From 244566cc3fcde45e555011c520ed7107b591663d Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 24 Jun 2024 18:24:57 +0300
Subject: viewer#1506 The Dynamic probe checkbox wasn't working

---
 indra/newview/llpanelvolume.cpp | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 16c38bf1f0..4e096ecc95 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -151,6 +151,7 @@ bool    LLPanelVolume::postBuild()
     {
         childSetCommitCallback("Reflection Probe", onCommitIsReflectionProbe, this);
         childSetCommitCallback("Probe Update Type", onCommitProbe, this);
+        childSetCommitCallback("Probe Dynamic", onCommitProbe, this);
         childSetCommitCallback("Probe Volume Type", onCommitProbe, this);
         childSetCommitCallback("Probe Ambiance", onCommitProbe, this);
         childSetCommitCallback("Probe Near Clip", onCommitProbe, this);
@@ -412,6 +413,7 @@ void LLPanelVolume::getState( )
         getChild<LLSpinCtrl>("Probe Ambiance", true)->clear();
         getChild<LLSpinCtrl>("Probe Near Clip", true)->clear();
         getChild<LLComboBox>("Probe Update Type", true)->clear();
+        getChild<LLUICtrl>("Probe Dynamic")->setValue(false);
     }
     else
     {
@@ -446,6 +448,7 @@ void LLPanelVolume::getState( )
         getChild<LLSpinCtrl>("Probe Ambiance", true)->setValue(volobjp->getReflectionProbeAmbiance());
         getChild<LLSpinCtrl>("Probe Near Clip", true)->setValue(volobjp->getReflectionProbeNearClip());
         getChild<LLComboBox>("Probe Update Type", true)->setValue(update_type);
+        getChild<LLUICtrl>("Probe Dynamic")->setValue(volobjp->getReflectionProbeIsDynamic());
     }
 
     // Animated Mesh
@@ -733,6 +736,7 @@ void LLPanelVolume::clearCtrls()
     getChildView("Reflection Probe")->setEnabled(false);;
     getChildView("Probe Volume Type")->setEnabled(false);
     getChildView("Probe Update Type")->setEnabled(false);
+    getChildView("Probe Dynamic")->setEnabled(false);
     getChildView("Probe Ambiance")->setEnabled(false);
     getChildView("Probe Near Clip")->setEnabled(false);
     getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(false);
@@ -1428,15 +1432,26 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
     volobjp->setReflectionProbeAmbiance((F32)self->getChild<LLUICtrl>("Probe Ambiance")->getValue().asReal());
     volobjp->setReflectionProbeNearClip((F32)self->getChild<LLUICtrl>("Probe Near Clip")->getValue().asReal());
 
-    std::string update_type = self->getChild<LLUICtrl>("Probe Update Type")->getValue().asString();
+    bool mirrors_enabled = LLPipeline::RenderMirrors;
+    bool is_mirror = false;
 
-    bool is_mirror = update_type.find("Mirror") != std::string::npos;
+    if (mirrors_enabled)
+    {
+        std::string update_type = self->getChild<LLUICtrl>("Probe Update Type")->getValue().asString();
 
-    self->getChildView("Probe Volume Type")->setEnabled(!is_mirror);
+        is_mirror = update_type.find("Mirror") != std::string::npos;
 
-    volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos);
-    volobjp->setReflectionProbeIsMirror(is_mirror);
+        volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos);
+        volobjp->setReflectionProbeIsMirror(is_mirror);
+    }
+    else
+    {
+        is_mirror = volobjp->getReflectionProbeIsMirror();
+        bool is_dynamic = self->getChild<LLUICtrl>("Probe Dynamic")->getValue().asBoolean();
+        volobjp->setReflectionProbeIsDynamic(is_dynamic);
+    }
 
+    self->getChildView("Probe Volume Type")->setEnabled(!is_mirror);
     self->getChildView("Probe Ambiance")->setEnabled(!is_mirror);
     self->getChildView("Probe Near Clip")->setEnabled(!is_mirror);
 
-- 
cgit v1.2.3


From 8804c019a817812828aa8b4602fd7af11c276478 Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Wed, 26 Jun 2024 20:38:51 +0200
Subject: Increase texture discard bias if system memory gets low

---
 indra/newview/app_settings/settings.xml | 22 +++++++++++++++
 indra/newview/lltextureview.cpp         |  2 --
 indra/newview/llviewertexture.cpp       | 48 +++++++++++++++++++++++++++------
 indra/newview/llviewertexture.h         |  1 +
 4 files changed, 63 insertions(+), 10 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 50632a7b07..e7e9fc5b88 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7716,6 +7716,28 @@
     <key>Value</key>
     <integer>0</integer>
   </map>
+  <key>RenderMinFreeMainMemoryThreshold</key>
+  <map>
+    <key>Comment</key>
+    <string>Minimum of available physical memory in MB before textures get scaled down</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>U32</string>
+    <key>Value</key>
+    <integer>512</integer>
+  </map>
+  <key>RenderLowMemMinDiscardIncrement</key>
+  <map>
+    <key>Comment</key>
+    <string>Minimum increment of discard level if system memory gets low</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>F32</string>
+    <key>Value</key>
+    <real>0.1</real>
+  </map>
   <key>RenderMaxTextureIndex</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index f521293b96..b51bcc5601 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -59,8 +59,6 @@
 #include "llvoavatarself.h"
 #include "lltexlayer.h"
 
-extern F32 texmem_lower_bound_scale;
-
 LLTextureView *gTextureView = NULL;
 
 #define HIGH_PRIORITY 100000000.f
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index c1062b9a01..c716eb4e86 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -101,6 +101,7 @@ U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
 bool LLViewerTexture::sFreezeImageUpdates = false;
 F32 LLViewerTexture::sCurrentTime = 0.0f;
 
+constexpr F32 MEMORY_CHECK_WAIT_TIME = 1.0f;
 constexpr F32 MIN_VRAM_BUDGET = 768.f;
 F32 LLViewerTexture::sFreeVRAMMegabytes = MIN_VRAM_BUDGET;
 
@@ -484,10 +485,6 @@ void LLViewerTexture::initClass()
     LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture();
 }
 
-// non-const (used externally
-F32 texmem_lower_bound_scale = 0.85f;
-F32 texmem_middle_bound_scale = 0.925f;
-
 //static
 void LLViewerTexture::updateClass()
 {
@@ -519,14 +516,49 @@ void LLViewerTexture::updateClass()
     sFreeVRAMMegabytes = target - used;
 
     F32 over_pct = llmax((used-target) / target, 0.f);
-    sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);
 
-    if (sDesiredDiscardBias > 1.f)
+    if (isSystemMemoryLow())
+    {
+        // System RAM is low -> ramp up discard bias over time to free memory
+        if (sEvaluationTimer.getElapsedTimeF32() > MEMORY_CHECK_WAIT_TIME)
+        {
+            static LLCachedControl<F32> low_mem_min_discard_increment(gSavedSettings, "RenderLowMemMinDiscardIncrement", .1f);
+            sDesiredDiscardBias += llmax(low_mem_min_discard_increment, over_pct);
+            sEvaluationTimer.reset();
+        }
+    }
+    else
     {
-        sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01;
+        sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);
+
+        if (sDesiredDiscardBias > 1.f)
+        {
+            sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01;
+        }
     }
 
-    LLViewerTexture::sFreezeImageUpdates = false; // sDesiredDiscardBias > (desired_discard_bias_max - 1.0f);
+    LLViewerTexture::sFreezeImageUpdates = false;
+}
+
+//static
+bool LLViewerTexture::isSystemMemoryLow()
+{
+    static LLFrameTimer timer;
+    static U32Megabytes physical_res = U32Megabytes(U32_MAX);
+
+    static LLCachedControl<U32> min_free_main_memory(gSavedSettings, "RenderMinFreeMainMemoryThreshold", 512);
+    const U32Megabytes MIN_FREE_MAIN_MEMORY(min_free_main_memory);
+
+    if (timer.getElapsedTimeF32() < MEMORY_CHECK_WAIT_TIME) //call this once per second.
+    {
+        return physical_res < MIN_FREE_MAIN_MEMORY;
+    }
+
+    timer.reset();
+
+    LLMemory::updateMemoryInfo();
+    physical_res = LLMemory::getAvailableMemKB();
+    return physical_res < MIN_FREE_MAIN_MEMORY;
 }
 
 //end of static functions
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index dc9182bf1b..9963626ada 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -117,6 +117,7 @@ protected:
 public:
     static void initClass();
     static void updateClass();
+    static bool isSystemMemoryLow();
 
     LLViewerTexture(bool usemipmaps = true);
     LLViewerTexture(const LLUUID& id, bool usemipmaps) ;
-- 
cgit v1.2.3


From ab87978cbc71cd4c83648627998055a010700f05 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 27 Jun 2024 13:12:43 -0500
Subject: 1836 dont store texture in system memory unless absolutely necessary
 (#1843)

* #1836 Texture memory usage overhaul.  Much decrufting
- don't keep a copy of textures in system memory
- use GPU to downrez textures instead of reloading from cache
- use GPU to generate brightness/darkness bumpmaps
---
 indra/llrender/llgltexture.cpp                     |  21 --
 indra/llrender/llgltexture.h                       |   6 +-
 indra/llrender/llimagegl.cpp                       | 260 +++++--------
 indra/llrender/llimagegl.h                         |  35 +-
 .../shaders/class1/deferred/normgenF.glsl          |  41 +-
 indra/newview/gltf/buffer_util.h                   |  10 +
 indra/newview/gltfscenemanager.cpp                 |   3 +-
 indra/newview/lldebugview.cpp                      |   6 +-
 indra/newview/lldrawpoolbump.cpp                   | 388 +++++--------------
 indra/newview/lldrawpoolbump.h                     |   5 +-
 indra/newview/llfloaterchangeitemthumbnail.cpp     |  22 +-
 indra/newview/lllocalbitmaps.cpp                   |   1 -
 indra/newview/llnetmap.cpp                         |  20 -
 indra/newview/llsurface.cpp                        | 169 +--------
 indra/newview/llsurface.h                          |  11 +-
 indra/newview/llsurfacepatch.cpp                   |   9 +-
 indra/newview/lltextureview.cpp                    |  65 +++-
 indra/newview/llviewermedia.cpp                    |  65 ++--
 indra/newview/llviewerobject.cpp                   |   4 +-
 indra/newview/llviewerregion.cpp                   |   6 +-
 indra/newview/llviewerregion.h                     |   2 +-
 indra/newview/llviewertexture.cpp                  | 312 ++--------------
 indra/newview/llviewertexture.h                    |  25 +-
 indra/newview/llviewertexturelist.cpp              |  24 +-
 indra/newview/llviewertexturelist.h                |  18 +-
 indra/newview/llviewerwindow.cpp                   | 134 +------
 indra/newview/llviewerwindow.h                     |   9 +-
 indra/newview/llvlcomposition.cpp                  | 412 +--------------------
 indra/newview/llvlcomposition.h                    |   2 -
 indra/newview/llvovolume.cpp                       |  36 +-
 indra/newview/llvowater.cpp                        |  15 +-
 indra/newview/llvowater.h                          |   3 -
 indra/newview/llworld.cpp                          |   2 -
 indra/newview/llworldmipmap.cpp                    |   1 +
 indra/newview/llworldmipmap.h                      |   6 +-
 35 files changed, 463 insertions(+), 1685 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp
index e614f45986..4dcca5a726 100644
--- a/indra/llrender/llgltexture.cpp
+++ b/indra/llrender/llgltexture.cpp
@@ -351,20 +351,6 @@ void LLGLTexture::forceUpdateBindStats(void) const
     return mGLTexturep->forceUpdateBindStats() ;
 }
 
-U32 LLGLTexture::getTexelsInAtlas() const
-{
-    llassert(mGLTexturep.notNull()) ;
-
-    return mGLTexturep->getTexelsInAtlas() ;
-}
-
-U32 LLGLTexture::getTexelsInGLTexture() const
-{
-    llassert(mGLTexturep.notNull()) ;
-
-    return mGLTexturep->getTexelsInGLTexture() ;
-}
-
 bool LLGLTexture::isGLTextureCreated() const
 {
     llassert(mGLTexturep.notNull()) ;
@@ -372,13 +358,6 @@ bool LLGLTexture::isGLTextureCreated() const
     return mGLTexturep->isGLTextureCreated() ;
 }
 
-S32  LLGLTexture::getDiscardLevelInAtlas() const
-{
-    llassert(mGLTexturep.notNull()) ;
-
-    return mGLTexturep->getDiscardLevelInAtlas() ;
-}
-
 void LLGLTexture::destroyGLTexture()
 {
     if(mGLTexturep.notNull() && mGLTexturep->getHasGLTexture())
diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index 0901243f8f..a7de20dc5c 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -51,10 +51,10 @@ public:
         BOOST_NONE          = 0,
         BOOST_AVATAR        ,
         BOOST_AVATAR_BAKED  ,
-        BOOST_SCULPTED      ,
         BOOST_TERRAIN       , // Needed for minimap generation for now. Lower than BOOST_HIGH so the texture stats don't get forced, i.e. texture stats are manually managed by minimap/terrain instead.
 
         BOOST_HIGH          = 10,
+        BOOST_SCULPTED      ,
         BOOST_BUMP          ,
         BOOST_UNUSED_1      , // Placeholder to avoid disrupting habits around texture debug
         BOOST_SELECTED      ,
@@ -75,7 +75,6 @@ public:
         AVATAR_SCRATCH_TEX,
         DYNAMIC_TEX,
         MEDIA,
-        ATLAS,
         OTHER,
         MAX_GL_IMAGE_CATEGORY
     };
@@ -156,10 +155,7 @@ public:
     bool       isJustBound()const ;
     void       forceUpdateBindStats(void) const;
 
-    U32        getTexelsInAtlas() const ;
-    U32        getTexelsInGLTexture() const ;
     bool       isGLTextureCreated() const ;
-    S32        getDiscardLevelInAtlas() const ;
     LLGLTextureState getTextureState() const { return mTextureState; }
 
     //---------------------------------------------------------------------------------------------
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 7e5cd628c1..956bcef352 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -41,6 +41,7 @@
 #include "llrender.h"
 #include "llwindow.h"
 #include "llframetimer.h"
+#include <unordered_set>
 
 extern LL_COMMON_API bool on_main_thread();
 
@@ -130,10 +131,9 @@ S32 LLImageGL::sCount                   = 0;
 
 bool LLImageGL::sGlobalUseAnisotropic   = false;
 F32 LLImageGL::sLastFrameTime           = 0.f;
-bool LLImageGL::sAllowReadBackRaw       = false ;
 LLImageGL* LLImageGL::sDefaultGLTexture = NULL ;
 bool LLImageGL::sCompressTextures = false;
-std::set<LLImageGL*> LLImageGL::sImageList;
+std::unordered_set<LLImageGL*> LLImageGL::sImageList;
 
 
 bool LLImageGLThread::sEnabledTextures = false;
@@ -150,6 +150,9 @@ S32 LLImageGL::sMaxCategories = 1 ;
 
 //optimization for when we don't need to calculate mIsMask
 bool LLImageGL::sSkipAnalyzeAlpha;
+U32  LLImageGL::sScratchPBO = 0;
+U32  LLImageGL::sScratchPBOSize = 0;
+
 
 //------------------------
 //****************************************************************************************************
@@ -159,20 +162,6 @@ bool LLImageGL::sSkipAnalyzeAlpha;
 //**************************************************************************************
 //below are functions for debug use
 //do not delete them even though they are not currently being used.
-void check_all_images()
-{
-    for (std::set<LLImageGL*>::iterator iter = LLImageGL::sImageList.begin();
-         iter != LLImageGL::sImageList.end(); iter++)
-    {
-        LLImageGL* glimage = *iter;
-        if (glimage->getTexName() && glimage->isGLTextureCreated())
-        {
-            gGL.getTexUnit(0)->bind(glimage) ;
-            glimage->checkTexSize() ;
-            gGL.getTexUnit(0)->unbind(glimage->getTarget()) ;
-        }
-    }
-}
 
 void LLImageGL::checkTexSize(bool forced) const
 {
@@ -252,6 +241,11 @@ void LLImageGL::initClass(LLWindow* window, S32 num_catagories, bool skip_analyz
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     sSkipAnalyzeAlpha = skip_analyze_alpha;
 
+    if (sScratchPBO == 0)
+    {
+        glGenBuffers(1, &sScratchPBO);
+    }
+
     if (thread_texture_loads || thread_media_updates)
     {
         LLImageGLThread::createInstance(window);
@@ -265,6 +259,12 @@ void LLImageGL::cleanupClass()
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     LLImageGLThread::deleteSingleton();
+    if (sScratchPBO != 0)
+    {
+        glDeleteBuffers(1, &sScratchPBO);
+        sScratchPBO = 0;
+        sScratchPBOSize = 0;
+    }
 }
 
 
@@ -360,66 +360,19 @@ void LLImageGL::updateStats(F32 current_time)
 //----------------------------------------------------------------------------
 
 //static
-void LLImageGL::destroyGL(bool save_state)
+void LLImageGL::destroyGL()
 {
     for (S32 stage = 0; stage < gGLManager.mNumTextureImageUnits; stage++)
     {
         gGL.getTexUnit(stage)->unbind(LLTexUnit::TT_TEXTURE);
     }
-
-    sAllowReadBackRaw = true ;
-    for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
-         iter != sImageList.end(); iter++)
-    {
-        LLImageGL* glimage = *iter;
-        if (glimage->mTexName)
-        {
-            if (save_state && glimage->isGLTextureCreated() && glimage->mComponents)
-            {
-                glimage->mSaveData = new LLImageRaw;
-                if(!glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false)) //necessary, keep it.
-                {
-                    glimage->mSaveData = NULL ;
-                }
-            }
-
-            glimage->destroyGLTexture();
-            stop_glerror();
-        }
-    }
-    sAllowReadBackRaw = false ;
-}
-
-//static
-void LLImageGL::restoreGL()
-{
-    for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
-         iter != sImageList.end(); iter++)
-    {
-        LLImageGL* glimage = *iter;
-        if(glimage->getTexName())
-        {
-            LL_ERRS() << "tex name is not 0." << LL_ENDL ;
-        }
-        if (glimage->mSaveData.notNull())
-        {
-            if (glimage->getComponents() && glimage->mSaveData->getComponents())
-            {
-                glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, true, glimage->getCategory());
-                stop_glerror();
-            }
-            glimage->mSaveData = NULL; // deletes data
-        }
-    }
 }
 
 //static
 void LLImageGL::dirtyTexOptions()
 {
-    for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
-         iter != sImageList.end(); iter++)
+    for (auto& glimage : sImageList)
     {
-        LLImageGL* glimage = *iter;
         glimage->mTexOptionsDirty = true;
         stop_glerror();
     }
@@ -542,10 +495,6 @@ void LLImageGL::init(bool usemipmaps)
     mHeight = 0;
     mCurrentDiscardLevel = -1;
 
-    mDiscardLevelInAtlas = -1 ;
-    mTexelsInAtlas = 0 ;
-    mTexelsInGLTexture = 0 ;
-
     mAllowCompression = true;
 
     mTarget = GL_TEXTURE_2D;
@@ -622,9 +571,6 @@ bool LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
             return false;
         }
 
-        // pickmask validity depends on old image size, delete it
-        freePickMask();
-
         mWidth = width;
         mHeight = height;
         mComponents = ncomponents;
@@ -1025,98 +971,6 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32
     return true;
 }
 
-bool LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
-{
-    //not compatible with core GL profile
-    llassert(!LLRender::sGLCoreProfile);
-
-    if (gGLManager.mIsDisabled)
-    {
-        LL_WARNS() << "Trying to create a texture while GL is disabled!" << LL_ENDL;
-        return false;
-    }
-    llassert(gGLManager.mInited);
-    stop_glerror();
-
-    if (discard_level < 0)
-    {
-        llassert(mCurrentDiscardLevel >= 0);
-        discard_level = mCurrentDiscardLevel;
-    }
-
-    // Actual image width/height = raw image width/height * 2^discard_level
-    S32 w = raw_image->getWidth() << discard_level;
-    S32 h = raw_image->getHeight() << discard_level;
-
-    // setSize may call destroyGLTexture if the size does not match
-    if (!setSize(w, h, raw_image->getComponents(), discard_level))
-    {
-        LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
-        return false;
-    }
-
-    if (!mHasExplicitFormat)
-    {
-        switch (mComponents)
-        {
-            case 1:
-                // Use luminance alpha (for fonts)
-                mFormatInternal = GL_LUMINANCE8;
-                mFormatPrimary  = GL_LUMINANCE;
-                mFormatType     = GL_UNSIGNED_BYTE;
-                break;
-            case 2:
-                // Use luminance alpha (for fonts)
-                mFormatInternal = GL_LUMINANCE8_ALPHA8;
-                mFormatPrimary  = GL_LUMINANCE_ALPHA;
-                mFormatType     = GL_UNSIGNED_BYTE;
-                break;
-            case 3:
-                mFormatInternal = GL_RGB8;
-                mFormatPrimary = GL_RGB;
-                mFormatType    = GL_UNSIGNED_BYTE;
-                break;
-            case 4:
-                mFormatInternal = GL_RGBA8;
-                mFormatPrimary = GL_RGBA;
-                mFormatType    = GL_UNSIGNED_BYTE;
-                break;
-            default:
-                LL_ERRS() << "Bad number of components for texture: " << (U32) getComponents() << LL_ENDL;
-        }
-    }
-
-    mCurrentDiscardLevel = discard_level;
-    mDiscardLevelInAtlas = discard_level;
-    mTexelsInAtlas = raw_image->getWidth() * raw_image->getHeight() ;
-    mLastBindTime = sLastFrameTime;
-    mGLTextureCreated = false ;
-
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, raw_image->getWidth());
-    stop_glerror();
-
-    if(mFormatSwapBytes)
-    {
-        glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
-        stop_glerror();
-    }
-
-    return true ;
-}
-
-void LLImageGL::postAddToAtlas()
-{
-    if(mFormatSwapBytes)
-    {
-        glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
-        stop_glerror();
-    }
-
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
-    gGL.getTexUnit(0)->setTextureFilteringOption(mFilterOption);
-    stop_glerror();
-}
-
 U32 type_width_from_pixtype(U32 pixtype)
 {
     U32 type_width = 0;
@@ -1752,7 +1606,6 @@ bool LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, bool data_
 
 
     mTextureMemory = (S64Bytes)getMipBytes(mCurrentDiscardLevel);
-    mTexelsInGLTexture = getWidth() * getHeight();
 
     // mark this as bound at this point, so we don't throw it out immediately
     mLastBindTime = sLastFrameTime;
@@ -1830,8 +1683,7 @@ void LLImageGL::syncTexName(LLGLuint texname)
 
 bool LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
 {
-    llassert_always(sAllowReadBackRaw) ;
-    //LL_ERRS() << "should not call this function!" << LL_ENDL ;
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
 
     if (discard_level < 0)
     {
@@ -2297,6 +2149,8 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
 //----------------------------------------------------------------------------
 U32 LLImageGL::createPickMask(S32 pWidth, S32 pHeight)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+    freePickMask();
     U32 pick_width = pWidth/2 + 1;
     U32 pick_height = pHeight/2 + 1;
 
@@ -2314,7 +2168,6 @@ U32 LLImageGL::createPickMask(S32 pWidth, S32 pHeight)
 //----------------------------------------------------------------------------
 void LLImageGL::freePickMask()
 {
-    // pickmask validity depends on old image size, delete it
     if (mPickMask != NULL)
     {
         delete [] mPickMask;
@@ -2352,16 +2205,16 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
         return ;
     }
 
-    freePickMask();
-
     if (mFormatType != GL_UNSIGNED_BYTE ||
         ((mFormatPrimary != GL_RGBA)
       && (mFormatPrimary != GL_SRGB_ALPHA)))
     {
         //cannot generate a pick mask for this texture
+        freePickMask();
         return;
     }
 
+
 #ifdef SHOW_ASSERT
     const U32 pickSize = createPickMask(width, height);
 #else // SHOW_ASSERT
@@ -2460,6 +2313,73 @@ void LLImageGL::resetCurTexSizebar()
     sCurTexSizeBar = -1 ;
     sCurTexPickSize = -1 ;
 }
+
+bool LLImageGL::scaleDown(S32 desired_discard)
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+
+    if (mTarget != GL_TEXTURE_2D)
+    {
+        return false;
+    }
+
+    desired_discard = llmin(desired_discard, mMaxDiscardLevel);
+
+    if (desired_discard <= mCurrentDiscardLevel)
+    {
+        return false;
+    }
+
+    S32 mip = desired_discard - mCurrentDiscardLevel;
+
+    S32 desired_width = getWidth(desired_discard);
+    S32 desired_height = getHeight(desired_discard);
+
+    U64 size = getBytes(desired_discard);
+    llassert(size <= 2048*2048*4); // we shouldn't be using this method to downscale huge textures, but it'll work
+    gGL.getTexUnit(0)->bind(this);
+
+
+    if (sScratchPBO == 0)
+    {
+        glGenBuffers(1, &sScratchPBO);
+        sScratchPBOSize = 0;
+    }
+
+    glBindBuffer(GL_PIXEL_PACK_BUFFER, sScratchPBO);
+
+    if (size > sScratchPBOSize)
+    {
+        glBufferData(GL_PIXEL_PACK_BUFFER, size, NULL, GL_STREAM_COPY);
+        sScratchPBOSize = size;
+    }
+
+    glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr);
+
+    free_tex_image(mTexName);
+
+    glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
+
+    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, sScratchPBO);
+    glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
+    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+
+    alloc_tex_image(desired_width, desired_height, mFormatPrimary);
+
+    if (mHasMipMaps)
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glGenerateMipmap");
+        glGenerateMipmap(mTarget);
+    }
+
+    gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+    mCurrentDiscardLevel = desired_discard;
+
+    return true;
+}
+
+
 //----------------------------------------------------------------------------
 #if LL_IMAGEGL_THREAD_CHECK
 void LLImageGL::checkActiveThread()
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 5c7a5ce821..3892e9c014 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -39,6 +39,7 @@
 #include "llrender.h"
 #include "threadpool.h"
 #include "workqueue.h"
+#include <unordered_set>
 
 #define LL_IMAGEGL_THREAD_CHECK 0 //set to 1 to enable thread debugging for ImageGL
 
@@ -83,9 +84,8 @@ public:
     // needs to be called every frame
     static void updateStats(F32 current_time);
 
-    // Save off / restore GL textures
-    static void destroyGL(bool save_state = true);
-    static void restoreGL();
+    // cleanup GL state
+    static void destroyGL();
     static void dirtyTexOptions();
 
     static bool checkSize(S32 width, S32 height);
@@ -148,6 +148,10 @@ public:
     S32  getDiscardLevel() const        { return mCurrentDiscardLevel; }
     S32  getMaxDiscardLevel() const     { return mMaxDiscardLevel; }
 
+    // override the current discard level
+    // should only be used for local textures where you know exactly what you're doing
+    void setDiscardLevel(S32 level) { mCurrentDiscardLevel = level; }
+
     S32  getCurrentWidth() const { return mWidth ;}
     S32  getCurrentHeight() const { return mHeight ;}
     S32  getWidth(S32 discard_level = -1) const;
@@ -194,26 +198,26 @@ public:
     void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
     LLTexUnit::eTextureFilterOptions getFilteringOption(void) const { return mFilterOption; }
 
-    LLGLenum getTexTarget()const { return mTarget ;}
-    S8       getDiscardLevelInAtlas()const {return mDiscardLevelInAtlas;}
-    U32      getTexelsInAtlas()const { return mTexelsInAtlas ;}
-    U32      getTexelsInGLTexture()const {return mTexelsInGLTexture;}
-
+    LLGLenum getTexTarget()const { return mTarget; }
 
     void init(bool usemipmaps);
     virtual void cleanup(); // Clean up the LLImageGL so it can be reinitialized.  Be careful when using this in derived class destructors
 
     void setNeedsAlphaAndPickMask(bool need_mask);
 
-    bool preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image);
-    void postAddToAtlas() ;
-
 #if LL_IMAGEGL_THREAD_CHECK
     // thread debugging
     std::thread::id mActiveThread;
     void checkActiveThread();
 #endif
 
+    // scale down to the desired discard level using GPU
+    // returns true if texture was scaled down
+    // desired discard will be clamped to max discard
+    // if desired discard is less than or equal to current discard, no scaling will occur
+    // only works for GL_TEXTURE_2D target
+    bool scaleDown(S32 desired_discard);
+
 public:
     // Various GL/Rendering options
     S64Bytes mTextureMemory;
@@ -240,15 +244,10 @@ private:
 
     bool     mGLTextureCreated ;
     LLGLuint mTexName;
-    //LLGLuint mNewTexName = 0; // tex name set by background thread to be applied in main thread
     U16      mWidth;
     U16      mHeight;
     S8       mCurrentDiscardLevel;
 
-    S8       mDiscardLevelInAtlas;
-    U32      mTexelsInAtlas ;
-    U32      mTexelsInGLTexture;
-
     bool mAllowCompression;
 
 protected:
@@ -275,7 +274,7 @@ protected:
 
     // STATICS
 public:
-    static std::set<LLImageGL*> sImageList;
+    static std::unordered_set<LLImageGL*> sImageList;
     static S32 sCount;
 
     static F32 sLastFrameTime;
@@ -301,6 +300,8 @@ public:
 private:
     static S32 sMaxCategories;
     static bool sSkipAnalyzeAlpha;
+    static U32 sScratchPBO;
+    static U32 sScratchPBOSize;
 
     //the flag to allow to call readBackRaw(...).
     //can be removed if we do not use that function at all.
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
index 902746366d..6d05d983f3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -25,24 +25,53 @@
 
 /*[EXTRA_CODE_HERE]*/
 
+
+
+// generate a normal map using an approximation of the old emboss bump map "brightness/darkness" technique
+// srcMap is a source color image, output should be a normal
+
 out vec4 frag_color;
 
-uniform sampler2D alphaMap;
+uniform sampler2D srcMap;
 
 in vec2 vary_texcoord0;
 
 uniform float stepX;
 uniform float stepY;
 uniform float norm_scale;
+uniform int bump_code;
+
+#define BE_BRIGHTNESS 1
+#define BE_DARKNESS 2
+
+// get luminance or inverse luminance depending on bump_code
+float getBumpValue(vec2 texcoord)
+{
+    vec3 c = texture(srcMap, texcoord).rgb;
+
+    vec3 WEIGHT = vec3(0.2995, 0.5875, 0.1145);
+
+    float l = dot(c, WEIGHT);
+
+    if (bump_code == BE_DARKNESS)
+    {
+        l = 1.0 - l;
+    }
+
+    return l;
+}
+
 
 void main()
 {
-    float c = texture(alphaMap, vary_texcoord0).r;
+    float c = getBumpValue(vary_texcoord0).r;
+
+    float scaler = 512.0;
 
-    vec3 right = vec3(norm_scale, 0, (texture(alphaMap, vary_texcoord0+vec2(stepX, 0)).r-c)*255);
-    vec3 left = vec3(-norm_scale, 0, (texture(alphaMap, vary_texcoord0-vec2(stepX, 0)).r-c)*255);
-    vec3 up = vec3(0, -norm_scale, (texture(alphaMap, vary_texcoord0-vec2(0, stepY)).r-c)*255);
-    vec3 down = vec3(0, norm_scale, (texture(alphaMap, vary_texcoord0+vec2(0, stepY)).r-c)*255);
+    vec3 right = vec3(norm_scale, 0, (getBumpValue(vary_texcoord0+vec2(stepX, 0)).r-c)*scaler);
+    vec3 left = vec3(-norm_scale, 0, (getBumpValue(vary_texcoord0-vec2(stepX, 0)).r-c)*scaler);
+    vec3 up = vec3(0, -norm_scale, (getBumpValue(vary_texcoord0-vec2(0, stepY)).r-c)*scaler);
+    vec3 down = vec3(0, norm_scale, (getBumpValue(vary_texcoord0+vec2(0, stepY)).r-c)*scaler);
 
     vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right);
 
diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h
index 40f9448aaf..89cedf4a47 100644
--- a/indra/newview/gltf/buffer_util.h
+++ b/indra/newview/gltf/buffer_util.h
@@ -180,6 +180,16 @@ namespace LL
             data[3] = src[3];
         }
 
+        template<>
+        inline void copyVec4<U8, U64>(U8* src, U64& dst)
+        {
+            U8* data = (U8*)&dst;
+            data[0] = src[0];
+            data[1] = src[1];
+            data[2] = src[2];
+            data[3] = src[3];
+        }
+
         template<>
         inline void copyVec4<U16, LLColor4U>(U16* src, LLColor4U& dst)
         {
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 7b2de4d6de..a0cbe9290c 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -144,7 +144,7 @@ void GLTFSceneManager::uploadSelection()
                 }
                 else
                 {
-                    raw = image.mTexture->getCachedRawImage();
+                    raw = image.mTexture->getRawImage();
                 }
 
                 if (raw.notNull())
@@ -339,6 +339,7 @@ void GLTFSceneManager::renderAlpha()
 
 void GLTFSceneManager::addGLTFObject(LLViewerObject* obj, LLUUID gltf_id)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_GLTF;
     llassert(obj->getVolume()->getParams().getSculptID() == gltf_id);
     llassert(obj->getVolume()->getParams().getSculptType() == LL_SCULPT_TYPE_GLTF);
 
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index b88d11886a..0596a8fe7d 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -105,10 +105,7 @@ void LLDebugView::init()
     addChild(gSceneMonitorView);
     gSceneMonitorView->setRect(rect);
 
-    r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
-                                     (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
-
-    r.set(150, rect.getHeight() - 50, 820, 100);
+    r.set(150, rect.getHeight() - 60, 820, 110);
     LLTextureView::Params tvp;
     tvp.name("gTextureView");
     tvp.rect(r);
@@ -116,7 +113,6 @@ void LLDebugView::init()
     tvp.visible(false);
     gTextureView = LLUICtrlFactory::create<LLTextureView>(tvp);
     addChild(gTextureView);
-    //gTextureView->reshape(r.getWidth(), r.getHeight(), true);
 }
 
 void LLDebugView::draw()
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 055f99d764..7289e95b6e 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -79,11 +79,6 @@ static S32 diffuse_channel = -1;
 static S32 bump_channel = -1;
 static bool shiny = false;
 
-// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an
-// LLAtomicBool; this should work just fine, now. HB
-#define LL_BUMPLIST_MULTITHREADED 1
-
-
 // static
 void LLStandardBumpmap::shutdown()
 {
@@ -764,24 +759,21 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
     llassert( (bump_code == BE_BRIGHTNESS) || (bump_code == BE_DARKNESS) );
 
-    LLViewerTexture* bump = NULL;
+    LLViewerTexture* bump = nullptr;
 
-    bump_image_map_t* entries_list = NULL;
-    void (*callback_func)( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) = NULL;
+    bump_image_map_t* entries_list = nullptr;
 
     switch( bump_code )
     {
     case BE_BRIGHTNESS:
         entries_list = &mBrightnessEntries;
-        callback_func = LLBumpImageList::onSourceBrightnessLoaded;
         break;
     case BE_DARKNESS:
         entries_list = &mDarknessEntries;
-        callback_func = LLBumpImageList::onSourceDarknessLoaded;
         break;
     default:
         llassert(0);
-        return NULL;
+        return nullptr;
     }
 
     bump_image_map_t::iterator iter = entries_list->find(src_image->getID());
@@ -789,51 +781,18 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
     {
         bump = iter->second;
     }
-    else
-    {
-        (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( true );
-        bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image
-    }
-
-    if (!src_image->hasCallbacks())
-    { //if image has no callbacks but resolutions don't match, trigger raw image loaded callback again
-        if (src_image->getWidth() != bump->getWidth() ||
-            src_image->getHeight() != bump->getHeight())// ||
-            //(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
-        {
-            src_image->setBoostLevel(LLGLTexture::BOOST_BUMP) ;
-            src_image->setLoadedCallback( callback_func, 0, true, false, new LLUUID(src_image->getID()), NULL );
-            src_image->forceToSaveRawImage(0) ;
-        }
-    }
-
-    return bump;
-}
-
 
-// static
-void LLBumpImageList::onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-    LLUUID* source_asset_id = (LLUUID*)userdata;
-    LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_BRIGHTNESS );
-    if( final )
+    if (bump == nullptr ||
+        src_image->getWidth() != bump->getWidth() ||
+        src_image->getHeight() != bump->getHeight())
     {
-        delete source_asset_id;
+        onSourceUpdated(src_image, (EBumpEffect) bump_code);
     }
-}
 
-// static
-void LLBumpImageList::onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata )
-{
-    LLUUID* source_asset_id = (LLUUID*)userdata;
-    LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_DARKNESS );
-    if( final )
-    {
-        delete source_asset_id;
-    }
+    return (*entries_list)[src_image->getID()];
 }
 
+
 void LLBumpImageList::onSourceStandardLoaded( bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata)
 {
     if (success && LLPipeline::sRenderDeferred)
@@ -909,289 +868,108 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
 }
 
 // static
-void LLBumpImageList::onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
+void LLBumpImageList::onSourceUpdated(LLViewerTexture* src, EBumpEffect bump_code)
 {
-    LL_PROFILE_ZONE_SCOPED;
-
-    if( success )
-    {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-
-        LLImageDataSharedLock lock(src);
-
-        bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
-        bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
-
-        {
-            if (iter == entries_list.end() ||
-                iter->second.isNull() ||
-                            iter->second->getWidth() != src->getWidth() ||
-                            iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
-            { //make sure an entry exists for this image
-                entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture(true);
-                iter = entries_list.find(src_vi->getID());
-            }
-        }
-
-        if (iter->second->getWidth() != src->getWidth() ||
-            iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
-        {
-            LLPointer<LLImageRaw> dst_image = new LLImageRaw(src->getWidth(), src->getHeight(), 1);
-            U8* dst_data = dst_image->getData();
-            S32 dst_data_size = dst_image->getDataSize();
-
-            const U8* src_data = src->getData();
-            S32 src_data_size = src->getDataSize();
-
-            S32 src_components = src->getComponents();
-
-            // Convert to luminance and then scale and bias that to get ready for
-            // embossed bump mapping.  (0-255 maps to 127-255)
-
-            // Convert to fixed point so we don't have to worry about precision/clamping.
-            const S32 FIXED_PT = 8;
-            const S32 R_WEIGHT = S32(0.2995f * (1<<FIXED_PT));
-            const S32 G_WEIGHT = S32(0.5875f * (1<<FIXED_PT));
-            const S32 B_WEIGHT = S32(0.1145f * (1<<FIXED_PT));
-
-            S32 minimum = 255;
-            S32 maximum = 0;
-
-            switch( src_components )
-            {
-            case 1:
-            case 2:
-                {
-                    if( src_data_size == dst_data_size * src_components )
-                    {
-                        for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
-                        {
-                            dst_data[i] = src_data[j];
-                            if( dst_data[i] < minimum )
-                            {
-                                minimum = dst_data[i];
-                            }
-                            if( dst_data[i] > maximum )
-                            {
-                                maximum = dst_data[i];
-                            }
-                        }
-                    }
-                    else
-                    {
-                        llassert(0);
-                        dst_image->clear();
-                    }
-                }
-                break;
-            case 3:
-            case 4:
-                {
-                    if( src_data_size == dst_data_size * src_components )
-                    {
-                        for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
-                        {
-                            // RGB to luminance
-                            dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
-                            //llassert( dst_data[i] <= 255 );true because it's 8bit
-                            if( dst_data[i] < minimum )
-                            {
-                                minimum = dst_data[i];
-                            }
-                            if( dst_data[i] > maximum )
-                            {
-                                maximum = dst_data[i];
-                            }
-                        }
-                    }
-                    else
-                    {
-                        llassert(0);
-                        dst_image->clear();
-                    }
-                }
-                break;
-            default:
-                llassert(0);
-                dst_image->clear();
-                break;
-            }
-
-            if( maximum > minimum )
-            {
-                U8 bias_and_scale_lut[256];
-                F32 twice_one_over_range = 2.f / (maximum - minimum);
-                S32 i;
-
-                const F32 ARTIFICIAL_SCALE = 2.f;  // Advantage: exaggerates the effect in midrange.  Disadvantage: clamps at the extremes.
-                if (BE_DARKNESS == bump_code)
-                {
-                    for( i = minimum; i <= maximum; i++ )
-                    {
-                        F32 minus_one_to_one = F32(maximum - i) * twice_one_over_range - 1.f;
-                        bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
-                    }
-                }
-                else
-                {
-                    for( i = minimum; i <= maximum; i++ )
-                    {
-                        F32 minus_one_to_one = F32(i - minimum) * twice_one_over_range - 1.f;
-                        bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
-                    }
-                }
-
-                for( i = 0; i < dst_data_size; i++ )
-                {
-                    dst_data[i] = bias_and_scale_lut[dst_data[i]];
-                }
-            }
-
-            //---------------------------------------------------
-            // immediately assign bump to a smart pointer in case some local smart pointer
-            // accidentally releases it.
-            LLPointer<LLViewerTexture> bump = iter->second;
-
-            if (!LLPipeline::sRenderDeferred)
-            {
-                bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
-
-#if LL_BUMPLIST_MULTITHREADED
-                auto tex_queue = LLImageGLThread::sEnabledTextures ? sTexUpdateQueue.lock() : nullptr;
-
-                if (tex_queue)
-                { //dispatch creation to background thread
-                    LLImageRaw* dst_ptr = dst_image;
-                    LLViewerTexture* bump_ptr = bump;
-                    dst_ptr->ref();
-                    bump_ptr->ref();
-                    tex_queue->post(
-                        [=]()
-                        {
-                            LL_PROFILE_ZONE_NAMED("bil - create texture");
-                            bump_ptr->createGLTexture(0, dst_ptr);
-                            bump_ptr->unref();
-                            dst_ptr->unref();
-                        });
-
-                }
-                else
-#endif
-                {
-                    bump->createGLTexture(0, dst_image);
-                }
-            }
-            else
-            { //convert to normal map
-                LL_PROFILE_ZONE_NAMED("bil - create normal map");
-                LLImageGL* img = bump->getGLTexture();
-                LLImageRaw* dst_ptr = dst_image.get();
-                LLGLTexture* bump_ptr = bump.get();
-
-                dst_ptr->ref();
-                img->ref();
-                bump_ptr->ref();
-                auto create_func = [=]()
-                {
-                    img->setUseMipMaps(true);
-                    // upload dst_image to GPU (greyscale in red channel)
-                    img->setExplicitFormat(GL_RED, GL_RED);
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
 
-                    bump_ptr->createGLTexture(0, dst_ptr);
-                    dst_ptr->unref();
-                };
+    const LLUUID& src_id = src->getID();
 
-                auto generate_func = [=]()
-                {
-                    // Allocate an empty RGBA texture at "tex_name" the same size as bump
-                    //  Note: bump will still point at GPU copy of dst_image
-                    bump_ptr->setExplicitFormat(GL_RGBA, GL_RGBA);
-                    LLGLuint tex_name;
-                    img->createGLTexture(0, nullptr, false, 0, true, &tex_name);
+    bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries);
+    bump_image_map_t::iterator iter = entries_list.find(src_id);
 
-                    // point render target at empty buffer
-                    sRenderTarget.setColorAttachment(img, tex_name);
+    if (iter == entries_list.end())
+    { //make sure an entry exists for this image
+        entries_list[src_id] = LLViewerTextureManager::getLocalTexture(true);
+        iter = entries_list.find(src_id);
+    }
 
-                    // generate normal map in empty texture
-                    {
-                        sRenderTarget.bindTarget();
+    //---------------------------------------------------
+    // immediately assign bump to a smart pointer in case some local smart pointer
+    // accidentally releases it.
+    LLPointer<LLViewerTexture> bump = iter->second;
 
-                        LLGLDepthTest depth(GL_FALSE);
-                        LLGLDisable cull(GL_CULL_FACE);
-                        LLGLDisable blend(GL_BLEND);
-                        gGL.setColorMask(true, true);
+    if (bump->getWidth() != src->getWidth() ||
+        bump->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
+    {
+        //convert to normal map
+        LL_PROFILE_ZONE_NAMED("bil - create normal map");
 
-                        gNormalMapGenProgram.bind();
+        bump->setExplicitFormat(GL_RGBA, GL_RGBA);
 
-                        static LLStaticHashedString sNormScale("norm_scale");
-                        static LLStaticHashedString sStepX("stepX");
-                        static LLStaticHashedString sStepY("stepY");
+        LLImageGL* src_img = src->getGLTexture();
+        LLImageGL* dst_img = bump->getGLTexture();
+        dst_img->setSize(src->getWidth(), src->getHeight(), 4, 0);
+        dst_img->setUseMipMaps(true);
+        dst_img->setDiscardLevel(0);
+        dst_img->createGLTexture();
 
-                        gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
-                        gNormalMapGenProgram.uniform1f(sStepX, 1.f / bump_ptr->getWidth());
-                        gNormalMapGenProgram.uniform1f(sStepY, 1.f / bump_ptr->getHeight());
+        gGL.getTexUnit(0)->bind(bump);
 
-                        gGL.getTexUnit(0)->bind(bump_ptr);
+        LLImageGL::setManualImage(GL_TEXTURE_2D, 0, dst_img->getPrimaryFormat(), dst_img->getWidth(), dst_img->getHeight(), GL_RGBA, GL_UNSIGNED_BYTE, nullptr, false);
 
-                        gGL.begin(LLRender::TRIANGLE_STRIP);
-                        gGL.texCoord2f(0, 0);
-                        gGL.vertex2f(0, 0);
+        LLGLuint tex_name = dst_img->getTexName();
+        // point render target at empty buffer
+        sRenderTarget.setColorAttachment(bump->getGLTexture(), tex_name);
 
-                        gGL.texCoord2f(0, 1);
-                        gGL.vertex2f(0, 1);
+        // generate normal map in empty texture
+        {
+            sRenderTarget.bindTarget();
 
-                        gGL.texCoord2f(1, 0);
-                        gGL.vertex2f(1, 0);
+            LLGLDepthTest depth(GL_FALSE);
+            LLGLDisable cull(GL_CULL_FACE);
+            LLGLDisable blend(GL_BLEND);
+            gGL.setColorMask(true, true);
 
-                        gGL.texCoord2f(1, 1);
-                        gGL.vertex2f(1, 1);
+            LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+            gNormalMapGenProgram.bind();
 
-                        gGL.end();
+            static LLStaticHashedString sNormScale("norm_scale");
+            static LLStaticHashedString sStepX("stepX");
+            static LLStaticHashedString sStepY("stepY");
+            static LLStaticHashedString sBumpCode("bump_code");
 
-                        gGL.flush();
+            gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
+            gNormalMapGenProgram.uniform1f(sStepX, 1.f / bump->getWidth());
+            gNormalMapGenProgram.uniform1f(sStepY, 1.f / bump->getHeight());
+            gNormalMapGenProgram.uniform1i(sBumpCode, bump_code);
 
-                        gNormalMapGenProgram.unbind();
+            gGL.getTexUnit(0)->bind(src);
 
-                        sRenderTarget.flush();
-                        sRenderTarget.releaseColorAttachment();
-                    }
+            gGL.begin(LLRender::TRIANGLE_STRIP);
+            gGL.texCoord2f(0, 0);
+            gGL.vertex2f(0, 0);
 
-                    // point bump at normal map and free gpu copy of dst_image
-                    img->syncTexName(tex_name);
+            gGL.texCoord2f(0, 1);
+            gGL.vertex2f(0, 1);
 
-                    // generate mipmap
-                    gGL.getTexUnit(0)->bind(img);
-                    glGenerateMipmap(GL_TEXTURE_2D);
-                    gGL.getTexUnit(0)->disable();
+            gGL.texCoord2f(1, 0);
+            gGL.vertex2f(1, 0);
 
-                    bump_ptr->unref();
-                    img->unref();
-                };
+            gGL.texCoord2f(1, 1);
+            gGL.vertex2f(1, 1);
 
-#if LL_BUMPLIST_MULTITHREADED
-                auto main_queue = LLImageGLThread::sEnabledTextures ? sMainQueue.lock() : nullptr;
+            gGL.end();
 
-                if (main_queue)
-                { //dispatch texture upload to background thread, issue GPU commands to generate normal map on main thread
-                    main_queue->postTo(
-                        sTexUpdateQueue,
-                        create_func,
-                        generate_func);
-                }
-                else
-#endif
-                { // immediate upload texture and generate normal map
-                    create_func();
-                    generate_func();
-                }
+            gGL.flush();
 
+            sRenderTarget.flush();
+            sRenderTarget.releaseColorAttachment();
 
+            if (shader)
+            {
+                shader->bind();
             }
-
-            iter->second = bump; // derefs (and deletes) old image
-            //---------------------------------------------------
         }
+
+        // generate mipmap
+        gGL.getTexUnit(0)->bind(bump);
+        glGenerateMipmap(GL_TEXTURE_2D);
+        gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
     }
+
+    iter->second = bump; // derefs (and deletes) old image
+    //---------------------------------------------------
+
 }
 
 void LLDrawPoolBump::pushBumpBatches(U32 type)
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index 65cb9af015..15976884ca 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -140,14 +140,13 @@ public:
     LLViewerTexture*    getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code);
     void        addTextureStats(U8 bump, const LLUUID& base_image_id, F32 virtual_size);
 
-    static void onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
-    static void onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
     static void onSourceStandardLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata );
     static void generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nrm_image);
 
 
 private:
-    static void onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump );
+    // should be called whenever resolution of src_vi changes compared to the current entry
+    static void onSourceUpdated( LLViewerTexture *src_vi, EBumpEffect bump );
 
 private:
     typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t;
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index 3e2e7cb7a3..fb31361fd9 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -951,8 +951,8 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
             || texturep->getFullWidth() == 0)
         {
             if (texturep->isFullyLoaded()
-                && (texturep->getCachedRawImageLevel() == 0 || texturep->getRawImageLevel() == 0)
-                && (texturep->isCachedRawImageReady() || texturep->isRawImageValid()))
+                && (texturep->getRawImageLevel() == 0)
+                && (texturep->isRawImageValid()))
             {
                 LLUUID task_id = mTaskId;
                 uuid_set_t inventory_ids = mItemList;
@@ -962,20 +962,10 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit()
                     {
                         onUploadComplete(asset_id, task_id, inventory_ids, handle);
                     };
-                if (texturep->isRawImageValid())
-                {
-                    LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getRawImage(),
-                                                             *mItemList.begin(),
-                                                             mTaskId,
-                                                             callback);
-                }
-                else
-                {
-                    LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getCachedRawImage(),
-                                                             *mItemList.begin(),
-                                                             mTaskId,
-                                                             callback);
-                }
+                LLFloaterSimpleSnapshot::uploadThumbnail(texturep->getRawImage(),
+                                                            *mItemList.begin(),
+                                                            mTaskId,
+                                                            callback);
             }
             else
             {
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 6ab5e05b7d..0e2b3cb409 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -215,7 +215,6 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
                         ("file://"+mFilename, FTT_LOCAL_FILE, mWorldID, LL_LOCAL_USE_MIPMAPS);
 
                     texture->createGLTexture(LL_LOCAL_DISCARD_LEVEL, raw_image);
-                    texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image);
                     texture->ref();
 
                     gTextureList.addImage(texture, TEX_LIST_STANDARD);
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 1410232a0f..fd968d9027 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -296,8 +296,6 @@ void LLNetMap::draw()
                 gGL.color4f(1.f, 0.5f, 0.5f, 1.f);
             }
 
-
-
             // Draw using texture.
             gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture());
             gGL.begin(LLRender::QUADS);
@@ -311,24 +309,6 @@ void LLNetMap::draw()
                 gGL.vertex2f(right, top);
             gGL.end();
 
-            // Draw water
-            gGL.flush();
-            {
-                if (regionp->getLand().getWaterTexture())
-                {
-                    gGL.getTexUnit(0)->bind(regionp->getLand().getWaterTexture());
-                    gGL.begin(LLRender::QUADS);
-                        gGL.texCoord2f(0.f, 1.f);
-                        gGL.vertex2f(left, top);
-                        gGL.texCoord2f(0.f, 0.f);
-                        gGL.vertex2f(left, bottom);
-                        gGL.texCoord2f(1.f, 0.f);
-                        gGL.vertex2f(right, bottom);
-                        gGL.texCoord2f(1.f, 1.f);
-                        gGL.vertex2f(right, top);
-                    gGL.end();
-                }
-            }
             gGL.flush();
         }
 
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index e6bced5c92..1826885069 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -54,6 +54,7 @@
 #include "llglheaders.h"
 #include "lldrawpoolterrain.h"
 #include "lldrawable.h"
+#include "llworldmipmap.h"
 
 extern LLPipeline gPipeline;
 extern bool gShiftFrame;
@@ -74,7 +75,6 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) :
     mDetailTextureScale(0.f),
     mOriginGlobal(0.0, 0.0, 0.0),
     mSTexturep(NULL),
-    mWaterTexturep(NULL),
     mGridsPerPatchEdge(0),
     mMetersPerGrid(1.0f),
     mMetersPerEdge(1.0f),
@@ -129,14 +129,7 @@ LLSurface::~LLSurface()
     {
         gPipeline.removePool(poolp);
         // Don't enable this until we blitz the draw pool for it as well.  -- djs
-        if (mSTexturep)
-        {
-            mSTexturep = NULL;
-        }
-        if (mWaterTexturep)
-        {
-            mWaterTexturep = NULL;
-        }
+        mSTexturep = NULL;
     }
     else
     {
@@ -216,62 +209,17 @@ LLViewerTexture* LLSurface::getSTexture()
     return mSTexturep;
 }
 
-LLViewerTexture* LLSurface::getWaterTexture()
-{
-    if (mWaterTexturep.notNull() && !mWaterTexturep->hasGLTexture())
-    {
-        createWaterTexture();
-    }
-    return mWaterTexturep;
-}
-
 void LLSurface::createSTexture()
 {
     if (!mSTexturep)
     {
-        // Fill with dummy gray data.
-        // GL NOT ACTIVE HERE
-        LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize, sTextureSize, 3);
-        U8 *default_texture = raw->getData();
-        for (S32 i = 0; i < sTextureSize; i++)
-        {
-            for (S32 j = 0; j < sTextureSize; j++)
-            {
-                *(default_texture + (i*sTextureSize + j)*3) = 128;
-                *(default_texture + (i*sTextureSize + j)*3 + 1) = 128;
-                *(default_texture + (i*sTextureSize + j)*3 + 2) = 128;
-            }
-        }
+        U64 handle = mRegionp->getHandle();
 
-        mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
-        mSTexturep->dontDiscard();
-        gGL.getTexUnit(0)->bind(mSTexturep);
-        mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
-    }
-}
+        U32 grid_x, grid_y;
 
-void LLSurface::createWaterTexture()
-{
-    if (!mWaterTexturep)
-    {
-        // Create the water texture
-        LLPointer<LLImageRaw> raw = new LLImageRaw(sTextureSize/2, sTextureSize/2, 4);
-        U8 *default_texture = raw->getData();
-        for (S32 i = 0; i < sTextureSize/2; i++)
-        {
-            for (S32 j = 0; j < sTextureSize/2; j++)
-            {
-                *(default_texture + (i*sTextureSize/2 + j)*4) = MAX_WATER_COLOR.mV[0];
-                *(default_texture + (i*sTextureSize/2 + j)*4 + 1) = MAX_WATER_COLOR.mV[1];
-                *(default_texture + (i*sTextureSize/2 + j)*4 + 2) = MAX_WATER_COLOR.mV[2];
-                *(default_texture + (i*sTextureSize/2 + j)*4 + 3) = MAX_WATER_COLOR.mV[3];
-            }
-        }
+        grid_from_region_handle(handle, &grid_x, &grid_y);
 
-        mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false);
-        mWaterTexturep->dontDiscard();
-        gGL.getTexUnit(0)->bind(mWaterTexturep);
-        mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
+        mSTexturep = LLWorldMipmap::loadObjectsTile(grid_x, grid_y, 1);
     }
 }
 
@@ -285,11 +233,10 @@ void LLSurface::initTextures()
 
     ///////////////////////
     //
-    // Water texture
+    // Water object
     //
     if (gSavedSettings.getBOOL("RenderWater") )
     {
-        createWaterTexture();
         mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
         gPipeline.createObject(mWaterObjp);
         LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
@@ -683,11 +630,8 @@ bool LLSurface::idleUpdate(F32 max_update_time)
         }
     }
 
-    if (did_update)
-    {
-        // some patches changed, update region reflection probes
-        mRegionp->updateReflectionProbes();
-    }
+    // some patches changed, update region reflection probes
+    mRegionp->updateReflectionProbes(did_update);
 
     return did_update;
 }
@@ -1221,98 +1165,3 @@ F32 LLSurface::getWaterHeight() const
     }
 }
 
-
-bool LLSurface::generateWaterTexture(const F32 x, const F32 y,
-                                     const F32 width, const F32 height)
-{
-    LL_PROFILE_ZONE_SCOPED
-    if (!getWaterTexture())
-    {
-        return false;
-    }
-
-    S32 tex_width = mWaterTexturep->getWidth();
-    S32 tex_height = mWaterTexturep->getHeight();
-    S32 tex_comps = mWaterTexturep->getComponents();
-    S32 tex_stride = tex_width * tex_comps;
-    LLPointer<LLImageRaw> raw = new LLImageRaw(tex_width, tex_height, tex_comps);
-    U8 *rawp = raw->getData();
-
-    F32 scale = 256.f * getMetersPerGrid() / (F32)tex_width;
-    F32 scale_inv = 1.f / scale;
-
-    S32 x_begin, y_begin, x_end, y_end;
-
-    x_begin = ll_round(x * scale_inv);
-    y_begin = ll_round(y * scale_inv);
-    x_end = ll_round((x + width) * scale_inv);
-    y_end = ll_round((y + width) * scale_inv);
-
-    if (x_end > tex_width)
-    {
-        x_end = tex_width;
-    }
-    if (y_end > tex_width)
-    {
-        y_end = tex_width;
-    }
-
-    // OK, for now, just have the composition value equal the height at the point.
-    LLVector3 location;
-    LLColor4U coloru;
-
-    const F32 WATER_HEIGHT = getWaterHeight();
-
-    S32 i, j, offset;
-    for (j = y_begin; j < y_end; j++)
-    {
-        for (i = x_begin; i < x_end; i++)
-        {
-            //F32 nv[2];
-            //nv[0] = i/256.f;
-            //nv[1] = j/256.f;
-            // const S32 modulation = noise2(nv)*40;
-            offset = j*tex_stride + i*tex_comps;
-            location.mV[VX] = i*scale;
-            location.mV[VY] = j*scale;
-
-            // Sample multiple points
-            const F32 height = resolveHeightRegion(location);
-
-            if (height > WATER_HEIGHT)
-            {
-                // Above water...
-                coloru = MAX_WATER_COLOR;
-                coloru.mV[3] = ABOVE_WATERLINE_ALPHA;
-                *(rawp + offset++) = coloru.mV[0];
-                *(rawp + offset++) = coloru.mV[1];
-                *(rawp + offset++) = coloru.mV[2];
-                *(rawp + offset++) = coloru.mV[3];
-            }
-            else
-            {
-                // Want non-linear curve for transparency gradient
-                coloru = MAX_WATER_COLOR;
-                const F32 frac = 1.f - 2.f/(2.f - (height - WATER_HEIGHT));
-                S32 alpha = 64 + ll_round((255-64)*frac);
-
-                alpha = llmin(ll_round((F32)MAX_WATER_COLOR.mV[3]), alpha);
-                alpha = llmax(64, alpha);
-
-                coloru.mV[3] = alpha;
-                *(rawp + offset++) = coloru.mV[0];
-                *(rawp + offset++) = coloru.mV[1];
-                *(rawp + offset++) = coloru.mV[2];
-                *(rawp + offset++) = coloru.mV[3];
-            }
-        }
-    }
-
-    if (!mWaterTexturep->hasGLTexture())
-    {
-        mWaterTexturep->createGLTexture(0, raw);
-    }
-
-    mWaterTexturep->setSubImage(raw, x_begin, y_begin, x_end - x_begin, y_end - y_begin);
-    return true;
-}
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 324296a4d3..68295225b6 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -128,7 +128,7 @@ public:
     F32 getWaterHeight() const;
 
     LLViewerTexture *getSTexture();
-    LLViewerTexture *getWaterTexture();
+
     bool hasZData() const                           { return mHasZData; }
 
     void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters
@@ -171,19 +171,11 @@ public:
 
 protected:
     void createSTexture();
-    void createWaterTexture();
     void initTextures();
-    void initWater();
-
 
     void createPatchData();     // Allocates memory for patches.
     void destroyPatchData();    // Deallocates memory for patches.
 
-    bool generateWaterTexture(const F32 x, const F32 y,
-                        const F32 width, const F32 height);     // Generate texture from composition values.
-
-    //F32 updateTexture(LLSurfacePatch *ppatch);
-
     LLSurfacePatch *getPatch(const S32 x, const S32 y) const;
 
 protected:
@@ -201,7 +193,6 @@ protected:
 
     // The textures should never be directly initialized - use the setter methods!
     LLPointer<LLViewerTexture> mSTexturep;      // Texture for surface
-    LLPointer<LLViewerTexture> mWaterTexturep;  // Water texture
 
     LLPointer<LLVOWater>    mWaterObjp;
 
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 042d770550..2a21170b07 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -906,15 +906,8 @@ void LLSurfacePatch::updateGL()
 
     updateCompositionStats();
     F32 tex_patch_size = meters_per_grid*grids_per_patch_edge;
-    if (comp->generateMinimapTileLand((F32)origin_region[VX], (F32)origin_region[VY],
-                              tex_patch_size, tex_patch_size))
-    {
-        mSTexUpdate = false;
 
-        // Also generate the water texture
-        mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY],
-                                        tex_patch_size, tex_patch_size);
-    }
+    mSTexUpdate = false;
 }
 
 void LLSurfacePatch::dirtyZ()
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index b51bcc5601..9d7319d5b8 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -461,7 +461,7 @@ public:
         :   texture_view("texture_view")
         {
             S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
-            changeDefault(rect, LLRect(0,0,100,line_height * 4));
+            changeDefault(rect, LLRect(0,0,0,line_height * 7));
         }
     };
 
@@ -492,19 +492,51 @@ void LLGLTexMemBar::draw()
     U32 total_objects = gObjectList.getNumObjects();
     F32 x_right = 0.0;
 
+    U32 image_count = gTextureList.getNumImages();
+    U32 raw_image_count = 0;
+    U64 raw_image_bytes = 0;
+
+    U32 saved_raw_image_count = 0;
+    U64 saved_raw_image_bytes = 0;
+
+    U32 aux_raw_image_count = 0;
+    U64 aux_raw_image_bytes = 0;
+
+    for (auto& image : gTextureList)
+    {
+        const LLImageRaw* raw_image = image->getRawImage();
+
+        if (raw_image)
+        {
+            raw_image_count++;
+            raw_image_bytes += raw_image->getDataSize();
+        }
+
+        raw_image = image->getSavedRawImage();
+        if (raw_image)
+        {
+            saved_raw_image_count++;
+            saved_raw_image_bytes += raw_image->getDataSize();
+        }
+
+        raw_image = image->getAuxRawImage();
+        if (raw_image)
+        {
+            aux_raw_image_count++;
+            aux_raw_image_bytes += raw_image->getDataSize();
+        }
+    }
+
+   F64 raw_image_bytes_MB = raw_image_bytes / (1024.0 * 1024.0);
+   F64 saved_raw_image_bytes_MB = saved_raw_image_bytes / (1024.0 * 1024.0);
+   F64 aux_raw_image_bytes_MB = aux_raw_image_bytes / (1024.0 * 1024.0);
+
     //----------------------------------------------------------------------------
     LLGLSUIDefault gls_ui;
     LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
     LLColor4 color;
 
-    // Gray background using completely magic numbers
-    gGL.color4f(0.f, 0.f, 0.f, 0.25f);
-    // const LLRect & rect(getRect());
-    // gl_rect_2d(-4, v_offset, rect.mRight - rect.mLeft + 2, v_offset + line_height*4);
-
     std::string text = "";
-    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
-                                             text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
     LLTrace::Recording& recording = LLViewerStats::instance().getRecording();
 
@@ -525,6 +557,10 @@ void LLGLTexMemBar::draw()
     U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
     U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
 
+    // draw a background above first line.... no idea where the rest of the background comes from for the below text
+    gGL.color4f(0.f, 0.f, 0.f, 0.25f);
+    gl_rect_2d(-10, getRect().getHeight() + line_height + 1, getRect().getWidth()+2, getRect().getHeight()+2);
+
     text = llformat("Est. Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
                     (S32)LLViewerTexture::sFreeVRAMMegabytes,
                     LLMemory::getAvailableMemKB()/1024,
@@ -532,11 +568,15 @@ void LLGLTexMemBar::draw()
                     discard_bias,
                     cache_usage,
                     cache_max_usage);
-    //, cache_entries, cache_max_entries
-
-    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*7,
                                              text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
+    text = llformat("Images: %d   Raw: %d (%.2f MB)  Saved: %d (%.2f MB) Aux: %d (%.2f MB)", image_count, raw_image_count, raw_image_bytes_MB,
+        saved_raw_image_count, saved_raw_image_bytes_MB,
+        aux_raw_image_count, aux_raw_image_bytes_MB);
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height * 6,
+        text_color, LLFontGL::LEFT, LLFontGL::TOP);
+
     U32 cache_read(0U), cache_write(0U), res_wait(0U);
     LLAppViewer::getTextureFetch()->getStateStats(&cache_read, &cache_write, &res_wait);
 
@@ -549,7 +589,6 @@ void LLGLTexMemBar::draw()
                     cache_read,
                     cache_write,
                     res_wait);
-
     LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*5,
                                              text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
@@ -789,7 +828,7 @@ void LLTextureView::draw()
             LL_INFOS() << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << LL_ENDL;
         }
 
-        for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin();
+        for (LLViewerTextureList::image_list_t::iterator iter = gTextureList.mImageList.begin();
              iter != gTextureList.mImageList.end(); )
         {
             LLPointer<LLViewerFetchedTexture> imagep = *iter++;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 23931ecf03..f62d929e9a 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1253,41 +1253,46 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url)
         hostEnd = authority.size();
     }
 
-    LLViewerMedia* inst = getInstance();
     if (url.length())
     {
-        LLMediaCtrl* media_instance = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents");
-        if (media_instance)
-        {
-            std::string cookie_host = authority.substr(hostStart, hostEnd - hostStart);
-            std::string cookie_name = "";
-            std::string cookie_value = "";
-            std::string cookie_path = "";
-            bool httponly = true;
-            bool secure = true;
-            if (inst->parseRawCookie(inst->mOpenIDCookie, cookie_name, cookie_value, cookie_path, httponly, secure) &&
-                media_instance->getMediaPlugin())
+        LLAppViewer::instance()->postToMainCoro([=]()
             {
-                // MAINT-5711 - inexplicably, the CEF setCookie function will no longer set the cookie if the
-                // url and domain are not the same. This used to be my.sl.com and id.sl.com respectively and worked.
-                // For now, we use the URL for the OpenID POST request since it will have the same authority
-                // as the domain field.
-                // (Feels like there must be a less dirty way to construct a URL from component LLURL parts)
-                // MAINT-6392 - Rider: Do not change, however, the original URI requested, since it is used further
-                // down.
-                std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority));
-
-                media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host,
-                    cookie_path, httponly, secure);
-
-                // Now that we have parsed the raw cookie, we must store it so that each new media instance
-                // can also get a copy and faciliate logging into internal SL sites.
-                media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value,
-                    cookie_host, cookie_path, httponly, secure);
-            }
-        }
+                LLMediaCtrl* media_instance = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents");
+                if (media_instance)
+                {
+                    LLViewerMedia* inst = getInstance();
+                    std::string cookie_host = authority.substr(hostStart, hostEnd - hostStart);
+                    std::string cookie_name = "";
+                    std::string cookie_value = "";
+                    std::string cookie_path = "";
+                    bool httponly = true;
+                    bool secure = true;
+                    if (inst->parseRawCookie(inst->mOpenIDCookie, cookie_name, cookie_value, cookie_path, httponly, secure) &&
+                        media_instance->getMediaPlugin())
+                    {
+                        // MAINT-5711 - inexplicably, the CEF setCookie function will no longer set the cookie if the
+                        // url and domain are not the same. This used to be my.sl.com and id.sl.com respectively and worked.
+                        // For now, we use the URL for the OpenID POST request since it will have the same authority
+                        // as the domain field.
+                        // (Feels like there must be a less dirty way to construct a URL from component LLURL parts)
+                        // MAINT-6392 - Rider: Do not change, however, the original URI requested, since it is used further
+                        // down.
+                        std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority));
+
+                        media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host,
+                            cookie_path, httponly, secure);
+
+                        // Now that we have parsed the raw cookie, we must store it so that each new media instance
+                        // can also get a copy and faciliate logging into internal SL sites.
+                        media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value,
+                            cookie_host, cookie_path, httponly, secure);
+                    }
+                }
+            });
     }
 
+    LLViewerMedia* inst = getInstance();
+
     // Note: Rider: MAINT-6392 - Some viewer code requires access to the my.sl.com openid cookie for such
     // actions as posting snapshots to the feed.  This is handled through HTTPCore rather than CEF and so
     // we must learn to SHARE the cookies.
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8af0057c88..232b020d3d 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3676,7 +3676,9 @@ bool LLViewerObject::updateLOD()
 
 bool LLViewerObject::updateGeometry(LLDrawable *drawable)
 {
-    return false;
+    // return true means "update complete", return false means "try again next frame"
+    // default should be return true
+    return true;
 }
 
 void LLViewerObject::updateGL()
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 19a1990665..39244c8246 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1269,8 +1269,12 @@ U32 LLViewerRegion::getNumOfVisibleGroups() const
     return mImpl ? static_cast<U32>(mImpl->mVisibleGroups.size()) : 0;
 }
 
-void LLViewerRegion::updateReflectionProbes()
+void LLViewerRegion::updateReflectionProbes(bool full_update)
 {
+    if (!full_update && mReflectionMaps.empty())
+    {
+        return;
+    }
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     const F32 probe_spacing = 32.f;
     const F32 probe_radius = sqrtf((probe_spacing * 0.5f) * (probe_spacing * 0.5f) * 3.f);
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 68247dc18e..d0ec1fe877 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -428,7 +428,7 @@ public:
     static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
 
     // rebuild reflection probe list
-    void updateReflectionProbes();
+    void updateReflectionProbes(bool full_update);
 
 private:
     void addToVOCacheTree(LLVOCacheEntry* entry);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index c716eb4e86..b2ed86707c 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -414,8 +414,6 @@ void LLViewerTextureManager::init()
         }
     }
     imagep->createGLTexture(0, image_raw);
-    //cache the raw image
-    imagep->setCachedRawImage(0, image_raw);
     image_raw = NULL;
 #else
     LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, true, LLGLTexture::BOOST_UI);
@@ -728,9 +726,6 @@ bool LLViewerTexture::bindDefaultImage(S32 stage)
     }
     stop_glerror();
 
-    //check if there is cached raw image and switch to it if possible
-    switchToCachedImage();
-
     LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
     if (tester)
     {
@@ -931,18 +926,6 @@ void LLViewerTexture::reorganizeVolumeList()
     }
 }
 
-//virtual
-void LLViewerTexture::switchToCachedImage()
-{
-    //nothing here.
-}
-
-//virtual
-void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
-{
-    //nothing here.
-}
-
 bool LLViewerTexture::isLargeImage()
 {
     return  (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize;
@@ -1077,10 +1060,6 @@ void LLViewerFetchedTexture::init(bool firstinit)
     mIsFetched = false;
     mInFastCacheList = false;
 
-    mCachedRawImage = NULL;
-    mCachedRawDiscardLevel = -1;
-    mCachedRawImageReady = false;
-
     mSavedRawImage = NULL;
     mForceToSaveRawImage  = false;
     mSaveRawImage = false;
@@ -1138,9 +1117,6 @@ void LLViewerFetchedTexture::cleanup()
 
     // Clean up image data
     destroyRawImage();
-    mCachedRawImage = NULL;
-    mCachedRawDiscardLevel = -1;
-    mCachedRawImageReady = false;
     mSavedRawImage = NULL;
     mSavedRawDiscardLevel = -1;
 }
@@ -1220,13 +1196,17 @@ void LLViewerFetchedTexture::setForSculpt()
 {
     static const S32 MAX_INTERVAL = 8; //frames
 
+    forceToSaveRawImage(0, F32_MAX);
+
+    setBoostLevel(llmax((S32)getBoostLevel(),
+        (S32)LLGLTexture::BOOST_SCULPTED));
+
     mForSculpt = true;
     if(isForSculptOnly() && hasGLTexture() && !getBoundRecently())
     {
         destroyGLTexture(); //sculpt image does not need gl texture.
         mTextureState = ACTIVE;
     }
-    checkCachedRawSculptImage();
     setMaxVirtualSizeResetInterval(MAX_INTERVAL);
 }
 
@@ -1339,10 +1319,6 @@ void LLViewerFetchedTexture::addToCreateTexture()
             }
         }
 
-        //discard the cached raw image and the saved raw image
-        mCachedRawImageReady = false;
-        mCachedRawDiscardLevel = -1;
-        mCachedRawImage = NULL;
         mSavedRawDiscardLevel = -1;
         mSavedRawImage = NULL;
     }
@@ -2043,13 +2019,6 @@ bool LLViewerFetchedTexture::updateFetch()
         LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - current < min");
         make_request = false;
     }
-    else if(mCachedRawImage.notNull() // can be empty
-            && mCachedRawImageReady
-            && (current_discard < 0 || current_discard > mCachedRawDiscardLevel))
-    {
-        make_request = false;
-        switchToCachedImage(); //use the cached raw data first
-    }
 
     if (make_request)
     {
@@ -2542,20 +2511,6 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
         }
     }
 
-    //
-    // Do a readback if required, OR start off a texture decode
-    //
-    if (need_readback && (getMaxDiscardLevel() > gl_discard))
-    {
-        // Do a readback to get the GL data into the raw image
-        // We have GL data.
-
-        destroyRawImage();
-        reloadRawImage(mLoadedCallbackDesiredDiscardLevel);
-        llassert(mRawImage.notNull());
-        llassert(!mNeedsAux || mAuxRawImage.notNull());
-    }
-
     //
     // Run raw/auxiliary data callbacks
     //
@@ -2663,61 +2618,6 @@ void LLViewerFetchedTexture::forceImmediateUpdate()
     return;
 }
 
-LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level)
-{
-    llassert(mGLTexturep.notNull());
-    llassert(discard_level >= 0);
-    llassert(mComponents > 0);
-
-    if (mRawImage.notNull())
-    {
-        //mRawImage is in use by somebody else, do not delete it.
-        return NULL;
-    }
-
-    if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level)
-    {
-        if (mSavedRawDiscardLevel != discard_level
-            && mBoostLevel != BOOST_ICON
-            && mBoostLevel != BOOST_THUMBNAIL)
-        {
-            mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
-            mRawImage->copy(getSavedRawImage());
-        }
-        else
-        {
-            mRawImage = getSavedRawImage();
-        }
-        mRawDiscardLevel = discard_level;
-    }
-    else
-    {
-        //force to fetch raw image again if cached raw image is not good enough.
-        if(mCachedRawDiscardLevel > discard_level)
-        {
-            mRawImage = mCachedRawImage;
-            mRawDiscardLevel = mCachedRawDiscardLevel;
-        }
-        else //cached raw image is good enough, copy it.
-        {
-            if(mCachedRawDiscardLevel != discard_level)
-            {
-                mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents());
-                mRawImage->copy(mCachedRawImage);
-            }
-            else
-            {
-                mRawImage = mCachedRawImage;
-            }
-            mRawDiscardLevel = discard_level;
-        }
-    }
-    mIsRawImageValid = true;
-    sRawCount++;
-
-    return mRawImage;
-}
-
 bool LLViewerFetchedTexture::needsToSaveRawImage()
 {
     return mForceToSaveRawImage || mSaveRawImage;
@@ -2742,7 +2642,6 @@ void LLViewerFetchedTexture::destroyRawImage()
             {
                 saveRawImage();
             }
-            setCachedRawImage();
         }
 
         mRawImage = NULL;
@@ -2752,151 +2651,6 @@ void LLViewerFetchedTexture::destroyRawImage()
     }
 }
 
-//use the mCachedRawImage to (re)generate the gl texture.
-//virtual
-void LLViewerFetchedTexture::switchToCachedImage()
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    if(mCachedRawImage.notNull() &&
-        !mNeedsCreateTexture) // <--- texture creation is pending, don't step on it
-    {
-        mRawImage = mCachedRawImage;
-
-        if (getComponents() != mRawImage->getComponents())
-        {
-            // We've changed the number of components, so we need to move any
-            // objects using this pool to a different pool.
-            mComponents = mRawImage->getComponents();
-            mGLTexturep->setComponents(mComponents);
-            gTextureList.dirtyImage(this);
-        }
-
-        mIsRawImageValid = true;
-        mRawDiscardLevel = mCachedRawDiscardLevel;
-
-        scheduleCreateTexture();
-    }
-}
-
-//cache the imageraw forcefully.
-//virtual
-void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
-{
-    if(imageraw != mRawImage.get())
-    {
-        if (mBoostLevel == LLGLTexture::BOOST_ICON)
-        {
-            S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_ICON_DIMENSIONS;
-            S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_ICON_DIMENSIONS;
-            if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
-            {
-                mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
-                mCachedRawImage->copyScaled(imageraw);
-            }
-            else
-            {
-                mCachedRawImage = imageraw;
-            }
-        }
-        else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
-        {
-            S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
-            S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
-            if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
-            {
-                mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
-                mCachedRawImage->copyScaled(imageraw);
-            }
-            else
-            {
-                mCachedRawImage = imageraw;
-            }
-        }
-        else
-        {
-            mCachedRawImage = imageraw;
-        }
-        mCachedRawDiscardLevel = discard_level;
-        mCachedRawImageReady = true;
-    }
-}
-
-void LLViewerFetchedTexture::setCachedRawImage()
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    if(mRawImage == mCachedRawImage)
-    {
-        return;
-    }
-    if(!mIsRawImageValid)
-    {
-        return;
-    }
-
-    if(mCachedRawImageReady)
-    {
-        return;
-    }
-
-    if(mCachedRawDiscardLevel < 0 || mCachedRawDiscardLevel > mRawDiscardLevel)
-    {
-        S32 i = 0;
-        S32 w = mRawImage->getWidth();
-        S32 h = mRawImage->getHeight();
-
-        S32 max_size = MAX_CACHED_RAW_IMAGE_AREA;
-        if(LLGLTexture::BOOST_TERRAIN == mBoostLevel)
-        {
-            max_size = MAX_CACHED_RAW_TERRAIN_IMAGE_AREA;
-        }
-        if(mForSculpt)
-        {
-            max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA;
-            mCachedRawImageReady = !mRawDiscardLevel;
-        }
-        else
-        {
-            mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size));
-        }
-
-        while(((w >> i) * (h >> i)) > max_size)
-        {
-            ++i;
-        }
-
-        if(i)
-        {
-            if(!(w >> i) || !(h >> i))
-            {
-                --i;
-            }
-
-            {
-                //make a duplicate in case somebody else is using this raw image
-                mRawImage = mRawImage->scaled(w >> i, h >> i);
-            }
-        }
-        mCachedRawImage = mRawImage;
-        mRawDiscardLevel += i;
-        mCachedRawDiscardLevel = mRawDiscardLevel;
-    }
-}
-
-void LLViewerFetchedTexture::checkCachedRawSculptImage()
-{
-    if(mCachedRawImageReady && mCachedRawDiscardLevel > 0)
-    {
-        if(getDiscardLevel() != 0)
-        {
-            mCachedRawImageReady = false;
-        }
-        else if(isForSculptOnly())
-        {
-            resetTextureStats(); //do not update this image any more.
-        }
-    }
-}
-
 void LLViewerFetchedTexture::saveRawImage()
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -2936,6 +2690,20 @@ void LLViewerFetchedTexture::saveRawImage()
             mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
         }
     }
+    else if (mBoostLevel == LLGLTexture::BOOST_SCULPTED)
+    {
+        S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : sMaxSculptRez;
+        S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : sMaxSculptRez;
+        if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+        {
+            mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
+            mSavedRawImage->copyScaled(mRawImage);
+        }
+        else
+        {
+            mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
+        }
+    }
     else
     {
         mSavedRawImage = new LLImageRaw(mRawImage->getData(), mRawImage->getWidth(), mRawImage->getHeight(), mRawImage->getComponents());
@@ -2981,20 +2749,23 @@ void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_t
     {
         mForceToSaveRawImage = true;
         mDesiredSavedRawDiscardLevel = desired_discard;
+    }
+}
 
-        //copy from the cached raw image if exists.
-        if(mCachedRawImage.notNull() && mRawImage.isNull() )
-        {
-            mRawImage = mCachedRawImage;
-            mRawDiscardLevel = mCachedRawDiscardLevel;
-
-            saveRawImage();
+void LLViewerFetchedTexture::readbackRawImage()
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
 
-            mRawImage = NULL;
-            mRawDiscardLevel = INVALID_DISCARD_LEVEL;
+    if (mGLTexturep.notNull() && mGLTexturep->getTexName() != 0 && mRawImage.isNull())
+    {
+        mRawImage = new LLImageRaw();
+        if (!mGLTexturep->readBackRaw(-1, mRawImage, false))
+        {
+            mRawImage = nullptr;
         }
     }
 }
+
 void LLViewerFetchedTexture::destroySavedRawImage()
 {
     if(mLastReferencedSavedRawImageTime < mKeptSavedRawImageTime)
@@ -3029,6 +2800,11 @@ LLImageRaw* LLViewerFetchedTexture::getSavedRawImage()
     return mSavedRawImage;
 }
 
+const LLImageRaw* LLViewerFetchedTexture::getSavedRawImage() const
+{
+    return mSavedRawImage;
+}
+
 bool LLViewerFetchedTexture::hasSavedRawImage() const
 {
     return mSavedRawImage.notNull();
@@ -3205,20 +2981,14 @@ void LLViewerLODTexture::processTextureStats()
 
 bool LLViewerLODTexture::scaleDown()
 {
-    if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel())
+    if (mGLTexturep.isNull())
     {
-        switchToCachedImage();
-
-        LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName);
-        if (tester)
-        {
-            tester->setStablizingTime();
-        }
-
-        return true;
+        return false;
     }
-    return false;
+
+    return mGLTexturep->scaleDown(mDesiredDiscardLevel);
 }
+
 //----------------------------------------------------------------------------------------------
 //end of LLViewerLODTexture
 //----------------------------------------------------------------------------------------------
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 9963626ada..b1e0494a30 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -166,8 +166,6 @@ public:
     S32 getNumVolumes(U32 channel) const;
     const ll_volume_list_t* getVolumeList(U32 channel) const { return &mVolumeList[channel]; }
 
-
-    virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
     bool isLargeImage() ;
 
     void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;}
@@ -185,8 +183,6 @@ private:
     friend class LLBumpImageList;
     friend class LLUIImageList;
 
-    virtual void switchToCachedImage();
-
 protected:
     friend class LLViewerTextureList;
     LLUUID mID;
@@ -371,7 +367,6 @@ public:
     U32 getFetchPriority() const { return mFetchPriority ;}
     F32 getDownloadProgress() const {return mDownloadProgress ;}
 
-    LLImageRaw* reloadRawImage(S8 discard_level) ;
     void destroyRawImage();
     bool needsToSaveRawImage();
 
@@ -390,17 +385,20 @@ public:
     bool isForSculptOnly() const;
 
     //raw image management
-    void        checkCachedRawSculptImage() ;
     LLImageRaw* getRawImage()const { return mRawImage ;}
     S32         getRawImageLevel() const {return mRawDiscardLevel;}
-    LLImageRaw* getCachedRawImage() const { return mCachedRawImage ;}
-    S32         getCachedRawImageLevel() const {return mCachedRawDiscardLevel;}
-    bool        isCachedRawImageReady() const {return mCachedRawImageReady ;}
     bool        isRawImageValid()const { return mIsRawImageValid ; }
     void        forceToSaveRawImage(S32 desired_discard = 0, F32 kept_time = 0.f) ;
-    /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) override;
+
+    // readback the raw image from OpenGL if mRawImage is not valid
+    void        readbackRawImage();
+
     void        destroySavedRawImage() ;
     LLImageRaw* getSavedRawImage() ;
+    S32         getSavedRawImageLevel() const {return mSavedRawDiscardLevel; }
+
+    const LLImageRaw* getSavedRawImage() const;
+    const LLImageRaw* getAuxRawImage() const { return mAuxRawImage; }
     bool        hasSavedRawImage() const ;
     F32         getElapsedLastReferencedSavedRawImageTime() const ;
     bool        isFullyLoaded() const;
@@ -417,7 +415,6 @@ public:
     /*virtual*/bool  isActiveFetching() override; //is actively in fetching by the fetching pipeline.
 
 protected:
-    /*virtual*/ void switchToCachedImage() override;
     S32 getCurrentDiscardLevelForFetching() ;
     void forceToRefetchTexture(S32 desired_discard = 0, F32 kept_time = 60.f);
 
@@ -426,7 +423,6 @@ private:
     void cleanup() ;
 
     void saveRawImage() ;
-    void setCachedRawImage() ;
 
     //for atlas
     void resetFaceAtlas() ;
@@ -498,11 +494,6 @@ protected:
     F32 mLastReferencedSavedRawImageTime ;
     F32 mKeptSavedRawImageTime ;
 
-    //a small version of the copy of the raw image (<= 64 * 64)
-    LLPointer<LLImageRaw> mCachedRawImage;
-    S32 mCachedRawDiscardLevel;
-    bool mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit.
-
     LLHost mTargetHost; // if invalid, just request from agent's simulator
 
     // Timers
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b90c1868fc..4d8fd8ddd5 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -296,7 +296,7 @@ void LLViewerTextureList::shutdown()
     // Write out list of currently loaded textures for precaching on startup
     typedef std::set<std::pair<S32,LLViewerFetchedTexture*> > image_area_list_t;
     image_area_list_t image_area_list;
-    for (image_priority_list_t::iterator iter = mImageList.begin();
+    for (image_list_t::iterator iter = mImageList.begin();
          iter != mImageList.end(); ++iter)
     {
         LLViewerFetchedTexture* image = *iter;
@@ -367,7 +367,7 @@ void LLViewerTextureList::dump()
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     LL_INFOS() << "LLViewerTextureList::dump()" << LL_ENDL;
-    for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
+    for (image_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
     {
         LLViewerFetchedTexture* image = *it;
 
@@ -381,15 +381,9 @@ void LLViewerTextureList::dump()
     }
 }
 
-void LLViewerTextureList::destroyGL(bool save_state)
+void LLViewerTextureList::destroyGL()
 {
-    LLImageGL::destroyGL(save_state);
-}
-
-void LLViewerTextureList::restoreGL()
-{
-    llassert_always(mInitialized) ;
-    LLImageGL::restoreGL();
+    LLImageGL::destroyGL();
 }
 
 /* Vertical tab container button image IDs
@@ -895,7 +889,7 @@ void LLViewerTextureList::clearFetchingRequests()
 
     LLAppViewer::getTextureFetch()->deleteAllRequests();
 
-    for (image_priority_list_t::iterator iter = mImageList.begin();
+    for (image_list_t::iterator iter = mImageList.begin();
          iter != mImageList.end(); ++iter)
     {
         LLViewerFetchedTexture* imagep = *iter;
@@ -1208,7 +1202,7 @@ void LLViewerTextureList::updateImagesUpdateStats()
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     if (mForceResetTextureStats)
     {
-        for (image_priority_list_t::iterator iter = mImageList.begin();
+        for (image_list_t::iterator iter = mImageList.begin();
              iter != mImageList.end(); )
         {
             LLViewerFetchedTexture* imagep = *iter++;
@@ -1228,7 +1222,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
 
     // Update texture stats and priorities
     std::vector<LLPointer<LLViewerFetchedTexture> > image_list;
-    for (image_priority_list_t::iterator iter = mImageList.begin();
+    for (image_list_t::iterator iter = mImageList.begin();
          iter != mImageList.end(); )
     {
         LLViewerFetchedTexture* imagep = *iter++;
@@ -1248,7 +1242,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
     image_list.clear();
 
     // Update fetch (decode)
-    for (image_priority_list_t::iterator iter = mImageList.begin();
+    for (image_list_t::iterator iter = mImageList.begin();
          iter != mImageList.end(); )
     {
         LLViewerFetchedTexture* imagep = *iter++;
@@ -1275,7 +1269,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time)
         }
     }
     // Update fetch again
-    for (image_priority_list_t::iterator iter = mImageList.begin();
+    for (image_list_t::iterator iter = mImageList.begin();
          iter != mImageList.end(); )
     {
         LLViewerFetchedTexture* imagep = *iter++;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index e4ebb7b0e8..2779ad9f91 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -33,7 +33,7 @@
 #include "llviewertexture.h"
 #include "llui.h"
 #include <list>
-#include <set>
+#include <unordered_set>
 #include "lluiimage.h"
 
 const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
@@ -115,8 +115,7 @@ public:
     void init();
     void shutdown();
     void dump();
-    void destroyGL(bool save_state = true);
-    void restoreGL();
+    void destroyGL();
     bool isInitialized() const {return mInitialized;}
 
     void findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output);
@@ -188,7 +187,7 @@ private:
                                      LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE,     // Get the requested level immediately upon creation.
                                      S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
                                      LLGLint internal_format = 0,
-                                     LLGLenum primary_format = 0,
+                                      LLGLenum primary_format = 0,
                                      const LLUUID& force_id = LLUUID::null
                                      );
 
@@ -211,7 +210,7 @@ private:
     { return getImage(image_id, f_type, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
 
 public:
-    typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t;
+    typedef std::unordered_set<LLPointer<LLViewerFetchedTexture> > image_list_t;
     image_list_t mLoadingStreamList;
     image_list_t mCreateTextureList;
     image_list_t mCallbackList;
@@ -222,16 +221,19 @@ public:
 
     bool mForceResetTextureStats;
 
+    // to make "for (auto& imagep : gTextureList)" work
+    const image_list_t::iterator begin() const { return mImageList.begin(); }
+    const image_list_t::iterator end() const { return mImageList.end(); }
+
 private:
     typedef std::map< LLTextureKey, LLPointer<LLViewerFetchedTexture> > uuid_map_t;
     uuid_map_t mUUIDMap;
     LLTextureKey mLastUpdateKey;
 
-    typedef std::set < LLPointer<LLViewerFetchedTexture> > image_priority_list_t;
-    image_priority_list_t mImageList;
+    image_list_t mImageList;
 
     // simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
-    std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
+    std::unordered_set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
 
     bool mInitialized ;
     LLFrameTimer mForceDecodeTimer;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cfa12bf178..ef85d57416 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1827,10 +1827,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
     mToolStored( NULL ),
     mHideCursorPermanent( false ),
     mCursorHidden(false),
-    mIgnoreActivate( false ),
     mResDirty(false),
     mStatesDirty(false),
-    mCurrResolutionIndex(0),
     mProgressView(NULL)
 {
     // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
@@ -2402,7 +2400,7 @@ void LLViewerWindow::shutdownGL()
     LLSelectMgr::getInstance()->cleanup();
 
     LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL;
-    stopGL(false);
+    stopGL();
     stop_glerror();
 
     gGL.shutdown();
@@ -5715,7 +5713,7 @@ void LLViewerWindow::dumpState()
         << LL_ENDL;
 }
 
-void LLViewerWindow::stopGL(bool save_state)
+void LLViewerWindow::stopGL()
 {
     //Note: --bao
     //if not necessary, do not change the order of the function calls in this function.
@@ -5761,7 +5759,7 @@ void LLViewerWindow::stopGL(bool save_state)
             gPostProcess->invalidate();
         }
 
-        gTextureList.destroyGL(save_state);
+        gTextureList.destroyGL();
         stop_glerror();
 
         gGLManager.mIsDisabled = true;
@@ -5778,6 +5776,14 @@ void LLViewerWindow::stopGL(bool save_state)
 
 void LLViewerWindow::restoreGL(const std::string& progress_message)
 {
+    llassert(false);
+    // DEPRECATED -- this is left over from when we would completely destroy and restore a GL context
+    // when switching from windowed to fullscreen.  None of this machinery has been exercised in years
+    // and is unreliable.  If we ever *do* have another use case where completely unloading and reloading
+    // everthing is necessary, requiring a viewer restart for that operation is a fine thing to do.
+    // -- davep
+
+
     //Note: --bao
     //if not necessary, do not change the order of the function calls in this function.
     //if change something, make sure it will not break anything.
@@ -5790,8 +5796,6 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
         initGLDefaults();
         LLGLState::restoreGL();
 
-        gTextureList.restoreGL();
-
         // for future support of non-square pixels, and fonts that are properly stretched
         //LLFontGL::destroyDefaultFonts();
         initFonts();
@@ -5867,122 +5871,6 @@ void LLViewerWindow::checkSettings()
     }
 }
 
-void LLViewerWindow::restartDisplay(bool show_progress_bar)
-{
-    LL_INFOS() << "Restaring GL" << LL_ENDL;
-    stopGL();
-    if (show_progress_bar)
-    {
-        restoreGL(LLTrans::getString("ProgressChangingResolution"));
-    }
-    else
-    {
-        restoreGL();
-    }
-}
-
-bool LLViewerWindow::changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar)
-{
-    //bool was_maximized = gSavedSettings.getBOOL("WindowMaximized");
-
-    //gResizeScreenTexture = true;
-
-
-    //U32 fsaa = gSavedSettings.getU32("RenderFSAASamples");
-    //U32 old_fsaa = mWindow->getFSAASamples();
-
-    // if not maximized, use the request size
-    if (!mWindow->getMaximized())
-    {
-        mWindow->setSize(size);
-    }
-
-    //if (fsaa == old_fsaa)
-    {
-        return true;
-    }
-
-/*
-
-    // Close floaters that don't handle settings change
-    LLFloaterReg::hideInstance("snapshot");
-
-    bool result_first_try = false;
-    bool result_second_try = false;
-
-    LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
-    send_agent_pause();
-    LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL;
-    stopGL();
-    mIgnoreActivate = true;
-    LLCoordScreen old_size;
-    LLCoordScreen old_pos;
-    mWindow->getSize(&old_size);
-
-    //mWindow->setFSAASamples(fsaa);
-
-    result_first_try = mWindow->switchContext(false, size, disable_vsync);
-    if (!result_first_try)
-    {
-        // try to switch back
-        //mWindow->setFSAASamples(old_fsaa);
-        result_second_try = mWindow->switchContext(false, old_size, disable_vsync);
-
-        if (!result_second_try)
-        {
-            // we are stuck...try once again with a minimal resolution?
-            send_agent_resume();
-            mIgnoreActivate = false;
-            return false;
-        }
-    }
-    send_agent_resume();
-
-    LL_INFOS() << "Restoring GL during resolution change" << LL_ENDL;
-    if (show_progress_bar)
-    {
-        restoreGL(LLTrans::getString("ProgressChangingResolution"));
-    }
-    else
-    {
-        restoreGL();
-    }
-
-    if (!result_first_try)
-    {
-        LLSD args;
-        args["RESX"] = llformat("%d",size.mX);
-        args["RESY"] = llformat("%d",size.mY);
-        LLNotificationsUtil::add("ResolutionSwitchFail", args);
-        size = old_size; // for reshape below
-    }
-
-    bool success = result_first_try || result_second_try;
-
-    if (success)
-    {
-        // maximize window if was maximized, else reposition
-        if (was_maximized)
-        {
-            mWindow->maximize();
-        }
-        else
-        {
-            S32 windowX = gSavedSettings.getS32("WindowX");
-            S32 windowY = gSavedSettings.getS32("WindowY");
-
-            mWindow->setPosition(LLCoordScreen ( windowX, windowY ) );
-        }
-    }
-
-    mIgnoreActivate = false;
-    gFocusMgr.setKeyboardFocus(keyboard_focus);
-
-    return success;
-
-    */
-}
-
 F32 LLViewerWindow::getWorldViewAspectRatio() const
 {
     F32 world_aspect = (F32)mWorldViewRectRaw.getWidth() / (F32)mWorldViewRectRaw.getHeight();
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 4a6b901b33..ba59ce4141 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -455,9 +455,7 @@ public:
     // handle shutting down GL and bringing it back up
     void            requestResolutionUpdate();
     void            checkSettings();
-    void            restartDisplay(bool show_progress_bar);
-    bool            changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar);
-    bool            getIgnoreDestroyWindow() { return mIgnoreActivate; }
+
     F32             getWorldViewAspectRatio() const;
     const LLVector2& getDisplayScale() const { return mDisplayScale; }
     void            calcDisplayScale();
@@ -471,7 +469,7 @@ private:
     void            switchToolByMask(MASK mask);
     void            destroyWindow();
     void            drawMouselookInstructions();
-    void            stopGL(bool save_state = true);
+    void            stopGL();
     void            restoreGL(const std::string& progress_message = LLStringUtil::null);
     void            initFonts(F32 zoom_factor = 1.f);
     void            schedulePick(LLPickInfo& pick_info);
@@ -528,8 +526,6 @@ private:
 
     std::string     mOverlayTitle;      // Used for special titles such as "Second Life - Special E3 2003 Beta"
 
-    bool            mIgnoreActivate;
-
     std::string     mInitAlert;         // Window / GL initialization requires an alert
 
     LLHandle<LLView> mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world
@@ -542,7 +538,6 @@ private:
 
     bool            mResDirty;
     bool            mStatesDirty;
-    U32         mCurrResolutionIndex;
 
     std::unique_ptr<LLWindowListener> mWindowListener;
     std::unique_ptr<LLViewerWindowListener> mViewerWindowListener;
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index ba255f2b24..f5f058a080 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -317,7 +317,7 @@ bool LLTerrainMaterials::makeMaterialsReady(bool boost, bool strict)
 // static
 bool LLTerrainMaterials::makeTextureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost)
 {
-    llassert(tex);
+    //llassert(tex); ??? maybe ok ???
     if (!tex) { return false; }
 
     if (tex->getDiscardLevel() < 0)
@@ -571,416 +571,6 @@ bool LLVLComposition::generateComposition()
     return LLTerrainMaterials::generateMaterials();
 }
 
-namespace
-{
-    void prepare_fallback_image(LLImageRaw* raw_image)
-    {
-        raw_image->resize(BASE_SIZE, BASE_SIZE, 4);
-        raw_image->fill(LLColor4U::white);
-    }
-
-    // Check if the raw image is loaded for this texture at a discard
-    // level the minimap can use, and if not then try to get it loaded.
-    bool prepare_raw_image(LLPointer<LLImageRaw>& raw_image, bool emissive, LLViewerFetchedTexture* tex, bool& delete_raw_post)
-    {
-        if (!tex)
-        {
-            if (!emissive)
-            {
-                prepare_fallback_image(raw_image);
-            }
-            else
-            {
-                llassert(!raw_image);
-                raw_image = nullptr;
-            }
-            return true;
-        }
-        if (raw_image)
-        {
-            // Callback already initiated
-            if (raw_image->getDataSize() > 0)
-            {
-                // Callback finished
-                delete_raw_post = true;
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-
-        raw_image = new LLImageRaw();
-
-        S32 ddiscard = 0;
-        {
-            S32 min_dim = llmin(tex->getFullWidth(), tex->getFullHeight());
-            while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
-            {
-                ddiscard++;
-                min_dim /= 2;
-            }
-        }
-
-        struct PendingImage
-        {
-            LLImageRaw* mRawImage;
-            S32 mDesiredDiscard;
-            LLUUID mTextureId;
-            PendingImage(LLImageRaw* raw_image, S32 ddiscard, const LLUUID& texture_id)
-                : mRawImage(raw_image)
-                , mDesiredDiscard(ddiscard)
-                , mTextureId(texture_id)
-            {
-                mRawImage->ref();
-            }
-            ~PendingImage()
-            {
-                mRawImage->unref();
-            }
-        };
-        PendingImage* pending_image = new PendingImage(raw_image, ddiscard, tex->getID());
-
-        loaded_callback_func cb = [](bool success, LLViewerFetchedTexture * src_vi, LLImageRaw * src, LLImageRaw * src_aux, S32 discard_level, bool is_final, void* userdata) {
-            PendingImage* pending = (PendingImage*)userdata;
-            // Owning LLVLComposition still exists
-
-            // Assume mRawImage only used by single LLVLComposition for now
-            const bool in_use_by_composition = pending->mRawImage->getNumRefs() > 1;
-            llassert(pending->mRawImage->getNumRefs());
-            llassert(pending->mRawImage->getNumRefs() <= 2);
-            const bool needs_data = !pending->mRawImage->getDataSize();
-            if (in_use_by_composition && needs_data)
-            {
-                if (success && pending->mDesiredDiscard == discard_level)
-                {
-                    pending->mRawImage->resize(BASE_SIZE, BASE_SIZE, src->getComponents());
-                    pending->mRawImage->copyScaled(src);
-                }
-                else if (is_final)
-                {
-                    prepare_fallback_image(pending->mRawImage);
-                }
-            }
-
-            if (is_final) { delete pending; }
-        };
-        tex->setLoadedCallback(cb, ddiscard, true, false, pending_image, nullptr);
-        tex->forceToSaveRawImage(ddiscard);
-
-        return false;
-    }
-};
-
-bool LLVLComposition::generateMinimapTileLand(const F32 x, const F32 y,
-                                      const F32 width, const F32 height)
-{
-    LL_PROFILE_ZONE_SCOPED
-    llassert(mSurfacep);
-    llassert(x >= 0.f);
-    llassert(y >= 0.f);
-
-    ///////////////////////////
-    //
-    // Generate raw data arrays for surface textures
-    //
-    //
-
-    // These have already been validated by generateComposition.
-    U8* st_data[ASSET_COUNT];
-    S32 st_data_size[ASSET_COUNT]; // for debugging
-
-    const bool use_textures = getMaterialType() != LLTerrainMaterials::Type::PBR;
-    if (use_textures)
-    {
-        if (!makeTexturesReady(true, true)) { return false; }
-    }
-    else
-    {
-        if (!makeMaterialsReady(true, true)) { return false; }
-    }
-
-    for (S32 i = 0; i < ASSET_COUNT; i++)
-    {
-        if (mRawImages[i].isNull())
-        {
-            // Read back a raw image for this discard level, if it exists
-            LLViewerFetchedTexture* tex;
-            LLViewerFetchedTexture* tex_emissive; // Can be null
-            bool has_base_color_factor;
-            bool has_emissive_factor;
-            bool has_alpha;
-            LLColor3 base_color_factor;
-            LLColor3 emissive_factor;
-            if (use_textures)
-            {
-                tex = mDetailTextures[i];
-                tex_emissive = nullptr;
-                has_base_color_factor = false;
-                has_emissive_factor = false;
-                has_alpha = false;
-                llassert(tex);
-            }
-            else
-            {
-                LLPointer<LLFetchedGLTFMaterial>& mat = mDetailRenderMaterials[i];
-                tex = mat->mBaseColorTexture;
-                tex_emissive = mat->mEmissiveTexture;
-                base_color_factor = LLColor3(mat->mBaseColor);
-                // *HACK: Treat alpha as black
-                base_color_factor *= (mat->mBaseColor.mV[VW]);
-                emissive_factor = mat->mEmissiveColor;
-                has_base_color_factor = (base_color_factor.mV[VX] != 1.f ||
-                                         base_color_factor.mV[VY] != 1.f ||
-                                         base_color_factor.mV[VZ] != 1.f);
-                has_emissive_factor = (emissive_factor.mV[VX] != 1.f ||
-                                       emissive_factor.mV[VY] != 1.f ||
-                                       emissive_factor.mV[VZ] != 1.f);
-                has_alpha = mat->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_OPAQUE;
-            }
-
-            if (!tex) { tex = LLViewerFetchedTexture::sWhiteImagep; }
-
-            bool delete_raw_post = false;
-            bool delete_raw_post_emissive = false;
-            if (!prepare_raw_image(mRawImagesBaseColor[i], false, tex, delete_raw_post)) { return false; }
-            if (tex_emissive && !prepare_raw_image(mRawImagesEmissive[i], true, tex_emissive, delete_raw_post_emissive)) { return false; }
-            // tex_emissive can be null, and then will be ignored
-
-            // In the simplest case, the minimap image is just the base color.
-            // This will be replaced if we need to do any tinting/compositing.
-            mRawImages[i] = mRawImagesBaseColor[i];
-
-            // *TODO: This isn't quite right for PBR:
-            // 1) It does not convert the color images from SRGB to linear
-            // before mixing (which will always require copying the image).
-            // 2) It mixes emissive and base color before mixing terrain
-            // materials, but it should be the other way around
-            // Long-term, we should consider a method that is more
-            // maintainable. Shaders, perhaps? Bake shaders to textures?
-            LLPointer<LLImageRaw> raw_emissive;
-            if (tex_emissive)
-            {
-                raw_emissive = mRawImagesEmissive[i];
-                if (has_emissive_factor ||
-                    tex_emissive->getWidth(tex_emissive->getRawImageLevel()) != BASE_SIZE ||
-                    tex_emissive->getHeight(tex_emissive->getRawImageLevel()) != BASE_SIZE ||
-                    tex_emissive->getComponents() != 4)
-                {
-                    LLPointer<LLImageRaw> newraw_emissive = new LLImageRaw(BASE_SIZE, BASE_SIZE, 4);
-                    // Copy RGB, leave alpha alone (set to opaque by default)
-                    newraw_emissive->copy(mRawImagesEmissive[i]);
-                    if (has_emissive_factor)
-                    {
-                        newraw_emissive->tint(emissive_factor);
-                    }
-                    raw_emissive = newraw_emissive;
-                }
-            }
-            if (has_base_color_factor ||
-                raw_emissive ||
-                has_alpha ||
-                tex->getWidth(tex->getRawImageLevel()) != BASE_SIZE ||
-                tex->getHeight(tex->getRawImageLevel()) != BASE_SIZE ||
-                tex->getComponents() != 3)
-            {
-                LLPointer<LLImageRaw> newraw = new LLImageRaw(BASE_SIZE, BASE_SIZE, 3);
-                if (has_alpha)
-                {
-                    // Approximate the water underneath terrain alpha with solid water color
-                    newraw->clear(
-                        MAX_WATER_COLOR.mV[VX],
-                        MAX_WATER_COLOR.mV[VY],
-                        MAX_WATER_COLOR.mV[VZ],
-                        255);
-                }
-                newraw->composite(mRawImagesBaseColor[i]);
-                if (has_base_color_factor)
-                {
-                    newraw->tint(base_color_factor);
-                }
-                // Apply emissive texture
-                if (raw_emissive)
-                {
-                    newraw->addEmissive(raw_emissive);
-                }
-
-                mRawImages[i] = newraw; // deletes old
-            }
-
-            if (delete_raw_post)
-            {
-                tex->destroyRawImage();
-            }
-            if (delete_raw_post_emissive)
-            {
-                tex_emissive->destroyRawImage();
-            }
-
-            // Remove intermediary image references
-            mRawImagesBaseColor[i] = nullptr;
-            mRawImagesEmissive[i] = nullptr;
-        }
-        st_data[i] = mRawImages[i]->getData();
-        st_data_size[i] = mRawImages[i]->getDataSize();
-    }
-
-    ///////////////////////////////////////
-    //
-    // Generate and clamp x/y bounding box.
-    //
-    //
-
-    S32 x_begin, y_begin, x_end, y_end;
-    x_begin = (S32)(x * mScaleInv);
-    y_begin = (S32)(y * mScaleInv);
-    x_end = ll_round( (x + width) * mScaleInv );
-    y_end = ll_round( (y + width) * mScaleInv );
-
-    if (x_end > mWidth)
-    {
-        llassert(false);
-        x_end = mWidth;
-    }
-    if (y_end > mWidth)
-    {
-        llassert(false);
-        y_end = mWidth;
-    }
-
-
-    ///////////////////////////////////////////
-    //
-    // Generate target texture information, stride ratios.
-    //
-    //
-
-    LLViewerTexture *texturep;
-    U32 tex_width, tex_height, tex_comps;
-    U32 tex_stride;
-    F32 tex_x_scalef, tex_y_scalef;
-    S32 tex_x_begin, tex_y_begin, tex_x_end, tex_y_end;
-    F32 tex_x_ratiof, tex_y_ratiof;
-
-    texturep = mSurfacep->getSTexture();
-    tex_width = texturep->getWidth();
-    tex_height = texturep->getHeight();
-    tex_comps = texturep->getComponents();
-    tex_stride = tex_width * tex_comps;
-
-    U32 st_comps = 3;
-    U32 st_width = BASE_SIZE;
-    U32 st_height = BASE_SIZE;
-
-    if (tex_comps != st_comps)
-    {
-        llassert(false);
-        return false;
-    }
-
-    tex_x_scalef = (F32)tex_width / (F32)mWidth;
-    tex_y_scalef = (F32)tex_height / (F32)mWidth;
-    tex_x_begin = (S32)((F32)x_begin * tex_x_scalef);
-    tex_y_begin = (S32)((F32)y_begin * tex_y_scalef);
-    tex_x_end = (S32)((F32)x_end * tex_x_scalef);
-    tex_y_end = (S32)((F32)y_end * tex_y_scalef);
-
-    tex_x_ratiof = (F32)mWidth*mScale / (F32)tex_width;
-    tex_y_ratiof = (F32)mWidth*mScale / (F32)tex_height;
-
-    LLPointer<LLImageRaw> raw = new LLImageRaw(tex_width, tex_height, tex_comps);
-    U8 *rawp = raw->getData();
-
-    F32 st_x_stride, st_y_stride;
-    st_x_stride = ((F32)st_width / (F32)mTexScaleX)*((F32)mWidth / (F32)tex_width);
-    st_y_stride = ((F32)st_height / (F32)mTexScaleY)*((F32)mWidth / (F32)tex_height);
-
-    llassert(st_x_stride > 0.f);
-    llassert(st_y_stride > 0.f);
-    ////////////////////////////////
-    //
-    // Iterate through the target texture, striding through the
-    // subtextures and interpolating appropriately.
-    //
-    //
-
-    F32 sti, stj;
-    S32 st_offset;
-    sti = (tex_x_begin * st_x_stride) - st_width*(llfloor((tex_x_begin * st_x_stride)/st_width));
-    stj = (tex_y_begin * st_y_stride) - st_height*(llfloor((tex_y_begin * st_y_stride)/st_height));
-
-    st_offset = (llfloor(stj * st_width) + llfloor(sti)) * st_comps;
-    for (S32 j = tex_y_begin; j < tex_y_end; j++)
-    {
-        U32 offset = j * tex_stride + tex_x_begin * tex_comps;
-        sti = (tex_x_begin * st_x_stride) - st_width*((U32)(tex_x_begin * st_x_stride)/st_width);
-        for (S32 i = tex_x_begin; i < tex_x_end; i++)
-        {
-            S32 tex0, tex1;
-            F32 composition = getValueScaled(i*tex_x_ratiof, j*tex_y_ratiof);
-
-            tex0 = llfloor( composition );
-            tex0 = llclamp(tex0, 0, 3);
-            composition -= tex0;
-            tex1 = tex0 + 1;
-            tex1 = llclamp(tex1, 0, 3);
-
-            st_offset = (lltrunc(sti) + lltrunc(stj)*st_width) * st_comps;
-            for (U32 k = 0; k < tex_comps; k++)
-            {
-                // Linearly interpolate based on composition.
-                if (st_offset >= st_data_size[tex0] || st_offset >= st_data_size[tex1])
-                {
-                    // SJB: This shouldn't be happening, but does... Rounding error?
-                    //LL_WARNS() << "offset 0 [" << tex0 << "] =" << st_offset << " >= size=" << st_data_size[tex0] << LL_ENDL;
-                    //LL_WARNS() << "offset 1 [" << tex1 << "] =" << st_offset << " >= size=" << st_data_size[tex1] << LL_ENDL;
-                }
-                else
-                {
-                    F32 a = *(st_data[tex0] + st_offset);
-                    F32 b = *(st_data[tex1] + st_offset);
-                    rawp[ offset ] = (U8)lltrunc( a + composition * (b - a) );
-                }
-                offset++;
-                st_offset++;
-            }
-
-            sti += st_x_stride;
-            if (sti >= st_width)
-            {
-                sti -= st_width;
-            }
-        }
-
-        stj += st_y_stride;
-        if (stj >= st_height)
-        {
-            stj -= st_height;
-        }
-    }
-
-    if (!texturep->hasGLTexture())
-    {
-        texturep->createGLTexture(0, raw);
-    }
-    texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin);
-
-    // Un-boost detail textures (will get re-boosted if rendering in high detail)
-    for (S32 i = 0; i < ASSET_COUNT; i++)
-    {
-        unboost_minimap_texture(mDetailTextures[i]);
-    }
-
-    // Un-boost textures for each detail material (will get re-boosted if rendering in high detail)
-    for (S32 i = 0; i < ASSET_COUNT; i++)
-    {
-        unboost_minimap_material(mDetailMaterials[i]);
-    }
-
-    return true;
-}
-
 F32 LLVLComposition::getStartHeight(S32 corner)
 {
     return mStartHeight[corner];
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h
index 61c35ade28..2637d77183 100644
--- a/indra/newview/llvlcomposition.h
+++ b/indra/newview/llvlcomposition.h
@@ -114,8 +114,6 @@ public:
     // Viewer side hack to generate composition values
     bool generateHeights(const F32 x, const F32 y, const F32 width, const F32 height);
     bool generateComposition();
-    // Generate texture from composition values.
-    bool generateMinimapTileLand(const F32 x, const F32 y, const F32 width, const F32 height);
 
     // Use these as indeces ito the get/setters below that use 'corner'
     enum ECorner
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index de62256134..7d9a3378f9 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -851,19 +851,9 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
 
         if (mSculptTexture.notNull())
         {
-            mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(),
-                                                (S32)LLGLTexture::BOOST_SCULPTED));
             mSculptTexture->setForSculpt() ;
 
-            if(!mSculptTexture->isCachedRawImageReady())
-            {
-                S32 lod = llmin(mLOD, 3);
-                F32 lodf = ((F32)(lod + 1.0f)/4.f);
-                F32 tex_size = lodf * LLViewerTexture::sMaxSculptRez ;
-                mSculptTexture->addTextureStats(2.f * tex_size * tex_size, false);
-            }
-
-            S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture
+            S32 texture_discard = mSculptTexture->getRawImageLevel(); //try to match the texture
             S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ;
 
             if (texture_discard >= 0 && //texture has some data available
@@ -1159,7 +1149,9 @@ void LLVOVolume::updateSculptTexture()
         LLUUID id =  sculpt_params->getSculptTexture();
         if (id.notNull())
         {
-            mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+            mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_SCULPTED, LLViewerTexture::LOD_TEXTURE);
+            mSculptTexture->forceToSaveRawImage(0, F32_MAX);
+            mSculptTexture->addTextureStats(256.f*256.f);
         }
 
         mSkinInfoUnavaliable = false;
@@ -1252,8 +1244,22 @@ void LLVOVolume::sculpt()
         S8 sculpt_components = 0;
         const U8* sculpt_data = NULL;
 
-        S32 discard_level = mSculptTexture->getCachedRawImageLevel() ;
-        LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ;
+        S32 discard_level = mSculptTexture->getRawImageLevel() ;
+        LLImageRaw* raw_image = mSculptTexture->getRawImage() ;
+
+        if (!raw_image)
+        {
+            raw_image = mSculptTexture->getSavedRawImage();
+            S32 discard_level = mSculptTexture->getSavedRawImageLevel();
+        }
+
+        if (!raw_image)
+        {
+            // last resort, read back from GL
+            mSculptTexture->readbackRawImage();
+            raw_image = mSculptTexture->getRawImage();
+            discard_level = mSculptTexture->getRawImageLevel();
+        }
 
         S32 max_discard = mSculptTexture->getMaxDiscardLevel();
         if (discard_level > max_discard)
@@ -1310,8 +1316,6 @@ void LLVOVolume::sculpt()
 
         if(!raw_image)
         {
-            llassert(discard_level < 0) ;
-
             sculpt_width = 0;
             sculpt_height = 0;
             sculpt_data = NULL ;
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 34040e1aca..2bc849a74f 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -59,7 +59,6 @@ LLVOWater::LLVOWater(const LLUUID &id,
     mbCanSelect = false;
     setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility.
 
-    mUseTexture = true;
     mIsEdgePatch = false;
 }
 
@@ -101,14 +100,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
 
     LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER);
 
-    if (mUseTexture)
-    {
-        mDrawable->setNumFaces(1, pool, mRegionp->getLand().getWaterTexture());
-    }
-    else
-    {
-        mDrawable->setNumFaces(1, pool, LLWorld::getInstance()->getDefaultWaterTexture());
-    }
+    mDrawable->setNumFaces(1, pool, LLWorld::getInstance()->getDefaultWaterTexture());
 
     return mDrawable;
 }
@@ -249,11 +241,6 @@ void setVecZ(LLVector3& v)
     v.mV[VZ] = 1;
 }
 
-void LLVOWater::setUseTexture(const bool use_texture)
-{
-    mUseTexture = use_texture;
-}
-
 void LLVOWater::setIsEdgePatch(const bool edge_patch)
 {
     mIsEdgePatch = edge_patch;
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index adae86691a..ba3da510c4 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -70,13 +70,10 @@ public:
 
     /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate.
 
-    void setUseTexture(const bool use_texture);
     void setIsEdgePatch(const bool edge_patch);
-    bool getUseTexture() const { return mUseTexture; }
     bool getIsEdgePatch() const { return mIsEdgePatch; }
 
 protected:
-    bool mUseTexture;
     bool mIsEdgePatch;
     S32  mRenderType;
 };
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 2eadea20ef..6470c81aaa 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -961,7 +961,6 @@ void LLWorld::updateWaterObjects()
             if (!getRegionFromHandle(region_handle))
             {   // No region at that area, so make water
                 LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion());
-                waterp->setUseTexture(false);
                 waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
                                                      y + rwidth/2,
                                                      256.f + water_height));
@@ -1015,7 +1014,6 @@ void LLWorld::updateWaterObjects()
             mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER,
                                                                                  gAgent.getRegion());
             waterp = mEdgeWaterObjects[dir];
-            waterp->setUseTexture(false);
             waterp->setIsEdgePatch(true);
             gPipeline.createObject(waterp);
         }
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index e226fd4748..d8ea2b884f 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -178,6 +178,7 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
     }
 }
 
+//static
 LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level)
 {
     // Get the grid coordinates
diff --git a/indra/newview/llworldmipmap.h b/indra/newview/llworldmipmap.h
index ab98b55b72..907f24d1e7 100644
--- a/indra/newview/llworldmipmap.h
+++ b/indra/newview/llworldmipmap.h
@@ -74,11 +74,13 @@ public:
     // Convert world coordinates to mipmap grid coordinates at a given level
     static void globalToMipmap(F64 global_x, F64 global_y, S32 level, U32* grid_x, U32* grid_y);
 
+    // Load the relevant tile from S3
+    static LLPointer<LLViewerFetchedTexture> loadObjectsTile(U32 grid_x, U32 grid_y, S32 level);
+
 private:
     // Get a handle (key) from grid coordinates
     U64     convertGridToHandle(U32 grid_x, U32 grid_y) { return to_region_handle(grid_x * REGION_WIDTH_UNITS, grid_y * REGION_WIDTH_UNITS); }
-    // Load the relevant tile from S3
-    LLPointer<LLViewerFetchedTexture> loadObjectsTile(U32 grid_x, U32 grid_y, S32 level);
+
     // Clear a level from its "missing" tiles
     void cleanMissedTilesFromLevel(S32 level);
 
-- 
cgit v1.2.3


From c2fbd139c10408460d94a525b979420cdcfe021b Mon Sep 17 00:00:00 2001
From: Beq <beqjanus@gmail.com>
Date: Thu, 27 Jun 2024 13:21:35 +0100
Subject: realign system ram functions

make the system ram function align across all supported platforms.
Taken from https://github.com/FirestormViewer/phoenix-firestorm/commit/3b074ba4af5e303125db606dd69eb4282a91f957
+ clean up FS specific comment markers and upstream code retention
---
 indra/llcommon/llmemory.cpp | 42 +++++++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 4b7d60d654..b9f9fdae17 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -39,6 +39,7 @@
 #elif LL_LINUX
 # include <unistd.h>
 # include <sys/resource.h>
+# include <sys/sysinfo.h>
 #endif
 
 #include "llmemory.h"
@@ -85,6 +86,7 @@ void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size)
 void LLMemory::updateMemoryInfo()
 {
     LL_PROFILE_ZONE_SCOPED
+    U32Kilobytes avail_phys; 
 #if LL_WINDOWS
     PROCESS_MEMORY_COUNTERS counters;
 
@@ -95,22 +97,10 @@ void LLMemory::updateMemoryInfo()
     }
 
     sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(counters.WorkingSetSize));
-    sample(sAllocatedMem, sAllocatedMemInKB);
     sAllocatedPageSizeInKB = U32Kilobytes::convert(U64Bytes(counters.PagefileUsage));
     sample(sVirtualMem, sAllocatedPageSizeInKB);
-
-    U32Kilobytes avail_phys, avail_virtual;
+    U32Kilobytes avail_virtual; 
     LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;
-    sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB);
-
-    if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
-    {
-        sAvailPhysicalMemInKB = sMaxPhysicalMemInKB - sAllocatedMemInKB ;
-    }
-    else
-    {
-        sAvailPhysicalMemInKB = U32Kilobytes(0);
-    }
 
 #elif defined(LL_DARWIN)
     task_vm_info info;
@@ -147,21 +137,39 @@ void LLMemory::updateMemoryInfo()
     if (result == KERN_SUCCESS) {
         // This is what Chrome reports as 'the "Physical Memory Free" value reported by the Memory Monitor in Instruments.'
         // Note though that inactive pages are not included here and not yet free, but could become so under memory pressure.
-        sAvailPhysicalMemInKB = U32Bytes(vmstat.free_count * page_size);
-        sMaxPhysicalMemInKB = LLMemoryInfo::getHardwareMemSize();
-      }
+        avail_phys = U32Bytes(vmstat.free_count * page_size);
+        sMaxHeapSizeInKB = LLMemoryInfo::getHardwareMemSize();
+    }
     else
     {
         LL_WARNS() << "task_info failed" << LL_ENDL;
     }
-
+#elif defined(LL_LINUX)
+    // Use sysinfo() to get the total physical memory.
+    struct sysinfo info;
+    sysinfo(&info);
+    sMaxHeapSizeInKB = U32Kilobytes::convert((U64Bytes)info.totalram); // Total RAM in system
+    avail_phys = U32Kilobytes::convert((U64Bytes)info.freeram); // Total Free RAM in system
+    sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(LLMemory::getCurrentRSS())); // represents the RAM allocated by this process only (in line with the windows implementation)
 #else
     //not valid for other systems for now.
+    LL_WARNS() << "LLMemory::updateMemoryInfo() not implemented for this platform." << LL_ENDL;
     sAllocatedMemInKB = U64Bytes(LLMemory::getCurrentRSS());
     sMaxPhysicalMemInKB = U64Bytes(U32_MAX);
     sAvailPhysicalMemInKB = U64Bytes(U32_MAX);
 #endif
+    sample(sAllocatedMem, sAllocatedMemInKB);
+    // sMaxPhysicalMem - max this process can use = the lesser of (what we already have + what's available) or MaxHeap
+    sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB); 
 
+    if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
+    {
+        sAvailPhysicalMemInKB = sMaxPhysicalMemInKB - sAllocatedMemInKB ;
+    }
+    else
+    {
+        sAvailPhysicalMemInKB = U32Kilobytes(0);
+    }
     return ;
 }
 
-- 
cgit v1.2.3


From 7322623a6fe0e5120c07b720259e3beb325b097e Mon Sep 17 00:00:00 2001
From: Brad Linden <brad@lindenlab.com>
Date: Fri, 28 Jun 2024 12:44:41 -0700
Subject: Fix pre-commit whitespace checks and merge PR secondlife/viewer#1874

---
 indra/llcommon/llmemory.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index b9f9fdae17..104c40f0d7 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -86,7 +86,7 @@ void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size)
 void LLMemory::updateMemoryInfo()
 {
     LL_PROFILE_ZONE_SCOPED
-    U32Kilobytes avail_phys; 
+    U32Kilobytes avail_phys;
 #if LL_WINDOWS
     PROCESS_MEMORY_COUNTERS counters;
 
@@ -99,7 +99,7 @@ void LLMemory::updateMemoryInfo()
     sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(counters.WorkingSetSize));
     sAllocatedPageSizeInKB = U32Kilobytes::convert(U64Bytes(counters.PagefileUsage));
     sample(sVirtualMem, sAllocatedPageSizeInKB);
-    U32Kilobytes avail_virtual; 
+    U32Kilobytes avail_virtual;
     LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;
 
 #elif defined(LL_DARWIN)
@@ -160,7 +160,7 @@ void LLMemory::updateMemoryInfo()
 #endif
     sample(sAllocatedMem, sAllocatedMemInKB);
     // sMaxPhysicalMem - max this process can use = the lesser of (what we already have + what's available) or MaxHeap
-    sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB); 
+    sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB);
 
     if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
     {
-- 
cgit v1.2.3


From 1142c2c79b79802c47720b10130bd194b2a8abf1 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 1 Jul 2024 16:43:29 +0300
Subject: Fix trailing spaces to make pre-commit happy

---
 indra/llwebrtc/llwebrtc.cpp    | 6 +++---
 indra/llwebrtc/llwebrtc.h      | 4 ++--
 indra/llwebrtc/llwebrtc_impl.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index d5bd913315..6dc632aba4 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -458,7 +458,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptr<webrtc::AudioDeviceMo
     {
         device_module->SetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice);
     }
-    else 
+    else
     {
         device_module->SetPlayoutDevice(device);
     }
@@ -656,7 +656,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn
 // Most peer connection (signaling) happens on
 // the signaling thread.
 
-LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : 
+LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() :
     mWebRTCImpl(nullptr),
     mPeerConnection(nullptr),
     mMute(false),
@@ -1171,7 +1171,7 @@ void LLWebRTCPeerConnectionImpl::OnSuccess(webrtc::SessionDescriptionInterface *
     {
         observer->OnOfferAvailable(mangled_sdp);
     }
-    
+
    mPeerConnection->SetLocalDescription(std::unique_ptr<webrtc::SessionDescriptionInterface>(
                                                      webrtc::CreateSessionDescription(webrtc::SdpType::kOffer, mangled_sdp)),
                                                  rtc::scoped_refptr<webrtc::SetLocalDescriptionObserverInterface>(this));
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index f447ea990a..54eefc8554 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -129,7 +129,7 @@ class LLWebRTCDeviceInterface
     };
 
     virtual void setAudioConfig(AudioConfig config) = 0;
-    
+
     // instructs webrtc to refresh the device list.
     virtual void refreshDevices() = 0;
 
@@ -231,7 +231,7 @@ class LLWebRTCSignalingObserver
 class LLWebRTCPeerConnectionInterface
 {
   public:
-    
+
     struct InitOptions
     {
         // equivalent of PeerConnectionInterface::IceServer
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 6672f8ce90..2fb5525519 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -235,7 +235,7 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS
 
     // The factory that allows creation of native webrtc PeerConnections.
     rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> mPeerConnectionFactory;
-    
+
     rtc::scoped_refptr<webrtc::AudioProcessing>                mAudioProcessingModule;
 
     // more native webrtc stuff
-- 
cgit v1.2.3


From b9740dfc6e72d34d135fb9dafe7eed250e4e8b6e Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Mon, 1 Jul 2024 11:52:47 +0200
Subject: Fix loop scope issue and rework some strange-looking loops

---
 indra/llui/llaccordionctrl.cpp    |  8 +++----
 indra/llui/llaccordionctrltab.cpp |  6 ++---
 indra/llui/llflatlistview.cpp     | 49 ++++++++++++++-------------------------
 3 files changed, 22 insertions(+), 41 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 4682044d6e..06f7a20add 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -379,12 +379,10 @@ void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)
 
 void LLAccordionCtrl::updateNoTabsHelpTextVisibility()
 {
-    bool visible_exists = false;
-    std::vector<LLAccordionCtrlTab*>::const_iterator it = mAccordionTabs.begin();
-    const std::vector<LLAccordionCtrlTab*>::const_iterator it_end = mAccordionTabs.end();
-    while (it < it_end)
+    bool visible_exists{ false };
+    for (auto accordion_tab : mAccordionTabs)
     {
-        if ((*(it++))->getVisible())
+        if (accordion_tab->getVisible())
         {
             visible_exists = true;
             break;
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 6d58a2545c..ac66525030 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -602,15 +602,13 @@ void LLAccordionCtrlTab::setSelected(bool is_selected)
 
 LLView* LLAccordionCtrlTab::findContainerView()
 {
-    child_list_const_iter_t it = getChildList()->begin(), it_end = getChildList()->end();
-    while (it != it_end)
+    for (auto child : *getChildList())
     {
-        LLView* child = *(it++);
         if (DD_HEADER_NAME != child->getName() && child->getVisible())
             return child;
     }
 
-    return NULL;
+    return nullptr;
 }
 
 void LLAccordionCtrlTab::selectOnFocusReceived()
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 1799968afb..53f39766c6 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -1250,17 +1250,15 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
     detached_items.clear();
     // Go through items and detach valid items, remove them from items panel
     // and add to detached_items.
-    pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
-    while (iter != iter_end)
+    for (auto item_pair : mItemPairs)
     {
-        LLPanel* pItem = (*iter)->first;
+        LLPanel* pItem = item_pair->first;
         if (1 == pItem->notify(action))
         {
-            selectItemPair((*iter), false);
+            selectItemPair(item_pair, false);
             mItemsPanel->removeChild(pItem);
-            detached_items.push_back(pItem);
+            detached_items.emplace_back(pItem);
         }
-        iter++;
     }
     if (!detached_items.empty())
     {
@@ -1268,12 +1266,10 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
         if (detached_items.size() == mItemPairs.size())
         {
             // This way will be faster if all items were disconnected
-            pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
-            while (iter != iter_end)
+            for (auto item_pair : mItemPairs)
             {
-                (*iter)->first = NULL;
-                delete *iter;
-                iter++;
+                item_pair->first = nullptr;
+                delete item_pair;
             }
             mItemPairs.clear();
             // Also set items panel height to zero.
@@ -1286,26 +1282,16 @@ void LLFlatListView::detachItems(std::vector<LLPanel*>& detached_items)
         }
         else
         {
-            std::vector<LLPanel*>::const_iterator
-                detached_iter = detached_items.begin(),
-                detached_iter_end = detached_items.end();
-            while (detached_iter < detached_iter_end)
+            for (auto detached_item : detached_items)
             {
-                LLPanel* pDetachedItem = *detached_iter;
-                pairs_iterator_t iter = mItemPairs.begin(), iter_end = mItemPairs.end();
-                while (iter != iter_end)
+                auto found_pos = std::find_if(mItemPairs.begin(), mItemPairs.end(), [detached_item](auto item_pair) { return item_pair->first == detached_item; });
+                if (found_pos != mItemPairs.end())
                 {
-                    item_pair_t* item_pair = *iter;
-                    if (item_pair->first == pDetachedItem)
-                    {
-                        mItemPairs.erase(iter);
-                        item_pair->first = NULL;
-                        delete item_pair;
-                        break;
-                    }
-                    iter++;
+                    mItemPairs.erase(found_pos);
+                    auto item_pair = *found_pos;
+                    item_pair->first = nullptr;
+                    delete item_pair;
                 }
-                detached_iter++;
             }
             rearrangeItems();
         }
@@ -1412,11 +1398,10 @@ void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent)
     action.with("match_filter", cur_filter);
 
     mHasMatchedItems = false;
-    bool visibility_changed = false;
-    pairs_const_iterator_t iter = getItemPairs().begin(), iter_end = getItemPairs().end();
-    while (iter != iter_end)
+    bool visibility_changed{ false };
+    for (auto item_pair : getItemPairs())
     {
-        LLPanel* pItem = (*(iter++))->first;
+        LLPanel* pItem = item_pair->first;
         visibility_changed |= updateItemVisibility(pItem, action);
     }
 
-- 
cgit v1.2.3


From 59cc1802814eff0742c8051b2d9200a1d4a2dc62 Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Mon, 1 Jul 2024 11:56:41 +0200
Subject: Remove include of format library that isn't used and can't be used
 without C++20 support anyway

---
 indra/newview/llvoicewebrtc.cpp | 1 -
 1 file changed, 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index ede1542bd1..8049bb7a73 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -24,7 +24,6 @@
  * $/LicenseInfo$
  */
 #include <algorithm>
-#include <format>
 #include "llvoicewebrtc.h"
 
 #include "llsdutil.h"
-- 
cgit v1.2.3


From fcc7d161083547e53b2210e20e850794b8faf4c8 Mon Sep 17 00:00:00 2001
From: Beq <beqjanus@gmail.com>
Date: Mon, 1 Jul 2024 17:13:15 +0100
Subject: Fix for various TP where a mirror is present

these manifest as crashes in isDynamic, isBox and similar calls that are accessed through a dangling probe.
---
 indra/newview/llheroprobemanager.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index 66ccdd2b32..cbe1105024 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -121,6 +121,7 @@ void LLHeroProbeManager::update()
         // Find our nearest hero candidate.
         float last_distance = 99999.f;
         float camera_center_distance = 99999.f;
+        mNearestHero = nullptr;
         for (auto vo : mHeroVOList)
         {
             if (vo && !vo->isDead() && vo->mDrawable.notNull() && vo->isReflectionProbe() && vo->getReflectionProbeIsBox())
@@ -194,11 +195,17 @@ void LLHeroProbeManager::update()
         else
         {
             mNearestHero = nullptr;
+            mDefaultProbe->mViewerObject = nullptr;
         }
 
         mHeroProbeStrength = 1;
     }
+    else
+    {
+        mNearestHero = nullptr;
+        mDefaultProbe->mViewerObject = nullptr;
     }
+}
 
 void LLHeroProbeManager::renderProbes()
 {
-- 
cgit v1.2.3


From c7bd4528a7bc295a17a12951389fcc499483f6c5 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 25 Jun 2024 19:18:23 +0300
Subject: viewer#1131 gltf model upload UI WIP

---
 indra/newview/CMakeLists.txt                       |   4 +
 indra/newview/gltfscenemanager.cpp                 |   2 +
 indra/newview/llfloateravatar.cpp                  |   5 -
 indra/newview/llfloaterdestinations.cpp            |   5 -
 indra/newview/llfloaterfonttest.cpp                |   5 -
 indra/newview/llfloatergltfasseteditor.cpp         | 111 ++++++++++++++++
 indra/newview/llfloatergltfasseteditor.h           | 114 ++++++++++++++++
 indra/newview/llgltffolderviews.cpp                | 143 +++++++++++++++++++++
 indra/newview/llgltffolderviews.h                  | 110 ++++++++++++++++
 indra/newview/llviewerfloaterreg.cpp               |   2 +
 indra/newview/llviewermenu.cpp                     |  10 ++
 .../default/xui/en/floater_gltf_asset_editor.xml   |  21 +++
 indra/newview/skins/default/xui/en/menu_viewer.xml |   8 ++
 13 files changed, 525 insertions(+), 15 deletions(-)
 create mode 100644 indra/newview/llfloatergltfasseteditor.cpp
 create mode 100644 indra/newview/llfloatergltfasseteditor.h
 create mode 100644 indra/newview/llgltffolderviews.cpp
 create mode 100644 indra/newview/llgltffolderviews.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3aaeb426da..67bcab86ff 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -219,6 +219,7 @@ set(viewer_SOURCE_FILES
     llfloaterfonttest.cpp
     llfloaterforgetuser.cpp
     llfloatergesture.cpp
+    llfloatergltfasseteditor.cpp
     llfloatergodtools.cpp
     llfloatergotoline.cpp
     llfloatergridstatus.cpp
@@ -313,6 +314,7 @@ set(viewer_SOURCE_FILES
     llgesturemgr.cpp
     llgiveinventory.cpp
     llglsandbox.cpp
+    llgltffolderviews.cpp
     llgltfmateriallist.cpp
     llgltfmaterialpreviewmgr.cpp
     llgroupactions.cpp
@@ -879,6 +881,7 @@ set(viewer_HEADER_FILES
     llfloaterfonttest.h
     llfloaterforgetuser.h
     llfloatergesture.h
+    llfloatergltfasseteditor.h
     llfloatergodtools.h
     llfloatergotoline.h
     llfloatergridstatus.h
@@ -975,6 +978,7 @@ set(viewer_HEADER_FILES
     llgesturelistener.h
     llgesturemgr.h
     llgiveinventory.h
+    llgltffolderviews.h
     llgltfmateriallist.h
     llgltfmaterialpreviewmgr.h
     llgroupactions.h
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index a0cbe9290c..b161ec8492 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -42,6 +42,7 @@
 #include "llviewertexturelist.h"
 #include "llimagej2c.h"
 #include "llfloaterperms.h"
+#include "llfloaterreg.h"
 #include "llagentbenefits.h"
 #include "llfilesystem.h"
 #include "boost/json.hpp"
@@ -314,6 +315,7 @@ void GLTFSceneManager::load(const std::string& filename)
             {
                 mObjects.push_back(obj);
             }
+            LLFloaterReg::showInstance("gltf_asset_editor");
         }
     }
     else
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
index 6a38d7549c..404316275d 100644
--- a/indra/newview/llfloateravatar.cpp
+++ b/indra/newview/llfloateravatar.cpp
@@ -25,11 +25,6 @@
  * $/LicenseInfo$
  */
 
-/**
- * Floater that appears when buying an object, giving a preview
- * of its contents and their permissions.
- */
-
 #include "llviewerprecompiledheaders.h"
 
 #include "llfloateravatar.h"
diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp
index 93cf02e835..fad9693e8f 100644
--- a/indra/newview/llfloaterdestinations.cpp
+++ b/indra/newview/llfloaterdestinations.cpp
@@ -25,11 +25,6 @@
  * $/LicenseInfo$
  */
 
-/**
- * Floater that appears when buying an object, giving a preview
- * of its contents and their permissions.
- */
-
 #include "llviewerprecompiledheaders.h"
 
 #include "llfloaterdestinations.h"
diff --git a/indra/newview/llfloaterfonttest.cpp b/indra/newview/llfloaterfonttest.cpp
index 95d08cb9ce..d39b061d40 100644
--- a/indra/newview/llfloaterfonttest.cpp
+++ b/indra/newview/llfloaterfonttest.cpp
@@ -25,11 +25,6 @@
  * $/LicenseInfo$
  */
 
-/**
- * Floater that appears when buying an object, giving a preview
- * of its contents and their permissions.
- */
-
 #include "llviewerprecompiledheaders.h"
 
 #include "llfloaterfonttest.h"
diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
new file mode 100644
index 0000000000..a2b5f573bb
--- /dev/null
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -0,0 +1,111 @@
+/**
+ * @file llfloatergltfasseteditor.cpp
+ * @author Brad Payne
+ * @brief LLFloaterFontTest class implementation
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatergltfasseteditor.h"
+
+#include "llfolderviewitem.h"
+#include "llgltffolderviews.h"
+
+bool LLGLTFSort::operator()(const LLGLTFItem* const& a, const LLGLTFItem* const& b) const
+{
+    // Comparison operator: returns "true" is a comes before b, "false" otherwise
+    S32 compare = LLStringUtil::compareDict(a->getName(), b->getName());
+    return (compare < 0);
+}
+
+/// LLGLTFViewModel
+
+LLGLTFViewModel::LLGLTFViewModel()
+    : base_t(new LLGLTFSort(), new LLGLTFFilter())
+{}
+
+void LLGLTFViewModel::sort(LLFolderViewFolder* folder)
+{
+    base_t::sort(folder);
+}
+
+ /// LLGLTFNode
+// LLUICtrlFactory::create<LLGLTFNode>(params);
+class LLGLTFNode : public LLFolderViewItem
+{
+public:
+    struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
+    {
+        Params();
+    };
+    ~LLGLTFNode();
+protected:
+    LLGLTFNode(const Params& p);
+};
+
+LLGLTFNode::LLGLTFNode(const LLGLTFNode::Params& p)
+    : LLFolderViewItem(p)
+{
+}
+
+LLGLTFNode::~LLGLTFNode()
+{
+}
+
+LLFloaterGltfAssetEditor::LLFloaterGltfAssetEditor(const LLSD& key)
+    : LLFloater(key)
+{
+    setTitle("GLTF Asset Editor (WIP)");
+}
+
+/// LLFloaterGltfAssetEditor
+
+LLFloaterGltfAssetEditor::~LLFloaterGltfAssetEditor()
+{
+}
+
+bool LLFloaterGltfAssetEditor::postBuild()
+{
+    mItemListPanel = getChild<LLPanel>("item_list_panel");
+
+    // Create the root model and view for all conversation sessions
+    LLGLTFItem* base_item = new LLGLTFItem(mGLTFViewModel);
+
+    LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>());
+    p.name = getName();
+    p.title = getLabel();
+    p.rect = LLRect(0, 0, getRect().getWidth(), 0);
+    p.parent_panel = mItemListPanel;
+    p.tool_tip = p.name;
+    p.listener = base_item;
+    p.view_model = &mGLTFViewModel;
+    p.root = NULL;
+    p.use_ellipses = true;
+    p.options_menu = "menu_gltf.xml"; // *TODO : create this or fix to be optional
+    mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
+    mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
+    mConversationsRoot->setEnableRegistrar(&mEnableCallbackRegistrar);
+
+    return true;
+}
diff --git a/indra/newview/llfloatergltfasseteditor.h b/indra/newview/llfloatergltfasseteditor.h
new file mode 100644
index 0000000000..30000506ae
--- /dev/null
+++ b/indra/newview/llfloatergltfasseteditor.h
@@ -0,0 +1,114 @@
+/**
+ * @file llfloatergltfasseteditor.h
+ * @author Brad Payne
+ * @brief floater to exercise standard fonts
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERGLTFASSETEDITOR_H
+#define LL_LLFLOATERGLTFASSETEDITOR_H
+
+#include "llfloater.h"
+
+#include "llfolderviewmodel.h"
+#include "llgltffolderviews.h"
+
+class LLGLTFViewModel;
+class LLFolderViewFolder;
+class LLFolderViewModelItem;
+
+class LLGLTFSort
+{
+public:
+    LLGLTFSort() { }
+    bool operator()(const LLGLTFItem* const& a, const LLGLTFItem* const& b) const;
+private:
+};
+
+class LLGLTFFilter : public LLFolderViewFilter
+{
+public:
+    LLGLTFFilter() { mEmpty = ""; }
+    ~LLGLTFFilter() {}
+
+    bool                check(const LLFolderViewModelItem* item) { return true; }
+    bool                checkFolder(const LLFolderViewModelItem* folder) const { return true; }
+    void                setEmptyLookupMessage(const std::string& message) { }
+    std::string         getEmptyLookupMessage(bool is_empty_folder = false) const { return mEmpty; }
+    bool                showAllResults() const { return true; }
+    std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const { return std::string::npos; }
+    std::string::size_type getFilterStringSize() const { return 0; }
+
+    bool                isActive() const { return false; }
+    bool                isModified() const { return false; }
+    void                clearModified() { }
+    const std::string& getName() const { return mEmpty; }
+    const std::string& getFilterText() { return mEmpty; }
+    void                setModified(EFilterModified behavior = FILTER_RESTART) { }
+
+    void                resetTime(S32 timeout) { }
+    bool                isTimedOut() { return false; }
+
+    bool                isDefault() const { return true; }
+    bool                isNotDefault() const { return false; }
+    void                markDefault() { }
+    void                resetDefault() { }
+
+    S32                 getCurrentGeneration() const { return 0; }
+    S32                 getFirstSuccessGeneration() const { return 0; }
+    S32                 getFirstRequiredGeneration() const { return 0; }
+private:
+    std::string mEmpty;
+};
+
+class LLGLTFViewModel
+    : public LLFolderViewModel<LLGLTFSort, LLGLTFItem, LLGLTFItem, LLGLTFFilter>
+{
+public:
+    typedef LLFolderViewModel< LLGLTFSort, LLGLTFItem, LLGLTFItem, LLGLTFFilter> base_t;
+    LLGLTFViewModel();
+
+    void sort(LLFolderViewFolder* folder);
+    bool startDrag(std::vector<LLFolderViewModelItem*>& items) { return false; }
+
+private:
+};
+
+class LLFloaterGltfAssetEditor : public LLFloater
+{
+public:
+    LLFloaterGltfAssetEditor(const LLSD& key);
+    ~LLFloaterGltfAssetEditor();
+
+    bool postBuild() override;
+
+    LLGLTFViewModel& getRootViewModel() { return mGLTFViewModel; }
+
+private:
+    LLGLTFViewModel mGLTFViewModel;
+
+    LLPanel* mItemListPanel = nullptr;
+    LLFolderView* mConversationsRoot = nullptr;
+};
+
+#endif LL_LLFLOATERGLTFASSETEDITOR_H
diff --git a/indra/newview/llgltffolderviews.cpp b/indra/newview/llgltffolderviews.cpp
new file mode 100644
index 0000000000..911b6262ca
--- /dev/null
+++ b/indra/newview/llgltffolderviews.cpp
@@ -0,0 +1,143 @@
+/**
+ * @file llgltffolderviews.cpp
+ * @author Andrey Kleshchev
+ * @brief LLFloaterFontTest class implementation
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llgltffolderviews.h"
+#include "llinventoryicon.h"
+
+/// LLGLTFItem
+
+LLGLTFItem::LLGLTFItem(std::string display_name, LLFolderViewModelInterface& root_view_model)
+    : LLFolderViewModelItemCommon(root_view_model)
+    , mName(display_name)
+{
+    init();
+}
+
+LLGLTFItem::LLGLTFItem(LLFolderViewModelInterface& root_view_model)
+    : LLFolderViewModelItemCommon(root_view_model)
+{
+    init();
+}
+
+LLGLTFItem::~LLGLTFItem()
+{
+
+}
+
+void LLGLTFItem::init()
+{
+    pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);
+}
+
+
+bool LLGLTFItem::filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter)
+{
+    S32 filter_generation = filter.getCurrentGeneration();
+
+    bool continue_filtering = true;
+    if (item)
+    {
+        if (item->getLastFilterGeneration() < filter_generation)
+        {
+            // Recursive application of the filter for child items (CHUI-849)
+            continue_filtering = item->filter(filter);
+        }
+
+        // Update latest generation to pass filter in parent and propagate up to root
+        if (item->passedFilter())
+        {
+            LLGLTFItem* view_model = this;
+
+            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+            {
+                view_model->mMostFilteredDescendantGeneration = filter_generation;
+                view_model = static_cast<LLGLTFItem*>(view_model->mParent);
+            }
+        }
+    }
+    return continue_filtering;
+}
+
+bool LLGLTFItem::filter(LLFolderViewFilter& filter)
+{
+
+    const S32 filter_generation = filter.getCurrentGeneration();
+    const S32 must_pass_generation = filter.getFirstRequiredGeneration();
+
+    if (getLastFilterGeneration() >= must_pass_generation
+        && getLastFolderFilterGeneration() >= must_pass_generation
+        && !passedFilter(must_pass_generation))
+    {
+        // failed to pass an earlier filter that was a subset of the current one
+        // go ahead and flag this item as not pass
+        setPassedFilter(false, filter_generation);
+        setPassedFolderFilter(false, filter_generation);
+        return true;
+    }
+
+    bool is_folder = true;
+    const bool passed_filter_folder = is_folder ? filter.checkFolder(this) : true;
+    setPassedFolderFilter(passed_filter_folder, filter_generation);
+
+    bool continue_filtering = true;
+
+    if (!mChildren.empty()
+        && (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
+            || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
+    {
+        // now query children
+        for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter)
+        {
+            continue_filtering = filterChildItem((*iter), filter);
+            if (!continue_filtering)
+            {
+                break;
+            }
+        }
+    }
+
+    // If we didn't use all the filter time that means we filtered all of our descendants so we can filter ourselves now
+    if (continue_filtering)
+    {
+        // This is where filter check on the item done (CHUI-849)
+        const bool passed_filter = filter.check(this);
+        if (passed_filter && mChildren.empty() && is_folder) // Update the latest filter generation for empty folders
+        {
+            LLGLTFItem* view_model = this;
+            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+            {
+                view_model->mMostFilteredDescendantGeneration = filter_generation;
+                view_model = static_cast<LLGLTFItem*>(view_model->mParent);
+            }
+        }
+        setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
+        continue_filtering = !filter.isTimedOut();
+    }
+    return continue_filtering;
+}
diff --git a/indra/newview/llgltffolderviews.h b/indra/newview/llgltffolderviews.h
new file mode 100644
index 0000000000..294074fd9f
--- /dev/null
+++ b/indra/newview/llgltffolderviews.h
@@ -0,0 +1,110 @@
+/**
+ * @file llgltffolderviews.h
+ * @author Andrey Kleshchev
+ * @brief floater to exercise standard fonts
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERGLTFFOLDERVIEWS_H
+#define LL_LLFLOATERGLTFFOLDERVIEWS_H
+
+#include "llfloater.h"
+
+#include "llfolderviewmodel.h"
+
+class LLGLTFItem : public LLFolderViewModelItemCommon
+{
+public:
+    LLGLTFItem(std::string display_name, LLFolderViewModelInterface& root_view_model);
+    LLGLTFItem(LLFolderViewModelInterface& root_view_model);
+    virtual ~LLGLTFItem();
+
+    void init();
+
+    const std::string& getName() const override { return mName; }
+    const std::string& getDisplayName() const override { return mName; }
+    const std::string& getSearchableName() const override { return mName; }
+
+    std::string getSearchableDescription() const override { return std::string(); }
+    std::string getSearchableCreatorName()const override { return std::string(); }
+    std::string getSearchableUUIDString() const override { return std::string(); }
+
+    LLPointer<LLUIImage> getIcon() const override { return pIcon; }
+    LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
+    LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
+
+    LLFontGL::StyleFlags getLabelStyle() const override { return LLFontGL::NORMAL; }
+    std::string getLabelSuffix() const override { return std::string(); }
+
+    void openItem(void) override {}
+    void closeItem(void) override {}
+    void selectItem(void) override {}
+
+    void navigateToFolder(bool new_window = false, bool change_mode = false) override {}
+
+    bool isItemWearable() const { return false; }
+
+    bool isItemRenameable() const override { return false; }
+    bool renameItem(const std::string& new_name) override { return false; }
+
+    bool isItemMovable(void) const override { return false; } // Can be moved to another folder
+    void move(LLFolderViewModelItem* parent_listener) override {}
+
+    bool isItemRemovable(bool check_worn = true) const override { return false; }
+    bool removeItem() override { return false; }
+    void removeBatch(std::vector<LLFolderViewModelItem*>& batch) override {}
+
+    bool isItemCopyable(bool can_copy_as_link = true) const override { return false; }
+    bool copyToClipboard() const override { return false; }
+    bool cutToClipboard() override { return false; }
+    bool isCutToClipboard() { return false; }
+
+    bool isClipboardPasteable() const override { return false; }
+    void pasteFromClipboard() override {}
+    void pasteLinkFromClipboard() override {}
+
+    void buildContextMenu(LLMenuGL& menu, U32 flags) override {};
+
+    bool potentiallyVisible() override { return true; }; // is the item definitely visible or we haven't made up our minds yet?
+
+    bool hasChildren() const override { return mChildren.size() > 0; }
+
+    bool dragOrDrop(
+        MASK mask,
+        bool drop,
+        EDragAndDropType cargo_type,
+        void* cargo_data,
+        std::string& tooltip_msg) override
+    {
+        return false;
+    }
+
+    bool filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter);
+    bool filter(LLFolderViewFilter& filter) override;
+
+private:
+    LLUIImagePtr pIcon;
+    std::string mName;
+};
+
+#endif LL_LLFLOATERGLTFFOLDERVIEWS_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index ceda2675d5..36fd1015f6 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -76,6 +76,7 @@
 #include "llfloaterfonttest.h"
 #include "llfloaterforgetuser.h"
 #include "llfloatergesture.h"
+#include "llfloatergltfasseteditor.h"
 #include "llfloatergodtools.h"
 #include "llfloatergridstatus.h"
 #include "llfloatergroups.h"
@@ -372,6 +373,7 @@ void LLViewerFloaterReg::registerFloaters()
     LLFloaterReg::add("forget_username", "floater_forget_user.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterForgetUser>);
 
     LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGesture>);
+    LLFloaterReg::add("gltf_asset_editor", "floater_gltf_asset_editor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGltfAssetEditor>);
     LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
     LLFloaterReg::add("grid_status", "floater_grid_status.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGridStatus>);
     LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9a9a316adf..2687938b35 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8139,6 +8139,15 @@ class LLAdvancedClickGLTFUpload: public view_listener_t
     }
 };
 
+class LLAdvancedClickGLTFEdit : public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        LLFloaterReg::showInstance("gltf_asset_editor");
+        return true;
+    }
+};
+
 class LLAdvancedClickResizeWindow : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
@@ -9794,6 +9803,7 @@ void initialize_menus()
     view_listener_t::addMenu(new LLAdvancedClickGLTFOpen(), "Advanced.ClickGLTFOpen");
     view_listener_t::addMenu(new LLAdvancedClickGLTFSaveAs(), "Advanced.ClickGLTFSaveAs");
     view_listener_t::addMenu(new LLAdvancedClickGLTFUpload(), "Advanced.ClickGLTFUpload");
+    view_listener_t::addMenu(new LLAdvancedClickGLTFEdit(), "Advanced.ClickGLTFEdit");
     view_listener_t::addMenu(new LLAdvancedClickResizeWindow(), "Advanced.ClickResizeWindow");
     view_listener_t::addMenu(new LLAdvancedPurgeShaderCache(), "Advanced.ClearShaderCache");
     view_listener_t::addMenu(new LLAdvancedRebuildTerrain(), "Advanced.RebuildTerrain");
diff --git a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
new file mode 100644
index 0000000000..9082486d84
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_resize="true"
+ default_tab_group="1"
+ height="891"
+ width="256"
+ min_height="500"
+ min_width="256"
+ layout="topleft"
+ name="gltf asset editor"
+ title="[OBJECT_NAME]">
+    <panel
+     bottom="-1"
+     follows="all"
+     layout="topleft"
+     name="item_list_panel"
+     top_pad="0"
+     left="5"
+     right="-1"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d5d2d00630..347638249b 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2851,6 +2851,14 @@ function="World.EnvPreset"
           <menu_item_call.on_click
            function="Advanced.ClickGLTFUpload" />
         </menu_item_call>
+        <menu_item_call
+         label="Edit..."
+         name="Edit...">
+          <menu_item_call.on_enable
+             function="EnableGLTFUpload"/>
+          <menu_item_call.on_click
+           function="Advanced.ClickGLTFEdit" />
+        </menu_item_call>
       </menu>
       <menu
          create_jump_keys="true"
-- 
cgit v1.2.3


From e75595a1c193abb95075b27ab5641a3b28556c2e Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 27 Jun 2024 18:03:30 +0300
Subject: viewer#1131 gltf model upload UI WIP #2

---
 indra/newview/CMakeLists.txt                       |   6 +-
 indra/newview/llfloatergltfasseteditor.cpp         | 251 ++++++++++++++++-----
 indra/newview/llfloatergltfasseteditor.h           |  89 ++------
 indra/newview/llgltffolderitem.cpp                 | 164 ++++++++++++++
 indra/newview/llgltffolderitem.h                   | 128 +++++++++++
 indra/newview/llgltffoldermodel.cpp                |  73 ++++++
 indra/newview/llgltffoldermodel.h                  |  91 ++++++++
 indra/newview/llgltffolderviews.cpp                | 143 ------------
 indra/newview/llgltffolderviews.h                  | 110 ---------
 indra/newview/llviewerfloaterreg.cpp               |   2 +-
 .../default/xui/en/floater_gltf_asset_editor.xml   |  15 +-
 11 files changed, 690 insertions(+), 382 deletions(-)
 create mode 100644 indra/newview/llgltffolderitem.cpp
 create mode 100644 indra/newview/llgltffolderitem.h
 create mode 100644 indra/newview/llgltffoldermodel.cpp
 create mode 100644 indra/newview/llgltffoldermodel.h
 delete mode 100644 indra/newview/llgltffolderviews.cpp
 delete mode 100644 indra/newview/llgltffolderviews.h

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 67bcab86ff..cbcc85cc1c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -314,7 +314,8 @@ set(viewer_SOURCE_FILES
     llgesturemgr.cpp
     llgiveinventory.cpp
     llglsandbox.cpp
-    llgltffolderviews.cpp
+    llgltffolderitem.cpp
+    llgltffoldermodel.cpp
     llgltfmateriallist.cpp
     llgltfmaterialpreviewmgr.cpp
     llgroupactions.cpp
@@ -978,7 +979,8 @@ set(viewer_HEADER_FILES
     llgesturelistener.h
     llgesturemgr.h
     llgiveinventory.h
-    llgltffolderviews.h
+    llgltffolderitem.h
+    llgltffoldermodel.h
     llgltfmateriallist.h
     llgltfmaterialpreviewmgr.h
     llgroupactions.h
diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index a2b5f573bb..62546c6ed9 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -1,7 +1,7 @@
 /**
  * @file llfloatergltfasseteditor.cpp
- * @author Brad Payne
- * @brief LLFloaterFontTest class implementation
+ * @author Andrii Kleshchev
+ * @brief LLFloaterGltfAssetEditor class implementation
  *
  * $LicenseInfo:firstyear=2008&license=viewerlgpl$
  * Second Life Viewer Source Code
@@ -29,72 +29,48 @@
 
 #include "llfloatergltfasseteditor.h"
 
-#include "llfolderviewitem.h"
-#include "llgltffolderviews.h"
+#include "gltf/asset.h"
+#include "llcallbacklist.h"
+#include "llselectmgr.h"
+#include "llviewerobject.h"
 
-bool LLGLTFSort::operator()(const LLGLTFItem* const& a, const LLGLTFItem* const& b) const
-{
-    // Comparison operator: returns "true" is a comes before b, "false" otherwise
-    S32 compare = LLStringUtil::compareDict(a->getName(), b->getName());
-    return (compare < 0);
-}
-
-/// LLGLTFViewModel
-
-LLGLTFViewModel::LLGLTFViewModel()
-    : base_t(new LLGLTFSort(), new LLGLTFFilter())
-{}
-
-void LLGLTFViewModel::sort(LLFolderViewFolder* folder)
-{
-    base_t::sort(folder);
-}
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
 
- /// LLGLTFNode
-// LLUICtrlFactory::create<LLGLTFNode>(params);
-class LLGLTFNode : public LLFolderViewItem
-{
-public:
-    struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
-    {
-        Params();
-    };
-    ~LLGLTFNode();
-protected:
-    LLGLTFNode(const Params& p);
-};
-
-LLGLTFNode::LLGLTFNode(const LLGLTFNode::Params& p)
-    : LLFolderViewItem(p)
-{
-}
-
-LLGLTFNode::~LLGLTFNode()
-{
-}
+/// LLFloaterGLTFAssetEditor
 
-LLFloaterGltfAssetEditor::LLFloaterGltfAssetEditor(const LLSD& key)
+LLFloaterGLTFAssetEditor::LLFloaterGLTFAssetEditor(const LLSD& key)
     : LLFloater(key)
+    , mUIColor(LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE))
 {
     setTitle("GLTF Asset Editor (WIP)");
 }
 
-/// LLFloaterGltfAssetEditor
-
-LLFloaterGltfAssetEditor::~LLFloaterGltfAssetEditor()
+LLFloaterGLTFAssetEditor::~LLFloaterGLTFAssetEditor()
 {
+    gIdleCallbacks.deleteFunction(idle, this);
 }
 
-bool LLFloaterGltfAssetEditor::postBuild()
+bool LLFloaterGLTFAssetEditor::postBuild()
 {
     mItemListPanel = getChild<LLPanel>("item_list_panel");
 
+    LLRect scroller_view_rect = mItemListPanel->getRect();
+    scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
+    LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>());
+    scroller_params.rect(scroller_view_rect);
+    scroller_params.name("folder_scroller");
+    mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
+    mScroller->setFollowsAll();
+
+    // Insert that scroller into the panel widgets hierarchy
+    mItemListPanel->addChild(mScroller);
+
     // Create the root model and view for all conversation sessions
-    LLGLTFItem* base_item = new LLGLTFItem(mGLTFViewModel);
+    LLGLTFFolderItem* base_item = new LLGLTFFolderItem(mGLTFViewModel);
 
     LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>());
-    p.name = getName();
-    p.title = getLabel();
+    p.name = "Root";
+    p.title = "Root";
     p.rect = LLRect(0, 0, getRect().getWidth(), 0);
     p.parent_panel = mItemListPanel;
     p.tool_tip = p.name;
@@ -103,9 +79,176 @@ bool LLFloaterGltfAssetEditor::postBuild()
     p.root = NULL;
     p.use_ellipses = true;
     p.options_menu = "menu_gltf.xml"; // *TODO : create this or fix to be optional
-    mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
-    mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
-    mConversationsRoot->setEnableRegistrar(&mEnableCallbackRegistrar);
+    mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p);
+    mFolderRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
+    mFolderRoot->setEnableRegistrar(&mEnableCallbackRegistrar);
+    // Attach root to the scroller
+    mScroller->addChild(mFolderRoot);
+    mFolderRoot->setScrollContainer(mScroller);
+    mFolderRoot->setFollowsAll();
+    mFolderRoot->setOpen(true);
+    mScroller->setVisible(true);
+
+    gIdleCallbacks.addFunction(idle, this);
 
     return true;
 }
+
+void LLFloaterGLTFAssetEditor::onOpen(const LLSD& key)
+{
+    loadFromSelection();
+}
+
+void LLFloaterGLTFAssetEditor::idle(void* user_data)
+{
+    LLFloaterGLTFAssetEditor* floater = (LLFloaterGLTFAssetEditor*)user_data;
+
+    if (floater->mFolderRoot)
+    {
+        floater->mFolderRoot->update();
+    }
+}
+
+void LLFloaterGLTFAssetEditor::loadItem(S32 id, const std::string& name, LLGLTFFolderItem::EType type, LLFolderViewFolder* parent)
+{
+    LLGLTFFolderItem* listener = new LLGLTFFolderItem(id, name, type, mGLTFViewModel);
+
+    LLFolderViewItem::Params params;
+    params.name(name);
+    params.creation_date(0);
+    params.root(mFolderRoot);
+    params.listener(listener);
+    params.rect(LLRect());
+    params.tool_tip = params.name;
+    params.font_color = mUIColor;
+    params.font_highlight_color = mUIColor;
+    LLFolderViewItem* view = LLUICtrlFactory::create<LLFolderViewItem>(params);
+
+    view->addToFolder(parent);
+    view->setVisible(true);
+}
+
+void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* parent)
+{
+    if (mAsset->mNodes.size() <= node_id)
+    {
+        return;
+    }
+
+    LL::GLTF::Node& node = mAsset->mNodes[node_id];
+
+    std::string name = node.mName;
+    if (node.mName.empty())
+    {
+        name = getString("node_tittle");
+    }
+    else
+    {
+        name = node.mName;
+    }
+
+    LLGLTFFolderItem* listener = new LLGLTFFolderItem(node_id, name, LLGLTFFolderItem::TYPE_NODE, mGLTFViewModel);
+
+    LLFolderViewFolder::Params p;
+    p.root = mFolderRoot;
+    p.listener = listener;
+    p.name = name;
+    p.tool_tip = name;
+    p.font_color = mUIColor;
+    p.font_highlight_color = mUIColor;
+    LLFolderViewFolder* view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
+
+    view->addToFolder(parent);
+    view->setVisible(true);
+    view->setOpen(true);
+
+    for (S32& node_id : node.mChildren)
+    {
+        loadFromNode(node_id, view);
+    }
+
+    if (node.mMesh != LL::GLTF::INVALID_INDEX && mAsset->mMeshes.size() > node.mMesh)
+    {
+        std::string name = mAsset->mMeshes[node.mMesh].mName;
+        if (name.empty())
+        {
+            name = getString("mesh_tittle");
+        }
+        loadItem(node.mMesh, name, LLGLTFFolderItem::TYPE_MESH, view);
+    }
+
+    if (node.mSkin != LL::GLTF::INVALID_INDEX && mAsset->mSkins.size() > node.mSkin)
+    {
+        std::string name = mAsset->mSkins[node.mSkin].mName;
+        if (name.empty())
+        {
+            name = getString("skin_tittle");
+        }
+        loadItem(node.mSkin, name, LLGLTFFolderItem::TYPE_SKIN, view);
+    }
+
+    view->setChildrenInited(true);
+}
+
+void LLFloaterGLTFAssetEditor::loadFromSelection()
+{
+    if (!mFolderRoot || LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1)
+    {
+        return;
+    }
+
+    LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
+    if (!objectp)
+    {
+        return;
+    }
+
+    mAsset = objectp->mGLTFAsset;
+    if (!mAsset)
+    {
+        return;
+    }
+
+    LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+    for (S32 i = 0; i < mAsset->mScenes.size(); i++)
+    {
+        LL::GLTF::Scene& scene = mAsset->mScenes[i];
+        std::string name = scene.mName;
+        if (scene.mName.empty())
+        {
+            name = getString("scene_tittle");
+        }
+        else
+        {
+            name = scene.mName;
+        }
+
+        LLGLTFFolderItem* listener = new LLGLTFFolderItem(i, name, LLGLTFFolderItem::TYPE_SCENE, mGLTFViewModel);
+
+
+        LLFolderViewFolder::Params p;
+        p.name = name;
+        p.root = mFolderRoot;
+        p.listener = listener;
+        p.tool_tip = name;
+        p.font_color = mUIColor;
+        p.font_highlight_color = mUIColor;
+        LLFolderViewFolder* view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
+
+        view->addToFolder(mFolderRoot);
+        view->setVisible(true);
+        view->setOpen(true);
+
+        for (S32& node_id : scene.mNodes)
+        {
+            loadFromNode(node_id, view);
+        }
+        view->setChildrenInited(true);
+    }
+
+    mGLTFViewModel.requestSortAll();
+    mFolderRoot->setChildrenInited(true);
+    mFolderRoot->arrangeAll();
+    mFolderRoot->update();
+}
+
diff --git a/indra/newview/llfloatergltfasseteditor.h b/indra/newview/llfloatergltfasseteditor.h
index 30000506ae..49c5aa4ae7 100644
--- a/indra/newview/llfloatergltfasseteditor.h
+++ b/indra/newview/llfloatergltfasseteditor.h
@@ -1,7 +1,7 @@
 /**
  * @file llfloatergltfasseteditor.h
- * @author Brad Payne
- * @brief floater to exercise standard fonts
+ * @author Andrii Kleshchev
+ * @brief LLFloaterGltfAssetEditor header file
  *
  * $LicenseInfo:firstyear=2024&license=viewerlgpl$
  * Second Life Viewer Source Code
@@ -30,85 +30,40 @@
 
 #include "llfloater.h"
 
-#include "llfolderviewmodel.h"
-#include "llgltffolderviews.h"
+#include "llgltffoldermodel.h"
 
-class LLGLTFViewModel;
-class LLFolderViewFolder;
-class LLFolderViewModelItem;
-
-class LLGLTFSort
-{
-public:
-    LLGLTFSort() { }
-    bool operator()(const LLGLTFItem* const& a, const LLGLTFItem* const& b) const;
-private:
-};
-
-class LLGLTFFilter : public LLFolderViewFilter
-{
-public:
-    LLGLTFFilter() { mEmpty = ""; }
-    ~LLGLTFFilter() {}
-
-    bool                check(const LLFolderViewModelItem* item) { return true; }
-    bool                checkFolder(const LLFolderViewModelItem* folder) const { return true; }
-    void                setEmptyLookupMessage(const std::string& message) { }
-    std::string         getEmptyLookupMessage(bool is_empty_folder = false) const { return mEmpty; }
-    bool                showAllResults() const { return true; }
-    std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const { return std::string::npos; }
-    std::string::size_type getFilterStringSize() const { return 0; }
-
-    bool                isActive() const { return false; }
-    bool                isModified() const { return false; }
-    void                clearModified() { }
-    const std::string& getName() const { return mEmpty; }
-    const std::string& getFilterText() { return mEmpty; }
-    void                setModified(EFilterModified behavior = FILTER_RESTART) { }
-
-    void                resetTime(S32 timeout) { }
-    bool                isTimedOut() { return false; }
-
-    bool                isDefault() const { return true; }
-    bool                isNotDefault() const { return false; }
-    void                markDefault() { }
-    void                resetDefault() { }
-
-    S32                 getCurrentGeneration() const { return 0; }
-    S32                 getFirstSuccessGeneration() const { return 0; }
-    S32                 getFirstRequiredGeneration() const { return 0; }
-private:
-    std::string mEmpty;
-};
-
-class LLGLTFViewModel
-    : public LLFolderViewModel<LLGLTFSort, LLGLTFItem, LLGLTFItem, LLGLTFFilter>
+namespace LL
 {
-public:
-    typedef LLFolderViewModel< LLGLTFSort, LLGLTFItem, LLGLTFItem, LLGLTFFilter> base_t;
-    LLGLTFViewModel();
+    namespace GLTF
+    {
+        class Asset;
+    }
+}
 
-    void sort(LLFolderViewFolder* folder);
-    bool startDrag(std::vector<LLFolderViewModelItem*>& items) { return false; }
-
-private:
-};
-
-class LLFloaterGltfAssetEditor : public LLFloater
+class LLFloaterGLTFAssetEditor : public LLFloater
 {
 public:
-    LLFloaterGltfAssetEditor(const LLSD& key);
-    ~LLFloaterGltfAssetEditor();
+    LLFloaterGLTFAssetEditor(const LLSD& key);
+    ~LLFloaterGLTFAssetEditor();
 
     bool postBuild() override;
+    void onOpen(const LLSD& key) override;
 
     LLGLTFViewModel& getRootViewModel() { return mGLTFViewModel; }
 
+    static void idle(void* user_data);
+    void loadItem(S32 id, const std::string& name, LLGLTFFolderItem::EType type, LLFolderViewFolder* parent);
+    void loadFromNode(S32 node, LLFolderViewFolder* parent);
+    void loadFromSelection();
+
 private:
     LLGLTFViewModel mGLTFViewModel;
+    LLUIColor mUIColor;
 
     LLPanel* mItemListPanel = nullptr;
-    LLFolderView* mConversationsRoot = nullptr;
+    LLFolderView* mFolderRoot = nullptr;
+    LLScrollContainer* mScroller = nullptr;
+    std::shared_ptr<LL::GLTF::Asset> mAsset;
 };
 
 #endif LL_LLFLOATERGLTFASSETEDITOR_H
diff --git a/indra/newview/llgltffolderitem.cpp b/indra/newview/llgltffolderitem.cpp
new file mode 100644
index 0000000000..c4fcb4f5ce
--- /dev/null
+++ b/indra/newview/llgltffolderitem.cpp
@@ -0,0 +1,164 @@
+/**
+ * @file llgltffolderitem.cpp
+ * @author Andrey Kleshchev
+ * @brief LLGLTFFolderItem class implementation
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llgltffolderitem.h"
+
+#include "llinventoryicon.h"
+
+/// LLGLTFItem
+
+LLGLTFFolderItem::LLGLTFFolderItem(S32 id, const std::string &display_name, EType type, LLFolderViewModelInterface& root_view_model)
+    : LLFolderViewModelItemCommon(root_view_model)
+    , mName(display_name)
+    , mItemType(type)
+    , mItemId(id)
+{
+    init();
+}
+
+LLGLTFFolderItem::LLGLTFFolderItem(LLFolderViewModelInterface& root_view_model)
+    : LLFolderViewModelItemCommon(root_view_model)
+{
+    init();
+}
+
+LLGLTFFolderItem::~LLGLTFFolderItem()
+{
+
+}
+
+void LLGLTFFolderItem::init()
+{
+    // using inventory icons as a placeholder.
+    // Todo: GLTF needs to have own icons
+    switch (mItemType)
+    {
+    case TYPE_SCENE:
+        pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT_MULTI);
+        break;
+    case TYPE_NODE:
+        pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);
+        break;
+    case TYPE_MESH:
+        pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_MESH);
+        break;
+    case TYPE_SKIN:
+        pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_BODYPART_SKIN);
+        break;
+    default:
+        pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);
+        break;
+    }
+}
+
+
+bool LLGLTFFolderItem::filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter)
+{
+    S32 filter_generation = filter.getCurrentGeneration();
+
+    bool continue_filtering = true;
+    if (item)
+    {
+        if (item->getLastFilterGeneration() < filter_generation)
+        {
+            // Recursive application of the filter for child items (CHUI-849)
+            continue_filtering = item->filter(filter);
+        }
+
+        // Update latest generation to pass filter in parent and propagate up to root
+        if (item->passedFilter())
+        {
+            LLGLTFFolderItem* view_model = this;
+
+            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+            {
+                view_model->mMostFilteredDescendantGeneration = filter_generation;
+                view_model = static_cast<LLGLTFFolderItem*>(view_model->mParent);
+            }
+        }
+    }
+    return continue_filtering;
+}
+
+bool LLGLTFFolderItem::filter(LLFolderViewFilter& filter)
+{
+    const S32 filter_generation = filter.getCurrentGeneration();
+    const S32 must_pass_generation = filter.getFirstRequiredGeneration();
+
+    if (getLastFilterGeneration() >= must_pass_generation
+        && getLastFolderFilterGeneration() >= must_pass_generation
+        && !passedFilter(must_pass_generation))
+    {
+        // failed to pass an earlier filter that was a subset of the current one
+        // go ahead and flag this item as not pass
+        setPassedFilter(false, filter_generation);
+        setPassedFolderFilter(false, filter_generation);
+        return true;
+    }
+
+    bool is_folder = true;
+    const bool passed_filter_folder = is_folder ? filter.checkFolder(this) : true;
+    setPassedFolderFilter(passed_filter_folder, filter_generation);
+
+    bool continue_filtering = true;
+
+    if (!mChildren.empty()
+        && (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
+            || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
+    {
+        // now query children
+        for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter)
+        {
+            continue_filtering = filterChildItem((*iter), filter);
+            if (!continue_filtering)
+            {
+                break;
+            }
+        }
+    }
+
+    // If we didn't use all the filter time that means we filtered all of our descendants so we can filter ourselves now
+    if (continue_filtering)
+    {
+        // This is where filter check on the item done (CHUI-849)
+        const bool passed_filter = filter.check(this);
+        if (passed_filter && mChildren.empty() && is_folder) // Update the latest filter generation for empty folders
+        {
+            LLGLTFFolderItem* view_model = this;
+            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+            {
+                view_model->mMostFilteredDescendantGeneration = filter_generation;
+                view_model = static_cast<LLGLTFFolderItem*>(view_model->mParent);
+            }
+        }
+        setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
+        continue_filtering = !filter.isTimedOut();
+    }
+    return continue_filtering;
+}
diff --git a/indra/newview/llgltffolderitem.h b/indra/newview/llgltffolderitem.h
new file mode 100644
index 0000000000..be6e264368
--- /dev/null
+++ b/indra/newview/llgltffolderitem.h
@@ -0,0 +1,128 @@
+/**
+ * @file llgltffolderitem.h
+ * @author Andrey Kleshchev
+ * @brief LLGLTFFolderItem header file
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLGLTFFOLDERITEM_H
+#define LL_LLGLTFFOLDERITEM_H
+
+#include "llfloater.h"
+
+#include "llfolderviewmodel.h"
+
+class LLGLTFFolderItem : public LLFolderViewModelItemCommon
+{
+public:
+    enum EType
+    {
+        TYPE_ROOT,
+        TYPE_SCENE,
+        TYPE_NODE,
+        TYPE_MESH,
+        TYPE_SKIN,
+    };
+
+    LLGLTFFolderItem(S32 id, const std::string &display_name, EType type, LLFolderViewModelInterface& root_view_model);
+    LLGLTFFolderItem(LLFolderViewModelInterface& root_view_model);
+    virtual ~LLGLTFFolderItem();
+
+    void init();
+
+    const std::string& getName() const override { return mName; }
+    const std::string& getDisplayName() const override { return mName; }
+    const std::string& getSearchableName() const override { return mName; }
+
+    std::string getSearchableDescription() const override { return std::string(); }
+    std::string getSearchableCreatorName()const override { return std::string(); }
+    std::string getSearchableUUIDString() const override { return std::string(); }
+
+    LLPointer<LLUIImage> getIcon() const override { return pIcon; }
+    LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
+    LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
+
+    LLFontGL::StyleFlags getLabelStyle() const override { return LLFontGL::NORMAL; }
+    std::string getLabelSuffix() const override { return std::string(); }
+
+    void openItem(void) override {}
+    void closeItem(void) override {}
+    void selectItem(void) override {}
+
+    void navigateToFolder(bool new_window = false, bool change_mode = false) override {}
+
+    bool isItemWearable() const { return false; }
+
+    bool isItemRenameable() const override { return false; }
+    bool renameItem(const std::string& new_name) override { return false; }
+
+    bool isItemMovable(void) const override { return false; } // Can be moved to another folder
+    void move(LLFolderViewModelItem* parent_listener) override {}
+
+    bool isItemRemovable(bool check_worn = true) const override { return false; }
+    bool removeItem() override { return false; }
+    void removeBatch(std::vector<LLFolderViewModelItem*>& batch) override {}
+
+    bool isItemCopyable(bool can_copy_as_link = true) const override { return false; }
+    bool copyToClipboard() const override { return false; }
+    bool cutToClipboard() override { return false; }
+    bool isCutToClipboard() { return false; }
+
+    bool isClipboardPasteable() const override { return false; }
+    void pasteFromClipboard() override {}
+    void pasteLinkFromClipboard() override {}
+
+    void buildContextMenu(LLMenuGL& menu, U32 flags) override {};
+
+    bool potentiallyVisible() override { return true; }; // is the item definitely visible or we haven't made up our minds yet?
+
+    bool hasChildren() const override { return mChildren.size() > 0; }
+
+    bool dragOrDrop(
+        MASK mask,
+        bool drop,
+        EDragAndDropType cargo_type,
+        void* cargo_data,
+        std::string& tooltip_msg) override
+    {
+        return false;
+    }
+
+    bool filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter);
+    bool filter(LLFolderViewFilter& filter) override;
+
+    EType getType() const { return mItemType; }
+    S32 getId() const { return mItemId; }
+
+private:
+    LLUIImagePtr pIcon;
+    std::string mName;
+    EType mItemType = TYPE_ROOT;
+
+    // mItemId can be an id in a mesh vector, node vector or any other vector.
+    // mItemId is not nessesarily unique, ex: some nodes can reuse the same
+    // mesh or skin, so mesh-items can have the same id.
+    S32 mItemId = -1;
+};
+
+#endif LL_LLGLTFFOLDERITEM_H
diff --git a/indra/newview/llgltffoldermodel.cpp b/indra/newview/llgltffoldermodel.cpp
new file mode 100644
index 0000000000..5f22c8b710
--- /dev/null
+++ b/indra/newview/llgltffoldermodel.cpp
@@ -0,0 +1,73 @@
+/**
+ * @file llgltffoldermodel.cpp
+ * @author Andrey Kleshchev
+ * @brief gltf model's folder structure related classes
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llgltffoldermodel.h"
+
+#include "llfolderviewitem.h"
+
+bool LLGLTFSort::operator()(const LLGLTFFolderItem* const& a, const LLGLTFFolderItem* const& b) const
+{
+    // Comparison operator: returns "true" is a comes before b, "false" otherwise
+    S32 compare = LLStringUtil::compareDict(a->getName(), b->getName());
+    return (compare < 0);
+}
+
+/// LLGLTFViewModel
+
+LLGLTFViewModel::LLGLTFViewModel()
+    : base_t(new LLGLTFSort(), new LLGLTFFilter())
+{}
+
+void LLGLTFViewModel::sort(LLFolderViewFolder* folder)
+{
+    base_t::sort(folder);
+}
+
+ /// LLGLTFNode
+// LLUICtrlFactory::create<LLGLTFNode>(params);
+class LLGLTFNode : public LLFolderViewItem
+{
+public:
+    struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
+    {
+        Params();
+    };
+    ~LLGLTFNode();
+protected:
+    LLGLTFNode(const Params& p);
+};
+
+LLGLTFNode::LLGLTFNode(const LLGLTFNode::Params& p)
+    : LLFolderViewItem(p)
+{
+}
+
+LLGLTFNode::~LLGLTFNode()
+{
+}
diff --git a/indra/newview/llgltffoldermodel.h b/indra/newview/llgltffoldermodel.h
new file mode 100644
index 0000000000..26f05d1ecd
--- /dev/null
+++ b/indra/newview/llgltffoldermodel.h
@@ -0,0 +1,91 @@
+/**
+ * @file llfloatergltfasseteditor.h
+ * @author Andrey Kleshchev
+ * @brief gltf model's folder structure related classes
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLGLTFFOLDERMODEL_H
+#define LL_LLGLTFFOLDERMODEL_H
+
+#include "llfolderviewmodel.h"
+#include "llgltffolderitem.h"
+
+class LLGLTFSort
+{
+public:
+    LLGLTFSort() { }
+    bool operator()(const LLGLTFFolderItem* const& a, const LLGLTFFolderItem* const& b) const;
+private:
+};
+
+class LLGLTFFilter : public LLFolderViewFilter
+{
+public:
+    LLGLTFFilter() { mEmpty = ""; }
+    ~LLGLTFFilter() {}
+
+    bool                check(const LLFolderViewModelItem* item) { return true; }
+    bool                checkFolder(const LLFolderViewModelItem* folder) const { return true; }
+    void                setEmptyLookupMessage(const std::string& message) { }
+    std::string         getEmptyLookupMessage(bool is_empty_folder = false) const { return mEmpty; }
+    bool                showAllResults() const { return true; }
+    std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const { return std::string::npos; }
+    std::string::size_type getFilterStringSize() const { return 0; }
+
+    bool                isActive() const { return false; }
+    bool                isModified() const { return false; }
+    void                clearModified() { }
+    const std::string& getName() const { return mEmpty; }
+    const std::string& getFilterText() { return mEmpty; }
+    void                setModified(EFilterModified behavior = FILTER_RESTART) { }
+
+    void                resetTime(S32 timeout) { }
+    bool                isTimedOut() { return false; }
+
+    bool                isDefault() const { return true; }
+    bool                isNotDefault() const { return false; }
+    void                markDefault() { }
+    void                resetDefault() { }
+
+    S32                 getCurrentGeneration() const { return 0; }
+    S32                 getFirstSuccessGeneration() const { return 0; }
+    S32                 getFirstRequiredGeneration() const { return 0; }
+private:
+    std::string mEmpty;
+};
+
+class LLGLTFViewModel
+    : public LLFolderViewModel<LLGLTFSort, LLGLTFFolderItem, LLGLTFFolderItem, LLGLTFFilter>
+{
+public:
+    typedef LLFolderViewModel< LLGLTFSort, LLGLTFFolderItem, LLGLTFFolderItem, LLGLTFFilter> base_t;
+    LLGLTFViewModel();
+
+    void sort(LLFolderViewFolder* folder);
+    bool startDrag(std::vector<LLFolderViewModelItem*>& items) { return false; }
+
+private:
+};
+
+#endif LL_LLGLTFFOLDERMODEL_H
diff --git a/indra/newview/llgltffolderviews.cpp b/indra/newview/llgltffolderviews.cpp
deleted file mode 100644
index 911b6262ca..0000000000
--- a/indra/newview/llgltffolderviews.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * @file llgltffolderviews.cpp
- * @author Andrey Kleshchev
- * @brief LLFloaterFontTest class implementation
- *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llgltffolderviews.h"
-#include "llinventoryicon.h"
-
-/// LLGLTFItem
-
-LLGLTFItem::LLGLTFItem(std::string display_name, LLFolderViewModelInterface& root_view_model)
-    : LLFolderViewModelItemCommon(root_view_model)
-    , mName(display_name)
-{
-    init();
-}
-
-LLGLTFItem::LLGLTFItem(LLFolderViewModelInterface& root_view_model)
-    : LLFolderViewModelItemCommon(root_view_model)
-{
-    init();
-}
-
-LLGLTFItem::~LLGLTFItem()
-{
-
-}
-
-void LLGLTFItem::init()
-{
-    pIcon = LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);
-}
-
-
-bool LLGLTFItem::filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter)
-{
-    S32 filter_generation = filter.getCurrentGeneration();
-
-    bool continue_filtering = true;
-    if (item)
-    {
-        if (item->getLastFilterGeneration() < filter_generation)
-        {
-            // Recursive application of the filter for child items (CHUI-849)
-            continue_filtering = item->filter(filter);
-        }
-
-        // Update latest generation to pass filter in parent and propagate up to root
-        if (item->passedFilter())
-        {
-            LLGLTFItem* view_model = this;
-
-            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
-            {
-                view_model->mMostFilteredDescendantGeneration = filter_generation;
-                view_model = static_cast<LLGLTFItem*>(view_model->mParent);
-            }
-        }
-    }
-    return continue_filtering;
-}
-
-bool LLGLTFItem::filter(LLFolderViewFilter& filter)
-{
-
-    const S32 filter_generation = filter.getCurrentGeneration();
-    const S32 must_pass_generation = filter.getFirstRequiredGeneration();
-
-    if (getLastFilterGeneration() >= must_pass_generation
-        && getLastFolderFilterGeneration() >= must_pass_generation
-        && !passedFilter(must_pass_generation))
-    {
-        // failed to pass an earlier filter that was a subset of the current one
-        // go ahead and flag this item as not pass
-        setPassedFilter(false, filter_generation);
-        setPassedFolderFilter(false, filter_generation);
-        return true;
-    }
-
-    bool is_folder = true;
-    const bool passed_filter_folder = is_folder ? filter.checkFolder(this) : true;
-    setPassedFolderFilter(passed_filter_folder, filter_generation);
-
-    bool continue_filtering = true;
-
-    if (!mChildren.empty()
-        && (getLastFilterGeneration() < must_pass_generation // haven't checked descendants against minimum required generation to pass
-            || descendantsPassedFilter(must_pass_generation))) // or at least one descendant has passed the minimum requirement
-    {
-        // now query children
-        for (child_list_t::iterator iter = mChildren.begin(), end_iter = mChildren.end(); iter != end_iter; ++iter)
-        {
-            continue_filtering = filterChildItem((*iter), filter);
-            if (!continue_filtering)
-            {
-                break;
-            }
-        }
-    }
-
-    // If we didn't use all the filter time that means we filtered all of our descendants so we can filter ourselves now
-    if (continue_filtering)
-    {
-        // This is where filter check on the item done (CHUI-849)
-        const bool passed_filter = filter.check(this);
-        if (passed_filter && mChildren.empty() && is_folder) // Update the latest filter generation for empty folders
-        {
-            LLGLTFItem* view_model = this;
-            while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
-            {
-                view_model->mMostFilteredDescendantGeneration = filter_generation;
-                view_model = static_cast<LLGLTFItem*>(view_model->mParent);
-            }
-        }
-        setPassedFilter(passed_filter, filter_generation, filter.getStringMatchOffset(this), filter.getFilterStringSize());
-        continue_filtering = !filter.isTimedOut();
-    }
-    return continue_filtering;
-}
diff --git a/indra/newview/llgltffolderviews.h b/indra/newview/llgltffolderviews.h
deleted file mode 100644
index 294074fd9f..0000000000
--- a/indra/newview/llgltffolderviews.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * @file llgltffolderviews.h
- * @author Andrey Kleshchev
- * @brief floater to exercise standard fonts
- *
- * $LicenseInfo:firstyear=2024&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2024, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERGLTFFOLDERVIEWS_H
-#define LL_LLFLOATERGLTFFOLDERVIEWS_H
-
-#include "llfloater.h"
-
-#include "llfolderviewmodel.h"
-
-class LLGLTFItem : public LLFolderViewModelItemCommon
-{
-public:
-    LLGLTFItem(std::string display_name, LLFolderViewModelInterface& root_view_model);
-    LLGLTFItem(LLFolderViewModelInterface& root_view_model);
-    virtual ~LLGLTFItem();
-
-    void init();
-
-    const std::string& getName() const override { return mName; }
-    const std::string& getDisplayName() const override { return mName; }
-    const std::string& getSearchableName() const override { return mName; }
-
-    std::string getSearchableDescription() const override { return std::string(); }
-    std::string getSearchableCreatorName()const override { return std::string(); }
-    std::string getSearchableUUIDString() const override { return std::string(); }
-
-    LLPointer<LLUIImage> getIcon() const override { return pIcon; }
-    LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
-    LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
-
-    LLFontGL::StyleFlags getLabelStyle() const override { return LLFontGL::NORMAL; }
-    std::string getLabelSuffix() const override { return std::string(); }
-
-    void openItem(void) override {}
-    void closeItem(void) override {}
-    void selectItem(void) override {}
-
-    void navigateToFolder(bool new_window = false, bool change_mode = false) override {}
-
-    bool isItemWearable() const { return false; }
-
-    bool isItemRenameable() const override { return false; }
-    bool renameItem(const std::string& new_name) override { return false; }
-
-    bool isItemMovable(void) const override { return false; } // Can be moved to another folder
-    void move(LLFolderViewModelItem* parent_listener) override {}
-
-    bool isItemRemovable(bool check_worn = true) const override { return false; }
-    bool removeItem() override { return false; }
-    void removeBatch(std::vector<LLFolderViewModelItem*>& batch) override {}
-
-    bool isItemCopyable(bool can_copy_as_link = true) const override { return false; }
-    bool copyToClipboard() const override { return false; }
-    bool cutToClipboard() override { return false; }
-    bool isCutToClipboard() { return false; }
-
-    bool isClipboardPasteable() const override { return false; }
-    void pasteFromClipboard() override {}
-    void pasteLinkFromClipboard() override {}
-
-    void buildContextMenu(LLMenuGL& menu, U32 flags) override {};
-
-    bool potentiallyVisible() override { return true; }; // is the item definitely visible or we haven't made up our minds yet?
-
-    bool hasChildren() const override { return mChildren.size() > 0; }
-
-    bool dragOrDrop(
-        MASK mask,
-        bool drop,
-        EDragAndDropType cargo_type,
-        void* cargo_data,
-        std::string& tooltip_msg) override
-    {
-        return false;
-    }
-
-    bool filterChildItem(LLFolderViewModelItem* item, LLFolderViewFilter& filter);
-    bool filter(LLFolderViewFilter& filter) override;
-
-private:
-    LLUIImagePtr pIcon;
-    std::string mName;
-};
-
-#endif LL_LLFLOATERGLTFFOLDERVIEWS_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 36fd1015f6..3e1705b8a1 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -373,7 +373,7 @@ void LLViewerFloaterReg::registerFloaters()
     LLFloaterReg::add("forget_username", "floater_forget_user.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterForgetUser>);
 
     LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGesture>);
-    LLFloaterReg::add("gltf_asset_editor", "floater_gltf_asset_editor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGltfAssetEditor>);
+    LLFloaterReg::add("gltf_asset_editor", "floater_gltf_asset_editor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGLTFAssetEditor>);
     LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
     LLFloaterReg::add("grid_status", "floater_grid_status.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGridStatus>);
     LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>);
diff --git a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
index 9082486d84..4dc0dffcfd 100644
--- a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
@@ -3,19 +3,24 @@
  legacy_header_height="18"
  can_resize="true"
  default_tab_group="1"
- height="891"
+ height="400"
  width="256"
- min_height="500"
- min_width="256"
+ min_height="200"
+ min_width="200"
  layout="topleft"
  name="gltf asset editor"
  title="[OBJECT_NAME]">
+    <floater.string name="scene_tittle" value="Scene"/>
+    <floater.string name="node_tittle" value="Node"/>
+    <floater.string name="mesh_tittle" value="Mesh"/>
+    <floater.string name="skin_tittle" value="Skin"/>
     <panel
-     bottom="-1"
      follows="all"
      layout="topleft"
      name="item_list_panel"
-     top_pad="0"
+     visible="true"
+     bottom="-1"
+     top="16"
      left="5"
      right="-1"/>
 </floater>
-- 
cgit v1.2.3


From 279ec534dd999420544b672cf84841b86d1306ae Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 1 Jul 2024 17:10:13 +0300
Subject: viewer#1131 gltf model upload UI WIP #3

---
 indra/newview/llfloatergltfasseteditor.cpp         | 269 +++++++++++++++++++-
 indra/newview/llfloatergltfasseteditor.h           |  38 ++-
 indra/newview/llgltffolderitem.h                   |   2 +-
 .../default/xui/en/floater_gltf_asset_editor.xml   | 271 ++++++++++++++++++++-
 4 files changed, 566 insertions(+), 14 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index 62546c6ed9..ec9ccc1324 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -31,7 +31,9 @@
 
 #include "gltf/asset.h"
 #include "llcallbacklist.h"
+#include "llmenubutton.h"
 #include "llselectmgr.h"
+#include "llspinctrl.h"
 #include "llviewerobject.h"
 
 const LLColor4U DEFAULT_WHITE(255, 255, 255);
@@ -43,16 +45,69 @@ LLFloaterGLTFAssetEditor::LLFloaterGLTFAssetEditor(const LLSD& key)
     , mUIColor(LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE))
 {
     setTitle("GLTF Asset Editor (WIP)");
+
+    mCommitCallbackRegistrar.add("PanelObject.menuDoToSelected", [this](LLUICtrl* ctrl, const LLSD& data) { onMenuDoToSelected(data); });
+    mEnableCallbackRegistrar.add("PanelObject.menuEnable", [this](LLUICtrl* ctrl, const LLSD& data) { return onMenuEnableItem(data); });
 }
 
 LLFloaterGLTFAssetEditor::~LLFloaterGLTFAssetEditor()
 {
     gIdleCallbacks.deleteFunction(idle, this);
+
+    if (mScroller)
+    {
+        removeChild(mScroller);
+        delete mScroller;
+        mScroller = NULL;
+    }
 }
 
 bool LLFloaterGLTFAssetEditor::postBuild()
 {
-    mItemListPanel = getChild<LLPanel>("item_list_panel");
+    // Position
+    mMenuClipboardPos = getChild<LLMenuButton>("clipboard_pos_btn");
+    mCtrlPosX = getChild<LLSpinCtrl>("Pos X", true);
+    mCtrlPosX->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlPosY = getChild<LLSpinCtrl>("Pos Y", true);
+    mCtrlPosY->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlPosZ = getChild<LLSpinCtrl>("Pos Z", true);
+    mCtrlPosZ->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+
+    // Scale
+    mMenuClipboardScale = getChild<LLMenuButton>("clipboard_size_btn");
+    mCtrlScaleX = getChild<LLSpinCtrl>("Scale X", true);
+    mCtrlScaleX->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlScaleY = getChild<LLSpinCtrl>("Scale Y", true);
+    mCtrlScaleY->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlScaleZ = getChild<LLSpinCtrl>("Scale Z", true);
+    mCtrlScaleZ->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+
+    // Rotation
+    mMenuClipboardRot = getChild<LLMenuButton>("clipboard_rot_btn");
+    mCtrlRotX = getChild<LLSpinCtrl>("Rot X", true);
+    mCtrlRotX->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlRotY = getChild<LLSpinCtrl>("Rot Y", true);
+    mCtrlRotY->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    mCtrlRotZ = getChild<LLSpinCtrl>("Rot Z", true);
+    mCtrlPosZ->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) { onCommitTransform(); });
+    setTransformsEnabled(false);
+    // todo: do multiple panels based on selected element.
+    mTransformsPanel = getChild<LLPanel>("transform_panel", true);
+    mTransformsPanel->setVisible(false);
+
+    mItemListPanel = getChild<LLPanel>("item_list_panel", true);
+    initFolderRoot();
+
+    return true;
+}
+
+void LLFloaterGLTFAssetEditor::initFolderRoot()
+{
+    if (mScroller || mFolderRoot)
+    {
+        LL_ERRS() << "Folder root already initialized" << LL_ENDL;
+        return;
+    }
 
     LLRect scroller_view_rect = mItemListPanel->getRect();
     scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
@@ -87,11 +142,10 @@ bool LLFloaterGLTFAssetEditor::postBuild()
     mFolderRoot->setScrollContainer(mScroller);
     mFolderRoot->setFollowsAll();
     mFolderRoot->setOpen(true);
+    mFolderRoot->setSelectCallback([this](const std::deque<LLFolderViewItem*>& items, bool user_action) { onFolderSelectionChanged(items, user_action); });
     mScroller->setVisible(true);
 
     gIdleCallbacks.addFunction(idle, this);
-
-    return true;
 }
 
 void LLFloaterGLTFAssetEditor::onOpen(const LLSD& key)
@@ -252,3 +306,212 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
     mFolderRoot->update();
 }
 
+void LLFloaterGLTFAssetEditor::onFolderSelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action)
+{
+    if (items.empty())
+    {
+        setTransformsEnabled(false);
+        return;
+    }
+
+    LLFolderViewItem* item = items.front();
+    LLGLTFFolderItem* vmi = static_cast<LLGLTFFolderItem*>(item->getViewModelItem());
+
+    switch (vmi->getType())
+    {
+    case LLGLTFFolderItem::TYPE_NODE:
+        {
+            setTransformsEnabled(true);
+            loadNodeTransforms(vmi->getItemId());
+            break;
+        }
+    default:
+        {
+            setTransformsEnabled(false);
+            break;
+        }
+    }
+}
+
+void LLFloaterGLTFAssetEditor::setTransformsEnabled(bool val)
+{
+    mMenuClipboardPos->setEnabled(val);
+    mCtrlPosX->setEnabled(val);
+    mCtrlPosY->setEnabled(val);
+    mCtrlPosZ->setEnabled(val);
+    mMenuClipboardScale->setEnabled(val);
+    mCtrlScaleX->setEnabled(val);
+    mCtrlScaleY->setEnabled(val);
+    mCtrlScaleZ->setEnabled(val);
+    mMenuClipboardRot->setEnabled(val);
+    mCtrlRotX->setEnabled(val);
+    mCtrlRotY->setEnabled(val);
+    mCtrlRotZ->setEnabled(val);
+}
+
+void LLFloaterGLTFAssetEditor::loadNodeTransforms(S32 node_id)
+{
+    if (node_id < 0 || node_id >= mAsset->mNodes.size())
+    {
+        LL_ERRS() << "Node id out of range: " << node_id << LL_ENDL;
+        return;
+    }
+
+    LL::GLTF::Node& node = mAsset->mNodes[node_id];
+
+    mCtrlPosX->set(node.mTranslation[0]);
+    mCtrlPosY->set(node.mTranslation[1]);
+    mCtrlPosZ->set(node.mTranslation[2]);
+
+    mCtrlScaleX->set(node.mScale[0]);
+    mCtrlScaleY->set(node.mScale[1]);
+    mCtrlScaleZ->set(node.mScale[2]);
+
+    LLQuaternion object_rot = LLQuaternion(node.mRotation[0], node.mRotation[1], node.mRotation[2], node.mRotation[3]);
+    object_rot.getEulerAngles(&(mLastEulerDegrees.mV[VX]), &(mLastEulerDegrees.mV[VY]), &(mLastEulerDegrees.mV[VZ]));
+    mLastEulerDegrees *= RAD_TO_DEG;
+    mLastEulerDegrees.mV[VX] = fmod(ll_round(mLastEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+    mLastEulerDegrees.mV[VY] = fmod(ll_round(mLastEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+    mLastEulerDegrees.mV[VZ] = fmod(ll_round(mLastEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+
+    mCtrlRotX->set(mLastEulerDegrees.mV[VX]);
+    mCtrlRotY->set(mLastEulerDegrees.mV[VY]);
+    mCtrlRotZ->set(mLastEulerDegrees.mV[VZ]);
+}
+
+void LLFloaterGLTFAssetEditor::onCommitTransform()
+{
+    if (!mFolderRoot)
+    {
+        LL_ERRS() << "Folder root not initialized" << LL_ENDL;
+        return;
+    }
+
+    LLFolderViewItem* item = mFolderRoot->getCurSelectedItem();
+    if (!item)
+    {
+        LL_ERRS() << "Nothing selected" << LL_ENDL;
+        return;
+    }
+
+    LLGLTFFolderItem* vmi = static_cast<LLGLTFFolderItem*>(item->getViewModelItem());
+
+    if (!vmi || vmi->getType() != LLGLTFFolderItem::TYPE_NODE)
+    {
+        LL_ERRS() << "Only nodes implemented" << LL_ENDL;
+        return;
+    }
+    S32 node_id = vmi->getItemId();
+    LL::GLTF::Node& node = mAsset->mNodes[node_id];
+
+    LL::GLTF::vec3 tr(mCtrlPosX->get(), mCtrlPosY->get(), mCtrlPosZ->get());
+    node.setTranslation(tr);
+
+    LL::GLTF::vec3 scale(mCtrlScaleX->get(), mCtrlScaleY->get(), mCtrlScaleZ->get());
+    node.setScale(scale);
+
+    LLVector3 new_rot(mCtrlRotX->get(), mCtrlRotY->get(), mCtrlRotZ->get());
+    new_rot.mV[VX] = ll_round(new_rot.mV[VX], OBJECT_ROTATION_PRECISION);
+    new_rot.mV[VY] = ll_round(new_rot.mV[VY], OBJECT_ROTATION_PRECISION);
+    new_rot.mV[VZ] = ll_round(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION);
+
+    // Note: must compare before conversion to radians, some value can go 'around' 360
+    LLVector3 delta = new_rot - mLastEulerDegrees;
+
+    if (delta.magVec() >= 0.0005f)
+    {
+        mLastEulerDegrees = new_rot;
+        new_rot *= DEG_TO_RAD;
+
+        LLQuaternion rotation;
+        rotation.setQuat(new_rot.mV[VX], new_rot.mV[VY], new_rot.mV[VZ]);
+        LL::GLTF::quat q;
+        q[0] = rotation.mQ[VX];
+        q[1] = rotation.mQ[VY];
+        q[2] = rotation.mQ[VZ];
+        q[3] = rotation.mQ[VW];
+
+        node.setRotation(q);
+    }
+
+    mAsset->updateTransforms();
+}
+
+void LLFloaterGLTFAssetEditor::onMenuDoToSelected(const LLSD& userdata)
+{
+    std::string command = userdata.asString();
+
+    if (command == "psr_paste")
+    {
+        // todo: implement
+        // onPastePos();
+        // onPasteSize();
+        // onPasteRot();
+    }
+    else if (command == "pos_paste")
+    {
+        // todo: implement
+    }
+    else if (command == "size_paste")
+    {
+        // todo: implement
+    }
+    else if (command == "rot_paste")
+    {
+        // todo: implement
+    }
+    else if (command == "psr_copy")
+    {
+        // onCopyPos();
+        // onCopySize();
+        // onCopyRot();
+    }
+    else if (command == "pos_copy")
+    {
+        // todo: implement
+    }
+    else if (command == "size_copy")
+    {
+        // todo: implement
+    }
+    else if (command == "rot_copy")
+    {
+        // todo: implement
+    }
+}
+
+bool LLFloaterGLTFAssetEditor::onMenuEnableItem(const LLSD& userdata)
+{
+    if (!mFolderRoot)
+    {
+        return false;
+    }
+
+    LLFolderViewItem* item = mFolderRoot->getCurSelectedItem();
+    if (!item)
+    {
+        return false;
+    }
+
+    LLGLTFFolderItem* vmi = static_cast<LLGLTFFolderItem*>(item->getViewModelItem());
+
+    if (!vmi || vmi->getType() != LLGLTFFolderItem::TYPE_NODE)
+    {
+        return false;
+    }
+
+    std::string command = userdata.asString();
+    if (command == "pos_paste" || command == "size_paste" || command == "rot_paste")
+    {
+        // todo: implement
+        return true;
+    }
+    if (command == "psr_copy")
+    {
+        // todo: implement
+        return true;
+    }
+
+    return false;
+}
+
diff --git a/indra/newview/llfloatergltfasseteditor.h b/indra/newview/llfloatergltfasseteditor.h
index 49c5aa4ae7..8164928824 100644
--- a/indra/newview/llfloatergltfasseteditor.h
+++ b/indra/newview/llfloatergltfasseteditor.h
@@ -40,6 +40,9 @@ namespace LL
     }
 }
 
+class LLSpinCtrl;
+class LLMenuButton;
+
 class LLFloaterGLTFAssetEditor : public LLFloater
 {
 public:
@@ -48,6 +51,7 @@ public:
 
     bool postBuild() override;
     void onOpen(const LLSD& key) override;
+    void initFolderRoot();
 
     LLGLTFViewModel& getRootViewModel() { return mGLTFViewModel; }
 
@@ -56,14 +60,42 @@ public:
     void loadFromNode(S32 node, LLFolderViewFolder* parent);
     void loadFromSelection();
 
+protected:
+    void onFolderSelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action);
+    void onCommitTransform();
+    void onMenuDoToSelected(const LLSD& userdata);
+    bool onMenuEnableItem(const LLSD& userdata);
+
+    void setTransformsEnabled(bool val);
+    void loadNodeTransforms(S32 id);
+
 private:
-    LLGLTFViewModel mGLTFViewModel;
-    LLUIColor mUIColor;
 
+    std::shared_ptr<LL::GLTF::Asset> mAsset;
+
+    // Folder view related
+    LLUIColor mUIColor;
+    LLGLTFViewModel mGLTFViewModel;
     LLPanel* mItemListPanel = nullptr;
     LLFolderView* mFolderRoot = nullptr;
     LLScrollContainer* mScroller = nullptr;
-    std::shared_ptr<LL::GLTF::Asset> mAsset;
+
+    // Transforms panel
+    LLVector3       mLastEulerDegrees;
+
+    LLPanel* mTransformsPanel = nullptr;
+    LLMenuButton* mMenuClipboardPos = nullptr;
+    LLSpinCtrl* mCtrlPosX = nullptr;
+    LLSpinCtrl* mCtrlPosY = nullptr;
+    LLSpinCtrl* mCtrlPosZ = nullptr;
+    LLMenuButton* mMenuClipboardScale = nullptr;
+    LLSpinCtrl* mCtrlScaleX = nullptr;
+    LLSpinCtrl* mCtrlScaleY = nullptr;
+    LLSpinCtrl* mCtrlScaleZ = nullptr;
+    LLMenuButton* mMenuClipboardRot = nullptr;
+    LLSpinCtrl* mCtrlRotX = nullptr;
+    LLSpinCtrl* mCtrlRotY = nullptr;
+    LLSpinCtrl* mCtrlRotZ = nullptr;
 };
 
 #endif LL_LLFLOATERGLTFASSETEDITOR_H
diff --git a/indra/newview/llgltffolderitem.h b/indra/newview/llgltffolderitem.h
index be6e264368..83c6449f96 100644
--- a/indra/newview/llgltffolderitem.h
+++ b/indra/newview/llgltffolderitem.h
@@ -112,7 +112,7 @@ public:
     bool filter(LLFolderViewFilter& filter) override;
 
     EType getType() const { return mItemType; }
-    S32 getId() const { return mItemId; }
+    S32 getItemId() const { return mItemId; }
 
 private:
     LLUIImagePtr pIcon;
diff --git a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
index 4dc0dffcfd..82e0e325fb 100644
--- a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
@@ -3,9 +3,9 @@
  legacy_header_height="18"
  can_resize="true"
  default_tab_group="1"
- height="400"
+ height="530"
  width="256"
- min_height="200"
+ min_height="400"
  min_width="200"
  layout="topleft"
  name="gltf asset editor"
@@ -14,13 +14,270 @@
     <floater.string name="node_tittle" value="Node"/>
     <floater.string name="mesh_tittle" value="Mesh"/>
     <floater.string name="skin_tittle" value="Skin"/>
-    <panel
+
+    <layout_stack
+     name="main_layout"
+     orientation="vertical"
      follows="all"
-     layout="topleft"
-     name="item_list_panel"
-     visible="true"
      bottom="-1"
      top="16"
      left="5"
-     right="-1"/>
+     right="-1"
+     border_size="0">
+
+        <layout_panel
+         name="top_lp"
+         border="true"
+         bevel_style="in"
+         auto_resize="false"
+         user_resize="true"
+         visible="true"
+         height="200">
+            <panel
+             follows="all"
+             layout="topleft"
+             name="item_list_panel"
+             visible="true"
+             bottom="-1"
+             top="16"
+             left="5"
+             right="-1"/>
+        </layout_panel>
+
+        <layout_panel
+         name="transforms_panel"
+         border="true"
+         bevel_style="in"
+         auto_resize="true"
+         user_resize="true"
+         visible="true"
+         height="150">
+            <menu_button
+             menu_filename="menu_copy_paste_pos.xml"
+             follows="top|left"
+             height="11"
+             image_disabled="ClipboardSmallMenu_Disabled"
+             image_selected="ClipboardSmallMenu_Press"
+             image_unselected="ClipboardSmallMenu_Off"
+             layout="topleft"
+             left_delta="0"
+             top_pad="13"
+             name="clipboard_pos_btn"
+             tool_tip="Paste options"
+             width="19"/>
+            <text
+             type="string"
+             length="1"
+             follows="left|top"
+             height="10"
+             layout="topleft"
+             name="label position"
+             tool_tip="Position (meters)"
+             left_pad="8"
+             top_delta="0"
+             width="121">
+                Position (m)
+            </text>
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="X"
+             label_width="10"
+             layout="topleft"
+             left_delta="-27"
+             max_val="512"
+             min_val="-256"
+             name="Pos X"
+             text_enabled_color="1 0 0.3 .7"
+             top_pad="8"
+             width="87" />
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="Y"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="512"
+             min_val="-256"
+             name="Pos Y"
+             text_enabled_color="EmphasisColor"
+             top_pad="3"
+             width="87" />
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="Z"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="4096"
+             min_val="-32"
+             name="Pos Z"
+             text_enabled_color="0 0.8 1 .65"
+             top_pad="3"
+             width="87" />
+            <menu_button
+             menu_filename="menu_copy_paste_size.xml"
+             follows="top|left"
+             height="11"
+             image_disabled="ClipboardSmallMenu_Disabled"
+             image_selected="ClipboardSmallMenu_Press"
+             image_unselected="ClipboardSmallMenu_Off"
+             layout="topleft"
+             left_delta="0"
+             top_pad="13"
+             name="clipboard_size_btn"
+             tool_tip="Paste options"
+             width="19"/>
+            <text
+             type="string"
+             length="1"
+             follows="left|top"
+             height="10"
+             layout="topleft"
+             left_pad="8"
+             top_delta="0"
+             name="label size"
+             tool_tip="Size (meters)"
+             width="121">
+                Size (m)
+            </text>
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="X"
+             label_width="10"
+             layout="topleft"
+             left_delta="-27"
+             max_val="64"
+             min_val="0.01"
+             name="Scale X"
+             text_enabled_color="1 1 1 1"
+             top_pad="8"
+             width="87" />
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="Y"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="64"
+             min_val="0.01"
+             name="Scale Y"
+             text_enabled_color="1 1 1 1"
+             top_pad="3"
+             width="87" />
+            <spinner
+             follows="left|top"
+             height="19"
+             increment="0.01"
+             initial_value="0"
+             label="Z"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="64"
+             min_val="0.01"
+             name="Scale Z"
+             text_enabled_color="1 1 1 1"
+             top_pad="3"
+             width="87" />
+            <menu_button
+             menu_filename="menu_copy_paste_rot.xml"
+             follows="top|left"
+             height="11"
+             image_disabled="ClipboardSmallMenu_Disabled"
+             image_selected="ClipboardSmallMenu_Press"
+             image_unselected="ClipboardSmallMenu_Off"
+             layout="topleft"
+             left_delta="0"
+             top_pad="13"
+             name="clipboard_rot_btn"
+             tool_tip="Paste options"
+             width="19"/>
+            <text
+             type="string"
+             length="1"
+             follows="left|top"
+             height="10"
+             layout="topleft"
+             left_pad="8"
+             top_delta="0"
+             name="label rotation"
+             tool_tip="Rotation (degrees)"
+             width="121">
+                Rotation (°)
+            </text>
+            <spinner
+             decimal_digits="2"
+             follows="left|top"
+             height="19"
+             increment="1"
+             initial_value="0"
+             label="X"
+             label_width="10"
+             layout="topleft"
+             left_delta="-27"
+             max_val="9999"
+             min_val="-9999"
+             name="Rot X"
+             text_enabled_color="1 1 1 1"
+             top_pad="8"
+             width="87" />
+            <spinner
+             decimal_digits="2"
+             follows="left|top"
+             height="19"
+             increment="1"
+             initial_value="0"
+             label="Y"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="9999"
+             min_val="-9999"
+             name="Rot Y"
+             text_enabled_color="1 1 1 1"
+             top_pad="3"
+             width="87" />
+            <spinner
+             decimal_digits="2"
+             follows="left|top"
+             height="19"
+             increment="1"
+             initial_value="0"
+             label="Z"
+             label_width="10"
+             layout="topleft"
+             left_delta="0"
+             max_val="9999"
+             min_val="-9999"
+             name="Rot Z"
+             text_enabled_color="1 1 1 1"
+             top_pad="3"
+             width="87" />
+        </layout_panel>
+
+        <layout_panel
+         name="blank_panel"
+         border="true"
+         bevel_style="in"
+         auto_resize="true"
+         user_resize="true"
+         visible="false"
+         height="150">
+        </layout_panel>
+    </layout_stack>
 </floater>
-- 
cgit v1.2.3


From b940fbc0d4b78534780de33dc9f7d41535de5ae3 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 1 Jul 2024 19:01:20 +0300
Subject: viewer#1131 MacOS build fixes and small adjustments

---
 indra/newview/llfloatergltfasseteditor.cpp               | 16 +++++++++++++---
 indra/newview/llfloatergltfasseteditor.h                 |  2 +-
 indra/newview/llgltffolderitem.cpp                       |  4 ++--
 indra/newview/llgltffolderitem.h                         | 10 +++++-----
 indra/newview/llgltffoldermodel.cpp                      |  4 ++--
 indra/newview/llgltffoldermodel.h                        |  2 +-
 .../skins/default/xui/en/floater_gltf_asset_editor.xml   |  7 ++++---
 7 files changed, 28 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index ec9ccc1324..f21b8032d0 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -3,9 +3,9 @@
  * @author Andrii Kleshchev
  * @brief LLFloaterGltfAssetEditor class implementation
  *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
  * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2024, Linden Research, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -251,7 +251,8 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
         return;
     }
 
-    LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
+    LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(NULL);
+    LLViewerObject* objectp = node->getObject();
     if (!objectp)
     {
         return;
@@ -263,6 +264,15 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
         return;
     }
 
+    if (node->mName.empty())
+    {
+        setTitle(getString("floater_title"));
+    }
+    else
+    {
+        setTitle(node->mName);
+    }
+
     LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
     for (S32 i = 0; i < mAsset->mScenes.size(); i++)
     {
diff --git a/indra/newview/llfloatergltfasseteditor.h b/indra/newview/llfloatergltfasseteditor.h
index 8164928824..e35ed30ed0 100644
--- a/indra/newview/llfloatergltfasseteditor.h
+++ b/indra/newview/llfloatergltfasseteditor.h
@@ -98,4 +98,4 @@ private:
     LLSpinCtrl* mCtrlRotZ = nullptr;
 };
 
-#endif LL_LLFLOATERGLTFASSETEDITOR_H
+#endif
diff --git a/indra/newview/llgltffolderitem.cpp b/indra/newview/llgltffolderitem.cpp
index c4fcb4f5ce..77a19c060d 100644
--- a/indra/newview/llgltffolderitem.cpp
+++ b/indra/newview/llgltffolderitem.cpp
@@ -3,9 +3,9 @@
  * @author Andrey Kleshchev
  * @brief LLGLTFFolderItem class implementation
  *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
  * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2024, Linden Research, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/indra/newview/llgltffolderitem.h b/indra/newview/llgltffolderitem.h
index 83c6449f96..89d90c81cc 100644
--- a/indra/newview/llgltffolderitem.h
+++ b/indra/newview/llgltffolderitem.h
@@ -59,8 +59,8 @@ public:
     std::string getSearchableUUIDString() const override { return std::string(); }
 
     LLPointer<LLUIImage> getIcon() const override { return pIcon; }
-    LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
-    LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
+    LLPointer<LLUIImage> getIconOpen() const override { return getIcon(); }
+    LLPointer<LLUIImage> getIconOverlay() const override { return NULL; }
 
     LLFontGL::StyleFlags getLabelStyle() const override { return LLFontGL::NORMAL; }
     std::string getLabelSuffix() const override { return std::string(); }
@@ -71,7 +71,7 @@ public:
 
     void navigateToFolder(bool new_window = false, bool change_mode = false) override {}
 
-    bool isItemWearable() const { return false; }
+    bool isItemWearable() const override { return false; }
 
     bool isItemRenameable() const override { return false; }
     bool renameItem(const std::string& new_name) override { return false; }
@@ -86,7 +86,7 @@ public:
     bool isItemCopyable(bool can_copy_as_link = true) const override { return false; }
     bool copyToClipboard() const override { return false; }
     bool cutToClipboard() override { return false; }
-    bool isCutToClipboard() { return false; }
+    bool isCutToClipboard() override { return false; }
 
     bool isClipboardPasteable() const override { return false; }
     void pasteFromClipboard() override {}
@@ -125,4 +125,4 @@ private:
     S32 mItemId = -1;
 };
 
-#endif LL_LLGLTFFOLDERITEM_H
+#endif
diff --git a/indra/newview/llgltffoldermodel.cpp b/indra/newview/llgltffoldermodel.cpp
index 5f22c8b710..de2510dc4a 100644
--- a/indra/newview/llgltffoldermodel.cpp
+++ b/indra/newview/llgltffoldermodel.cpp
@@ -3,9 +3,9 @@
  * @author Andrey Kleshchev
  * @brief gltf model's folder structure related classes
  *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
  * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2024, Linden Research, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
diff --git a/indra/newview/llgltffoldermodel.h b/indra/newview/llgltffoldermodel.h
index 26f05d1ecd..69b284aa31 100644
--- a/indra/newview/llgltffoldermodel.h
+++ b/indra/newview/llgltffoldermodel.h
@@ -88,4 +88,4 @@ public:
 private:
 };
 
-#endif LL_LLGLTFFOLDERMODEL_H
+#endif
diff --git a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
index 82e0e325fb..b17d0aa5b6 100644
--- a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml
@@ -10,6 +10,7 @@
  layout="topleft"
  name="gltf asset editor"
  title="[OBJECT_NAME]">
+    <floater.string name="floater_title" value="GLTF Scene Editor"/>
     <floater.string name="scene_tittle" value="Scene"/>
     <floater.string name="node_tittle" value="Node"/>
     <floater.string name="mesh_tittle" value="Mesh"/>
@@ -39,7 +40,7 @@
              name="item_list_panel"
              visible="true"
              bottom="-1"
-             top="16"
+             top="1"
              left="5"
              right="-1"/>
         </layout_panel>
@@ -60,8 +61,8 @@
              image_selected="ClipboardSmallMenu_Press"
              image_unselected="ClipboardSmallMenu_Off"
              layout="topleft"
-             left_delta="0"
-             top_pad="13"
+             left="4"
+             top="10"
              name="clipboard_pos_btn"
              tool_tip="Paste options"
              width="19"/>
-- 
cgit v1.2.3


From 2ea5ac0c43e3e28d2b1774f5367d099271a1da32 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Mon, 1 Jul 2024 13:34:50 +0200
Subject: #1111 Remove xmlrpc-epi

---
 indra/cmake/CMakeLists.txt                         |   1 -
 indra/cmake/LLCommon.cmake                         |   2 -
 indra/cmake/XmlRpcEpi.cmake                        |  11 -
 indra/llcommon/llfile.cpp                          |  18 +
 indra/llcommon/llfile.h                            |   2 +
 indra/llcommon/llsd.cpp                            | 201 +++++-
 indra/llcommon/llsd.h                              |  20 +-
 indra/llcommon/llstring.cpp                        |  69 ++
 indra/llcommon/llstring.h                          |  14 +
 indra/llmessage/CMakeLists.txt                     |   3 -
 indra/llmessage/llfiltersd2xmlrpc.cpp              | 778 ---------------------
 indra/llmessage/llfiltersd2xmlrpc.h                | 271 -------
 indra/llxml/llxmlnode.cpp                          |  39 +-
 indra/llxml/llxmlnode.h                            |  12 +-
 indra/newview/llcurrencyuimanager.cpp              | 137 ++--
 indra/newview/llfloaterbuyland.cpp                 | 201 ++----
 indra/newview/lllogininstance.cpp                  |   5 +-
 indra/newview/llslurl.cpp                          |   6 +-
 indra/newview/llversioninfo.cpp                    |  22 +-
 indra/newview/llversioninfo.h                      |  26 +-
 indra/newview/llxmlrpclistener.cpp                 | 278 ++------
 indra/newview/llxmlrpclistener.h                   |   3 -
 indra/newview/llxmlrpctransaction.cpp              | 361 ++++------
 indra/newview/llxmlrpctransaction.h                |  92 +--
 .../newview/skins/default/xui/da/floater_about.xml |   1 -
 .../newview/skins/default/xui/de/floater_about.xml |   1 -
 .../newview/skins/default/xui/en/floater_about.xml |   1 -
 .../newview/skins/default/xui/es/floater_about.xml |   1 -
 .../newview/skins/default/xui/fr/floater_about.xml |   1 -
 .../newview/skins/default/xui/it/floater_about.xml |   1 -
 .../newview/skins/default/xui/ja/floater_about.xml |   1 -
 .../newview/skins/default/xui/pt/floater_about.xml |   1 -
 .../newview/skins/default/xui/ru/floater_about.xml |   1 -
 .../newview/skins/default/xui/tr/floater_about.xml |   1 -
 .../newview/skins/default/xui/zh/floater_about.xml |   1 -
 indra/viewer_components/login/lllogin.cpp          |  41 +-
 36 files changed, 723 insertions(+), 1901 deletions(-)
 delete mode 100644 indra/cmake/XmlRpcEpi.cmake
 delete mode 100644 indra/llmessage/llfiltersd2xmlrpc.cpp
 delete mode 100644 indra/llmessage/llfiltersd2xmlrpc.h

(limited to 'indra')

diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 0f338931c0..c067105f68 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -63,7 +63,6 @@ set(cmake_SOURCE_FILES
         VisualLeakDetector.cmake
         LibVLCPlugin.cmake
         WebRTC.cmake
-        XmlRpcEpi.cmake
         xxHash.cmake
         ZLIBNG.cmake
         )
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 9e3707ff17..dd43ca4916 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -6,5 +6,3 @@ include(EXPAT)
 include(Tracy)
 include(xxHash)
 include(ZLIBNG)
-
-include(XmlRpcEpi)
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
deleted file mode 100644
index 6409f9d6e2..0000000000
--- a/indra/cmake/XmlRpcEpi.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-
-include_guard()
-add_library( ll::xmlrpc-epi INTERFACE IMPORTED )
-
-use_system_binary( xmlrpc-epi )
-
-use_prebuilt_binary(xmlrpc-epi)
-target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi )
-target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index ddf239f306..9045324bf2 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -248,6 +248,24 @@ int LLFile::close(LLFILE * file)
     return ret_value;
 }
 
+std::string LLFile::getContents(const std::string& filename)
+{
+    LLFILE* fp = fopen(filename, "rb"); /* Flawfinder: ignore */
+    if (fp)
+    {
+        fseek(fp, 0, SEEK_END);
+        U32 length = ftell(fp);
+        fseek(fp, 0, SEEK_SET);
+
+        std::vector<char> buffer(length);
+        size_t nread = fread(buffer.data(), 1, length, fp);
+        fclose(fp);
+
+        return std::string(buffer.data(), nread);
+    }
+
+    return LLStringUtil::null;
+}
 
 int LLFile::remove(const std::string& filename, int supress_error)
 {
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 2564671b13..74110343fc 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -67,6 +67,8 @@ public:
 
     static  int     close(LLFILE * file);
 
+    static std::string getContents(const std::string& filename);
+
     // perms is a permissions mask like 0777 or 0700.  In most cases it will
     // be overridden by the user's umask.  It is ignored on Windows.
     // mkdir() considers "directory already exists" to be SUCCESS.
diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 663ceac22b..b36ff7d263 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -30,6 +30,7 @@
 #include "linden_common.h"
 #include "llsd.h"
 
+#include "llbase64.h"
 #include "llerror.h"
 #include "../llmath/llmath.h"
 #include "llformat.h"
@@ -142,6 +143,8 @@ public:
 
     virtual const String& asStringRef() const { static const std::string empty; return empty; }
 
+    virtual String asXMLRPCValue() const { return "<nil/>"; }
+
     virtual bool has(const String&) const       { return false; }
     virtual LLSD get(const String&) const       { return LLSD(); }
     virtual LLSD getKeys() const                { return LLSD::emptyArray(); }
@@ -222,6 +225,8 @@ namespace
         virtual LLSD::Integer   asInteger() const   { return mValue ? 1 : 0; }
         virtual LLSD::Real      asReal() const      { return mValue ? 1 : 0; }
         virtual LLSD::String    asString() const;
+
+        virtual LLSD::String asXMLRPCValue() const { return mValue ? "<boolean>1</boolean>" : "<boolean>0</boolean>"; }
     };
 
     LLSD::String ImplBoolean::asString() const
@@ -243,6 +248,8 @@ namespace
         virtual LLSD::Integer   asInteger() const   { return mValue; }
         virtual LLSD::Real      asReal() const      { return mValue; }
         virtual LLSD::String    asString() const;
+
+        virtual LLSD::String asXMLRPCValue() const { return "<int>" + std::to_string(mValue) + "</int>"; }
     };
 
     LLSD::String ImplInteger::asString() const
@@ -259,6 +266,8 @@ namespace
         virtual LLSD::Integer   asInteger() const;
         virtual LLSD::Real      asReal() const      { return mValue; }
         virtual LLSD::String    asString() const;
+
+        virtual LLSD::String asXMLRPCValue() const { return "<double>" + std::to_string(mValue) + "</double>"; }
     };
 
     LLSD::Boolean ImplReal::asBoolean() const
@@ -286,9 +295,11 @@ namespace
         virtual LLSD::URI       asURI() const   { return LLURI(mValue); }
         virtual size_t          size() const    { return mValue.size(); }
         virtual const LLSD::String& asStringRef() const { return mValue; }
+
+        virtual LLSD::String asXMLRPCValue() const { return "<string>" + LLStringFn::xml_encode(mValue) + "</string>"; }
     };
 
-    LLSD::Integer   ImplString::asInteger() const
+    LLSD::Integer ImplString::asInteger() const
     {
         // This must treat "1.23" not as an error, but as a number, which is
         // then truncated down to an integer.  Hence, this code doesn't call
@@ -298,7 +309,7 @@ namespace
         return (int)asReal();
     }
 
-    LLSD::Real      ImplString::asReal() const
+    LLSD::Real ImplString::asReal() const
     {
         F64 v = 0.0;
         std::istringstream i_stream(mValue);
@@ -323,6 +334,8 @@ namespace
 
         virtual LLSD::String    asString() const{ return mValue.asString(); }
         virtual LLSD::UUID      asUUID() const  { return mValue; }
+
+        virtual LLSD::String asXMLRPCValue() const { return "<string>" + mValue.asString() + "</string>"; }
     };
 
 
@@ -344,6 +357,8 @@ namespace
         }
         virtual LLSD::String    asString() const{ return mValue.asString(); }
         virtual LLSD::Date      asDate() const  { return mValue; }
+
+        virtual LLSD::String asXMLRPCValue() const { return "<dateTime.iso8601>" + mValue.toHTTPDateString("%FT%T") + "</dateTime.iso8601>"; }
     };
 
 
@@ -355,6 +370,8 @@ namespace
 
         virtual LLSD::String    asString() const{ return mValue.asString(); }
         virtual LLSD::URI       asURI() const   { return mValue; }
+
+        virtual LLSD::String asXMLRPCValue() const { return "<string>" + LLStringFn::xml_encode(mValue.asString()) + "</string>"; }
     };
 
 
@@ -365,13 +382,15 @@ namespace
         ImplBinary(const LLSD::Binary& v) : Base(v) { }
 
         virtual const LLSD::Binary& asBinary() const{ return mValue; }
+
+        virtual LLSD::String asXMLRPCValue() const { return "<base64>" + LLBase64::encode(mValue.data(), mValue.size()) + "</base64>"; }
     };
 
 
     class ImplMap : public LLSD::Impl
     {
     private:
-        typedef std::map<LLSD::String, LLSD>    DataMap;
+        typedef std::map<LLSD::String, LLSD> DataMap;
 
         DataMap mData;
 
@@ -387,6 +406,19 @@ namespace
 
         virtual LLSD::Boolean asBoolean() const { return !mData.empty(); }
 
+        virtual LLSD::String asXMLRPCValue() const
+        {
+            std::ostringstream os;
+            os << "<struct>";
+            for (const auto& it : mData)
+            {
+                os << "<member><name>" << LLStringFn::xml_encode(it.first) << "</name>"
+                    << it.second.asXMLRPCValue() << "</member>";
+            }
+            os << "</struct>";
+            return os.str();
+        }
+
         virtual bool has(const LLSD::String&) const;
 
         using LLSD::Impl::get; // Unhiding get(size_t)
@@ -511,7 +543,7 @@ namespace
     class ImplArray : public LLSD::Impl
     {
     private:
-        typedef std::vector<LLSD>   DataVector;
+        typedef std::vector<LLSD> DataVector;
 
         DataVector mData;
 
@@ -527,6 +559,18 @@ namespace
 
         virtual LLSD::Boolean asBoolean() const { return !mData.empty(); }
 
+        virtual LLSD::String asXMLRPCValue() const
+        {
+            std::ostringstream os;
+            os << "<array><data>";
+            for (const auto& it : mData)
+            {
+                os << it.asXMLRPCValue();
+            }
+            os << "</data></array>";
+            return os.str();
+        }
+
         using LLSD::Impl::get; // Unhiding get(LLSD::String)
         using LLSD::Impl::erase; // Unhiding erase(LLSD::String)
         using LLSD::Impl::ref; // Unhiding ref(LLSD::String)
@@ -872,6 +916,155 @@ const LLSD::Binary& LLSD::asBinary() const  { return safe(impl).asBinary(); }
 
 const LLSD::String& LLSD::asStringRef() const { return safe(impl).asStringRef(); }
 
+LLSD::String LLSD::asXMLRPCValue() const { return "<value>" + safe(impl).asXMLRPCValue() + "</value>"; }
+
+static bool inline check(bool condition, const char* warning_message)
+{
+    if (!condition)
+    {
+        LL_WARNS() << warning_message << LL_ENDL;
+    }
+
+    return condition;
+}
+
+static bool parseXMLRPCArrayValue(LLSD& target, LLSD::TreeNode* node)
+{
+    LLSD::TreeNode* data = node->getFirstChild();
+    if (!check(data, "No array inner XML element (<data> expected)") ||
+        !check(data->hasName("data"), "Invalid array inner XML element (<data> expected)") ||
+        !check(!data->getNextSibling(), "Multiple array inner XML elements (single <data> expected)"))
+        return false;
+
+    for (LLSD::TreeNode* item = data->getFirstChild(); item; item = item->getNextSibling())
+    {
+        LLSD value;
+        if (!value.fromXMLRPCValue(item))
+            return false;
+
+        target.append(value);
+    }
+
+    return true;
+}
+
+static bool parseXMLRPCStructValue(LLSD& target, LLSD::TreeNode* node)
+{
+    for (LLSD::TreeNode* item = node->getFirstChild(); item; item = item->getNextSibling())
+    {
+        if (!check(item->hasName("member"), "Invalid struct inner XML element (<member> expected)"))
+            return false;
+
+        std::string name;
+        LLSD value;
+        for (LLSD::TreeNode* subitem = item->getFirstChild(); subitem; subitem = subitem->getNextSibling())
+        {
+            if (subitem->hasName("name"))
+            {
+                name = LLStringFn::xml_decode(subitem->getTextContents());
+            }
+            else if (!value.fromXMLRPCValue(subitem))
+            {
+                return false;
+            }
+        }
+        if (!check(!name.empty(), "Empty struct member name"))
+            return false;
+
+        target.insert(name, value);
+    }
+
+    return true;
+}
+
+bool LLSD::fromXMLRPCValue(TreeNode* node)
+{
+    clear();
+
+    llassert(node);
+    if (!node)
+        return false;
+
+    if (!check(node->hasName("value"), "Invalid XML element (<value> expected)"))
+        return false;
+
+    TreeNode* inner = node->getFirstChild();
+    if (!inner)
+    {
+        check(false, "No inner XML element (value type expected)");
+        // Value with no type qualifier is treated as string
+        assign(LLStringFn::xml_decode(node->getTextContents()));
+        return true;
+    }
+
+    if (!check(!inner->getNextSibling(), "Multiple inner XML elements (single expected)"))
+        return false;
+
+    if (inner->hasName("string"))
+    {
+        assign(LLStringFn::xml_decode(inner->getTextContents()));
+        return true;
+    }
+
+    if (inner->hasName("int") || inner->hasName("i4"))
+    {
+        assign(std::stoi(inner->getTextContents()));
+        return true;
+    }
+
+    if (inner->hasName("double"))
+    {
+        assign(std::stod(inner->getTextContents()));
+        return true;
+    }
+
+    if (inner->hasName("boolean"))
+    {
+        assign(!!std::stoi(inner->getTextContents()));
+        return true;
+    }
+
+    if (inner->hasName("dateTime.iso8601"))
+    {
+        assign(Date(inner->getTextContents()));
+        return true;
+    }
+
+    if (inner->hasName("base64"))
+    {
+        std::string decoded = LLBase64::decodeAsString(inner->getTextContents());
+        Binary binary(decoded.size());
+        memcpy(binary.data(), decoded.data(), decoded.size());
+        assign(binary);
+        return true;
+    }
+
+    if (inner->hasName("array"))
+    {
+        if (!parseXMLRPCArrayValue(*this, inner))
+        {
+            clear();
+            return false;
+        }
+        return true;
+    }
+
+    if (inner->hasName("struct"))
+    {
+        if (!parseXMLRPCStructValue(*this, inner))
+        {
+            clear();
+            return false;
+        }
+        return true;
+    }
+
+    check(false, "Unknown inner XML element (known value type expected)");
+    // Value with unknown type qualifier is treated as string
+    assign(LLStringFn::xml_decode(inner->getTextContents()));
+    return true;
+}
+
 // const char * helpers
 LLSD::LLSD(const char* v) : impl(0)     { ALLOC_LLSD_OBJECT;    assign(v); }
 void LLSD::assign(const char* v)
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index a5e735b561..5532decfc3 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -259,10 +259,24 @@ public:
         UUID    asUUID() const;
         Date    asDate() const;
         URI     asURI() const;
-        const Binary&   asBinary() const;
+        const Binary& asBinary() const;
 
         // asStringRef on any non-string type will return a ref to an empty string.
-        const String&   asStringRef() const;
+        const String& asStringRef() const;
+
+        // Return "<value><((type))>((scalar value or recursive calls))</((type))></value>"
+        // See http://xmlrpc.com/spec.md
+        String asXMLRPCValue() const;
+
+        struct TreeNode
+        {
+            virtual bool hasName(const String& name) const = 0;
+            virtual String getTextContents() const = 0;
+            virtual TreeNode* getFirstChild() const = 0;
+            virtual TreeNode* getNextSibling() const = 0;
+        };
+
+        bool fromXMLRPCValue(TreeNode* node);
 
         operator Boolean() const    { return asBoolean(); }
         operator Integer() const    { return asInteger(); }
@@ -275,7 +289,7 @@ public:
 
         // This is needed because most platforms do not automatically
         // convert the boolean negation as a bool in an if statement.
-        bool operator!() const {return !asBoolean();}
+        bool operator!() const { return !asBoolean(); }
     //@}
 
     /** @name Character Pointer Helpers
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 514d73b24b..6f3d193d6b 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -1208,6 +1208,75 @@ namespace LLStringFn
         return output;
     }
 
+    using literals_t = std::map<char, std::string>;
+    static const literals_t xml_elem_literals =
+    {
+        { '<', "&lt;" },
+        { '>', "&gt;" },
+        { '&', "&amp;" }
+    };
+    static const literals_t xml_attr_literals =
+    {
+        { '"', "&quot;" },
+        { '\'', "&apos;" }
+    };
+
+    static void literals_encode(std::string& text, const literals_t& literals)
+    {
+        for (const std::pair<char, std::string> it : literals)
+        {
+            std::string::size_type pos = 0;
+            while ((pos = text.find(it.first, pos)) != std::string::npos)
+            {
+                text.replace(pos, 1, it.second);
+                pos += it.second.size();
+            }
+        }
+    }
+
+    static void literals_decode(std::string& text, const literals_t& literals)
+    {
+        for (const std::pair<char, std::string> it : literals)
+        {
+            std::string::size_type pos = 0;
+            while ((pos = text.find(it.second, pos)) != std::string::npos)
+            {
+                text[pos++] = it.first;
+                text.erase(pos, it.second.size() - 1);
+            }
+        }
+    }
+
+    /**
+     * @brief Replace all characters that are not allowed in XML 1.0
+     * with corresponding literals: [ < > & ] => [ &lt; &gt; &amp; ]
+     */
+    std::string xml_encode(const std::string& input, bool for_attribute)
+    {
+        std::string result(input);
+        literals_encode(result, xml_elem_literals);
+        if (for_attribute)
+        {
+            literals_encode(result, xml_attr_literals);
+        }
+        return result;
+    }
+
+    /**
+     * @brief Replace some of XML literals that are defined in XML 1.0
+     * with corresponding characters: [ &lt; &gt; &amp; ] => [ < > & ]
+     */
+    std::string xml_decode(const std::string& input, bool for_attribute)
+    {
+        std::string result(input);
+        literals_decode(result, xml_elem_literals);
+        if (for_attribute)
+        {
+            literals_decode(result, xml_attr_literals);
+        }
+        return result;
+    }
+
     /**
      * @brief Replace all control characters (c < 0x20) with replacement in
      * string.
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 123f4184b5..b69a068830 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -889,6 +889,20 @@ namespace LLStringFn
     LL_COMMON_API std::string strip_invalid_xml(const std::string& input);
 
 
+    /**
+     * @brief Replace all characters that are not allowed in XML 1.0
+     * with corresponding literals: [ < > & ] => [ &lt; &gt; &amp; ]
+     */
+    LL_COMMON_API std::string xml_encode(const std::string& input, bool for_attribute = false);
+
+
+    /**
+     * @brief Replace some of XML literals that are defined in XML 1.0
+     * with corresponding characters: [ &lt; &gt; &amp; ] => [ < > & ]
+     */
+    LL_COMMON_API std::string xml_decode(const std::string& input, bool for_attribute = false);
+
+
     /**
      * @brief Replace all control characters (0 <= c < 0x20) with replacement in
      * string.   This is safe for utf-8
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 5322139304..b2757a7306 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -27,7 +27,6 @@ set(llmessage_SOURCE_FILES
     lldatapacker.cpp
     lldispatcher.cpp
     llexperiencecache.cpp
-    llfiltersd2xmlrpc.cpp
     llgenericstreamingmessage.cpp
     llhost.cpp
     llhttpnode.cpp
@@ -111,7 +110,6 @@ set(llmessage_HEADER_FILES
     lleventflags.h
     llexperiencecache.h
     llextendedstatus.h
-    llfiltersd2xmlrpc.h
     llfollowcamparams.h
     llgenericstreamingmessage.h
     llhost.h
@@ -193,7 +191,6 @@ target_link_libraries(
         llfilesystem
         llmath
         llcorehttp
-        ll::xmlrpc-epi
 )
 target_include_directories( llmessage  INTERFACE   ${CMAKE_CURRENT_SOURCE_DIR})
 
diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp
deleted file mode 100644
index 84b56d54bf..0000000000
--- a/indra/llmessage/llfiltersd2xmlrpc.cpp
+++ /dev/null
@@ -1,778 +0,0 @@
-/**
- * @file llfiltersd2xmlrpc.cpp
- * @author Phoenix
- * @date 2005-04-26
- *
- * $LicenseInfo:firstyear=2005&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-/**
- * xml rpc request:
- * <code>
- * <?xml version="1.0"?>
- * <methodCall><methodName>examples.getStateName</methodName>
- * <params><param><value><i4>41</i4></value></param></params>
- * </methodCall>
- * </code>
- *
- * xml rpc response:
- * <code>
- * <?xml version="1.0"?>
- * <methodResponse>
- * <params><param><value><string>South Dakota</string></value></param></params>
- * </methodResponse>
- * </code>
- *
- * xml rpc fault:
- * </code>
- * <?xml version="1.0"?>
- * <methodResponse>
- * <fault><value><struct>
- * <member><name>faultCode</name><value><int>4</int></value></member>
- * <member><name>faultString</name><value><string>...</string></value></member>
- * </struct></value></fault>
- * </methodResponse>
- * </code>
- *
- * llsd rpc request:
- * <code>
- * { 'method':'...', 'parameter':...]}
- * </code>
- *
- * llsd rpc response:
- * <code>
- * { 'response':... }
- * </code>
- *
- * llsd rpc fault:
- * <code>
- * { 'fault': {'code':i..., 'description':'...'} }
- * </code>
- *
- */
-
-#include "linden_common.h"
-#include "llfiltersd2xmlrpc.h"
-
-#include <sstream>
-#include <iterator>
-
-#ifdef LL_USESYSTEMLIBS
-#include <xmlrpc.h>
-#else
-#include <xmlrpc-epi/xmlrpc.h>
-#endif
-
-#include "apr_base64.h"
-
-#include "llbuffer.h"
-#include "llbufferstream.h"
-#include "llfasttimer.h"
-#include "llmemorystream.h"
-#include "llsd.h"
-#include "llsdserialize.h"
-#include "lluuid.h"
-
-// spammy mode
-//#define LL_SPEW_STREAM_OUT_DEBUGGING 1
-
-/**
- * String constants
- */
-static const char XML_HEADER[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
-static const char XMLRPC_REQUEST_HEADER_1[] = "<methodCall><methodName>";
-static const char XMLRPC_REQUEST_HEADER_2[] = "</methodName><params>";
-static const char XMLRPC_REQUEST_FOOTER[] = "</params></methodCall>";
-static const char XMLRPC_METHOD_RESPONSE_HEADER[] = "<methodResponse>";
-static const char XMLRPC_METHOD_RESPONSE_FOOTER[] = "</methodResponse>";
-static const char XMLRPC_RESPONSE_HEADER[] = "<params><param>";
-static const char XMLRPC_RESPONSE_FOOTER[] = "</param></params>";
-static const char XMLRPC_FAULT_1[] = "<fault><value><struct><member><name>faultCode</name><value><int>";
-static const char XMLRPC_FAULT_2[] = "</int></value></member><member><name>faultString</name><value><string>";
-static const char XMLRPC_FAULT_3[] = "</string></value></member></struct></value></fault>";
-static const char LLSDRPC_RESPONSE_HEADER[] = "{'response':";
-static const char LLSDRPC_RESPONSE_FOOTER[] = "}";
-const char LLSDRPC_REQUEST_HEADER_1[] = "{'method':'";
-const char LLSDRPC_REQUEST_HEADER_2[] = "', 'parameter': ";
-const char LLSDRPC_REQUEST_FOOTER[] = "}";
-static const char LLSDRPC_FAULT_HADER_1[] = "{ 'fault': {'code':i";
-static const char LLSDRPC_FAULT_HADER_2[] = ", 'description':";
-static const char LLSDRPC_FAULT_FOOTER[] = "} }";
-static const S32 DEFAULT_PRECISION = 20;
-
-/**
- * LLFilterSD2XMLRPC
- */
-LLFilterSD2XMLRPC::LLFilterSD2XMLRPC()
-{
-}
-
-LLFilterSD2XMLRPC::~LLFilterSD2XMLRPC()
-{
-}
-
-std::string xml_escape_string(const std::string& in)
-{
-    std::ostringstream out;
-    std::string::const_iterator it = in.begin();
-    std::string::const_iterator end = in.end();
-    for(; it != end; ++it)
-    {
-        switch((*it))
-        {
-        case '<':
-            out << "&lt;";
-            break;
-        case '>':
-            out << "&gt;";
-            break;
-        case '&':
-            out << "&amp;";
-            break;
-        case '\'':
-            out << "&apos;";
-            break;
-        case '"':
-            out << "&quot;";
-            break;
-        default:
-            out << (*it);
-            break;
-        }
-    }
-    return out.str();
-}
-
-void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd)
-{
-    ostr << "<value>";
-    switch(sd.type())
-    {
-    case LLSD::TypeMap:
-    {
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(map) BEGIN" << LL_ENDL;
-#endif
-        ostr << "<struct>";
-        if(ostr.fail())
-        {
-            LL_INFOS() << "STREAM FAILURE writing struct" << LL_ENDL;
-        }
-        LLSD::map_const_iterator it = sd.beginMap();
-        LLSD::map_const_iterator end = sd.endMap();
-        for(; it != end; ++it)
-        {
-            ostr << "<member><name>" << xml_escape_string((*it).first)
-                << "</name>";
-            streamOut(ostr, (*it).second);
-            if(ostr.fail())
-            {
-                LL_INFOS() << "STREAM FAILURE writing '" << (*it).first
-                        << "' with sd type " << (*it).second.type() << LL_ENDL;
-            }
-            ostr << "</member>";
-        }
-        ostr << "</struct>";
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(map) END" << LL_ENDL;
-#endif
-        break;
-    }
-    case LLSD::TypeArray:
-    {
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(array) BEGIN" << LL_ENDL;
-#endif
-        ostr << "<array><data>";
-        LLSD::array_const_iterator it = sd.beginArray();
-        LLSD::array_const_iterator end = sd.endArray();
-        for(; it != end; ++it)
-        {
-            streamOut(ostr, *it);
-            if(ostr.fail())
-            {
-                LL_INFOS() << "STREAM FAILURE writing array element sd type "
-                        << (*it).type() << LL_ENDL;
-            }
-        }
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(array) END" << LL_ENDL;
-#endif
-        ostr << "</data></array>";
-        break;
-    }
-    case LLSD::TypeUndefined:
-        // treat undefined as a bool with a false value.
-    case LLSD::TypeBoolean:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(bool)" << LL_ENDL;
-#endif
-        ostr << "<boolean>" << (sd.asBoolean() ? "1" : "0") << "</boolean>";
-        break;
-    case LLSD::TypeInteger:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(int)" << LL_ENDL;
-#endif
-        ostr << "<i4>" << sd.asInteger() << "</i4>";
-        break;
-    case LLSD::TypeReal:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(real)" << LL_ENDL;
-#endif
-        ostr << "<double>" << sd.asReal() << "</double>";
-        break;
-    case LLSD::TypeString:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(string)" << LL_ENDL;
-#endif
-        ostr << "<string>" << xml_escape_string(sd.asString()) << "</string>";
-        break;
-    case LLSD::TypeUUID:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(uuid)" << LL_ENDL;
-#endif
-        // serialize it as a string
-        ostr << "<string>" << sd.asString() << "</string>";
-        break;
-    case LLSD::TypeURI:
-    {
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(uri)" << LL_ENDL;
-#endif
-        // serialize it as a string
-        ostr << "<string>" << xml_escape_string(sd.asString()) << "</string>";
-        break;
-    }
-    case LLSD::TypeBinary:
-    {
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(binary)" << LL_ENDL;
-#endif
-        // this is pretty inefficient, but we'll deal with that
-        // problem when it becomes one.
-        ostr << "<base64>";
-        LLSD::Binary buffer = sd.asBinary();
-        if(!buffer.empty())
-        {
-            // *TODO: convert to LLBase64
-            int b64_buffer_length = apr_base64_encode_len(static_cast<int>(buffer.size()));
-            char* b64_buffer = new char[b64_buffer_length];
-            b64_buffer_length = apr_base64_encode_binary(
-                b64_buffer,
-                &buffer[0],
-                static_cast<int>(buffer.size()));
-            ostr.write(b64_buffer, b64_buffer_length - 1);
-            delete[] b64_buffer;
-        }
-        ostr << "</base64>";
-        break;
-    }
-    case LLSD::TypeDate:
-#if LL_SPEW_STREAM_OUT_DEBUGGING
-        LL_INFOS() << "streamOut(date)" << LL_ENDL;
-#endif
-        // no need to escape this since it will be alpha-numeric.
-        ostr << "<dateTime.iso8601>" << sd.asString() << "</dateTime.iso8601>";
-        break;
-    default:
-        // unhandled type
-        LL_WARNS() << "Unhandled structured data type: " << sd.type()
-            << LL_ENDL;
-        break;
-    }
-    ostr << "</value>";
-}
-
-/**
- * LLFilterSD2XMLRPCResponse
- */
-
-LLFilterSD2XMLRPCResponse::LLFilterSD2XMLRPCResponse()
-{
-}
-
-LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse()
-{
-}
-
-
-// virtual
-LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl(
-    const LLChannelDescriptors& channels,
-    buffer_ptr_t& buffer,
-    bool& eos,
-    LLSD& context,
-    LLPumpIO* pump)
-{
-    LL_PROFILE_ZONE_SCOPED;
-
-    PUMP_DEBUG;
-    // This pipe does not work if it does not have everyting. This
-    // could be addressed by making a stream parser for llsd which
-    // handled partial information.
-    if(!eos)
-    {
-        return STATUS_BREAK;
-    }
-
-    PUMP_DEBUG;
-    // we have everyting in the buffer, so turn the structure data rpc
-    // response into an xml rpc response.
-    LLBufferStream stream(channels, buffer.get());
-    stream << XML_HEADER << XMLRPC_METHOD_RESPONSE_HEADER;
-    LLSD sd;
-    LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in()));
-
-    PUMP_DEBUG;
-    LLIOPipe::EStatus rv = STATUS_ERROR;
-    if(sd.has("response"))
-    {
-        PUMP_DEBUG;
-        // it is a normal response. pack it up and ship it out.
-        stream.precision(DEFAULT_PRECISION);
-        stream << XMLRPC_RESPONSE_HEADER;
-        streamOut(stream, sd["response"]);
-        stream << XMLRPC_RESPONSE_FOOTER << XMLRPC_METHOD_RESPONSE_FOOTER;
-        rv = STATUS_DONE;
-    }
-    else if(sd.has("fault"))
-    {
-        PUMP_DEBUG;
-        // it is a fault.
-        stream << XMLRPC_FAULT_1 << sd["fault"]["code"].asInteger()
-            << XMLRPC_FAULT_2
-            << xml_escape_string(sd["fault"]["description"].asString())
-            << XMLRPC_FAULT_3 << XMLRPC_METHOD_RESPONSE_FOOTER;
-        rv = STATUS_DONE;
-    }
-    else
-    {
-        LL_WARNS() << "Unable to determine the type of LLSD response." << LL_ENDL;
-    }
-    PUMP_DEBUG;
-    return rv;
-}
-
-/**
- * LLFilterSD2XMLRPCRequest
- */
-LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest()
-{
-}
-
-LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest(const char* method)
-{
-    if(method)
-    {
-        mMethod.assign(method);
-    }
-}
-
-LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest()
-{
-}
-
-// virtual
-LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl(
-    const LLChannelDescriptors& channels,
-    buffer_ptr_t& buffer,
-    bool& eos,
-    LLSD& context,
-    LLPumpIO* pump)
-{
-    LL_PROFILE_ZONE_SCOPED;
-    // This pipe does not work if it does not have everyting. This
-    // could be addressed by making a stream parser for llsd which
-    // handled partial information.
-    PUMP_DEBUG;
-    if(!eos)
-    {
-        LL_INFOS() << "!eos" << LL_ENDL;
-        return STATUS_BREAK;
-    }
-
-    // See if we can parse it
-    LLBufferStream stream(channels, buffer.get());
-    LLSD sd;
-    LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in()));
-    if(stream.fail())
-    {
-        LL_INFOS() << "STREAM FAILURE reading structure data." << LL_ENDL;
-    }
-
-    PUMP_DEBUG;
-    // We can get the method and parameters from either the member
-    // function or passed in via the buffer. We prefer the buffer if
-    // we found a parameter and a method, or fall back to using
-    // mMethod and putting everyting in the buffer into the parameter.
-    std::string method;
-    LLSD param_sd;
-    if(sd.has("method") && sd.has("parameter"))
-    {
-        method = sd["method"].asString();
-        param_sd = sd["parameter"];
-    }
-    else
-    {
-        method = mMethod;
-        param_sd = sd;
-    }
-    if(method.empty())
-    {
-        LL_WARNS() << "SD -> XML Request no method found." << LL_ENDL;
-        return STATUS_ERROR;
-    }
-
-    PUMP_DEBUG;
-    // We have a method, and some kind of parameter, so package it up
-    // and send it out.
-    LLBufferStream ostream(channels, buffer.get());
-    ostream.precision(DEFAULT_PRECISION);
-    if(ostream.fail())
-    {
-        LL_INFOS() << "STREAM FAILURE setting precision" << LL_ENDL;
-    }
-    ostream << XML_HEADER << XMLRPC_REQUEST_HEADER_1
-        << xml_escape_string(method) << XMLRPC_REQUEST_HEADER_2;
-    if(ostream.fail())
-    {
-        LL_INFOS() << "STREAM FAILURE writing method headers" << LL_ENDL;
-    }
-    switch(param_sd.type())
-    {
-    case LLSD::TypeMap:
-        // If the params are a map, then we do not want to iterate
-        // through them since the iterators returned will be map
-        // ordered un-named values, which will lose the names, and
-        // only stream the values, turning it into an array.
-        ostream << "<param>";
-        streamOut(ostream, param_sd);
-        ostream << "</param>";
-        break;
-    case LLSD::TypeArray:
-    {
-
-        LLSD::array_iterator it = param_sd.beginArray();
-        LLSD::array_iterator end = param_sd.endArray();
-        for(; it != end; ++it)
-        {
-            ostream << "<param>";
-            streamOut(ostream, *it);
-            ostream << "</param>";
-        }
-        break;
-    }
-    default:
-        ostream << "<param>";
-        streamOut(ostream, param_sd);
-        ostream << "</param>";
-        break;
-    }
-
-    stream << XMLRPC_REQUEST_FOOTER;
-    return STATUS_DONE;
-}
-
-/**
- * LLFilterXMLRPCResponse2LLSD
- */
-// this is a c function here since it's really an implementation
-// detail that requires a header file just get the definition of the
-// parameters.
-LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value)
-{
-    XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(value);
-    LLIOPipe::EStatus status = LLIOPipe::STATUS_OK;
-    switch(type)
-    {
-    case xmlrpc_type_base64:
-    {
-        S32 len = XMLRPC_GetValueStringLen(value);
-        const char* buf = XMLRPC_GetValueBase64(value);
-        ostr << " b(";
-        if((len > 0) && buf)
-        {
-            ostr << len << ")\"";
-            ostr.write(buf, len);
-            ostr << "\"";
-        }
-        else
-        {
-            ostr << "0)\"\"";
-        }
-        break;
-    }
-    case xmlrpc_type_boolean:
-        //LL_DEBUGS() << "stream_out() bool" << LL_ENDL;
-        ostr << " " << (XMLRPC_GetValueBoolean(value) ? "true" : "false");
-        break;
-    case xmlrpc_type_datetime:
-        ostr << " d\"" << XMLRPC_GetValueDateTime_ISO8601(value) << "\"";
-        break;
-    case xmlrpc_type_double:
-        ostr << " r" << XMLRPC_GetValueDouble(value);
-        //LL_DEBUGS() << "stream_out() double" << XMLRPC_GetValueDouble(value)
-        //       << LL_ENDL;
-        break;
-    case xmlrpc_type_int:
-        ostr << " i" << XMLRPC_GetValueInt(value);
-        //LL_DEBUGS() << "stream_out() integer:" << XMLRPC_GetValueInt(value)
-        //       << LL_ENDL;
-        break;
-    case xmlrpc_type_string:
-        //LL_DEBUGS() << "stream_out() string: " << str << LL_ENDL;
-        ostr << " s(" << XMLRPC_GetValueStringLen(value) << ")'"
-            << XMLRPC_GetValueString(value) << "'";
-        break;
-    case xmlrpc_type_array: // vector
-    case xmlrpc_type_mixed: // vector
-    {
-        //LL_DEBUGS() << "stream_out() array" << LL_ENDL;
-        ostr << " [";
-        U32 needs_comma = 0;
-        XMLRPC_VALUE current = XMLRPC_VectorRewind(value);
-        while(current && (LLIOPipe::STATUS_OK == status))
-        {
-            if(needs_comma++) ostr << ",";
-            status = stream_out(ostr, current);
-            current = XMLRPC_VectorNext(value);
-        }
-        ostr << "]";
-        break;
-    }
-    case xmlrpc_type_struct: // still vector
-    {
-        //LL_DEBUGS() << "stream_out() struct" << LL_ENDL;
-        ostr << " {";
-        std::string name;
-        U32 needs_comma = 0;
-        XMLRPC_VALUE current = XMLRPC_VectorRewind(value);
-        while(current && (LLIOPipe::STATUS_OK == status))
-        {
-            if(needs_comma++) ostr << ",";
-            name.assign(XMLRPC_GetValueID(current));
-            ostr << "'" << LLSDNotationFormatter::escapeString(name) << "':";
-            status = stream_out(ostr, current);
-            current = XMLRPC_VectorNext(value);
-        }
-        ostr << "}";
-        break;
-    }
-    case xmlrpc_type_empty:
-    case xmlrpc_type_none:
-    default:
-        status = LLIOPipe::STATUS_ERROR;
-        LL_WARNS() << "Found an empty xmlrpc type.." << LL_ENDL;
-        // not much we can do here...
-        break;
-    };
-    return status;
-}
-
-LLFilterXMLRPCResponse2LLSD::LLFilterXMLRPCResponse2LLSD()
-{
-}
-
-LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD()
-{
-}
-
-LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl(
-    const LLChannelDescriptors& channels,
-    buffer_ptr_t& buffer,
-    bool& eos,
-    LLSD& context,
-    LLPumpIO* pump)
-{
-    LL_PROFILE_ZONE_SCOPED;
-
-    PUMP_DEBUG;
-    if(!eos) return STATUS_BREAK;
-    if(!buffer) return STATUS_ERROR;
-
-    PUMP_DEBUG;
-    // *FIX: This technique for reading data is far from optimal. We
-    // need to have some kind of istream interface into the xml
-    // parser...
-    S32 bytes = buffer->countAfter(channels.in(), NULL);
-    if(!bytes) return STATUS_ERROR;
-    char* buf = new char[bytes + 1];
-    buf[bytes] = '\0';
-    buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes);
-
-    //LL_DEBUGS() << "xmlrpc response: " << buf << LL_ENDL;
-
-    PUMP_DEBUG;
-    XMLRPC_REQUEST response = XMLRPC_REQUEST_FromXML(
-        buf,
-        bytes,
-        NULL);
-    if(!response)
-    {
-        LL_WARNS() << "XML -> SD Response unable to parse xml." << LL_ENDL;
-        delete[] buf;
-        return STATUS_ERROR;
-    }
-
-    PUMP_DEBUG;
-    LLBufferStream stream(channels, buffer.get());
-    stream.precision(DEFAULT_PRECISION);
-    if(XMLRPC_ResponseIsFault(response))
-    {
-        PUMP_DEBUG;
-        stream << LLSDRPC_FAULT_HADER_1
-               << XMLRPC_GetResponseFaultCode(response)
-               << LLSDRPC_FAULT_HADER_2;
-        const char* fault_str = XMLRPC_GetResponseFaultString(response);
-        std::string fault_string;
-        if(fault_str)
-        {
-            fault_string.assign(fault_str);
-        }
-        stream << "'" << LLSDNotationFormatter::escapeString(fault_string)
-           << "'" <<LLSDRPC_FAULT_FOOTER;
-    }
-    else
-    {
-        PUMP_DEBUG;
-        stream << LLSDRPC_RESPONSE_HEADER;
-        XMLRPC_VALUE param = XMLRPC_RequestGetData(response);
-        if(param)
-        {
-            stream_out(stream, param);
-        }
-        stream << LLSDRPC_RESPONSE_FOOTER;
-    }
-    PUMP_DEBUG;
-    XMLRPC_RequestFree(response, 1);
-    delete[] buf;
-    PUMP_DEBUG;
-    return STATUS_DONE;
-}
-
-/**
- * LLFilterXMLRPCRequest2LLSD
- */
-LLFilterXMLRPCRequest2LLSD::LLFilterXMLRPCRequest2LLSD()
-{
-}
-
-LLFilterXMLRPCRequest2LLSD::~LLFilterXMLRPCRequest2LLSD()
-{
-}
-
-LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl(
-    const LLChannelDescriptors& channels,
-    buffer_ptr_t& buffer,
-    bool& eos,
-    LLSD& context,
-    LLPumpIO* pump)
-{
-    LL_PROFILE_ZONE_SCOPED;
-    PUMP_DEBUG;
-    if(!eos) return STATUS_BREAK;
-    if(!buffer) return STATUS_ERROR;
-
-    PUMP_DEBUG;
-    // *FIX: This technique for reading data is far from optimal. We
-    // need to have some kind of istream interface into the xml
-    // parser...
-    S32 bytes = buffer->countAfter(channels.in(), NULL);
-    if(!bytes) return STATUS_ERROR;
-    char* buf = new char[bytes + 1];
-    buf[bytes] = '\0';
-    buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes);
-
-    //LL_DEBUGS() << "xmlrpc request: " << buf << LL_ENDL;
-
-    // Check the value in the buffer. XMLRPC_REQUEST_FromXML will report a error code 4 if
-    // values that are less than 0x20 are passed to it, except
-    // 0x09: Horizontal tab; 0x0a: New Line; 0x0d: Carriage
-    U8* cur_pBuf = (U8*)buf;
-    U8 cur_char;
-    for (S32 i=0; i<bytes; i++)
-    {
-        cur_char = *cur_pBuf;
-        if (   cur_char < 0x20
-            && 0x09 != cur_char
-            && 0x0a != cur_char
-            && 0x0d != cur_char )
-        {
-            *cur_pBuf = '?';
-        }
-        ++cur_pBuf;
-    }
-
-    PUMP_DEBUG;
-    XMLRPC_REQUEST request = XMLRPC_REQUEST_FromXML(
-        buf,
-        bytes,
-        NULL);
-    if(!request)
-    {
-        LL_WARNS() << "XML -> SD Request process parse error." << LL_ENDL;
-        delete[] buf;
-        return STATUS_ERROR;
-    }
-
-    PUMP_DEBUG;
-    LLBufferStream stream(channels, buffer.get());
-    stream.precision(DEFAULT_PRECISION);
-    const char* name = XMLRPC_RequestGetMethodName(request);
-    stream << LLSDRPC_REQUEST_HEADER_1 << (name ? name : "")
-           << LLSDRPC_REQUEST_HEADER_2;
-    XMLRPC_VALUE param = XMLRPC_RequestGetData(request);
-    if(param)
-    {
-        PUMP_DEBUG;
-        S32 size = XMLRPC_VectorSize(param);
-        if(size > 1)
-        {
-            // if there are multiple parameters, stuff the values into
-            // an array so that the next step in the chain can read them.
-            stream << "[";
-        }
-        XMLRPC_VALUE current = XMLRPC_VectorRewind(param);
-        bool needs_comma = false;
-        while(current)
-        {
-            if(needs_comma)
-            {
-                stream << ",";
-            }
-            needs_comma = true;
-            stream_out(stream, current);
-            current = XMLRPC_VectorNext(param);
-        }
-        if(size > 1)
-        {
-            // close the array
-            stream << "]";
-        }
-    }
-    stream << LLSDRPC_REQUEST_FOOTER;
-    XMLRPC_RequestFree(request, 1);
-    delete[] buf;
-    PUMP_DEBUG;
-    return STATUS_DONE;
-}
-
diff --git a/indra/llmessage/llfiltersd2xmlrpc.h b/indra/llmessage/llfiltersd2xmlrpc.h
deleted file mode 100644
index 55938d3e2b..0000000000
--- a/indra/llmessage/llfiltersd2xmlrpc.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/**
- * @file llfiltersd2xmlrpc.h
- * @author Phoenix
- * @date 2005-04-26
- *
- * $LicenseInfo:firstyear=2005&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFILTERSD2XMLRPC_H
-#define LL_LLFILTERSD2XMLRPC_H
-
-/**
- * These classes implement the necessary pipes for translating between
- * xmlrpc and llsd rpc. The llsd rpcs mechanism was developed as an
- * extensible and easy to parse serialization grammer which maintains
- * a time efficient in-memory representation.
- */
-
-#include <iosfwd>
-#include "lliopipe.h"
-
-/**
- * @class LLFilterSD2XMLRPC
- * @brief Filter from serialized LLSD to an XMLRPC method call
- *
- * This clas provides common functionality for the LLFilterSD2XMLRPRC
- * request and response classes.
- */
-class LLFilterSD2XMLRPC : public LLIOPipe
-{
-public:
-    LLFilterSD2XMLRPC();
-    virtual ~LLFilterSD2XMLRPC();
-
-protected:
-    /**
-     * @brief helper method
-     */
-    void streamOut(std::ostream& ostr, const LLSD& sd);
-};
-
-/**
- * @class LLFilterSD2XMLRPCResponse
- * @brief Filter from serialized LLSD to an XMLRPC response
- *
- * This class filters a serialized LLSD object to an xmlrpc
- * repsonse. Since resonses are limited to a single param, the xmlrprc
- * response only serializes it as one object.
- * This class correctly handles normal llsd responses as well as llsd
- * rpc faults.
- *
- * For example, if given:
- * <code>{'response':[ i200, r3.4, {"foo":"bar"} ]}</code>
- * Would generate:
- * <code>
- *  <?xml version="1.0"?>
- *  <methodResponse><params><param><array><data>
- *    <value><int>200</int></value>
- *    <value><double>3.4</double></value>
- *    <value><struct><member>
- *      <name>foo</name><value><string>bar</string></value></member>
- *      </struct></value>
- *  </data></array></param></params></methodResponse>
- * </code>
- */
-class LLFilterSD2XMLRPCResponse : public LLFilterSD2XMLRPC
-{
-public:
-    // constructor
-    LLFilterSD2XMLRPCResponse();
-
-    // destructor
-    virtual ~LLFilterSD2XMLRPCResponse();
-
-    /* @name LLIOPipe virtual implementations
-     */
-    //@{
-protected:
-    /**
-     * @brief Process the data in buffer.
-     */
-    virtual EStatus process_impl(
-        const LLChannelDescriptors& channels,
-        buffer_ptr_t& buffer,
-        bool& eos,
-        LLSD& context,
-        LLPumpIO* pump);
-    //@}
-};
-
-/**
- * @class LLFilterSD2XMLRPCRequest
- * @brief Filter from serialized LLSD to an XMLRPC method call
- *
- * This class will accept any kind of serialized LLSD object, but you
- * probably want to have an array on the outer boundary since this
- * object will interpret each element in the top level LLSD as a
- * parameter into the xmlrpc spec.
- *
- * For example, you would represent 3 params as:
- * <code>
- *  {'method'='foo', 'parameter':[i200, r3.4, {"foo":"bar"}]}
- * </code>
- * To generate:
- * <code>
- *  <?xml version="1.0"?>
- *  <methodCall><params>
- *  <param><value><int>200</int></value></param>
- *  <param><value><double>3.4</double></value></param>
- *  <param><value><struct><member>
- *    <name>foo</name><value><string>bar</string></value></member>
- *    </struct></value></param>
- *  </params></methodCall>
- *
- * This class will accept 2 different kinds of encodings. The first
- * just an array of params as long as you specify the method in the
- * constructor. It will also accept a structured data in the form:
- * {'method':'$method_name', 'parameter':[...] } In the latter form, the
- * encoded 'method' will be used regardless of the construction of the
- * object, and the 'parameter' will be used as parameter to the call.
- */
-class LLFilterSD2XMLRPCRequest : public LLFilterSD2XMLRPC
-{
-public:
-    // constructor
-    LLFilterSD2XMLRPCRequest();
-
-    // constructor
-    LLFilterSD2XMLRPCRequest(const char* method);
-
-    // destructor
-    virtual ~LLFilterSD2XMLRPCRequest();
-
-    /* @name LLIOPipe virtual implementations
-     */
-    //@{
-protected:
-    /**
-     * @brief Process the data in buffer.
-     */
-    virtual EStatus process_impl(
-        const LLChannelDescriptors& channels,
-        buffer_ptr_t& buffer,
-        bool& eos,
-        LLSD& context,
-        LLPumpIO* pump);
-    //@}
-
-protected:
-    // The method name of this request.
-    std::string mMethod;
-};
-
-/**
- * @class LLFilterXMLRPCResponse2LLSD
- * @brief Filter from serialized XMLRPC method response to LLSD
- *
- * The xmlrpc spec states that responses can only have one element
- * which can be of any supported type.
- * This takes in  xml of the form:
- * <code>
- * <?xml version=\"1.0\"?><methodResponse><params><param>
- * <value><string>ok</string></value></param></params></methodResponse>
- * </code>
- * And processes it into:
- *  <code>'ok'</code>
- *
- */
-class LLFilterXMLRPCResponse2LLSD : public LLIOPipe
-{
-public:
-    // constructor
-    LLFilterXMLRPCResponse2LLSD();
-
-    // destructor
-    virtual ~LLFilterXMLRPCResponse2LLSD();
-
-    /* @name LLIOPipe virtual implementations
-     */
-    //@{
-protected:
-    /**
-     * @brief Process the data in buffer.
-     */
-    virtual EStatus process_impl(
-        const LLChannelDescriptors& channels,
-        buffer_ptr_t& buffer,
-        bool& eos,
-        LLSD& context,
-        LLPumpIO* pump);
-    //@}
-
-protected:
-};
-
-/**
- * @class LLFilterXMLRPCRequest2LLSD
- * @brief Filter from serialized XMLRPC method call to LLSD
- *
- * This takes in  xml of the form:
- * <code>
- *  <?xml version=\"1.0\"?><methodCall>
- *  <methodName>repeat</methodName>
- *  <params>
- *  <param><value><i4>4</i4></value></param>
- *  <param><value><string>ok</string></value></param>
- *  </params></methodCall>
- * </code>
- * And processes it into:
- *  <code>{ 'method':'repeat', 'params':[i4, 'ok'] }</code>
- */
-class LLFilterXMLRPCRequest2LLSD : public LLIOPipe
-{
-public:
-    // constructor
-    LLFilterXMLRPCRequest2LLSD();
-
-    // destructor
-    virtual ~LLFilterXMLRPCRequest2LLSD();
-
-    /* @name LLIOPipe virtual implementations
-     */
-    //@{
-protected:
-    /**
-     * @brief Process the data in buffer.
-     */
-    virtual EStatus process_impl(
-        const LLChannelDescriptors& channels,
-        buffer_ptr_t& buffer,
-        bool& eos,
-        LLSD& context,
-        LLPumpIO* pump);
-    //@}
-
-protected:
-};
-
-/**
- * @brief This function takes string, and escapes it appropritately
- * for inclusion as xml data.
- */
-std::string xml_escape_string(const std::string& in);
-
-/**
- * @brief Externally available constants
- */
-extern const char LLSDRPC_REQUEST_HEADER_1[];
-extern const char LLSDRPC_REQUEST_HEADER_2[];
-extern const char LLSDRPC_REQUEST_FOOTER[];
-
-#endif // LL_LLFILTERSD2XMLRPC_H
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 0fd4516844..7f6b8093fc 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -653,32 +653,24 @@ bool LLXMLNode::updateNode(
 // static
 bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXMLNode* defaults_tree)
 {
-    // Read file
-    LL_DEBUGS("XMLNode") << "parsing XML file: " << filename << LL_ENDL;
-    LLFILE* fp = LLFile::fopen(filename, "rb");     /* Flawfinder: ignore */
-    if (fp == NULL)
+    std::string xml = LLFile::getContents(filename);
+    if (xml.empty())
     {
-        node = NULL ;
-        return false;
+        LL_WARNS("XMLNode") << "no XML file: " << filename << LL_ENDL;
+    }
+    else if (parseBuffer(xml.data(), xml.size(), node, defaults_tree))
+    {
+        return true;
     }
-    fseek(fp, 0, SEEK_END);
-    U32 length = ftell(fp);
-    fseek(fp, 0, SEEK_SET);
-
-    U8* buffer = new U8[length+1];
-    size_t nread = fread(buffer, 1, length, fp);
-    buffer[nread] = 0;
-    fclose(fp);
 
-    bool rv = parseBuffer(buffer, static_cast<U32>(nread), node, defaults_tree);
-    delete [] buffer;
-    return rv;
+    node = nullptr;
+    return false;
 }
 
 // static
 bool LLXMLNode::parseBuffer(
-    U8* buffer,
-    U32 length,
+    const char* buffer,
+    U64 length,
     LLXMLNodePtr& node,
     LLXMLNode* defaults)
 {
@@ -693,20 +685,25 @@ bool LLXMLNode::parseBuffer(
 
     file_node->mParser = &my_parser;
 
-    XML_SetUserData(my_parser, (void *)file_node_ptr);
+    XML_SetUserData(my_parser, file_node_ptr);
 
     // Do the parsing
-    if (XML_Parse(my_parser, (const char *)buffer, length, true) != XML_STATUS_OK)
+    bool success = XML_STATUS_OK == XML_Parse(my_parser, buffer, (int)length, true);
+    if (!success)
     {
         LL_WARNS() << "Error parsing xml error code: "
                 << XML_ErrorString(XML_GetErrorCode(my_parser))
                 << " on line " << XML_GetCurrentLineNumber(my_parser)
+                << ", column " << XML_GetCurrentColumnNumber(my_parser)
                 << LL_ENDL;
     }
 
     // Deinit
     XML_ParserFree(my_parser);
 
+    if (!success)
+        return false;
+
     if (!file_node->mChildren || file_node->mChildren->map.size() != 1)
     {
         LL_WARNS() << "Parse failure - wrong number of top-level nodes xml."
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index b8e29bbfef..b8f9e1ff69 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -129,20 +129,20 @@ public:
     void addChild(LLXMLNodePtr& new_child);
     void setParent(LLXMLNodePtr& new_parent); // reparent if necessary
 
-    // Serialization
+    // Deserialization
     static bool parseFile(
         const std::string& filename,
         LLXMLNodePtr& node,
-        LLXMLNode* defaults_tree);
+        LLXMLNode* defaults = nullptr);
     static bool parseBuffer(
-        U8* buffer,
-        U32 length,
+        const char* buffer,
+        U64 length,
         LLXMLNodePtr& node,
-        LLXMLNode* defaults);
+        LLXMLNode* defaults = nullptr);
     static bool parseStream(
         std::istream& str,
         LLXMLNodePtr& node,
-        LLXMLNode* defaults);
+        LLXMLNode* defaults = nullptr);
     static bool updateNode(
         LLXMLNodePtr& node,
         LLXMLNodePtr& update_node);
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 06c87343e2..8a4ab091a3 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -111,16 +111,17 @@ public:
     bool hasEstimate() const;
     std::string getLocalEstimate() const;
 
-    void startTransaction(TransactionType type,
-        const char* method, LLXMLRPCValue params);
+    void startTransaction(TransactionType type, const char* method, const LLSD& params);
+
+    // return true if update needed
     bool checkTransaction();
-        // return true if update needed
 
     void setError(const std::string& message, const std::string& uri);
     void clearError();
 
+    // return true if update needed
     bool considerUpdateCurrency();
-        // return true if update needed
+
     void currencyKey(S32);
     static void onCurrencyKey(LLLineEditor* caller, void* data);
 
@@ -160,32 +161,29 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo()
         return;
     }
 
-    LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct();
-    keywordArgs.appendString("agentId", gAgent.getID().asString());
-    keywordArgs.appendString(
-        "secureSessionId",
-        gAgent.getSecureSessionID().asString());
-    keywordArgs.appendString("language", LLUI::getLanguage());
-    keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy);
-    keywordArgs.appendString("viewerChannel", LLVersionInfo::instance().getChannel());
-    keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::instance().getMajor());
-    keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::instance().getMinor());
-    keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::instance().getPatch());
+    const LLVersionInfo& vi(LLVersionInfo::instance());
+
+    LLSD params = LLSD::emptyMap();
+    params["agentId"] = gAgent.getID().asString();
+    params["secureSessionId"] = gAgent.getSecureSessionID().asString();
+    params["language"] = LLUI::getLanguage();
+    params["currencyBuy"] = mUserCurrencyBuy;
+    params["viewerChannel"] = vi.getChannel();
+    params["viewerMajorVersion"] = vi.getMajor();
+    params["viewerMinorVersion"] = vi.getMinor();
+    params["viewerPatchVersion"] = vi.getPatch();
     // With GitHub builds, the build number is too big to fit in a 32-bit int,
-    // and XMLRPC_VALUE doesn't deal with integers wider than int. Use string.
-    keywordArgs.appendString("viewerBuildVersion", stringize(LLVersionInfo::instance().getBuild()));
-
-    LLXMLRPCValue params = LLXMLRPCValue::createArray();
-    params.append(keywordArgs);
+    // and XMLRPC value doesn't deal with integers wider than int. Use string.
+    params["viewerBuildVersion"] = std::to_string(vi.getBuild());
 
     startTransaction(TransactionCurrency, "getCurrencyQuote", params);
 }
 
 void LLCurrencyUIManager::Impl::finishCurrencyInfo()
 {
-    LLXMLRPCValue result = mTransaction->responseValue();
+    const LLSD& result = mTransaction->response();
 
-    bool success = result["success"].asBool();
+    bool success = result["success"].asBoolean();
     if (!success)
     {
         setError(
@@ -195,24 +193,24 @@ void LLCurrencyUIManager::Impl::finishCurrencyInfo()
         return;
     }
 
-    LLXMLRPCValue currency = result["currency"];
+    const LLSD& currency = result["currency"];
 
     // old XML-RPC server: estimatedCost = value in US cents
-    mUSDCurrencyEstimated = currency["estimatedCost"].isValid();
+    mUSDCurrencyEstimated = currency.has("estimatedCost");
     if (mUSDCurrencyEstimated)
     {
-        mUSDCurrencyEstimatedCost = currency["estimatedCost"].asInt();
+        mUSDCurrencyEstimatedCost = currency["estimatedCost"].asInteger();
     }
 
     // newer XML-RPC server: estimatedLocalCost = local currency string
-    mLocalCurrencyEstimated = currency["estimatedLocalCost"].isValid();
+    mLocalCurrencyEstimated = currency.has("estimatedLocalCost");
     if (mLocalCurrencyEstimated)
     {
         mLocalCurrencyEstimatedCost = currency["estimatedLocalCost"].asString();
         mSupportsInternationalBilling = true;
     }
 
-    S32 newCurrencyBuy = currency["currencyBuy"].asInt();
+    S32 newCurrencyBuy = currency["currencyBuy"].asInteger();
     if (newCurrencyBuy != mUserCurrencyBuy)
     {
         mUserCurrencyBuy = newCurrencyBuy;
@@ -224,36 +222,36 @@ void LLCurrencyUIManager::Impl::finishCurrencyInfo()
 
 void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password)
 {
-    LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct();
-    keywordArgs.appendString("agentId", gAgent.getID().asString());
-    keywordArgs.appendString(
-        "secureSessionId",
-        gAgent.getSecureSessionID().asString());
-    keywordArgs.appendString("language", LLUI::getLanguage());
-    keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy);
+    const LLVersionInfo& vi(LLVersionInfo::instance());
+
+    LLSD params = LLSD::emptyMap();
+    params["agentId"] = gAgent.getID().asString();
+    params["secureSessionId"] = gAgent.getSecureSessionID().asString();
+    params["language"] = LLUI::getLanguage();
+    params["currencyBuy"] = mUserCurrencyBuy;
+    params["confirm"] = mSiteConfirm;
+    params["viewerChannel"] = vi.getChannel();
+    params["viewerMajorVersion"] = vi.getMajor();
+    params["viewerMinorVersion"] = vi.getMinor();
+    params["viewerPatchVersion"] = vi.getPatch();
+    // With GitHub builds, the build number is too big to fit in a 32-bit int,
+    // and XMLRPC value doesn't deal with integers wider than int. Use string.
+    params["viewerBuildVersion"] = std::to_string(vi.getBuild());
+
     if (mUSDCurrencyEstimated)
     {
-        keywordArgs.appendInt("estimatedCost", mUSDCurrencyEstimatedCost);
+        params["estimatedCost"] = mUSDCurrencyEstimatedCost;
     }
+
     if (mLocalCurrencyEstimated)
     {
-        keywordArgs.appendString("estimatedLocalCost", mLocalCurrencyEstimatedCost);
+        params["estimatedLocalCost"] = mLocalCurrencyEstimatedCost;
     }
-    keywordArgs.appendString("confirm", mSiteConfirm);
+
     if (!password.empty())
     {
-        keywordArgs.appendString("password", password);
+        params["password"] = password;
     }
-    keywordArgs.appendString("viewerChannel", LLVersionInfo::instance().getChannel());
-    keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::instance().getMajor());
-    keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::instance().getMinor());
-    keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::instance().getPatch());
-    // With GitHub builds, the build number is too big to fit in a 32-bit int,
-    // and XMLRPC_VALUE doesn't deal with integers wider than int. Use string.
-    keywordArgs.appendString("viewerBuildVersion", stringize(LLVersionInfo::instance().getBuild()));
-
-    LLXMLRPCValue params = LLXMLRPCValue::createArray();
-    params.append(keywordArgs);
 
     startTransaction(TransactionBuy, "buyCurrency", params);
 
@@ -263,9 +261,9 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password)
 
 void LLCurrencyUIManager::Impl::finishCurrencyBuy()
 {
-    LLXMLRPCValue result = mTransaction->responseValue();
+    const LLSD& result = mTransaction->response();
 
-    bool success = result["success"].asBool();
+    bool success = result["success"].asBoolean();
     if (!success)
     {
         setError(
@@ -282,7 +280,7 @@ void LLCurrencyUIManager::Impl::finishCurrencyBuy()
 }
 
 void LLCurrencyUIManager::Impl::startTransaction(TransactionType type,
-        const char* method, LLXMLRPCValue params)
+        const char* method, const LLSD& params)
 {
     static std::string transactionURI;
     if (transactionURI.empty())
@@ -293,12 +291,7 @@ void LLCurrencyUIManager::Impl::startTransaction(TransactionType type,
     delete mTransaction;
 
     mTransactionType = type;
-    mTransaction = new LLXMLRPCTransaction(
-        transactionURI,
-        method,
-        params,
-        false /* don't use gzip */
-        );
+    mTransaction = new LLXMLRPCTransaction(transactionURI, method, params);
 
     clearError();
 }
@@ -352,12 +345,17 @@ bool LLCurrencyUIManager::Impl::checkTransaction()
     {
         setError(mTransaction->statusMessage(), mTransaction->statusURI());
     }
-    else {
+    else
+    {
         switch (mTransactionType)
         {
-            case TransactionCurrency:   finishCurrencyInfo();   break;
-            case TransactionBuy:        finishCurrencyBuy();    break;
-            default: ;
+        case TransactionCurrency:
+            finishCurrencyInfo();
+            break;
+        case TransactionBuy:
+            finishCurrencyBuy();
+            break;
+        default:;
         }
     }
 
@@ -385,9 +383,8 @@ void LLCurrencyUIManager::Impl::clearError()
 
 bool LLCurrencyUIManager::Impl::considerUpdateCurrency()
 {
-    if (mCurrencyChanged
-    &&  !mTransaction
-    &&  mCurrencyKeyTimer.getElapsedTimeF32() >= CURRENCY_ESTIMATE_FREQUENCY)
+    if (mCurrencyChanged && !mTransaction &&
+        mCurrencyKeyTimer.getElapsedTimeF32() >= CURRENCY_ESTIMATE_FREQUENCY)
     {
         updateCurrencyInfo();
         return true;
@@ -408,7 +405,8 @@ void LLCurrencyUIManager::Impl::currencyKey(S32 value)
 
     mUserCurrencyBuy = value;
 
-    if (hasEstimate()) {
+    if (hasEstimate())
+    {
         clearEstimate();
         //cannot just simply refresh the whole UI, as the edit field will
         // get reset and the cursor will change...
@@ -421,8 +419,7 @@ void LLCurrencyUIManager::Impl::currencyKey(S32 value)
 }
 
 // static
-void LLCurrencyUIManager::Impl::onCurrencyKey(
-        LLLineEditor* caller, void* data)
+void LLCurrencyUIManager::Impl::onCurrencyKey(LLLineEditor* caller, void* data)
 {
     S32 value = atoi(caller->getText().c_str());
     LLCurrencyUIManager::Impl* self = (LLCurrencyUIManager::Impl*)data;
@@ -589,14 +586,12 @@ bool LLCurrencyUIManager::inProcess()
 
 bool LLCurrencyUIManager::canCancel()
 {
-    return impl.mTransactionType != Impl::TransactionBuy;
+    return !buying();
 }
 
 bool LLCurrencyUIManager::canBuy()
 {
-    return impl.mTransactionType == Impl::TransactionNone
-        && impl.hasEstimate()
-        && impl.mUserCurrencyBuy > 0;
+    return !inProcess() && impl.hasEstimate() && impl.mUserCurrencyBuy > 0;
 }
 
 bool LLCurrencyUIManager::buying()
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 570a223908..11505e3047 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -182,7 +182,7 @@ public:
 
     void refreshUI();
 
-    void startTransaction(TransactionType type, const LLXMLRPCValue& params);
+    void startTransaction(TransactionType type, const LLSD& params);
     bool checkTransaction();
 
     void tellUserError(const std::string& message, const std::string& uri);
@@ -396,11 +396,10 @@ void LLFloaterBuyLandUI::updateParcelInfo()
     // Can't have more than region max tasks, regardless of parcel
     // object bonus factor.
     LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
-    if(region)
+    if (region)
     {
         S32 max_tasks_per_region = (S32)region->getMaxTasks();
-        mParcelSupportedObjects = llmin(
-            mParcelSupportedObjects, max_tasks_per_region);
+        mParcelSupportedObjects = llmin(mParcelSupportedObjects, max_tasks_per_region);
     }
 
     mParcelSoldWithObjects = parcel->getSellWithObjects();
@@ -423,7 +422,7 @@ void LLFloaterBuyLandUI::updateParcelInfo()
 
     // checks that we can buy the land
 
-    if(mIsForGroup && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
+    if (mIsForGroup && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
     {
         mCannotBuyReason = getString("cant_buy_for_group");
         return;
@@ -492,85 +491,56 @@ void LLFloaterBuyLandUI::updateParcelInfo()
 void LLFloaterBuyLandUI::updateCovenantInfo()
 {
     LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
-    if(!region) return;
+    if (!region)
+        return;
 
     U8 sim_access = region->getSimAccess();
     std::string rating = LLViewerRegion::accessToString(sim_access);
 
     LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
-    if (region_name)
-    {
-        std::string region_name_txt = region->getName() + " ("+rating +")";
-        region_name->setText(region_name_txt);
+    std::string region_name_txt = region->getName() + " ("+rating +")";
+    region_name->setText(region_name_txt);
 
-        LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon");
-        LLRect rect = rating_icon->getRect();
-        S32 region_name_width = llmin(region_name->getRect().getWidth(), region_name->getTextBoundingRect().getWidth());
-        S32 icon_left_pad = region_name->getRect().mLeft + region_name_width + ICON_PAD;
-        region_name->setToolTip(region_name->getText());
-        rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
+    LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon");
+    LLRect rect = rating_icon->getRect();
+    S32 region_name_width = llmin(region_name->getRect().getWidth(), region_name->getTextBoundingRect().getWidth());
+    S32 icon_left_pad = region_name->getRect().mLeft + region_name_width + ICON_PAD;
+    region_name->setToolTip(region_name->getText());
+    rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
 
-        switch(sim_access)
-        {
-        case SIM_ACCESS_PG:
-            rating_icon->setValue(getString("icon_PG"));
-            break;
+    switch (sim_access)
+    {
+    case SIM_ACCESS_PG:
+        rating_icon->setValue(getString("icon_PG"));
+        break;
 
-        case SIM_ACCESS_ADULT:
-            rating_icon->setValue(getString("icon_R"));
-            break;
+    case SIM_ACCESS_ADULT:
+        rating_icon->setValue(getString("icon_R"));
+        break;
 
-        default:
-            rating_icon->setValue(getString("icon_M"));
-        }
+    default:
+        rating_icon->setValue(getString("icon_M"));
     }
 
     LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
-    if (region_type)
-    {
-        region_type->setText(region->getLocalizedSimProductName());
-        region_type->setToolTip(region->getLocalizedSimProductName());
-    }
+    region_type->setText(region->getLocalizedSimProductName());
+    region_type->setToolTip(region->getLocalizedSimProductName());
 
     LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
-    if (resellable_clause)
-    {
-        if (region->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL))
-        {
-            resellable_clause->setText(getString("can_not_resell"));
-        }
-        else
-        {
-            resellable_clause->setText(getString("can_resell"));
-        }
-    }
+    const char* can_resell = region->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL) ? "can_not_resell" : "can_resell";
+    resellable_clause->setText(getString(can_resell));
 
     LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
-    if (changeable_clause)
-    {
-        if (region->getRegionFlag(REGION_FLAGS_ALLOW_PARCEL_CHANGES))
-        {
-            changeable_clause->setText(getString("can_change"));
-        }
-        else
-        {
-            changeable_clause->setText(getString("can_not_change"));
-        }
-    }
+    const char* can_change = region->getRegionFlag(REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? "can_change" : "can_not_change";
+    changeable_clause->setText(getString(can_change));
 
     LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
-    if(check)
-    {
-        check->set(false);
-        check->setEnabled(true);
-        check->setCommitCallback(onChangeAgreeCovenant, this);
-    }
+    check->set(false);
+    check->setEnabled(true);
+    check->setCommitCallback(onChangeAgreeCovenant, this);
 
     LLTextBox* box = getChild<LLTextBox>("covenant_text");
-    if(box)
-    {
-        box->setVisible(false);
-    }
+    box->setVisible(false);
 
     // send EstateCovenantInfo message
     LLMessageSystem *msg = gMessageSystem;
@@ -584,10 +554,9 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
 // static
 void LLFloaterBuyLandUI::onChangeAgreeCovenant(LLUICtrl* ctrl, void* user_data)
 {
-    LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)user_data;
-    if(self)
+    if (user_data)
     {
-        self->refreshUI();
+        ((LLFloaterBuyLandUI*)user_data)->refreshUI();
     }
 }
 
@@ -626,13 +595,13 @@ void LLFloaterBuyLandUI::updateFloaterEstateName(const std::string& name)
 void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text)
 {
     LLTextBox* editor = getChild<LLTextBox>("covenant_timestamp_text");
-    if (editor) editor->setText(text);
+    editor->setText(text);
 }
 
 void LLFloaterBuyLandUI::updateFloaterEstateOwnerName(const std::string& name)
 {
     LLTextBox* box = getChild<LLTextBox>("estate_owner_text");
-    if (box) box->setText(name);
+    box->setText(name);
 }
 
 void LLFloaterBuyLandUI::updateWebSiteInfo()
@@ -640,9 +609,10 @@ void LLFloaterBuyLandUI::updateWebSiteInfo()
     S32 askBillableArea = mIsForGroup ? 0 : mParcelBillableArea;
     S32 askCurrencyBuy = mCurrency.getAmount();
 
-    if (mTransaction && mTransactionType == TransactionPreflight
-    &&  mPreflightAskBillableArea == askBillableArea
-    &&  mPreflightAskCurrencyBuy == askCurrencyBuy)
+    if (mTransaction &&
+        mTransactionType == TransactionPreflight &&
+        mPreflightAskBillableArea == askBillableArea &&
+        mPreflightAskCurrencyBuy == askCurrencyBuy)
     {
         return;
     }
@@ -664,27 +634,21 @@ void LLFloaterBuyLandUI::updateWebSiteInfo()
     mSiteCurrencyEstimatedCost = 0;
 #endif
 
-    LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct();
-    keywordArgs.appendString("agentId", gAgent.getID().asString());
-    keywordArgs.appendString(
-        "secureSessionId",
-        gAgent.getSecureSessionID().asString());
-    keywordArgs.appendString("language", LLUI::getLanguage());
-    keywordArgs.appendInt("billableArea", mPreflightAskBillableArea);
-    keywordArgs.appendInt("currencyBuy", mPreflightAskCurrencyBuy);
-
-    LLXMLRPCValue params = LLXMLRPCValue::createArray();
-    params.append(keywordArgs);
+    LLSD params = LLSD::emptyMap();
+    params["agentId"] = gAgent.getID().asString();
+    params["secureSessionId"] = gAgent.getSecureSessionID().asString();
+    params["language"] = LLUI::getLanguage();
+    params["billableArea"] = mPreflightAskBillableArea;
+    params["currencyBuy"] = mPreflightAskCurrencyBuy;
 
     startTransaction(TransactionPreflight, params);
 }
 
 void LLFloaterBuyLandUI::finishWebSiteInfo()
 {
+    const LLSD& result = mTransaction->response();
 
-    LLXMLRPCValue result = mTransaction->responseValue();
-
-    mSiteValid = result["success"].asBool();
+    mSiteValid = result["success"].asBoolean();
     if (!mSiteValid)
     {
         tellUserError(
@@ -694,31 +658,30 @@ void LLFloaterBuyLandUI::finishWebSiteInfo()
         return;
     }
 
-    LLXMLRPCValue membership = result["membership"];
-    mSiteMembershipUpgrade = membership["upgrade"].asBool();
+    const LLSD& membership = result["membership"];
+    mSiteMembershipUpgrade = membership["upgrade"].asBoolean();
     mSiteMembershipAction = membership["action"].asString();
     mSiteMembershipPlanIDs.clear();
     mSiteMembershipPlanNames.clear();
-    LLXMLRPCValue levels = membership["levels"];
-    for (LLXMLRPCValue level = levels.rewind();
-        level.isValid();
-        level = levels.next())
+    const LLSD& levels = membership["levels"];
+    for (auto it = levels.beginArray(); it != levels.endArray(); ++it)
     {
+        const LLSD& level = *it;
         mSiteMembershipPlanIDs.push_back(level["id"].asString());
         mSiteMembershipPlanNames.push_back(level["description"].asString());
     }
     mUserPlanChoice = 0;
 
-    LLXMLRPCValue landUse = result["landUse"];
-    mSiteLandUseUpgrade = landUse["upgrade"].asBool();
+    const LLSD& landUse = result["landUse"];
+    mSiteLandUseUpgrade = landUse["upgrade"].asBoolean();
     mSiteLandUseAction = landUse["action"].asString();
 
-    LLXMLRPCValue currency = result["currency"];
-    if (currency["estimatedCost"].isValid())
+    const LLSD& currency = result["currency"];
+    if (currency.has("estimatedCost"))
     {
-        mCurrency.setUSDEstimate(currency["estimatedCost"].asInt());
+        mCurrency.setUSDEstimate(currency["estimatedCost"].asInteger());
     }
-    if (currency["estimatedLocalCost"].isValid())
+    if (currency.has("estimatedLocalCost"))
     {
         mCurrency.setLocalEstimate(currency["estimatedLocalCost"].asString());
     }
@@ -760,35 +723,30 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
         }
     }
 
-    LLXMLRPCValue keywordArgs = LLXMLRPCValue::createStruct();
-    keywordArgs.appendString("agentId", gAgent.getID().asString());
-    keywordArgs.appendString(
-        "secureSessionId",
-        gAgent.getSecureSessionID().asString());
-    keywordArgs.appendString("language", LLUI::getLanguage());
-    keywordArgs.appendString("levelId", newLevel);
-    keywordArgs.appendInt("billableArea",
-        mIsForGroup ? 0 : mParcelBillableArea);
-    keywordArgs.appendInt("currencyBuy", mCurrency.getAmount());
-    keywordArgs.appendInt("estimatedCost", mCurrency.getUSDEstimate());
-    keywordArgs.appendString("estimatedLocalCost", mCurrency.getLocalEstimate());
-    keywordArgs.appendString("confirm", mSiteConfirm);
+    LLSD params = LLSD::emptyMap();
+    params["agentId"] = gAgent.getID().asString();
+    params["secureSessionId"] = gAgent.getSecureSessionID().asString();
+    params["language"] = LLUI::getLanguage();
+    params["levelId"] = newLevel;
+    params["billableArea"] = mIsForGroup ? 0 : mParcelBillableArea;
+    params["currencyBuy"] = mCurrency.getAmount();
+    params["estimatedCost"] = mCurrency.getUSDEstimate();
+    params["estimatedLocalCost"] = mCurrency.getLocalEstimate();
+    params["confirm"] = mSiteConfirm;
+
     if (!password.empty())
     {
-        keywordArgs.appendString("password", password);
+        params["password"] = password;
     }
 
-    LLXMLRPCValue params = LLXMLRPCValue::createArray();
-    params.append(keywordArgs);
-
     startTransaction(TransactionBuy, params);
 }
 
 void LLFloaterBuyLandUI::finishWebSitePrep()
 {
-    LLXMLRPCValue result = mTransaction->responseValue();
+    const LLSD& result = mTransaction->response();
 
-    bool success = result["success"].asBool();
+    bool success = result["success"].asBoolean();
     if (!success)
     {
         tellUserError(
@@ -850,7 +808,7 @@ void LLFloaterBuyLandUI::updateGroupName(const LLUUID& id,
     }
 }
 
-void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCValue& params)
+void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLSD& params)
 {
     delete mTransaction;
     mTransaction = NULL;
@@ -878,12 +836,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCVa
             return;
     }
 
-    mTransaction = new LLXMLRPCTransaction(
-        transaction_uri,
-        method,
-        params,
-        false /* don't use gzip */
-        );
+    mTransaction = new LLXMLRPCTransaction(transaction_uri, method, params);
 }
 
 bool LLFloaterBuyLandUI::checkTransaction()
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 282a273be6..d015c0ed95 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -33,9 +33,6 @@
 #include "stringize.h"
 #include "llsdserialize.h"
 
-// llmessage (!)
-#include "llfiltersd2xmlrpc.h" // for xml_escape_string()
-
 // login
 #include "lllogin.h"
 
@@ -612,7 +609,7 @@ std::string construct_start_string()
                         << position[VX] << "&"
                         << position[VY] << "&"
                         << position[VZ]);
-            start = xml_escape_string(unescaped_start);
+            start = LLStringFn::xml_encode(unescaped_start, true);
             break;
         }
         case LLSLURL::HOME_LOCATION:
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 432ec3899a..d80cf2e80e 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -32,13 +32,15 @@
 #include "llpanellogin.h"
 #include "llviewercontrol.h"
 #include "llviewernetwork.h"
-#include "llfiltersd2xmlrpc.h"
+
 #include "curl/curl.h"
+
 const char* LLSLURL::SLURL_HTTP_SCHEME       = "http";
 const char* LLSLURL::SLURL_HTTPS_SCHEME      = "https";
 const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
 const char* LLSLURL::SLURL_SECONDLIFE_PATH   = "secondlife";
 const char* LLSLURL::SLURL_COM               = "slurl.com";
+
 // For DnD - even though www.slurl.com redirects to slurl.com in a browser, you  can copy and drag
 // text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this
 // version is required also.
@@ -437,7 +439,7 @@ std::string LLSLURL::getLoginString() const
             LL_WARNS("AppInit") << "Unexpected SLURL type (" << (int)mType << ")for login string" << LL_ENDL;
             break;
     }
-    return  xml_escape_string(unescaped_start.str());
+    return  LLStringFn::xml_encode(unescaped_start.str(), true);
 }
 
 bool LLSLURL::operator ==(const LLSLURL& rhs)
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index a571b5544b..4e8320b72a 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -76,37 +76,37 @@ LLVersionInfo::~LLVersionInfo()
 {
 }
 
-S32 LLVersionInfo::getMajor()
+S32 LLVersionInfo::getMajor() const
 {
     return LL_VIEWER_VERSION_MAJOR;
 }
 
-S32 LLVersionInfo::getMinor()
+S32 LLVersionInfo::getMinor() const
 {
     return LL_VIEWER_VERSION_MINOR;
 }
 
-S32 LLVersionInfo::getPatch()
+S32 LLVersionInfo::getPatch() const
 {
     return LL_VIEWER_VERSION_PATCH;
 }
 
-U64 LLVersionInfo::getBuild()
+U64 LLVersionInfo::getBuild() const
 {
     return LL_VIEWER_VERSION_BUILD;
 }
 
-std::string LLVersionInfo::getVersion()
+std::string LLVersionInfo::getVersion() const
 {
     return version;
 }
 
-std::string LLVersionInfo::getShortVersion()
+std::string LLVersionInfo::getShortVersion() const
 {
     return short_version;
 }
 
-std::string LLVersionInfo::getChannelAndVersion()
+std::string LLVersionInfo::getChannelAndVersion() const
 {
     if (mVersionChannel.empty())
     {
@@ -117,7 +117,7 @@ std::string LLVersionInfo::getChannelAndVersion()
     return mVersionChannel;
 }
 
-std::string LLVersionInfo::getChannel()
+std::string LLVersionInfo::getChannel() const
 {
     return mWorkingChannelName;
 }
@@ -128,7 +128,7 @@ void LLVersionInfo::resetChannel(const std::string& channel)
     mVersionChannel.clear(); // Reset version and channel string til next use.
 }
 
-LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity()
+LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() const
 {
     ViewerMaturity maturity;
 
@@ -166,12 +166,12 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity()
 }
 
 
-std::string LLVersionInfo::getBuildConfig()
+std::string LLVersionInfo::getBuildConfig() const
 {
     return build_configuration;
 }
 
-std::string LLVersionInfo::getReleaseNotes()
+std::string LLVersionInfo::getReleaseNotes() const
 {
     return mReleaseNotes;
 }
diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h
index aed43263a6..237b37a084 100644
--- a/indra/newview/llversioninfo.h
+++ b/indra/newview/llversioninfo.h
@@ -52,38 +52,38 @@ public:
     ~LLVersionInfo();
 
     /// return the major version number as an integer
-    S32 getMajor();
+    S32 getMajor() const;
 
     /// return the minor version number as an integer
-    S32 getMinor();
+    S32 getMinor() const;
 
     /// return the patch version number as an integer
-    S32 getPatch();
+    S32 getPatch() const;
 
     /// return the build number as an integer
-    U64 getBuild();
+    U64 getBuild() const;
 
     /// return the full viewer version as a string like "2.0.0.200030"
-    std::string getVersion();
+    std::string getVersion() const;
 
     /// return the viewer version as a string like "2.0.0"
-    std::string getShortVersion();
+    std::string getShortVersion() const;
 
     /// return the viewer version and channel as a string
     /// like "Second Life Release 2.0.0.200030"
-    std::string getChannelAndVersion();
+    std::string getChannelAndVersion() const;
 
     /// return the channel name, e.g. "Second Life"
-    std::string getChannel();
+    std::string getChannel() const;
 
     /// return the CMake build type
-    std::string getBuildConfig();
+    std::string getBuildConfig() const;
 
     /// reset the channel name used by the viewer.
     void resetChannel(const std::string& channel);
 
     /// return the bit width of an address
-    S32 getAddressSize() { return ADDRESS_SIZE; }
+    S32 getAddressSize() const { return ADDRESS_SIZE; }
 
     typedef enum
     {
@@ -92,11 +92,11 @@ public:
         BETA_VIEWER,
         RELEASE_VIEWER
     } ViewerMaturity;
-    ViewerMaturity getViewerMaturity();
+    ViewerMaturity getViewerMaturity() const;
 
     /// get the release-notes URL, once it becomes available -- until then,
     /// return empty string
-    std::string getReleaseNotes();
+    std::string getReleaseNotes() const;
 
 private:
     std::string version;
@@ -107,7 +107,7 @@ private:
     std::string mWorkingChannelName;
     // Storage for the "version and channel" string.
     // This will get reset too.
-    std::string mVersionChannel;
+    mutable std::string mVersionChannel;
     std::string build_configuration;
     std::string mReleaseNotes;
     // Store unique_ptrs to the next couple things so we don't have to explain
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 1148e81fd5..7c7bd98bcd 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -39,12 +39,6 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/range.hpp>          // boost::begin(), boost::end()
 
-#ifdef LL_USESYSTEMLIBS
-#include <xmlrpc.h>
-#else
-#include <xmlrpc-epi/xmlrpc.h>
-#endif
-
 #include "curl/curl.h"
 
 // other Linden headers
@@ -178,13 +172,6 @@ public:
 
 static const CURLcodeMapper sCURLcodeMapper;
 
-LLXMLRPCListener::LLXMLRPCListener(const std::string& pumpname):
-    mBoundListener(LLEventPumps::instance().
-                   obtain(pumpname).
-                   listen("LLXMLRPCListener", boost::bind(&LLXMLRPCListener::process, this, _1)))
-{
-}
-
 /**
  * Capture an outstanding LLXMLRPCTransaction and poll it periodically until
  * done.
@@ -213,38 +200,20 @@ public:
         mMethod(command["method"]),
         mReplyPump(command["reply"])
     {
-        // LL_ERRS if any of these are missing
-        const char* required[] = { "uri", "method", "reply" };
-        // optional: "options" (array of string)
-        // Validate the request
-        std::set<std::string> missing;
-        for (const char** ri = boost::begin(required); ri != boost::end(required); ++ri)
+        // LL_ERRS if any of these keys are missing or empty
+        if (mUri.empty() || mMethod.empty() || mReplyPump.empty())
         {
-            // If the command does not contain this required entry, add it to 'missing'.
-            if (! command.has(*ri))
-            {
-                missing.insert(*ri);
-            }
-        }
-        if (! missing.empty())
-        {
-            LL_ERRS("LLXMLRPCListener") << mMethod << " request missing params: ";
-            const char* separator = "";
-            for (std::set<std::string>::const_iterator mi(missing.begin()), mend(missing.end());
-                 mi != mend; ++mi)
-            {
-                LL_CONT << separator << *mi;
-                separator = ", ";
-            }
-            LL_CONT << LL_ENDL;
+            LL_ERRS("LLXMLRPCListener")
+                << "Some params are missing: "
+                << "reply: '" << mReplyPump << "', "
+                << "method: '" << mMethod << "', "
+                << "uri: '" << mUri << "'"
+                << LL_ENDL;
         }
 
-        // Build the XMLRPC request.
-        XMLRPC_REQUEST request = XMLRPC_RequestNew();
-        XMLRPC_RequestSetMethodName(request, mMethod.c_str());
-        XMLRPC_RequestSetRequestType(request, xmlrpc_request_call);
-        XMLRPC_VALUE xparams = XMLRPC_CreateVector(NULL, xmlrpc_vector_struct);
-        LLSD params(command["params"]);
+        LLSD request_params = LLSD::emptyMap();
+
+        LLSD params = command.get("params");
         if (params.isMap())
         {
             for (LLSD::map_const_iterator pi(params.beginMap()), pend(params.endMap());
@@ -252,44 +221,33 @@ public:
             {
                 std::string name(pi->first);
                 LLSD param(pi->second);
-                if (param.isString())
+                switch (param.type())
                 {
-                    XMLRPC_VectorAppendString(xparams, name.c_str(), param.asString().c_str(), 0);
-                }
-                else if (param.isInteger() || param.isBoolean())
-                {
-                    XMLRPC_VectorAppendInt(xparams, name.c_str(), param.asInteger());
-                }
-                else if (param.isReal())
-                {
-                    XMLRPC_VectorAppendDouble(xparams, name.c_str(), param.asReal());
-                }
-                else
-                {
-                    LL_ERRS("LLXMLRPCListener") << mMethod << " request param "
-                                                << name << " has unknown type: " << param << LL_ENDL;
+                case LLSD::TypeString:
+                case LLSD::TypeInteger:
+                case LLSD::TypeReal:
+                    request_params.insert(name, param);
+                    break;
+                case LLSD::TypeBoolean:
+                    request_params.insert(name, param.asInteger());
+                    break;
+                default:
+                    LL_ERRS("LLXMLRPCListener") << mMethod
+                        << " request param '" << name << "' has unknown type: " << param << LL_ENDL;
                 }
             }
         }
-        LLSD options(command["options"]);
+
+        LLSD options = command.get("options");
         if (options.isArray())
         {
-            XMLRPC_VALUE xoptions = XMLRPC_CreateVector("options", xmlrpc_vector_array);
-            for (LLSD::array_const_iterator oi(options.beginArray()), oend(options.endArray());
-                 oi != oend; ++oi)
-            {
-                XMLRPC_VectorAppendString(xoptions, NULL, oi->asString().c_str(), 0);
-            }
-            XMLRPC_AddValueToVector(xparams, xoptions);
+            request_params.insert("options", options);
         }
-        XMLRPC_RequestSetData(request, xparams);
 
-        mTransaction.reset(new LLXMLRPCTransaction(mUri, request, true, command.has("http_params")? LLSD(command["http_params"]) : LLSD()));
+        LLSD http_params = command.get("http_params");
+        mTransaction.reset(new LLXMLRPCTransaction(mUri, mMethod, request_params, http_params));
         mPreviousStatus = mTransaction->status(NULL);
 
-        // Free the XMLRPC_REQUEST object and the attached data values.
-        XMLRPC_RequestFree(request, 1);
-
         // Now ensure that we get regular callbacks to poll for completion.
         mBoundListener =
             LLEventPumps::instance().
@@ -323,7 +281,7 @@ public:
         data["error"] = "";
         data["transfer_rate"] = 0.0;
         LLEventPump& replyPump(LLEventPumps::instance().obtain(mReplyPump));
-        if (! done)
+        if (!done)
         {
             // Not done yet, carry on.
             if (status == LLXMLRPCTransaction::StatusDownloading
@@ -367,10 +325,8 @@ public:
         // Given 'message', need we care?
         if (status == LLXMLRPCTransaction::StatusComplete)
         {
-            // Success! Parse data.
-            std::string status_string(data["status"]);
-            data["responses"] = parseResponse(status_string);
-            data["status"] = status_string;
+            // Success! Retrieve response data.
+            data["responses"] = mTransaction->response();
         }
 
         // whether successful or not, send reply on requested LLEventPump
@@ -388,159 +344,6 @@ public:
     }
 
 private:
-    /// Derived from LLUserAuth::parseResponse() and parseOptionInto()
-    LLSD parseResponse(std::string& status_string)
-    {
-        // Extract every member into data["responses"] (a map of string
-        // values).
-        XMLRPC_REQUEST response = mTransaction->response();
-        if (! response)
-        {
-            LL_DEBUGS("LLXMLRPCListener") << "No response" << LL_ENDL;
-            return LLSD();
-        }
-
-        XMLRPC_VALUE param = XMLRPC_RequestGetData(response);
-        if (! param)
-        {
-            LL_DEBUGS("LLXMLRPCListener") << "Response contains no data" << LL_ENDL;
-            return LLSD();
-        }
-
-        // Now, parse everything
-        return parseValues(status_string, "", param);
-    }
-
-    LLSD parseValue(std::string& status_string, const std::string& key, const std::string& key_pfx, XMLRPC_VALUE param)
-    {
-        LLSD response;
-
-        XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(param);
-        switch (type)
-        {
-            case xmlrpc_type_empty:
-                LL_INFOS("LLXMLRPCListener") << "Empty result for key " << key_pfx << key << LL_ENDL;
-                break;
-            case xmlrpc_type_base64:
-                {
-                    S32 len = XMLRPC_GetValueStringLen(param);
-                    const char* buf = XMLRPC_GetValueBase64(param);
-                    if ((len > 0) && buf)
-                    {
-                        // During implementation this code was not tested
-                        // If you encounter this, please make sure this is correct,
-                        // then remove llassert
-                        llassert(0);
-
-                        LLSD::Binary data;
-                        data.resize(len);
-                        memcpy((void*)&data[0], (void*)buf, len);
-                        response = data;
-                    }
-                    else
-                    {
-                        LL_WARNS("LLXMLRPCListener") << "Potentially malformed xmlrpc_type_base64 for key "
-                            << key_pfx << key << LL_ENDL;
-                    }
-                    break;
-                }
-            case xmlrpc_type_boolean:
-                {
-                    response = LLSD::Boolean(XMLRPC_GetValueBoolean(param));
-                    LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
-                    break;
-                }
-            case xmlrpc_type_datetime:
-                {
-                    std::string iso8601_date(XMLRPC_GetValueDateTime_ISO8601(param));
-                    LL_DEBUGS("LLXMLRPCListener") << "val: " << iso8601_date << LL_ENDL;
-                    response = LLSD::Date(iso8601_date);
-                    break;
-                }
-            case xmlrpc_type_double:
-                {
-                    response = LLSD::Real(XMLRPC_GetValueDouble(param));
-                    LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
-                    break;
-                }
-            case xmlrpc_type_int:
-                {
-                    response = LLSD::Integer(XMLRPC_GetValueInt(param));
-                    LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
-                    break;
-                }
-            case xmlrpc_type_string:
-                {
-                    response = LLSD::String(XMLRPC_GetValueString(param));
-                    LL_DEBUGS("LLXMLRPCListener") << "val: " << response << LL_ENDL;
-                    break;
-                }
-            case xmlrpc_type_mixed:
-            case xmlrpc_type_array:
-                {
-                    // We expect this to be an array of submaps. Walk the array,
-                    // recursively parsing each submap and collecting them.
-                    LLSD array;
-                    int i = 0;          // for descriptive purposes
-                    for (XMLRPC_VALUE row = XMLRPC_VectorRewind(param); row;
-                         row = XMLRPC_VectorNext(param), ++i)
-                    {
-                        // Recursive call. For the lower-level key_pfx, if 'key'
-                        // is "foo", pass "foo[0]:", then "foo[1]:", etc. In the
-                        // nested call, a subkey "bar" will then be logged as
-                        // "foo[0]:bar", and so forth.
-                        // Parse the scalar subkey/value pairs from this array
-                        // entry into a temp submap. Collect such submaps in 'array'.
-
-                        array.append(parseValue(status_string, "",
-                                                 STRINGIZE(key_pfx << key << '[' << i << "]:"),
-                                                 row));
-                    }
-                    // Having collected an 'array' of 'submap's, insert that whole
-                    // 'array' as the value of this 'key'.
-                    response = array;
-                    break;
-                }
-            case xmlrpc_type_struct:
-                {
-                    response = parseValues(status_string,
-                                              STRINGIZE(key_pfx << key << ':'),
-                                              param);
-                    break;
-                }
-            case xmlrpc_type_none: // Not expected
-            default:
-                // whoops - unrecognized type
-                LL_WARNS("LLXMLRPCListener") << "Unhandled xmlrpc type " << type << " for key "
-                    << key_pfx << key << LL_ENDL;
-                response = STRINGIZE("<bad XMLRPC type " << type << '>');
-                status_string = "BadType";
-        }
-        return response;
-    }
-
-    /**
-     * Parse key/value pairs from a given XMLRPC_VALUE into an LLSD map.
-     * @param key_pfx Used to describe a given key in log messages. At top
-     * level, pass "". When parsing an options array, pass the top-level key
-     * name of the array plus the index of the array entry; to this we'll
-     * append the subkey of interest.
-     * @param param XMLRPC_VALUE iterator. At top level, pass
-     * XMLRPC_RequestGetData(XMLRPC_REQUEST).
-     */
-    LLSD parseValues(std::string& status_string, const std::string& key_pfx, XMLRPC_VALUE param)
-    {
-        LLSD responses;
-        for (XMLRPC_VALUE current = XMLRPC_VectorRewind(param); current;
-             current = XMLRPC_VectorNext(param))
-        {
-            std::string key(XMLRPC_GetValueID(current));
-            LL_DEBUGS("LLXMLRPCListener") << "key: " << key_pfx << key << LL_ENDL;
-            responses.insert(key, parseValue(status_string, key, key_pfx, current));
-        }
-        return responses;
-    }
-
     const LLReqID mReqID;
     const std::string mUri;
     const std::string mMethod;
@@ -550,11 +353,18 @@ private:
     LLXMLRPCTransaction::EStatus mPreviousStatus; // To detect state changes.
 };
 
-bool LLXMLRPCListener::process(const LLSD& command)
+LLXMLRPCListener::LLXMLRPCListener(const std::string& pumpname)
+: mBoundListener(LLEventPumps::instance().obtain(pumpname).listen
+(
+    "LLXMLRPCListener",
+    [&](const LLSD& command) -> bool
+    {
+        // Allocate a new heap Poller, but do not save a pointer to it. Poller
+        // will check its own status and free itself on completion of the request.
+        (new Poller(command));
+        // Conventional event listener return
+        return false;
+    }
+))
 {
-    // Allocate a new heap Poller, but do not save a pointer to it. Poller
-    // will check its own status and free itself on completion of the request.
-    (new Poller(command));
-    // conventional event listener return
-    return false;
 }
diff --git a/indra/newview/llxmlrpclistener.h b/indra/newview/llxmlrpclistener.h
index aaed98eec5..fd75acb8b1 100644
--- a/indra/newview/llxmlrpclistener.h
+++ b/indra/newview/llxmlrpclistener.h
@@ -42,9 +42,6 @@ public:
     /// Specify the pump name on which to listen
     LLXMLRPCListener(const std::string& pumpname);
 
-    /// Handle request events on the event pump specified at construction time
-    bool process(const LLSD& command);
-
 private:
     LLTempBoundListener mBoundListener;
 };
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index ec6e22cd7a..55622fb6b7 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -42,22 +42,11 @@
 #include "bufferarray.h"
 #include "llversioninfo.h"
 #include "llviewercontrol.h"
+#include "llxmlnode.h"
 #include "stringize.h"
 
 // Have to include these last to avoid queue redefinition!
 
-#ifdef LL_USESYSTEMLIBS
-#include <xmlrpc.h>
-#else
-#include <xmlrpc-epi/xmlrpc.h>
-#endif
-// <xmlrpc-epi/queue.h> contains a harmful #define queue xmlrpc_queue. This
-// breaks any use of std::queue. Ditch that #define: if any of our code wants
-// to reference xmlrpc_queue, let it reference it directly.
-#if defined(queue)
-#undef queue
-#endif
-
 #include "llappviewer.h"
 #include "lltrans.h"
 
@@ -75,111 +64,6 @@ namespace boost
 // nothing.
 static LLXMLRPCListener listener("LLXMLRPCTransaction");
 
-LLXMLRPCValue LLXMLRPCValue::operator[](const char* id) const
-{
-    return LLXMLRPCValue(XMLRPC_VectorGetValueWithID(mV, id));
-}
-
-std::string LLXMLRPCValue::asString() const
-{
-    const char* s = XMLRPC_GetValueString(mV);
-    return s ? s : "";
-}
-
-int     LLXMLRPCValue::asInt() const    { return XMLRPC_GetValueInt(mV); }
-bool    LLXMLRPCValue::asBool() const   { return XMLRPC_GetValueBoolean(mV) != 0; }
-double  LLXMLRPCValue::asDouble() const { return XMLRPC_GetValueDouble(mV); }
-
-LLXMLRPCValue LLXMLRPCValue::rewind()
-{
-    return LLXMLRPCValue(XMLRPC_VectorRewind(mV));
-}
-
-LLXMLRPCValue LLXMLRPCValue::next()
-{
-    return LLXMLRPCValue(XMLRPC_VectorNext(mV));
-}
-
-bool LLXMLRPCValue::isValid() const
-{
-    return mV != NULL;
-}
-
-LLXMLRPCValue LLXMLRPCValue::createArray()
-{
-    return LLXMLRPCValue(XMLRPC_CreateVector(NULL, xmlrpc_vector_array));
-}
-
-LLXMLRPCValue LLXMLRPCValue::createStruct()
-{
-    return LLXMLRPCValue(XMLRPC_CreateVector(NULL, xmlrpc_vector_struct));
-}
-
-
-void LLXMLRPCValue::append(LLXMLRPCValue& v)
-{
-    XMLRPC_AddValueToVector(mV, v.mV);
-}
-
-void LLXMLRPCValue::appendString(const std::string& v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueString(NULL, v.c_str(), 0));
-}
-
-void LLXMLRPCValue::appendInt(int v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueInt(NULL, v));
-}
-
-void LLXMLRPCValue::appendBool(bool v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueBoolean(NULL, v));
-}
-
-void LLXMLRPCValue::appendDouble(double v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueDouble(NULL, v));
-}
-
-
-void LLXMLRPCValue::append(const char* id, LLXMLRPCValue& v)
-{
-    XMLRPC_SetValueID(v.mV, id, 0);
-    XMLRPC_AddValueToVector(mV, v.mV);
-}
-
-void LLXMLRPCValue::appendString(const char* id, const std::string& v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueString(id, v.c_str(), 0));
-}
-
-void LLXMLRPCValue::appendInt(const char* id, int v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueInt(id, v));
-}
-
-void LLXMLRPCValue::appendBool(const char* id, bool v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueBoolean(id, v));
-}
-
-void LLXMLRPCValue::appendDouble(const char* id, double v)
-{
-    XMLRPC_AddValueToVector(mV, XMLRPC_CreateValueDouble(id, v));
-}
-
-void LLXMLRPCValue::cleanup()
-{
-    XMLRPC_CleanupValue(mV);
-    mV = NULL;
-}
-
-XMLRPC_VALUE LLXMLRPCValue::getValue() const
-{
-    return mV;
-}
-
-
 class LLXMLRPCTransaction::Handler : public LLCore::HttpHandler
 {
 public:
@@ -192,6 +76,9 @@ public:
 
 private:
 
+    bool parseResponse(LLXMLNodePtr root);
+    bool parseValue(LLSD& target, LLXMLNodePtr source);
+
     LLXMLRPCTransaction::Impl *mImpl;
     LLCore::HttpRequest::ptr_t mRequest;
 };
@@ -213,26 +100,26 @@ public:
     LLCore::HttpHandle  mPostH;
 
     std::string         mURI;
-
     std::string         mProxyAddress;
 
     std::string         mResponseText;
-    XMLRPC_REQUEST      mResponse;
+    LLSD                mResponseData;
+
     std::string         mCertStore;
-    LLSD mErrorCertData;
+    LLSD                mErrorCertData;
 
-    Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams);
-    Impl(const std::string& uri,
-        const std::string& method, LLXMLRPCValue params, bool useGzip);
-    ~Impl();
+    Impl
+    (
+        const std::string& uri,
+        const std::string& method,
+        const LLSD& params,
+        const LLSD& httpParams
+    );
 
     bool process();
 
     void setStatus(EStatus code, const std::string& message = "", const std::string& uri = "");
     void setHttpStatus(const LLCore::HttpStatus &status);
-
-private:
-    void init(XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams);
 };
 
 LLXMLRPCTransaction::Handler::Handler(LLCore::HttpRequest::ptr_t &request,
@@ -275,89 +162,113 @@ void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
     mImpl->setStatus(LLXMLRPCTransaction::StatusComplete);
     mImpl->mTransferStats = response->getTransferStats();
 
-    // the contents of a buffer array are potentially noncontiguous, so we
+    // The contents of a buffer array are potentially noncontiguous, so we
     // will need to copy them into an contiguous block of memory for XMLRPC.
     LLCore::BufferArray *body = response->getBody();
-    char * bodydata = new char[body->size()];
+    mImpl->mResponseText.resize(body->size());
 
-    body->read(0, bodydata, body->size());
+    body->read(0, mImpl->mResponseText.data(), body->size());
 
-    mImpl->mResponse = XMLRPC_REQUEST_FromXML(bodydata, static_cast<int>(body->size()), 0);
+    LLXMLNodePtr root;
+    if (!LLXMLNode::parseBuffer(mImpl->mResponseText.data(), body->size(), root, nullptr))
+    {
+        LL_WARNS() << "Failed parsing XML response; request URI: " << mImpl->mURI << LL_ENDL;
+        return;
+    }
 
-    delete[] bodydata;
+    if (!parseResponse(root))
+        return;
 
-    bool        hasError = false;
-    bool        hasFault = false;
-    int         faultCode = 0;
-    std::string faultString;
+    LL_INFOS() << "XML response parsed successfully; request URI: " << mImpl->mURI << LL_ENDL;
+}
 
-    LLXMLRPCValue error(XMLRPC_RequestGetError(mImpl->mResponse));
-    if (error.isValid())
+struct XMLTreeNode final : public LLSD::TreeNode
+{
+    XMLTreeNode(const LLXMLNodePtr impl)
+        : mImpl(impl)
+        , mFirstChild(impl ? create(impl->getFirstChild()) : nullptr)
+        , mNextSibling(impl ? create(impl->getNextSibling()) : nullptr)
     {
-        hasError = true;
-        faultCode = error["faultCode"].asInt();
-        faultString = error["faultString"].asString();
     }
-    else if (XMLRPC_ResponseIsFault(mImpl->mResponse))
+
+    static XMLTreeNode* create(LLXMLNodePtr node) { return node ? new XMLTreeNode(node) : nullptr; }
+
+    virtual bool hasName(const LLSD::String& name) const override { return mImpl && mImpl->hasName(name); }
+    virtual LLSD::String getTextContents() const override { return mImpl ? mImpl->getTextContents() : LLStringUtil::null; }
+    virtual TreeNode* getFirstChild() const override { return mFirstChild.get(); }
+    virtual TreeNode* getNextSibling() const override { return mNextSibling.get(); }
+
+private:
+    const LLXMLNodePtr mImpl;
+    const std::shared_ptr<XMLTreeNode> mFirstChild;
+    const std::shared_ptr<XMLTreeNode> mNextSibling;
+};
+
+bool LLXMLRPCTransaction::Handler::parseResponse(LLXMLNodePtr root)
+{
+    // We have alreasy checked in LLXMLNode::parseBuffer()
+    // that root contains exactly one child
+    if (!root->hasName("methodResponse"))
     {
-        hasFault = true;
-        faultCode = XMLRPC_GetResponseFaultCode(mImpl->mResponse);
-        faultString = XMLRPC_GetResponseFaultString(mImpl->mResponse);
+        LL_WARNS() << "Invalid root element in XML response; request URI: " << mImpl->mURI << LL_ENDL;
+        return false;
     }
 
-    if (hasError || hasFault)
+    LLXMLNodePtr first = root->getFirstChild();
+    LLXMLNodePtr second = first->getFirstChild();
+    if (!first->getNextSibling() && second && !second->getNextSibling())
     {
-        mImpl->setStatus(LLXMLRPCTransaction::StatusXMLRPCError);
-
-        LL_WARNS() << "LLXMLRPCTransaction XMLRPC "
-            << (hasError ? "error " : "fault ")
-            << faultCode << ": "
-            << faultString << LL_ENDL;
-        LL_WARNS() << "LLXMLRPCTransaction request URI: "
-            << mImpl->mURI << LL_ENDL;
+        if (first->hasName("fault"))
+        {
+            LLSD fault;
+            if (parseValue(fault, second) &&
+                fault.isMap() && fault.has("faultCode") && fault.has("faultString"))
+            {
+                LL_WARNS() << "Request failed;"
+                    << " faultCode: '" << fault.get("faultCode").asString() << "',"
+                    << " faultString: '" << fault.get("faultString").asString() << "',"
+                    << " request URI: " << mImpl->mURI << LL_ENDL;
+                return false;
+            }
+        }
+        else if (first->hasName("params") &&
+            second->hasName("param") && !second->getNextSibling())
+        {
+            LLXMLNodePtr third = second->getFirstChild();
+            if (third && !third->getNextSibling() && parseValue(mImpl->mResponseData, third))
+            {
+                return true;
+            }
+        }
     }
 
-}
-
-//=========================================================================
+    LL_WARNS() << "Invalid response format; request URI: " << mImpl->mURI << LL_ENDL;
 
-LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
-        XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
-    : mHttpRequest(),
-      mStatus(LLXMLRPCTransaction::StatusNotStarted),
-      mURI(uri),
-      mResponse(0)
-{
-    init(request, useGzip, httpParams);
+    return false;
 }
 
-
-LLXMLRPCTransaction::Impl::Impl(const std::string& uri,
-        const std::string& method, LLXMLRPCValue params, bool useGzip)
-    : mHttpRequest(),
-      mStatus(LLXMLRPCTransaction::StatusNotStarted),
-      mURI(uri),
-      mResponse(0)
+bool LLXMLRPCTransaction::Handler::parseValue(LLSD& target, LLXMLNodePtr source)
 {
-    XMLRPC_REQUEST request = XMLRPC_RequestNew();
-    XMLRPC_RequestSetMethodName(request, method.c_str());
-    XMLRPC_RequestSetRequestType(request, xmlrpc_request_call);
-    XMLRPC_RequestSetData(request, params.getValue());
-
-    init(request, useGzip, LLSD());
-    // DEV-28398: without this XMLRPC_RequestFree() call, it looks as though
-    // the 'request' object is simply leaked. It's less clear to me whether we
-    // should also ask to free request value data (second param 1), since the
-    // data come from 'params'.
-    XMLRPC_RequestFree(request, 1);
+    XMLTreeNode tn(source);
+    return target.fromXMLRPCValue(&tn);
 }
 
-void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
+//=========================================================================
+
+LLXMLRPCTransaction::Impl::Impl
+(
+    const std::string& uri,
+    const std::string& method,
+    const LLSD& params,
+    const LLSD& http_params
+)
+    : mHttpRequest()
+    , mStatus(LLXMLRPCTransaction::StatusNotStarted)
+    , mURI(uri)
 {
     LLCore::HttpOptions::ptr_t httpOpts;
     LLCore::HttpHeaders::ptr_t httpHeaders;
 
-
     if (!mHttpRequest)
     {
         mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest);
@@ -366,37 +277,34 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const
     // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
     httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
 
-    // delay between repeats will start from 5 sec and grow to 20 sec with each repeat
+    // Delay between repeats will start from 5 sec and grow to 20 sec with each repeat
     httpOpts->setMinBackoff(5E6L);
     httpOpts->setMaxBackoff(20E6L);
 
-    httpOpts->setTimeout(httpParams.has("timeout") ? httpParams["timeout"].asInteger() : 40L);
-    if (httpParams.has("retries"))
+    httpOpts->setTimeout(http_params.has("timeout") ? http_params["timeout"].asInteger() : 40L);
+    if (http_params.has("retries"))
     {
-        httpOpts->setRetries(httpParams["retries"].asInteger());
+        httpOpts->setRetries(http_params["retries"].asInteger());
     }
-    if (httpParams.has("DNSCacheTimeout"))
+    if (http_params.has("DNSCacheTimeout"))
     {
-        httpOpts->setDNSCacheTimeout(httpParams["DNSCacheTimeout"].asInteger());
+        httpOpts->setDNSCacheTimeout(http_params["DNSCacheTimeout"].asInteger());
     }
 
     bool vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert");
     mCertStore = gSavedSettings.getString("CertStore");
 
-    httpOpts->setSSLVerifyPeer( vefifySSLCert );
-    httpOpts->setSSLVerifyHost( vefifySSLCert ? 2 : 0);
+    httpOpts->setSSLVerifyPeer(vefifySSLCert);
+    httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0);
 
     // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
     httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
 
     httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
 
-    std::string user_agent = stringize(
-        LLVersionInfo::instance().getChannel(), ' ',
-        LLVersionInfo::instance().getMajor(), '.',
-        LLVersionInfo::instance().getMinor(), '.',
-        LLVersionInfo::instance().getPatch(), " (",
-        LLVersionInfo::instance().getBuild(), ')');
+    const LLVersionInfo& vi(LLVersionInfo::instance());
+    std::string user_agent = vi.getChannel() + llformat(" %d.%d.%d (%llu)",
+        vi.getMajor(), vi.getMinor(), vi.getPatch(), vi.getBuild());
 
     httpHeaders->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
 
@@ -404,31 +312,19 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const
     //This might help with bug #503 */
     //httpOpts->setDNSCacheTimeout(-1);
 
-    LLCore::BufferArray::ptr_t body = LLCore::BufferArray::ptr_t(new LLCore::BufferArray());
+    std::string request =
+        "<?xml version=\"1.0\"?><methodCall><methodName>" + method +
+        "</methodName><params><param>" + params.asXMLRPCValue() +
+        "</param></params></methodCall>";
 
-    // TODO: See if there is a way to serialize to a preallocated buffer I'm
-    // not fond of the copy here.
-    int requestSize(0);
-    char * requestText = XMLRPC_REQUEST_ToXML(request, &requestSize);
-
-    body->append(requestText, requestSize);
+    LLCore::BufferArray::ptr_t body = LLCore::BufferArray::ptr_t(new LLCore::BufferArray());
 
-    XMLRPC_Free(requestText);
+    body->append(request.c_str(), request.size());
 
-    mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler( mHttpRequest, this ));
+    mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler(mHttpRequest, this));
 
     mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID,
         mURI, body.get(), httpOpts, httpHeaders, mHandler);
-
-}
-
-
-LLXMLRPCTransaction::Impl::~Impl()
-{
-    if (mResponse)
-    {
-        XMLRPC_RequestFree(mResponse, 1);
-    }
 }
 
 bool LLXMLRPCTransaction::Impl::process()
@@ -539,18 +435,16 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status)
 
 }
 
-
-LLXMLRPCTransaction::LLXMLRPCTransaction(
-    const std::string& uri, XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams)
-: impl(* new Impl(uri, request, useGzip, httpParams))
-{ }
-
-
-LLXMLRPCTransaction::LLXMLRPCTransaction(
+LLXMLRPCTransaction::LLXMLRPCTransaction
+(
     const std::string& uri,
-    const std::string& method, LLXMLRPCValue params, bool useGzip)
-: impl(* new Impl(uri, method, params, useGzip))
-{ }
+    const std::string& method,
+    const LLSD& params,
+    const LLSD& http_params
+)
+: impl(*new Impl(uri, method, params, http_params))
+{
+}
 
 LLXMLRPCTransaction::~LLXMLRPCTransaction()
 {
@@ -590,14 +484,9 @@ std::string LLXMLRPCTransaction::statusURI()
     return impl.mStatusURI;
 }
 
-XMLRPC_REQUEST LLXMLRPCTransaction::response()
-{
-    return impl.mResponse;
-}
-
-LLXMLRPCValue LLXMLRPCTransaction::responseValue()
+const LLSD& LLXMLRPCTransaction::response()
 {
-    return LLXMLRPCValue(XMLRPC_RequestGetData(impl.mResponse));
+    return impl.mResponseData;
 }
 
 
diff --git a/indra/newview/llxmlrpctransaction.h b/indra/newview/llxmlrpctransaction.h
index 4c8796f936..f7a38f5f90 100644
--- a/indra/newview/llxmlrpctransaction.h
+++ b/indra/newview/llxmlrpctransaction.h
@@ -29,73 +29,22 @@
 
 #include <string>
 
-typedef struct _xmlrpc_request* XMLRPC_REQUEST;
-typedef struct _xmlrpc_value* XMLRPC_VALUE;
-    // foward decl of types from xmlrpc.h (this usage is type safe)
-class LLCertificate;
-
-class LLXMLRPCValue
-    // a c++ wrapper around XMLRPC_VALUE
-{
-public:
-    LLXMLRPCValue()                     : mV(NULL) { }
-    LLXMLRPCValue(XMLRPC_VALUE value)   : mV(value) { }
-
-    bool isValid() const;
-
-    std::string asString()  const;
-    int         asInt()     const;
-    bool        asBool()    const;
-    double      asDouble()  const;
-
-    LLXMLRPCValue operator[](const char*) const;
-
-    LLXMLRPCValue rewind();
-    LLXMLRPCValue next();
-
-    static LLXMLRPCValue createArray();
-    static LLXMLRPCValue createStruct();
-
-    void append(LLXMLRPCValue&);
-    void appendString(const std::string&);
-    void appendInt(int);
-    void appendBool(bool);
-    void appendDouble(double);
-    void appendValue(LLXMLRPCValue&);
-
-    void append(const char*, LLXMLRPCValue&);
-    void appendString(const char*, const std::string&);
-    void appendInt(const char*, int);
-    void appendBool(const char*, bool);
-    void appendDouble(const char*, double);
-    void appendValue(const char*, LLXMLRPCValue&);
-
-    void cleanup();
-        // only call this on the top level created value
-
-    XMLRPC_VALUE getValue() const;
-
-private:
-    XMLRPC_VALUE mV;
-};
-
-
+/// An asynchronous request and responses via XML-RPC
 class LLXMLRPCTransaction
-    // an asynchronous request and responses via XML-RPC
 {
 public:
-    LLXMLRPCTransaction(const std::string& uri,
-        XMLRPC_REQUEST request, bool useGzip = true, const LLSD& httpParams = LLSD());
-        // does not take ownership of the request object
-        // request can be freed as soon as the transaction is constructed
-
-    LLXMLRPCTransaction(const std::string& uri,
-        const std::string& method, LLXMLRPCValue params, bool useGzip = true);
-        // *does* take control of the request value, you must not free it
+    LLXMLRPCTransaction
+    (
+        const std::string& uri,
+        const std::string& method,
+        const LLSD& params,
+        const LLSD& http_params = LLSD()
+    );
 
     ~LLXMLRPCTransaction();
 
-    typedef enum e_status {
+    typedef enum e_status
+    {
         StatusNotStarted,
         StatusStarted,
         StatusDownloading,
@@ -105,26 +54,25 @@ public:
         StatusOtherError
     } EStatus;
 
+    /// Run the request a little, returns true when done
     bool process();
-        // run the request a little, returns true when done
 
+    /// Return a status, and extended CURL code, if code isn't null
     EStatus status(int* curlCode);
-        // return status, and extended CURL code, if code isn't null
 
     LLSD getErrorCertData();
+
+    /// Return a message string, suitable for showing the user
     std::string statusMessage();
-        // return a message string, suitable for showing the user
+
+    /// Return a URI for the user with more information (can be empty)
     std::string statusURI();
-        // return a URI for the user with more information
-        // can be empty
 
-    XMLRPC_REQUEST response();
-    LLXMLRPCValue responseValue();
-        // only valid if StatusComplete, otherwise NULL
-        // retains ownership of the result object, don't free it
+    /// Only non-empty if StatusComplete, otherwise Undefined
+    const LLSD& response();
 
+    /// Only valid if StsatusComplete, otherwise 0.0
     F64 transferRate();
-        // only valid if StsatusComplete, otherwise 0.0
 
 private:
     class Handler;
@@ -133,6 +81,4 @@ private:
     Impl& impl;
 };
 
-
-
 #endif // LLXMLRPCTRANSACTION_H
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 7bcae69779..604eb7c58f 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -69,7 +69,6 @@ OpenSSL Copyright (C) 1998-2002 The OpenSSL Project.
 PCRE Copyright (c) 1997-2008 University of Cambridge
 SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
 SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
 xxHash Copyright (C) 2012-2020 Yann Collet.
 zlib Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler.
 google-perftools Copyright (c) 2005, Google Inc.
diff --git a/indra/newview/skins/default/xui/de/floater_about.xml b/indra/newview/skins/default/xui/de/floater_about.xml
index 10ccf0d5da..320db7f654 100644
--- a/indra/newview/skins/default/xui/de/floater_about.xml
+++ b/indra/newview/skins/default/xui/de/floater_about.xml
@@ -28,7 +28,6 @@ mit Open-Source-Beiträgen von:</text>
         PCRE Copyright (c) 1997-2012 University of Cambridge.
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga.
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com).
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly und Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index ff2fa93cbb..126cd84d56 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -111,7 +111,6 @@ Dummy Name replaced at run time
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/es/floater_about.xml b/indra/newview/skins/default/xui/es/floater_about.xml
index e14ba32f69..8103a95376 100644
--- a/indra/newview/skins/default/xui/es/floater_about.xml
+++ b/indra/newview/skins/default/xui/es/floater_about.xml
@@ -28,7 +28,6 @@ con contribuciones de código abierto de:</text>
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly y Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/fr/floater_about.xml b/indra/newview/skins/default/xui/fr/floater_about.xml
index 09da1fb5fd..b6ea621177 100644
--- a/indra/newview/skins/default/xui/fr/floater_about.xml
+++ b/indra/newview/skins/default/xui/fr/floater_about.xml
@@ -28,7 +28,6 @@ avec les contributions Open Source de :</text>
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-Loup Gailly et Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/it/floater_about.xml b/indra/newview/skins/default/xui/it/floater_about.xml
index 7e195d3ca9..77be47d749 100644
--- a/indra/newview/skins/default/xui/it/floater_about.xml
+++ b/indra/newview/skins/default/xui/it/floater_about.xml
@@ -28,7 +28,6 @@ con contributi open source da:</text>
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly e Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/ja/floater_about.xml b/indra/newview/skins/default/xui/ja/floater_about.xml
index 12d763be37..6cd22f6a31 100644
--- a/indra/newview/skins/default/xui/ja/floater_about.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about.xml
@@ -33,7 +33,6 @@ OpenSSL Copyright (C) 1998-2008 The OpenSSL Project.
 PCRE Copyright (c) 1997-2012 University of Cambridge
 SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
 SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
 xxHash Copyright (C) 2012-2020 Yann Collet.
 zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/pt/floater_about.xml b/indra/newview/skins/default/xui/pt/floater_about.xml
index aaed728f84..0e95c53109 100644
--- a/indra/newview/skins/default/xui/pt/floater_about.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about.xml
@@ -28,7 +28,6 @@ com contribuições de código aberto de:</text>
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/ru/floater_about.xml b/indra/newview/skins/default/xui/ru/floater_about.xml
index a65a979ccd..22827bc397 100644
--- a/indra/newview/skins/default/xui/ru/floater_about.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about.xml
@@ -28,7 +28,6 @@
         PCRE (c) 1997-2012, Кембриджский университет
         SDL (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib (C) 1995-2012 Jean-loup Gailly и Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml
index 40ca3707c3..ca21bee464 100644
--- a/indra/newview/skins/default/xui/tr/floater_about.xml
+++ b/indra/newview/skins/default/xui/tr/floater_about.xml
@@ -28,7 +28,6 @@ açık kaynak kod katkısında bulunanlar şunlardır:</text>
         PCRE Telif Hakkı (c) 1997-2012 University of Cambridge
         SDL Telif Hakkı (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Telif Hakkı (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Telif Hakkı (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Telif Hakkı (C) 1995-2012 Jean-loup Gailly ve Mark Adler.
 
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index a56ae753d1..727f598894 100644
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -28,7 +28,6 @@
         PCRE Copyright (c) 1997-2012 University of Cambridge
         SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
         SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
-        xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
         xxHash Copyright (C) 2012-2020 Yann Collet.
         zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
 
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 2a0468f3ad..48fecb4f22 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -66,6 +66,16 @@ public:
     LLEventPump& getEventPump() { return mPump; }
 
 private:
+    LLSD hidePasswd(const LLSD& data)
+    {
+        LLSD result(data);
+        if (result.has("params") && result["params"].has("passwd"))
+        {
+            result["params"]["passwd"] = "*******";
+        }
+        return result;
+    }
+
     LLSD getProgressEventLLSD(const std::string& state, const std::string& change,
                            const LLSD& data = LLSD())
     {
@@ -74,15 +84,16 @@ private:
         status_data["change"] = change;
         status_data["progress"] = 0.0f;
 
-        if(mAuthResponse.has("transfer_rate"))
+        if (mAuthResponse.has("transfer_rate"))
         {
             status_data["transfer_rate"] = mAuthResponse["transfer_rate"];
         }
 
-        if(data.isDefined())
+        if (data.isDefined())
         {
             status_data["data"] = data;
         }
+
         return status_data;
     }
 
@@ -119,17 +130,18 @@ private:
 
 void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params)
 {
-    LL_DEBUGS("LLLogin") << " connect with  uri '" << uri << "', login_params " << login_params << LL_ENDL;
+    LL_DEBUGS("LLLogin") << " connect with uri '" << uri << "', login_params " << login_params << LL_ENDL;
 
     // Launch a coroutine with our login_() method. Run the coroutine until
     // its first wait; at that point, return here.
     std::string coroname =
-        LLCoros::instance().launch("LLLogin::Impl::login_",
-                                   boost::bind(&Impl::loginCoro, this, uri, login_params));
-    LL_DEBUGS("LLLogin") << " connected with  uri '" << uri << "', login_params " << login_params << LL_ENDL;
+        LLCoros::instance().launch("LLLogin::Impl::login_", [&]() { loginCoro(uri, login_params); });
+
+    LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL;
 }
 
-namespace {
+namespace
+{
 // Instantiate this rendezvous point at namespace scope so it's already
 // present no matter how early the updater might post to it.
 // Use an LLEventMailDrop, which has future-like semantics: regardless of the
@@ -140,12 +152,8 @@ static LLEventMailDrop sSyncPoint("LoginSync");
 
 void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params)
 {
-    LLSD printable_params = login_params;
-    if (printable_params.has("params")
-        && printable_params["params"].has("passwd"))
-    {
-        printable_params["params"]["passwd"] = "*******";
-    }
+    LLSD printable_params = hidePasswd(login_params);
+
     try
     {
         LL_DEBUGS("LLLogin") << "Entering coroutine " << LLCoros::getName()
@@ -171,12 +179,7 @@ void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params)
             ++attempts;
             LLSD progress_data;
             progress_data["attempt"] = attempts;
-            progress_data["request"] = request;
-            if (progress_data["request"].has("params")
-                && progress_data["request"]["params"].has("passwd"))
-            {
-                progress_data["request"]["params"]["passwd"] = "*******";
-            }
+            progress_data["request"] = hidePasswd(request);
             sendProgressEvent("offline", "authenticating", progress_data);
 
             // We expect zero or more "Downloading" status events, followed by
-- 
cgit v1.2.3


From 5a60b7811fb666f2ef59abc57a3204297f6aaa1a Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Fri, 28 Jun 2024 14:54:53 -0700
Subject: secondlife/viewer#1847: Fix wrong lighting for negative texture scale
 on PBR materials and PBR terrain

---
 .../shaders/class1/deferred/pbralphaV.glsl         |  7 +-
 .../shaders/class1/deferred/pbropaqueV.glsl        |  7 +-
 .../shaders/class1/deferred/pbrterrainF.glsl       | 29 +++++++--
 .../shaders/class1/deferred/pbrterrainUtilF.glsl   | 12 +++-
 .../shaders/class1/deferred/pbrterrainV.glsl       | 23 ++++---
 .../shaders/class1/deferred/textureUtilV.glsl      | 74 +++++++++++++++-------
 6 files changed, 105 insertions(+), 47 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl
index ae179d3f37..66adf50fa9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl
@@ -69,7 +69,7 @@ flat out float vary_sign;
 out vec3 vary_normal;
 
 vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
-vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
+vec4 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
 
 
 void main()
@@ -103,8 +103,9 @@ void main()
 
     n = normalize(n);
 
-    vary_tangent = normalize(tangent_space_transform(vec4(t, tangent.w), n, texture_normal_transform, texture_matrix0));
-    vary_sign = tangent.w;
+    vec4 transformed_tangent = tangent_space_transform(vec4(t, tangent.w), n, texture_normal_transform, texture_matrix0);
+    vary_tangent = normalize(transformed_tangent.xyz);
+    vary_sign = transformed_tangent.w;
     vary_normal = n;
 
     vertex_color = diffuse_color;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
index fd020afd57..0ad9bf5e4b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl
@@ -63,7 +63,7 @@ out vec3 vary_normal;
 out vec3 vary_position;
 
 vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
-vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
+vec4 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform);
 
 void main()
 {
@@ -97,8 +97,9 @@ void main()
 
     n = normalize(n);
 
-    vary_tangent = normalize(tangent_space_transform(vec4(t, tangent.w), n, texture_normal_transform, texture_matrix0));
-    vary_sign = tangent.w;
+    vec4 transformed_tangent = tangent_space_transform(vec4(t, tangent.w), n, texture_normal_transform, texture_matrix0);
+    vary_tangent = normalize(transformed_tangent.xyz);
+    vary_sign = transformed_tangent.w;
     vary_normal = n;
 
     vertex_color = diffuse_color;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
index 2cb7ff196b..6ca35419f2 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
@@ -75,6 +75,9 @@ PBRMix terrain_sample_and_multiply_pbr(
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
     , sampler2D tex_vNt
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+    , float transform_sign
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
     , sampler2D tex_emissive
@@ -139,7 +142,7 @@ in vec3 vary_position;
 in vec3 vary_normal;
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
 in vec3 vary_tangents[4];
-flat in float vary_sign;
+flat in float vary_signs[4];
 #endif
 in vec4 vary_texcoord0;
 in vec4 vary_texcoord1;
@@ -150,11 +153,11 @@ float terrain_mix(TerrainMix tm, vec4 tms4);
 
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
 // from mikktspace.com
-vec3 mikktspace(vec3 vNt, vec3 vT)
+vec3 mikktspace(vec3 vNt, vec3 vT, float sign)
 {
     vec3 vN = vary_normal;
 
-    vec3 vB = vary_sign * cross(vN, vT);
+    vec3 vB = sign * cross(vN, vT);
     vec3 tnorm = normalize( vNt.x * vT + vNt.y * vB + vNt.z * vN );
 
     tnorm *= gl_FrontFacing ? 1.0 : -1.0;
@@ -216,6 +219,9 @@ void main()
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
             , detail_0_normal
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+            , vary_signs[0]
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
             , detail_0_emissive
@@ -231,7 +237,7 @@ void main()
 #endif
         );
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
-        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[0]);
+        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[0], vary_signs[0]);
 #endif
         pbr_mix = mix_pbr(pbr_mix, mix2, tm.weight.x);
         break;
@@ -258,6 +264,9 @@ void main()
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
             , detail_1_normal
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+            , vary_signs[1]
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
             , detail_1_emissive
@@ -273,7 +282,7 @@ void main()
 #endif
         );
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
-        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[1]);
+        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[1], vary_signs[1]);
 #endif
         pbr_mix = mix_pbr(pbr_mix, mix2, tm.weight.y);
         break;
@@ -300,6 +309,9 @@ void main()
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
             , detail_2_normal
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+            , vary_signs[2]
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
             , detail_2_emissive
@@ -315,7 +327,7 @@ void main()
 #endif
         );
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
-        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[2]);
+        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[2], vary_signs[2]);
 #endif
         pbr_mix = mix_pbr(pbr_mix, mix2, tm.weight.z);
         break;
@@ -342,6 +354,9 @@ void main()
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
             , detail_3_normal
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+            , vary_signs[3]
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
             , detail_3_emissive
@@ -357,7 +372,7 @@ void main()
 #endif
         );
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
-        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[3]);
+        mix2.vNt = mikktspace(mix2.vNt, vary_tangents[3], vary_signs[3]);
 #endif
         pbr_mix = mix_pbr(pbr_mix, mix2, tm.weight.w);
         break;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
index 1ae9efe544..5098de717e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
@@ -256,11 +256,12 @@ vec3 _t_normal_post_1(vec3 vNt0, float sign_or_zero)
 }
 
 // Triplanar-specific normal texture fixes
-vec3 _t_normal_post_x(vec3 vNt0)
+vec3 _t_normal_post_x(vec3 vNt0, float tangent_sign)
 {
     vec3 vNt_x = _t_normal_post_1(vNt0, sign(vary_vertex_normal.x));
     // *HACK: Transform normals according to orientation of the UVs
     vNt_x.xy = vec2(-vNt_x.y, vNt_x.x);
+    vNt_x.xy *= tangent_sign;
     return vNt_x;
 }
 vec3 _t_normal_post_y(vec3 vNt0)
@@ -285,6 +286,7 @@ PBRMix terrain_sample_pbr(
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
     , sampler2D tex_vNt
+    , float tangent_sign
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
     , sampler2D tex_emissive
@@ -314,7 +316,7 @@ PBRMix terrain_sample_pbr(
             );
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
         // Triplanar-specific normal texture fix
-        mix_x.vNt = _t_normal_post_x(mix_x.vNt);
+        mix_x.vNt = _t_normal_post_x(mix_x.vNt, tangent_sign);
 #endif
         mix = mix_pbr(mix, mix_x, tw.weight.x);
         break;
@@ -420,6 +422,9 @@ PBRMix terrain_sample_and_multiply_pbr(
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
     , sampler2D tex_vNt
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+    , float tangent_sign
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
     , sampler2D tex_emissive
@@ -446,6 +451,9 @@ PBRMix terrain_sample_and_multiply_pbr(
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
         , tex_vNt
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+        , tangent_sign
+#endif
 #endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_EMISSIVE)
         , tex_emissive
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
index f8e826bbdb..c90b2b5926 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
@@ -43,7 +43,7 @@ out vec3 vary_vertex_normal; // Used by pbrterrainUtilF.glsl
 out vec3 vary_normal;
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
 out vec3 vary_tangents[4];
-flat out float vary_sign;
+flat out float vary_signs[4];
 #endif
 out vec4 vary_texcoord0;
 out vec4 vary_texcoord1;
@@ -60,7 +60,7 @@ out vec3 vary_position;
 uniform vec4[5] terrain_texture_transforms;
 
 vec2 terrain_texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform);
-vec3 terrain_tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform);
+vec4 terrain_tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform);
 
 void main()
 {
@@ -75,28 +75,35 @@ void main()
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
     {
         vec4[2] ttt;
+        vec4 transformed_tangent;
         // material 1
         ttt[0].xyz = terrain_texture_transforms[0].xyz;
         ttt[1].x = terrain_texture_transforms[0].w;
         ttt[1].y = terrain_texture_transforms[1].x;
-        vary_tangents[0] = normalize(terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt));
+        transformed_tangent = terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt);
+        vary_tangents[0] = normalize(transformed_tangent.xyz);
+        vary_signs[0] = transformed_tangent.w;
         // material 2
         ttt[0].xyz = terrain_texture_transforms[1].yzw;
         ttt[1].xy = terrain_texture_transforms[2].xy;
-        vary_tangents[1] = normalize(terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt));
+        transformed_tangent = terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt);
+        vary_tangents[1] = normalize(transformed_tangent.xyz);
+        vary_signs[1] = transformed_tangent.w;
         // material 3
         ttt[0].xy = terrain_texture_transforms[2].zw;
         ttt[0].z = terrain_texture_transforms[3].x;
         ttt[1].xy = terrain_texture_transforms[3].yz;
-        vary_tangents[2] = normalize(terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt));
+        transformed_tangent = terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt);
+        vary_tangents[2] = normalize(transformed_tangent.xyz);
+        vary_signs[2] = transformed_tangent.w;
         // material 4
         ttt[0].x = terrain_texture_transforms[3].w;
         ttt[0].yz = terrain_texture_transforms[4].xy;
         ttt[1].xy = terrain_texture_transforms[4].zw;
-        vary_tangents[3] = normalize(terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt));
+        transformed_tangent = terrain_tangent_space_transform(vec4(t, tangent.w), n, ttt);
+        vary_tangents[3] = normalize(transformed_tangent.xyz);
+        vary_signs[3] = transformed_tangent.w;
     }
-
-    vary_sign = tangent.w;
 #endif
     vary_normal = normalize(n);
 
diff --git a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
index 767416d564..c75a0e0d5d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/textureUtilV.glsl
@@ -94,36 +94,48 @@ vec2 terrain_texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform)
 // Take the rotation only from both transforms and apply to the tangent. This
 // accounts for the change of the topology of the normal texture when a texture
 // rotation is applied to it.
+// In practice, this applies the inverse of the texture transform to the tangent.
+// It is effectively an inverse of the rotation
 // *HACK: Assume the imported GLTF model did not have both normal texture
 // transforms and tangent vertices. The use of this function is inconsistent
 // with the GLTF sample viewer when that is the case. See getNormalInfo in
 // https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Viewer/47a191931461a6f2e14de48d6da0f0eb6ec2d147/source/Renderer/shaders/material_info.glsl
 // We may want to account for this case during GLTF model import.
 // -Cosmic,2023-06-06
-vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform)
+vec4 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform)
 {
-    vec2 weights = vec2(0, 1);
-
-    // Apply texture animation first to avoid shearing and other artifacts (rotation only)
-    mat2 sl_rot_scale;
-    sl_rot_scale[0][0] = sl_animation_transform[0][0];
-    sl_rot_scale[0][1] = sl_animation_transform[0][1];
-    sl_rot_scale[1][0] = sl_animation_transform[1][0];
-    sl_rot_scale[1][1] = sl_animation_transform[1][1];
-    weights = sl_rot_scale * weights;
-    // Remove scale
-    weights = normalize(weights);
-
-    // Convert to left-handed coordinate system
-    weights.y = -weights.y;
+    // Immediately convert to left-handed coordinate system, but it has no
+    // effect here because y is 0 ((1,0) -> (1,0))
+    vec2 weights = vec2(1, 0);
 
-    // Apply KHR_texture_transform (rotation only)
-    float khr_rotation = khr_gltf_transform[0].z;
+    // Apply inverse KHR_texture_transform (rotation and scale sign only)
+    float khr_rotation = -khr_gltf_transform[0].z;
     mat2 khr_rotation_mat = mat2(
         cos(khr_rotation),-sin(khr_rotation),
         sin(khr_rotation), cos(khr_rotation)
     );
     weights = khr_rotation_mat * weights;
+    vec2 khr_scale_sign = sign(khr_gltf_transform[0].xy);
+    weights *= khr_scale_sign.xy;
+
+    // *NOTE: Delay conversion to right-handed coordinate system here, to
+    // remove the need for computing the inverse of the SL texture animation
+    // matrix.
+
+    // Apply texture animation last to avoid shearing and other artifacts (rotation only)
+    mat2 inv_sl_rot_scale;
+    inv_sl_rot_scale[0][0] = sl_animation_transform[0][0];
+    inv_sl_rot_scale[0][1] = sl_animation_transform[0][1];
+    inv_sl_rot_scale[1][0] = sl_animation_transform[1][0];
+    inv_sl_rot_scale[1][1] = sl_animation_transform[1][1];
+    weights = inv_sl_rot_scale * weights;
+    // *NOTE: Scale to be removed later
+
+    // Set weights to default if 0 for some reason
+    weights.x += 1.0 - abs(sign(sign(weights.x) + (0.5 * sign(weights.y))));
+
+    // Remove scale from SL texture animation transform
+    weights = normalize(weights);
 
     // Convert back to right-handed coordinate system
     weights.y = -weights.y;
@@ -132,27 +144,41 @@ vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] kh
     // from the normal and tangent, as seen in the fragment shader
     vec3 vertex_binormal = vertex_tangent.w * cross(vertex_normal, vertex_tangent.xyz);
 
-    return (weights.x * vertex_binormal.xyz) + (weights.y * vertex_tangent.xyz);
+    // An additional sign flip prevents the binormal from being flipped as a
+    // result of a propagation of the tangent sign during the cross product.
+    float sign_flip = khr_scale_sign.x * khr_scale_sign.y;
+    return vec4((weights.x * vertex_tangent.xyz) + (weights.y * vertex_binormal.xyz), vertex_tangent.w * sign_flip);
 }
 
 // Similar to tangent_space_transform but no texture animation support.
-vec3 terrain_tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform)
+vec4 terrain_tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform)
 {
-    // Immediately convert to left-handed coordinate system ((0,1) -> (0, -1))
-    vec2 weights = vec2(0, -1);
+    // Immediately convert to left-handed coordinate system, but it has no
+    // effect here because y is 0 ((1,0) -> (1,0))
+    vec2 weights = vec2(1, 0);
 
-    // Apply KHR_texture_transform (rotation only)
-    float khr_rotation = khr_gltf_transform[0].z;
+    // Apply inverse KHR_texture_transform (rotation and scale sign only)
+    float khr_rotation = -khr_gltf_transform[0].z;
     mat2 khr_rotation_mat = mat2(
         cos(khr_rotation),-sin(khr_rotation),
         sin(khr_rotation), cos(khr_rotation)
     );
     weights = khr_rotation_mat * weights;
+    vec2 khr_scale_sign = sign(khr_gltf_transform[0].xy);
+    weights *= khr_scale_sign.xy;
+
+    // Set weights to default if 0 for some reason
+    weights.x += 1.0 - abs(sign(sign(weights.x) + (0.5 * sign(weights.y))));
 
     // Convert back to right-handed coordinate system
     weights.y = -weights.y;
 
+    // Similar to the MikkTSpace-compatible method of extracting the binormal
+    // from the normal and tangent, as seen in the fragment shader
     vec3 vertex_binormal = vertex_tangent.w * cross(vertex_normal, vertex_tangent.xyz);
 
-    return (weights.x * vertex_binormal.xyz) + (weights.y * vertex_tangent.xyz);
+    // An additional sign flip prevents the binormal from being flipped as a
+    // result of a propagation of the tangent sign during the cross product.
+    float sign_flip = khr_scale_sign.x * khr_scale_sign.y;
+    return vec4((weights.x * vertex_tangent.xyz) + (weights.y * vertex_binormal.xyz), vertex_tangent.w * sign_flip);
 }
-- 
cgit v1.2.3


From e834e77988fcf637ee0f3e4c5c0875e47044e324 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 21:48:34 -0400
Subject: Reduce string temporaries from findChild and getChild

---
 indra/llui/llbadge.cpp              |  2 +-
 indra/llui/llbadge.h                |  2 +-
 indra/llui/llbutton.cpp             |  2 +-
 indra/llui/llbutton.h               |  2 +-
 indra/llui/llcheckboxctrl.cpp       |  2 +-
 indra/llui/llcheckboxctrl.h         |  2 +-
 indra/llui/llfloaterreglistener.cpp |  2 +-
 indra/llui/lllineeditor.cpp         |  2 +-
 indra/llui/lllineeditor.h           |  2 +-
 indra/llui/llmenugl.cpp             |  4 ++--
 indra/llui/llmenugl.h               |  4 ++--
 indra/llui/llpanel.cpp              |  2 +-
 indra/llui/llpanel.h                |  2 +-
 indra/llui/lltabcontainer.cpp       |  4 ++--
 indra/llui/lltabcontainer.h         |  4 ++--
 indra/llui/lltextbox.cpp            |  2 +-
 indra/llui/lltextbox.h              |  2 +-
 indra/llui/lltexteditor.cpp         |  2 +-
 indra/llui/lltexteditor.h           |  2 +-
 indra/llui/lluictrl.cpp             |  2 +-
 indra/llui/lluictrl.h               |  2 +-
 indra/llui/lluictrlfactory.h        |  4 ++--
 indra/llui/llview.cpp               | 12 ++++++------
 indra/llui/llview.h                 | 22 +++++++++++-----------
 24 files changed, 44 insertions(+), 44 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 3397c97ee1..40c5041132 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -36,7 +36,7 @@ static LLDefaultChildRegistry::Register<LLBadge> r("badge");
 static const S32 BADGE_OFFSET_NOT_SPECIFIED = 0x7FFFFFFF;
 
 // Compiler optimization, generate extern template
-template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const;
+template class LLBadge* LLView::getChild<class LLBadge>(std::string_view name, bool recurse) const;
 
 
 LLBadge::Params::Params()
diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h
index a6d584c6d7..77fe76f0da 100644
--- a/indra/llui/llbadge.h
+++ b/indra/llui/llbadge.h
@@ -171,7 +171,7 @@ private:
 
 // Build time optimization, generate once in .cpp file
 #ifndef LLBADGE_CPP
-extern template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const;
+extern template class LLBadge* LLView::getChild<class LLBadge>(std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_LLBADGE_H
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index e6c045250e..91044e5441 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -56,7 +56,7 @@ static LLDefaultChildRegistry::Register<LLButton> r("button");
 
 // Compiler optimization, generate extern template
 template class LLButton* LLView::getChild<class LLButton>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 // globals
 S32 LLBUTTON_H_PAD  = 4;
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index fed5cdcc50..80a876393e 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -400,7 +400,7 @@ protected:
 // Build time optimization, generate once in .cpp file
 #ifndef LLBUTTON_CPP
 extern template class LLButton* LLView::getChild<class LLButton>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_LLBUTTON_H
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index 3bcf0a6517..dea262942b 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -45,7 +45,7 @@ static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box");
 
 // Compiler optimization, generate extern template
 template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 void LLCheckBoxCtrl::WordWrap::declareValues()
 {
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index 3058e946c3..fc04a8a781 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -151,7 +151,7 @@ protected:
 // Build time optimization, generate once in .cpp file
 #ifndef LLCHECKBOXCTRL_CPP
 extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_LLCHECKBOXCTRL_H
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index aa3d1a1171..88fa65e8f5 100644
--- a/indra/llui/llfloaterreglistener.cpp
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -131,7 +131,7 @@ void LLFloaterRegListener::clickButton(const LLSD& event) const
     {
         // Here 'floater' points to an LLFloater instance with the specified
         // name and key which isShown().
-        LLButton* button = floater->findChild<LLButton>(event["button"]);
+        LLButton* button = floater->findChild<LLButton>(event["button"].asString());
         if (! LLButton::isAvailable(button))
         {
             reply["type"]  = "LLButton";
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 50bf3f5877..e4b18e8919 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -74,7 +74,7 @@ static LLDefaultChildRegistry::Register<LLLineEditor> r1("line_editor");
 
 // Compiler optimization, generate extern template
 template class LLLineEditor* LLView::getChild<class LLLineEditor>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 //
 // Member functions
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index e955cbb17d..1cb7cac854 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -466,7 +466,7 @@ private:
 // Build time optimization, generate once in .cpp file
 #ifndef LLLINEEDITOR_CPP
 extern template class LLLineEditor* LLView::getChild<class LLLineEditor>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_LINEEDITOR_
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index dffaf69a9f..9ab210e003 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -988,7 +988,7 @@ LLMenuItemBranchGL::~LLMenuItemBranchGL()
 
 
 // virtual
-LLView* LLMenuItemBranchGL::getChildView(const std::string& name, bool recurse) const
+LLView* LLMenuItemBranchGL::getChildView(std::string_view name, bool recurse) const
 {
     LLMenuGL* branch = getBranch();
     if (branch)
@@ -1005,7 +1005,7 @@ LLView* LLMenuItemBranchGL::getChildView(const std::string& name, bool recurse)
     return LLView::getChildView(name, recurse);
 }
 
-LLView* LLMenuItemBranchGL::findChildView(const std::string& name, bool recurse) const
+LLView* LLMenuItemBranchGL::findChildView(std::string_view name, bool recurse) const
 {
     LLMenuGL* branch = getBranch();
     if (branch)
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 51766afe85..300a669d52 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -687,8 +687,8 @@ public:
 
     virtual void openMenu();
 
-    virtual LLView* getChildView(const std::string& name, bool recurse = true) const;
-    virtual LLView* findChildView(const std::string& name, bool recurse = true) const;
+    virtual LLView* getChildView(std::string_view name, bool recurse = true) const;
+    virtual LLView* findChildView(std::string_view name, bool recurse = true) const;
 
 private:
     LLHandle<LLView> mBranchHandle;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 468cdb10fb..01d0097eab 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -55,7 +55,7 @@ LLPanel::factory_stack_t    LLPanel::sFactoryStack;
 
 // Compiler optimization, generate extern template
 template class LLPanel* LLView::getChild<class LLPanel>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 LLPanel::LocalizedString::LocalizedString()
 :   name("name"),
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 2be5573faf..6d1be519e4 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -259,7 +259,7 @@ private:
 // Build time optimization, generate once in .cpp file
 #ifndef LLPANEL_CPP
 extern template class LLPanel* LLView::getChild<class LLPanel>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 typedef boost::function<LLPanel* (void)> LLPanelClassCreatorFunc;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 06f584d372..f10d545126 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -315,7 +315,7 @@ void LLTabContainer::reshape(S32 width, S32 height, bool called_from_parent)
 }
 
 //virtual
-LLView* LLTabContainer::getChildView(const std::string& name, bool recurse) const
+LLView* LLTabContainer::getChildView(std::string_view name, bool recurse) const
 {
     tuple_list_t::const_iterator itor;
     for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
@@ -343,7 +343,7 @@ LLView* LLTabContainer::getChildView(const std::string& name, bool recurse) cons
 }
 
 //virtual
-LLView* LLTabContainer::findChildView(const std::string& name, bool recurse) const
+LLView* LLTabContainer::findChildView(std::string_view name, bool recurse) const
 {
     tuple_list_t::const_iterator itor;
     for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index b22eec2fe5..4f0a0b2a57 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -149,8 +149,8 @@ public:
     /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
                                        EDragAndDropType type, void* cargo_data,
                                        EAcceptance* accept, std::string& tooltip);
-    /*virtual*/ LLView* getChildView(const std::string& name, bool recurse = true) const;
-    /*virtual*/ LLView* findChildView(const std::string& name, bool recurse = true) const;
+    /*virtual*/ LLView* getChildView(std::string_view name, bool recurse = true) const;
+    /*virtual*/ LLView* findChildView(std::string_view name, bool recurse = true) const;
     /*virtual*/ void initFromParams(const LLPanel::Params& p);
     /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
     /*virtual*/ bool postBuild();
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 92551b682c..05af36b71e 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -39,7 +39,7 @@ static LLDefaultChildRegistry::Register<LLTextBox> r("text");
 
 // Compiler optimization, generate extern template
 template class LLTextBox* LLView::getChild<class LLTextBox>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 LLTextBox::LLTextBox(const LLTextBox::Params& p)
 :   LLTextBase(p),
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h
index c1f829c2b9..a3cde45cd0 100644
--- a/indra/llui/lltextbox.h
+++ b/indra/llui/lltextbox.h
@@ -81,7 +81,7 @@ protected:
 // Build time optimization, generate once in .cpp file
 #ifndef LLTEXTBOX_CPP
 extern template class LLTextBox* LLView::getChild<class LLTextBox>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index dc3026e14d..bba9e9d5a5 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -71,7 +71,7 @@ static LLDefaultChildRegistry::Register<LLTextEditor> r("simple_text_editor");
 
 // Compiler optimization, generate extern template
 template class LLTextEditor* LLView::getChild<class LLTextEditor>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 //
 // Constants
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index be7f7cb256..0b5acf19a1 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -345,7 +345,7 @@ private:
 // Build time optimization, generate once in .cpp file
 #ifndef LLTEXTEDITOR_CPP
 extern template class LLTextEditor* LLView::getChild<class LLTextEditor>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_TEXTEDITOR_H
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 52c5f72a45..d1011edcf7 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -44,7 +44,7 @@ F32 LLUICtrl::sInactiveControlTransparency = 1.0f;
 
 // Compiler optimization, generate extern template
 template class LLUICtrl* LLView::getChild<class LLUICtrl>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 LLUICtrl::CallbackParam::CallbackParam()
 :   name("name"),
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index c56c3c43a4..fb8fc0c5ea 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -335,7 +335,7 @@ private:
 // Build time optimization, generate once in .cpp file
 #ifndef LLUICTRL_CPP
 extern template class LLUICtrl* LLView::getChild<class LLUICtrl>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif  // LL_LLUICTRL_H
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index a07f9b7dae..75e7e396bc 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -182,10 +182,10 @@ fail:
     }
 
     template<class T>
-    static T* getDefaultWidget(const std::string& name)
+    static T* getDefaultWidget(std::string_view name)
     {
         typename T::Params widget_params;
-        widget_params.name = name;
+        widget_params.name = std::string(name);
         return create<T>(widget_params);
     }
 
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 441b7d6a6c..ab03a7a9a8 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -85,7 +85,7 @@ bool LLView::sIsDrawing = false;
 
 // Compiler optimization, generate extern template
 template class LLView* LLView::getChild<class LLView>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 
 static LLDefaultChildRegistry::Register<LLView> r("view");
 
@@ -729,7 +729,7 @@ void LLView::logMouseEvent()
 }
 
 template <typename METHOD, typename CHARTYPE>
-LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& method,
+LLView* LLView::childrenHandleCharEvent(std::string_view desc, const METHOD& method,
                                         CHARTYPE c, MASK mask)
 {
     if ( getVisible() && getEnabled() )
@@ -1613,7 +1613,7 @@ bool LLView::hasAncestor(const LLView* parentp) const
 
 //-----------------------------------------------------------------------------
 
-bool LLView::childHasKeyboardFocus( const std::string& childname ) const
+bool LLView::childHasKeyboardFocus(std::string_view childname) const
 {
     LLView *focus = dynamic_cast<LLView *>(gFocusMgr.getKeyboardFocus());
 
@@ -1632,7 +1632,7 @@ bool LLView::childHasKeyboardFocus( const std::string& childname ) const
 
 //-----------------------------------------------------------------------------
 
-bool LLView::hasChild(const std::string& childname, bool recurse) const
+bool LLView::hasChild(std::string_view childname, bool recurse) const
 {
     return findChildView(childname, recurse) != NULL;
 }
@@ -1640,12 +1640,12 @@ bool LLView::hasChild(const std::string& childname, bool recurse) const
 //-----------------------------------------------------------------------------
 // getChildView()
 //-----------------------------------------------------------------------------
-LLView* LLView::getChildView(const std::string& name, bool recurse) const
+LLView* LLView::getChildView(std::string_view name, bool recurse) const
 {
     return getChild<LLView>(name, recurse);
 }
 
-LLView* LLView::findChildView(const std::string& name, bool recurse) const
+LLView* LLView::findChildView(std::string_view name, bool recurse) const
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 3ce7243370..4a9bef158a 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -341,8 +341,8 @@ public:
     S32         getChildCount() const           { return (S32)mChildList.size(); }
     template<class _Pr3> void sortChildren(_Pr3 _Pred) { mChildList.sort(_Pred); }
     bool        hasAncestor(const LLView* parentp) const;
-    bool        hasChild(const std::string& childname, bool recurse = false) const;
-    bool        childHasKeyboardFocus( const std::string& childname ) const;
+    bool        hasChild(std::string_view childname, bool recurse = false) const;
+    bool        childHasKeyboardFocus( std::string_view childname ) const;
 
     // these iterators are used for collapsing various tree traversals into for loops
     typedef LLTreeDFSIter<LLView, child_list_const_iter_t> tree_iterator_t;
@@ -452,24 +452,24 @@ public:
     // static method handles NULL pointer too
     static std::string getPathname(const LLView*);
 
-    template <class T> T* findChild(const std::string& name, bool recurse = true) const
+    template <class T> T* findChild(std::string_view name, bool recurse = true) const
     {
         LLView* child = findChildView(name, recurse);
         T* result = dynamic_cast<T*>(child);
         return result;
     }
 
-    template <class T> T* getChild(const std::string& name, bool recurse = true) const;
+    template <class T> T* getChild(std::string_view name, bool recurse = true) const;
 
-    template <class T> T& getChildRef(const std::string& name, bool recurse = true) const
+    template <class T> T& getChildRef(std::string_view name, bool recurse = true) const
     {
         return *getChild<T>(name, recurse);
     }
 
-    virtual LLView* getChildView(const std::string& name, bool recurse = true) const;
-    virtual LLView* findChildView(const std::string& name, bool recurse = true) const;
+    virtual LLView* getChildView(std::string_view name, bool recurse = true) const;
+    virtual LLView* findChildView(std::string_view name, bool recurse = true) const;
 
-    template <class T> T* getDefaultWidget(const std::string& name) const
+    template <class T> T* getDefaultWidget(std::string_view name) const
     {
         LLView* widgetp = getDefaultWidgetContainer().findChildView(name);
         return dynamic_cast<T*>(widgetp);
@@ -576,7 +576,7 @@ private:
     LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block = true);
 
     template <typename METHOD, typename CHARTYPE>
-    LLView* childrenHandleCharEvent(const std::string& desc, const METHOD& method,
+    LLView* childrenHandleCharEvent(std::string_view desc, const METHOD& method,
                                     CHARTYPE c, MASK mask);
 
     // adapter to blur distinction between handleKey() and handleUnicodeChar()
@@ -696,7 +696,7 @@ struct TypeValues<LLView::EOrientation> : public LLInitParam::TypeValuesHelper<L
 };
 }
 
-template <class T> T* LLView::getChild(const std::string& name, bool recurse) const
+template <class T> T* LLView::getChild(std::string_view name, bool recurse) const
 {
     LLView* child = findChildView(name, recurse);
     T* result = dynamic_cast<T*>(child);
@@ -731,7 +731,7 @@ template <class T> T* LLView::getChild(const std::string& name, bool recurse) co
 // require explicit specialization.  See llbutton.cpp for an example.
 #ifndef LLVIEW_CPP
 extern template class LLView* LLView::getChild<class LLView>(
-    const std::string& name, bool recurse) const;
+    std::string_view name, bool recurse) const;
 #endif
 
 #endif //LL_LLVIEW_H
-- 
cgit v1.2.3


From 49d60e0ded52c095c834e9ca134b67282728b389 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 22:24:32 -0400
Subject: Reduce string temporaries from LLFloaterReg find/get

---
 indra/llui/llbutton.cpp                       |   2 +-
 indra/llui/llfloaterreg.cpp                   | 165 ++++++++++++++------------
 indra/llui/llfloaterreg.h                     |  36 +++---
 indra/llui/llfloaterreglistener.cpp           |  10 +-
 indra/llui/llui.cpp                           |  14 +--
 indra/newview/llfloatersidepanelcontainer.cpp |  10 +-
 indra/newview/llfloatersidepanelcontainer.h   |  12 +-
 indra/newview/llfloaterwebcontent.cpp         |   2 +-
 indra/newview/llsidetraypanelcontainer.cpp    |   4 +-
 indra/newview/llsidetraypanelcontainer.h      |   2 +-
 10 files changed, 137 insertions(+), 120 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 91044e5441..7912baf132 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1273,7 +1273,7 @@ void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname)
     // Set the button control value (toggle state) to the floater visibility control (Sets the value as well)
     button->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name));
     // Set the clicked callback to toggle the floater
-    button->setClickedCallback(boost::bind(&LLFloaterReg::toggleInstance, sdname, LLSD()));
+    button->setClickedCallback([=](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstance(sdname.asString(), LLSD()); });
 }
 
 // static
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index fd5a370bc3..a818e72f59 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -40,9 +40,9 @@
 LLFloaterReg::instance_list_t LLFloaterReg::sNullInstanceList;
 LLFloaterReg::instance_map_t LLFloaterReg::sInstanceMap;
 LLFloaterReg::build_map_t LLFloaterReg::sBuildMap;
-std::map<std::string,std::string> LLFloaterReg::sGroupMap;
+std::map<std::string, std::string, std::less<>> LLFloaterReg::sGroupMap;
 bool LLFloaterReg::sBlockShowFloaters = false;
-std::set<std::string> LLFloaterReg::sAlwaysShowableList;
+std::set<std::string, std::less<>> LLFloaterReg::sAlwaysShowableList;
 
 static LLFloaterRegListener sFloaterRegListener;
 
@@ -58,27 +58,31 @@ void LLFloaterReg::add(const std::string& name, const std::string& filename, con
 }
 
 //static
-bool LLFloaterReg::isRegistered(const std::string& name)
+bool LLFloaterReg::isRegistered(std::string_view name)
 {
     return sBuildMap.find(name) != sBuildMap.end();
 }
 
 //static
-LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name)
+LLFloater* LLFloaterReg::getLastFloaterInGroup(std::string_view name)
 {
-    const std::string& groupname = sGroupMap[name];
-    if (!groupname.empty())
+    auto it = sGroupMap.find(name);
+    if (it != sGroupMap.end())
     {
-        instance_list_t& list = sInstanceMap[groupname];
-        if (!list.empty())
+        const std::string& groupname = it->second;
+        if (!groupname.empty())
         {
-            for (instance_list_t::reverse_iterator iter = list.rbegin(); iter != list.rend(); ++iter)
+            instance_list_t& list = sInstanceMap[groupname];
+            if (!list.empty())
             {
-                LLFloater* inst = *iter;
-
-                if (inst->getVisible() && !inst->isMinimized())
+                for (instance_list_t::reverse_iterator iter = list.rbegin(), end = list.rend(); iter != end; ++iter)
                 {
-                    return inst;
+                    LLFloater* inst = *iter;
+
+                    if (inst->getVisible() && !inst->isMinimized())
+                    {
+                        return inst;
+                    }
                 }
             }
         }
@@ -99,10 +103,8 @@ LLFloater* LLFloaterReg::getLastFloaterCascading()
 
         instance_list_t& instances = sInstanceMap[group_name];
 
-        for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter)
+        for (LLFloater* inst : instances)
         {
-            LLFloater* inst = *iter;
-
             if (inst->getVisible()
                 && (inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING)
                     || inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADE_GROUP)))
@@ -120,20 +122,23 @@ LLFloater* LLFloaterReg::getLastFloaterCascading()
 }
 
 //static
-LLFloater* LLFloaterReg::findInstance(const std::string& name, const LLSD& key)
+LLFloater* LLFloaterReg::findInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* res = NULL;
-    const std::string& groupname = sGroupMap[name];
-    if (!groupname.empty())
+    auto it = sGroupMap.find(name);
+    if (it != sGroupMap.end())
     {
-        instance_list_t& list = sInstanceMap[groupname];
-        for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+        const std::string& groupname = it->second;
+        if (!groupname.empty())
         {
-            LLFloater* inst = *iter;
-            if (inst->matchesKey(key))
+            instance_list_t& list = sInstanceMap[groupname];
+            for (LLFloater* inst : list)
             {
-                res = inst;
-                break;
+                if (inst->matchesKey(key))
+                {
+                    res = inst;
+                    break;
+                }
             }
         }
     }
@@ -141,47 +146,55 @@ LLFloater* LLFloaterReg::findInstance(const std::string& name, const LLSD& key)
 }
 
 //static
-LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
+LLFloater* LLFloaterReg::getInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* res = findInstance(name, key);
     if (!res)
     {
-        const LLFloaterBuildFunc& build_func = sBuildMap[name].mFunc;
-        const std::string& xui_file = sBuildMap[name].mFile;
-        if (build_func)
+        auto it = sBuildMap.find(name);
+        if (it != sBuildMap.end())
         {
-            const std::string& groupname = sGroupMap[name];
-            if (!groupname.empty())
+            const LLFloaterBuildFunc& build_func = it->second.mFunc;
+            const std::string& xui_file = it->second.mFile;
+            if (build_func)
             {
-                instance_list_t& list = sInstanceMap[groupname];
-
-                res = build_func(key);
-                if (!res)
-                {
-                    LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL;
-                    return NULL;
-                }
-                bool success = res->buildFromFile(xui_file);
-                if (!success)
+                auto it = sGroupMap.find(name);
+                if (it != sGroupMap.end())
                 {
-                    LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL;
-                    return NULL;
+                    const std::string& groupname = it->second;
+                    if (!groupname.empty())
+                    {
+                        instance_list_t& list = sInstanceMap[groupname];
+
+                        res = build_func(key);
+                        if (!res)
+                        {
+                            LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL;
+                            return NULL;
+                        }
+                        bool success = res->buildFromFile(xui_file);
+                        if (!success)
+                        {
+                            LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL;
+                            return NULL;
+                        }
+
+                        // Note: key should eventually be a non optional LLFloater arg; for now, set mKey to be safe
+                        if (res->mKey.isUndefined())
+                        {
+                            res->mKey = key;
+                        }
+                        res->setInstanceName(std::string(name));
+
+                        LLFloater* last_floater = (list.empty() ? NULL : list.back());
+
+                        res->applyControlsAndPosition(last_floater);
+
+                        gFloaterView->adjustToFitScreen(res, false);
+
+                        list.push_back(res);
+                    }
                 }
-
-                // Note: key should eventually be a non optional LLFloater arg; for now, set mKey to be safe
-                if (res->mKey.isUndefined())
-                {
-                    res->mKey = key;
-                }
-                res->setInstanceName(name);
-
-                LLFloater *last_floater = (list.empty() ? NULL : list.back());
-
-                res->applyControlsAndPosition(last_floater);
-
-                gFloaterView->adjustToFitScreen(res, false);
-
-                list.push_back(res);
             }
         }
         if (!res)
@@ -193,21 +206,25 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
 }
 
 //static
-LLFloater* LLFloaterReg::removeInstance(const std::string& name, const LLSD& key)
+LLFloater* LLFloaterReg::removeInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* res = NULL;
-    const std::string& groupname = sGroupMap[name];
-    if (!groupname.empty())
+    auto it = sGroupMap.find(name);
+    if (it != sGroupMap.end())
     {
-        instance_list_t& list = sInstanceMap[groupname];
-        for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
+        const std::string& groupname = it->second;
+        if (!groupname.empty())
         {
-            LLFloater* inst = *iter;
-            if (inst->matchesKey(key))
+            instance_list_t& list = sInstanceMap[groupname];
+            for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
             {
-                res = inst;
-                list.erase(iter);
-                break;
+                LLFloater* inst = *iter;
+                if (inst->matchesKey(key))
+                {
+                    res = inst;
+                    list.erase(iter);
+                    break;
+                }
             }
         }
     }
@@ -216,7 +233,7 @@ LLFloater* LLFloaterReg::removeInstance(const std::string& name, const LLSD& key
 
 //static
 // returns true if the instance existed
-bool LLFloaterReg::destroyInstance(const std::string& name, const LLSD& key)
+bool LLFloaterReg::destroyInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* inst = removeInstance(name, key);
     if (inst)
@@ -232,7 +249,7 @@ bool LLFloaterReg::destroyInstance(const std::string& name, const LLSD& key)
 
 // Iterators
 //static
-LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::string& name)
+LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(std::string_view name)
 {
     instance_map_t::iterator iter = sInstanceMap.find(name);
     if (iter != sInstanceMap.end())
@@ -248,7 +265,7 @@ LLFloaterReg::const_instance_list_t& LLFloaterReg::getFloaterList(const std::str
 // Visibility Management
 
 //static
-LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
+LLFloater* LLFloaterReg::showInstance(std::string_view name, const LLSD& key, bool focus)
 {
     if( sBlockShowFloaters
             // see EXT-7090
@@ -266,7 +283,7 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key,
 
 //static
 // returns true if the instance exists
-bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key)
+bool LLFloaterReg::hideInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* instance = findInstance(name, key);
     if (instance)
@@ -278,7 +295,7 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key)
 
 //static
 // returns true if the instance is visible when completed
-bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
+bool LLFloaterReg::toggleInstance(std::string_view name, const LLSD& key)
 {
     LLFloater* instance = findInstance(name, key);
     if (instance && instance->isShown())
@@ -294,7 +311,7 @@ bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
 
 //static
 // returns true if the instance exists and is visible (doesnt matter minimized or not)
-bool LLFloaterReg::instanceVisible(const std::string& name, const LLSD& key)
+bool LLFloaterReg::instanceVisible(std::string_view name, const LLSD& key)
 {
     LLFloater* instance = findInstance(name, key);
     return LLFloater::isVisible(instance);
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index 6a642cbb27..94a67c8d8b 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -51,26 +51,26 @@ public:
     // 2) We can change the key of a floater without altering the list.
     typedef std::list<LLFloater*> instance_list_t;
     typedef const instance_list_t const_instance_list_t;
-    typedef std::map<std::string, instance_list_t> instance_map_t;
+    typedef std::map<std::string, instance_list_t, std::less<>> instance_map_t;
 
     struct BuildData
     {
         LLFloaterBuildFunc mFunc;
         std::string mFile;
     };
-    typedef std::map<std::string, BuildData> build_map_t;
+    typedef std::map<std::string, BuildData, std::less<>> build_map_t;
 
 private:
     friend class LLFloaterRegListener;
     static instance_list_t sNullInstanceList;
     static instance_map_t sInstanceMap;
     static build_map_t sBuildMap;
-    static std::map<std::string,std::string> sGroupMap;
+    static std::map<std::string, std::string, std::less<>> sGroupMap;
     static bool sBlockShowFloaters;
     /**
      * Defines list of floater names that can be shown despite state of sBlockShowFloaters.
      */
-    static std::set<std::string> sAlwaysShowableList;
+    static std::set<std::string, std::less<>> sAlwaysShowableList;
 
 public:
     // Registration
@@ -85,30 +85,30 @@ public:
 
     static void add(const std::string& name, const std::string& file, const LLFloaterBuildFunc& func,
                     const std::string& groupname = LLStringUtil::null);
-    static bool isRegistered(const std::string& name);
+    static bool isRegistered(std::string_view name);
 
     // Helpers
-    static LLFloater* getLastFloaterInGroup(const std::string& name);
+    static LLFloater* getLastFloaterInGroup(std::string_view name);
     static LLFloater* getLastFloaterCascading();
 
     // Find / get (create) / remove / destroy
-    static LLFloater* findInstance(const std::string& name, const LLSD& key = LLSD());
-    static LLFloater* getInstance(const std::string& name, const LLSD& key = LLSD());
-    static LLFloater* removeInstance(const std::string& name, const LLSD& key = LLSD());
-    static bool destroyInstance(const std::string& name, const LLSD& key = LLSD());
+    static LLFloater* findInstance(std::string_view name, const LLSD& key = LLSD());
+    static LLFloater* getInstance(std::string_view name, const LLSD& key = LLSD());
+    static LLFloater* removeInstance(std::string_view name, const LLSD& key = LLSD());
+    static bool destroyInstance(std::string_view name, const LLSD& key = LLSD());
 
     // Iterators
-    static const_instance_list_t& getFloaterList(const std::string& name);
+    static const_instance_list_t& getFloaterList(std::string_view name);
 
     // Visibility Management
     // return NULL if instance not found or can't create instance (no builder)
-    static LLFloater* showInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false);
+    static LLFloater* showInstance(std::string_view name, const LLSD& key = LLSD(), bool focus = false);
     // Close a floater (may destroy or set invisible)
     // return false if can't find instance
-    static bool hideInstance(const std::string& name, const LLSD& key = LLSD());
+    static bool hideInstance(std::string_view name, const LLSD& key = LLSD());
     // return true if instance is visible:
-    static bool toggleInstance(const std::string& name, const LLSD& key = LLSD());
-    static bool instanceVisible(const std::string& name, const LLSD& key = LLSD());
+    static bool toggleInstance(std::string_view name, const LLSD& key = LLSD());
+    static bool instanceVisible(std::string_view name, const LLSD& key = LLSD());
 
     static void showInitialVisibleInstances();
     static void hideVisibleInstances(const std::set<std::string>& exceptions = std::set<std::string>());
@@ -133,19 +133,19 @@ public:
 
     // Typed find / get / show
     template <class T>
-    static T* findTypedInstance(const std::string& name, const LLSD& key = LLSD())
+    static T* findTypedInstance(std::string_view name, const LLSD& key = LLSD())
     {
         return dynamic_cast<T*>(findInstance(name, key));
     }
 
     template <class T>
-    static T* getTypedInstance(const std::string& name, const LLSD& key = LLSD())
+    static T* getTypedInstance(std::string_view name, const LLSD& key = LLSD())
     {
         return dynamic_cast<T*>(getInstance(name, key));
     }
 
     template <class T>
-    static T* showTypedInstance(const std::string& name, const LLSD& key = LLSD(), bool focus = false)
+    static T* showTypedInstance(std::string_view name, const LLSD& key = LLSD(), bool focus = false)
     {
         return dynamic_cast<T*>(showInstance(name, key, focus));
     }
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index 88fa65e8f5..17641b8375 100644
--- a/indra/llui/llfloaterreglistener.cpp
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -94,22 +94,22 @@ void LLFloaterRegListener::getBuildMap(const LLSD& event) const
 
 void LLFloaterRegListener::showInstance(const LLSD& event) const
 {
-    LLFloaterReg::showInstance(event["name"], event["key"], event["focus"]);
+    LLFloaterReg::showInstance(event["name"].asString(), event["key"], event["focus"]);
 }
 
 void LLFloaterRegListener::hideInstance(const LLSD& event) const
 {
-    LLFloaterReg::hideInstance(event["name"], event["key"]);
+    LLFloaterReg::hideInstance(event["name"].asString(), event["key"]);
 }
 
 void LLFloaterRegListener::toggleInstance(const LLSD& event) const
 {
-    LLFloaterReg::toggleInstance(event["name"], event["key"]);
+    LLFloaterReg::toggleInstance(event["name"].asString(), event["key"]);
 }
 
 void LLFloaterRegListener::instanceVisible(const LLSD& event) const
 {
-    sendReply(LLSDMap("visible", LLFloaterReg::instanceVisible(event["name"], event["key"])),
+    sendReply(LLSDMap("visible", LLFloaterReg::instanceVisible(event["name"].asString(), event["key"])),
               event);
 }
 
@@ -119,7 +119,7 @@ void LLFloaterRegListener::clickButton(const LLSD& event) const
     LLReqID reqID(event);
     LLSD reply(reqID.makeResponse());
 
-    LLFloater* floater = LLFloaterReg::findInstance(event["name"], event["key"]);
+    LLFloater* floater = LLFloaterReg::findInstance(event["name"].asString(), event["key"]);
     if (! LLFloater::isShown(floater))
     {
         reply["type"]  = "LLFloater";
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 66ec3ad9bd..f5c55a3d37 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -170,11 +170,11 @@ mHelpImpl(NULL)
     LLUICtrl::CommitCallbackRegistry::Registrar& reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar();
 
     // Callbacks for associating controls with floater visibility:
-    reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleInstance, _2, LLSD()));
-    reg.add("Floater.ToggleOrBringToFront", boost::bind(&LLFloaterReg::toggleInstanceOrBringToFront, _2, LLSD()));
-    reg.add("Floater.Show", boost::bind(&LLFloaterReg::showInstance, _2, LLSD(), false));
-    reg.add("Floater.ShowOrBringToFront", boost::bind(&LLFloaterReg::showInstanceOrBringToFront, _2, LLSD()));
-    reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideInstance, _2, LLSD()));
+    reg.add("Floater.Toggle", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstance(param.asStringRef()); });
+    reg.add("Floater.ToggleOrBringToFront", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::toggleInstanceOrBringToFront(param.asStringRef()); });
+    reg.add("Floater.Show", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::showInstance(param.asStringRef(), LLSD(), false); });
+    reg.add("Floater.ShowOrBringToFront", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::showInstanceOrBringToFront(param.asStringRef(), LLSD()); });
+    reg.add("Floater.Hide", [](LLUICtrl* ctrl, const LLSD& param) -> void { LLFloaterReg::hideInstance(param.asStringRef()); });
 
     // Button initialization callback for toggle buttons
     reg.add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
@@ -189,8 +189,8 @@ mHelpImpl(NULL)
     reg.add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
 
     // Used by menus along with Floater.Toggle to display visibility as a check-mark
-    LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
-    LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
+    LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); });
+    LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen",  [](LLUICtrl* ctrl, const LLSD& param) -> bool { return LLFloaterReg::instanceVisible(param.asStringRef(), LLSD()); });
 
     // Parse the master list of commands
     LLCommandManager::load();
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 2f6d14d6b5..48547852c4 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -113,7 +113,7 @@ LLFloater* LLFloaterSidePanelContainer::getTopmostInventoryFloater()
     return topmost_floater;
 }
 
-LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
+LLPanel* LLFloaterSidePanelContainer::openChildPanel(std::string_view panel_name, const LLSD& params)
 {
     LLView* view = findChildView(panel_name, true);
     if (!view)
@@ -144,7 +144,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
     return panel;
 }
 
-void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& key)
+void LLFloaterSidePanelContainer::showPanel(std::string_view floater_name, const LLSD& key)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
     if (floaterp)
@@ -153,7 +153,7 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
     }
 }
 
-void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
+void LLFloaterSidePanelContainer::showPanel(std::string_view floater_name, std::string_view panel_name, const LLSD& key)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
     if (floaterp)
@@ -162,7 +162,7 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
     }
 }
 
-LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name)
+LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, std::string_view panel_name)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
 
@@ -174,7 +174,7 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name,
     return NULL;
 }
 
-LLPanel* LLFloaterSidePanelContainer::findPanel(const std::string& floater_name, const std::string& panel_name)
+LLPanel* LLFloaterSidePanelContainer::findPanel(std::string_view floater_name, std::string_view panel_name)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::findTypedInstance<LLFloaterSidePanelContainer>(floater_name);
 
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index d5d0c43cae..19d6c747cb 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -55,17 +55,17 @@ public:
 
     void cleanup() { destroy(); }
 
-    LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
+    LLPanel* openChildPanel(std::string_view panel_name, const LLSD& params);
 
     static LLFloater* getTopmostInventoryFloater();
 
-    static void showPanel(const std::string& floater_name, const LLSD& key);
+    static void showPanel(std::string_view floater_name, const LLSD& key);
 
-    static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
+    static void showPanel(std::string_view floater_name, std::string_view panel_name, const LLSD& key);
 
-    static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName);
+    static LLPanel* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName);
 
-    static LLPanel* findPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName);
+    static LLPanel* findPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName);
 
     /**
      * Gets the panel of given type T (doesn't show it or do anything else with it).
@@ -75,7 +75,7 @@ public:
      * @returns a pointer to the panel of given type T.
      */
     template <typename T>
-    static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName)
+    static T* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName)
     {
         T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name));
         if (!panel)
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index f5b5b8293f..e1b6df6072 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -220,7 +220,7 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
         // showInstance will open a new window.  Figure out how many web browsers are already open,
         // and close the least recently opened one if this will put us over the limit.
 
-        LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class);
+        LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class());
 
         if(instances.size() >= (size_t)browser_window_limit)
         {
diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp
index eb8e05ec27..44e0c3b05c 100644
--- a/indra/newview/llsidetraypanelcontainer.cpp
+++ b/indra/newview/llsidetraypanelcontainer.cpp
@@ -62,10 +62,10 @@ void LLSideTrayPanelContainer::onOpen(const LLSD& key)
     getCurrentPanel()->onOpen(key);
 }
 
-void LLSideTrayPanelContainer::openPanel(const std::string& panel_name, const LLSD& key)
+void LLSideTrayPanelContainer::openPanel(std::string_view panel_name, const LLSD& key)
 {
     LLSD combined_key = key;
-    combined_key[PARAM_SUB_PANEL_NAME] = panel_name;
+    combined_key[PARAM_SUB_PANEL_NAME] = std::string(panel_name);
     onOpen(combined_key);
 }
 
diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h
index 5dfd7f2d83..0017d7743f 100644
--- a/indra/newview/llsidetraypanelcontainer.h
+++ b/indra/newview/llsidetraypanelcontainer.h
@@ -59,7 +59,7 @@ public:
     /**
      * Opens given subpanel.
      */
-    void openPanel(const std::string& panel_name, const LLSD& key = LLSD::emptyMap());
+    void openPanel(std::string_view panel_name, const LLSD& key = LLSD::emptyMap());
 
     /**
     * Opens previous panel from panel navigation history.
-- 
cgit v1.2.3


From b0e30477e93bb16b0cf8c7b64aaee35cedf85ca8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 22:25:56 -0400
Subject: Use heterogeneous comparison for string_view map finds in LLControl
 and convert controlExists to string_view

---
 indra/llcommon/llstl.h         |  6 +++---
 indra/llui/llnotifications.cpp |  2 +-
 indra/llui/llui.cpp            |  2 +-
 indra/llui/llui.h              |  4 ++--
 indra/llui/lluictrl.cpp        |  8 ++++----
 indra/llui/llview.cpp          | 14 ++++++++------
 indra/llui/llview.h            |  2 +-
 indra/llxml/llcontrol.cpp      |  4 ++--
 indra/llxml/llcontrol.h        |  4 ++--
 indra/newview/llappviewer.cpp  |  2 +-
 10 files changed, 25 insertions(+), 23 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index 1b52d94258..e3999cbdaa 100644
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -226,11 +226,11 @@ void delete_and_clear_array(T*& ptr)
 //  foo[2] = "hello";
 //  const char* bar = get_ptr_in_map(foo, 2); // bar -> "hello"
 //  const char* baz = get_ptr_in_map(foo, 3); // baz == NULL
-template <typename K, typename T>
-inline T* get_ptr_in_map(const std::map<K,T*>& inmap, const K& key)
+template <typename T>
+inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key)
 {
     // Typedef here avoids warnings because of new c++ naming rules.
-    typedef typename std::map<K,T*>::const_iterator map_iter;
+    typedef T::const_iterator map_iter;
     map_iter iter = inmap.find(key);
     if(iter == inmap.end())
     {
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index bee7d5bb3f..825956227f 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -439,7 +439,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
     mSoundName("")
 {
     if (p.sound.isProvided()
-        && LLUI::getInstance()->mSettingGroups["config"]->controlExists(p.sound))
+        && LLUI::getInstance()->mSettingGroups["config"]->controlExists(p.sound()))
     {
         mSoundName = p.sound;
     }
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index f5c55a3d37..448c730688 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -367,7 +367,7 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
 }
 
 
-LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname)
+LLControlGroup& LLUI::getControlControlGroup (std::string_view controlname)
 {
     for (settings_map_t::iterator itor = mSettingGroups.begin();
          itor != mSettingGroups.end(); ++itor)
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 373a358544..f33b43f599 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -115,7 +115,7 @@ typedef void (*LLUIAudioCallback)(const LLUUID& uuid);
 class LLUI : public LLParamSingleton<LLUI>
 {
 public:
-    typedef std::map<std::string, LLControlGroup*> settings_map_t;
+    typedef std::map<std::string, LLControlGroup*, std::less<> > settings_map_t;
 
 private:
     LLSINGLETON(LLUI , const settings_map_t &settings,
@@ -295,7 +295,7 @@ public:
     void screenRectToGL(const LLRect& screen, LLRect *gl);
     void glRectToScreen(const LLRect& gl, LLRect *screen);
     // Returns the control group containing the control name, or the default group
-    LLControlGroup& getControlControlGroup (const std::string& controlname);
+    LLControlGroup& getControlControlGroup (std::string_view controlname);
     F32 getMouseIdleTime() { return mMouseIdleTimer.getElapsedTimeF32(); }
     void resetMouseIdleTimer() { mMouseIdleTimer.reset(); }
     LLWindow* getWindow() { return mWindow; }
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index d1011edcf7..cb86a79407 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -135,7 +135,7 @@ void LLUICtrl::initFromParams(const Params& p)
     {
         if (p.enabled_controls.enabled.isChosen())
         {
-            LLControlVariable* control = findControl(p.enabled_controls.enabled);
+            LLControlVariable* control = findControl(p.enabled_controls.enabled());
             if (control)
             {
                 setEnabledControlVariable(control);
@@ -149,7 +149,7 @@ void LLUICtrl::initFromParams(const Params& p)
         }
         else if(p.enabled_controls.disabled.isChosen())
         {
-            LLControlVariable* control = findControl(p.enabled_controls.disabled);
+            LLControlVariable* control = findControl(p.enabled_controls.disabled());
             if (control)
             {
                 setDisabledControlVariable(control);
@@ -166,7 +166,7 @@ void LLUICtrl::initFromParams(const Params& p)
     {
         if (p.controls_visibility.visible.isChosen())
         {
-            LLControlVariable* control = findControl(p.controls_visibility.visible);
+            LLControlVariable* control = findControl(p.controls_visibility.visible());
             if (control)
             {
                 setMakeVisibleControlVariable(control);
@@ -180,7 +180,7 @@ void LLUICtrl::initFromParams(const Params& p)
         }
         else if (p.controls_visibility.invisible.isChosen())
         {
-            LLControlVariable* control = findControl(p.controls_visibility.invisible);
+            LLControlVariable* control = findControl(p.controls_visibility.invisible());
             if (control)
             {
                 setMakeInvisibleControlVariable(control);
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index ab03a7a9a8..7d6c937b85 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -2312,18 +2312,20 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
 //-----------------------------------------------------------------------------
 
 
-LLControlVariable *LLView::findControl(const std::string& name)
+LLControlVariable *LLView::findControl(std::string_view name)
 {
+    auto uiInst = LLUI::getInstance();
     // parse the name to locate which group it belongs to
     std::size_t key_pos= name.find(".");
-    if(key_pos!=  std::string::npos )
+    if(key_pos !=  std::string_view::npos )
     {
-        std::string control_group_key = name.substr(0, key_pos);
+        std::string_view control_group_key = name.substr(0, key_pos);
         LLControlVariable* control;
         // check if it's in the control group that name indicated
-        if(LLUI::getInstance()->mSettingGroups[control_group_key])
+        auto it = uiInst->mSettingGroups.find(control_group_key);
+        if(it != uiInst->mSettingGroups.end() && it->second)
         {
-            control = LLUI::getInstance()->mSettingGroups[control_group_key]->getControl(name);
+            control = it->second->getControl(name);
             if (control)
             {
                 return control;
@@ -2331,7 +2333,7 @@ LLControlVariable *LLView::findControl(const std::string& name)
         }
     }
 
-    LLControlGroup& control_group = LLUI::getInstance()->getControlControlGroup(name);
+    LLControlGroup& control_group = uiInst->getControlControlGroup(name);
     return control_group.getControl(name);
 }
 
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 4a9bef158a..710ec3d05e 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -416,7 +416,7 @@ public:
     void screenRectToLocal( const LLRect& screen, LLRect* local ) const;
     void localRectToScreen( const LLRect& local, LLRect* screen ) const;
 
-    LLControlVariable *findControl(const std::string& name);
+    LLControlVariable *findControl(std::string_view name);
 
     const child_list_t* getChildList() const { return &mChildList; }
     child_list_const_iter_t beginChild() const { return mChildList.begin(); }
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 82e07e03c9..bb590ebd76 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -348,7 +348,7 @@ LLPointer<LLControlVariable> LLControlGroup::getControl(std::string_view name)
         incrCount(name);
     }
 
-    ctrl_name_table_t::iterator iter = mNameTable.find(name.data());
+    ctrl_name_table_t::iterator iter = mNameTable.find(name);
     return iter == mNameTable.end() ? LLPointer<LLControlVariable>() : iter->second;
 }
 
@@ -657,7 +657,7 @@ LLSD LLControlGroup::asLLSD(bool diffs_only)
     return result;
 }
 
-bool LLControlGroup::controlExists(const std::string& name)
+bool LLControlGroup::controlExists(std::string_view name)
 {
     ctrl_name_table_t::iterator iter = mNameTable.find(name);
     return iter != mNameTable.end();
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 1b04729a82..344352e980 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -189,7 +189,7 @@ class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string>
     LOG_CLASS(LLControlGroup);
 
 protected:
-    typedef std::map<std::string, LLControlVariablePtr > ctrl_name_table_t;
+    typedef std::map<std::string, LLControlVariablePtr, std::less<> > ctrl_name_table_t;
     ctrl_name_table_t mNameTable;
     static const std::string mTypeString[TYPE_COUNT];
 
@@ -295,7 +295,7 @@ public:
         }
     }
 
-    bool    controlExists(const std::string& name);
+    bool    controlExists(std::string_view name);
 
     // Returns number of controls loaded, 0 if failed
     // If require_declaration is false, will auto-declare controls it finds
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 85ede793e2..51099a480d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2393,7 +2393,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
             std::string full_settings_path;
 
             if (file.file_name_setting.isProvided()
-                && gSavedSettings.controlExists(file.file_name_setting))
+                && gSavedSettings.controlExists(file.file_name_setting()))
             {
                 // try to find filename stored in file_name_setting control
                 full_settings_path = gSavedSettings.getString(file.file_name_setting());
-- 
cgit v1.2.3


From 0460d9a5e84599316e505ae25b3f9a8148adb3fa Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 22:35:34 -0400
Subject: Reduce string temporaries from finding colors in the color table

---
 indra/llui/llui.cpp           |  2 +-
 indra/llui/lluicolortable.cpp | 10 +++++-----
 indra/llui/lluicolortable.h   | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 448c730688..e3ddd66b58 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -529,7 +529,7 @@ namespace LLInitParam
     {
         if (control.isProvided() && !control().empty())
         {
-            updateValue(LLUIColorTable::instance().getColor(control));
+            updateValue(LLUIColorTable::instance().getColor(control()));
         }
         else
         {
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 54f8727fa5..3279926786 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -63,7 +63,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table
         ColorEntryParams color_entry = *it;
         if(color_entry.color.value.isChosen())
         {
-            setColor(color_entry.name, color_entry.color.value, table);
+            setColor(color_entry.name(), color_entry.color.value, table);
         }
         else
         {
@@ -176,7 +176,7 @@ void LLUIColorTable::clear()
     clearTable(mUserSetColors);
 }
 
-LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
+LLUIColor LLUIColorTable::getColor(std::string_view name, const LLColor4& default_color) const
 {
     string_color_map_t::const_iterator iter = mUserSetColors.find(name);
 
@@ -196,7 +196,7 @@ LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& defa
 }
 
 // update user color, loaded colors are parsed on initialization
-void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
+void LLUIColorTable::setColor(std::string_view name, const LLColor4& color)
 {
     setColor(name, color, mUserSetColors);
 }
@@ -258,7 +258,7 @@ void LLUIColorTable::saveUserSettings() const
     }
 }
 
-bool LLUIColorTable::colorExists(const std::string& color_name) const
+bool LLUIColorTable::colorExists(std::string_view color_name) const
 {
     return ((mLoadedColors.find(color_name) != mLoadedColors.end())
          || (mUserSetColors.find(color_name) != mUserSetColors.end()));
@@ -276,7 +276,7 @@ void LLUIColorTable::clearTable(string_color_map_t& table)
 
 // this method inserts a color into the table if it does not exist
 // if the color already exists it changes the color
-void LLUIColorTable::setColor(const std::string& name, const LLColor4& color, string_color_map_t& table)
+void LLUIColorTable::setColor(std::string_view name, const LLColor4& color, string_color_map_t& table)
 {
     string_color_map_t::iterator it = table.lower_bound(name);
     if(it != table.end()
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index 7232077cab..ca1ca9eaa7 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -42,7 +42,7 @@ class LLUIColorTable : public LLSingleton<LLUIColorTable>
     LOG_CLASS(LLUIColorTable);
 
     // consider using sorted vector, can be much faster
-    typedef std::map<std::string, LLUIColor>  string_color_map_t;
+    typedef std::map<std::string, LLUIColor, std::less<>>  string_color_map_t;
 
 public:
     struct ColorParams : LLInitParam::ChoiceBlock<ColorParams>
@@ -75,13 +75,13 @@ public:
     void clear();
 
     // color lookup
-    LLUIColor getColor(const std::string& name, const LLColor4& default_color = LLColor4::magenta) const;
+    LLUIColor getColor(std::string_view name, const LLColor4& default_color = LLColor4::magenta) const;
 
     // if the color is in the table, it's value is changed, otherwise it is added
-    void setColor(const std::string& name, const LLColor4& color);
+    void setColor(std::string_view name, const LLColor4& color);
 
     // returns true if color_name exists in the table
-    bool colorExists(const std::string& color_name) const;
+    bool colorExists(std::string_view color_name) const;
 
     // loads colors from settings files
     bool loadFromSettings();
@@ -95,7 +95,7 @@ private:
     void insertFromParams(const Params& p, string_color_map_t& table);
 
     void clearTable(string_color_map_t& table);
-    void setColor(const std::string& name, const LLColor4& color, string_color_map_t& table);
+    void setColor(std::string_view name, const LLColor4& color, string_color_map_t& table);
 
     string_color_map_t mLoadedColors;
     string_color_map_t mUserSetColors;
-- 
cgit v1.2.3


From 3fa6db9603a020402eea8c61622b0cab27dbcca3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 22:50:39 -0400
Subject: Reduce string temporaries from LLTrans

---
 indra/llui/lltrans.cpp            | 24 ++++++++++++------------
 indra/llui/lltrans.h              | 23 +++++++++++------------
 indra/llwindow/llkeyboard.cpp     |  4 ++--
 indra/llwindow/llkeyboard.h       |  2 +-
 indra/newview/lllogininstance.cpp |  2 +-
 5 files changed, 27 insertions(+), 28 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp
index 6c7e472a87..8410031653 100644
--- a/indra/llui/lltrans.cpp
+++ b/indra/llui/lltrans.cpp
@@ -65,7 +65,7 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa
     if (!root->hasName("strings"))
     {
         LL_ERRS() << "Invalid root node name in " << xml_filename
-            << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL;
+            << ": was " << root->getName()->mString << ", expected \"strings\"" << LL_ENDL;
     }
 
     StringTable string_table;
@@ -113,7 +113,7 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root)
     if (!root->hasName("strings"))
     {
         LL_ERRS() << "Invalid root node name in " << xml_filename
-        << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL;
+        << ": was " << root->getName()->mString << ", expected \"strings\"" << LL_ENDL;
     }
 
     StringTable string_table;
@@ -143,7 +143,7 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root)
 static LLTrace::BlockTimerStatHandle FTM_GET_TRANS("Translate string");
 
 //static
-std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args, bool def_string)
+std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& msg_args, bool def_string)
 {
     // Don't care about time as much as call count.  Make sure we're not
     // calling LLTrans::getString() in an inner loop. JC
@@ -167,12 +167,12 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::
     else
     {
         LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
-        return "MissingString("+xml_desc+")";
+        return "MissingString(" + std::string(xml_desc) + ")";
     }
 }
 
 //static
-std::string LLTrans::getDefString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
+std::string LLTrans::getDefString(std::string_view xml_desc, const LLStringUtil::format_map_t& msg_args)
 {
     template_map_t::iterator iter = sDefaultStringTemplates.find(xml_desc);
     if (iter != sDefaultStringTemplates.end())
@@ -187,12 +187,12 @@ std::string LLTrans::getDefString(const std::string &xml_desc, const LLStringUti
     else
     {
         LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
-        return "MissingString(" + xml_desc + ")";
+        return "MissingString(" + std::string(xml_desc) + ")";
     }
 }
 
 //static
-std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args, bool def_string)
+std::string LLTrans::getString(std::string_view xml_desc, const LLSD& msg_args, bool def_string)
 {
     // Don't care about time as much as call count.  Make sure we're not
     // calling LLTrans::getString() in an inner loop. JC
@@ -213,12 +213,12 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
     else
     {
         LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
-        return "MissingString("+xml_desc+")";
+        return "MissingString(" + std::string(xml_desc) + ")";
     }
 }
 
 //static
-std::string LLTrans::getDefString(const std::string &xml_desc, const LLSD& msg_args)
+std::string LLTrans::getDefString(std::string_view xml_desc, const LLSD& msg_args)
 {
     template_map_t::iterator iter = sDefaultStringTemplates.find(xml_desc);
     if (iter != sDefaultStringTemplates.end())
@@ -230,12 +230,12 @@ std::string LLTrans::getDefString(const std::string &xml_desc, const LLSD& msg_a
     else
     {
         LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
-        return "MissingString(" + xml_desc + ")";
+        return "MissingString(" + std::string(xml_desc) + ")";
     }
 }
 
 //static
-bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
+bool LLTrans::findString(std::string &result, std::string_view xml_desc, const LLStringUtil::format_map_t& msg_args)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
@@ -257,7 +257,7 @@ bool LLTrans::findString(std::string &result, const std::string &xml_desc, const
 }
 
 //static
-bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLSD& msg_args)
+bool LLTrans::findString(std::string &result, std::string_view xml_desc, const LLSD& msg_args)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
diff --git a/indra/llui/lltrans.h b/indra/llui/lltrans.h
index 4f38ef9067..3492ed0169 100644
--- a/indra/llui/lltrans.h
+++ b/indra/llui/lltrans.h
@@ -76,12 +76,12 @@ public:
      * @param args A list of substrings to replace in the string
      * @returns Translated string
      */
-    static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
-    static std::string getDefString(const std::string &xml_desc, const LLStringUtil::format_map_t& args);
-    static std::string getString(const std::string &xml_desc, const LLSD& args, bool def_string = false);
-    static std::string getDefString(const std::string &xml_desc, const LLSD& args);
-    static bool findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& args);
-    static bool findString(std::string &result, const std::string &xml_desc, const LLSD& args);
+    static std::string getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
+    static std::string getDefString(std::string_view xml_desc, const LLStringUtil::format_map_t& args);
+    static std::string getString(std::string_view xml_desc, const LLSD& args, bool def_string = false);
+    static std::string getDefString(std::string_view xml_desc, const LLSD& args);
+    static bool findString(std::string &result, std::string_view xml_desc, const LLStringUtil::format_map_t& args);
+    static bool findString(std::string &result, std::string_view xml_desc, const LLSD& args);
 
     // Returns translated string with [COUNT] replaced with a number, following
     // special per-language logic for plural nouns.  For example, some languages
@@ -94,23 +94,22 @@ public:
      * @param xml_desc String's description
      * @returns Translated string
      */
-    static std::string getString(const std::string &xml_desc, bool def_string = false)
+    static std::string getString(std::string_view xml_desc, bool def_string = false)
     {
         LLStringUtil::format_map_t empty;
         return getString(xml_desc, empty);
     }
 
-    static bool findString(std::string &result, const std::string &xml_desc)
+    static bool findString(std::string &result, std::string_view xml_desc)
     {
         LLStringUtil::format_map_t empty;
         return findString(result, xml_desc, empty);
     }
 
-    static std::string getKeyboardString(const char* keystring)
+    static std::string getKeyboardString(const std::string_view keystring)
     {
-        std::string key_str(keystring);
         std::string trans_str;
-        return findString(trans_str, key_str) ? trans_str : key_str;
+        return findString(trans_str, keystring) ? trans_str : std::string(keystring);
     }
 
     // get the default args
@@ -128,7 +127,7 @@ public:
     }
 
 private:
-    typedef std::map<std::string, LLTransTemplate > template_map_t;
+    typedef std::map<std::string, LLTransTemplate, std::less<>> template_map_t;
     static template_map_t sStringTemplates;
     static template_map_t sDefaultStringTemplates;
     static LLStringUtil::format_map_t sDefaultArgs;
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp
index 4f29fb0b0a..33eebdadd1 100644
--- a/indra/llwindow/llkeyboard.cpp
+++ b/indra/llwindow/llkeyboard.cpp
@@ -359,7 +359,7 @@ std::string LLKeyboard::stringFromKey(KEY key, bool translate)
         LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator;
         if (trans != NULL)
         {
-            res = trans(res.c_str());
+            res = trans(res);
         }
     }
 
@@ -399,7 +399,7 @@ std::string LLKeyboard::stringFromMouse(EMouseClickType click, bool translate)
         LLKeyStringTranslatorFunc* trans = gKeyboard->mStringTranslator;
         if (trans != NULL)
         {
-            res = trans(res.c_str());
+            res = trans(res);
         }
     }
     return res;
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index 7f8d0af155..713eb7aec2 100644
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -42,7 +42,7 @@ enum EKeystate
 };
 
 typedef boost::function<bool(EKeystate keystate)> LLKeyFunc;
-typedef std::string (LLKeyStringTranslatorFunc)(const char *label);
+typedef std::string (LLKeyStringTranslatorFunc)(std::string_view);
 
 enum EKeyboardInsertMode
 {
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index d015c0ed95..f37926a938 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -447,7 +447,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
             gViewerWindow->setShowProgress(false);
         }
 
-        showMFAChallange(LLTrans::getString(response["message_id"]));
+        showMFAChallange(LLTrans::getString(response["message_id"].asString()));
     }
     else if(   reason_response == "key"
             || reason_response == "presence"
-- 
cgit v1.2.3


From fad6a3753757778d4b50d46f44aabd0d3fa3e13b Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 1 Jul 2024 22:58:25 -0400
Subject: Fix test builds

---
 indra/llcommon/llstl.h                       |  2 +-
 indra/newview/tests/lldateutil_test.cpp      | 15 ++++++++++-----
 indra/newview/tests/lllogininstance_test.cpp |  4 ++--
 indra/newview/tests/llslurl_test.cpp         |  4 ++--
 indra/newview/tests/llviewernetwork_test.cpp |  4 ++--
 indra/newview/tests/llworldmap_test.cpp      |  2 +-
 6 files changed, 18 insertions(+), 13 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index e3999cbdaa..7d41c42ba7 100644
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -230,7 +230,7 @@ template <typename T>
 inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key)
 {
     // Typedef here avoids warnings because of new c++ naming rules.
-    typedef T::const_iterator map_iter;
+    typedef typename T::const_iterator map_iter;
     map_iter iter = inmap.find(key);
     if(iter == inmap.end())
     {
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp
index e9d4982e35..151aadfd4b 100644
--- a/indra/newview/tests/lldateutil_test.cpp
+++ b/indra/newview/tests/lldateutil_test.cpp
@@ -38,18 +38,23 @@
 
 
 // Baked-in return values for getString()
-std::map< std::string, std::string > gString;
+std::map< std::string, std::string, std::less<>> gString;
 
 // Baked-in return values for getCountString()
 // map of pairs of input xml_desc and integer count
 typedef std::pair< std::string, int > count_string_t;
 std::map< count_string_t, std::string > gCountString;
 
-std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
+std::string LLTrans::getString(const std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
 {
-    std::string text = gString[xml_desc];
-    LLStringUtil::format(text, args);
-    return text;
+    auto it = gString.find(xml_desc);
+    if (it != gString.end())
+    {
+        std::string text = it->second;
+        LLStringUtil::format(text, args);
+        return text;
+    }
+    return {};
 }
 
 std::string LLTrans::getCountString(const std::string& language, const std::string& xml_desc, S32 count)
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index df0f006d02..bff2289a7c 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -79,7 +79,7 @@ LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
 
 LLViewerWindow* gViewerWindow;
 
-std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
+std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
 {
     return std::string("test_trans");
 }
@@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL;
 LLPointer<LLSecAPIHandler> gSecAPIHandler;
 
 //static
-LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus)
+LLFloater* LLFloaterReg::showInstance(std::string_view name, const LLSD& key, bool focus)
 {
     gTOSType = name;
     gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]);
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 3be44a9bd5..fc9f5b707a 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -46,10 +46,10 @@ static const char * const TEST_FILENAME("llslurl_test.xml");
 class LLTrans
 {
 public:
-    static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
+    static std::string getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
 };
 
-std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
+std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
 {
     return std::string();
 }
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 40c2059d27..d9cb9e7538 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -45,10 +45,10 @@ static const char * const TEST_FILENAME("llviewernetwork_test.xml");
 class LLTrans
 {
 public:
-    static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
+    static std::string getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
 };
 
-std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
+std::string LLTrans::getString(std::string_view xml_desc, const LLStringUtil::format_map_t& args, bool def_string)
 {
     std::string grid_label = std::string();
     if(xml_desc == "AgniGridLabel")
diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp
index 8564dbeeb6..d5bf189d82 100644
--- a/indra/newview/tests/llworldmap_test.cpp
+++ b/indra/newview/tests/llworldmap_test.cpp
@@ -66,7 +66,7 @@ void LLWorldMipmap::equalizeBoostLevels() { }
 LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) { return NULL; }
 
 // Stub other stuff
-std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); }
+std::string LLTrans::getString(std::string_view, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); }
 void LLUIString::updateResult() const { }
 void LLUIString::setArg(const std::string& , const std::string& ) { }
 void LLUIString::assign(const std::string& ) { }
-- 
cgit v1.2.3


From fc8c601fc1e5173267b6231f7223a0f1e76d5164 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 2 Jul 2024 08:55:12 -0400
Subject: Reduce string temporaries from LLNotifications using string_view

---
 indra/llui/llnotifications.cpp         | 29 +++++++++++++++--------------
 indra/llui/llnotifications.h           | 26 +++++++++++++-------------
 indra/llui/llnotificationslistener.cpp |  2 +-
 3 files changed, 29 insertions(+), 28 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 825956227f..8a73148631 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -266,7 +266,7 @@ LLSD LLNotificationForm::asLLSD() const
     return mFormData;
 }
 
-LLSD LLNotificationForm::getElement(const std::string& element_name)
+LLSD LLNotificationForm::getElement(std::string_view element_name)
 {
     for (LLSD::array_const_iterator it = mFormData.beginArray();
         it != mFormData.endArray();
@@ -278,7 +278,7 @@ LLSD LLNotificationForm::getElement(const std::string& element_name)
 }
 
 
-bool LLNotificationForm::hasElement(const std::string& element_name) const
+bool LLNotificationForm::hasElement(std::string_view element_name) const
 {
     for (LLSD::array_const_iterator it = mFormData.beginArray();
         it != mFormData.endArray();
@@ -301,7 +301,7 @@ void LLNotificationForm::getElements(LLSD& elements, S32 offset)
     }
 }
 
-bool LLNotificationForm::getElementEnabled(const std::string& element_name) const
+bool LLNotificationForm::getElementEnabled(std::string_view element_name) const
 {
     for (LLSD::array_const_iterator it = mFormData.beginArray();
         it != mFormData.endArray();
@@ -316,7 +316,7 @@ bool LLNotificationForm::getElementEnabled(const std::string& element_name) cons
     return false;
 }
 
-void LLNotificationForm::setElementEnabled(const std::string& element_name, bool enabled)
+void LLNotificationForm::setElementEnabled(std::string_view element_name, bool enabled)
 {
     for (LLSD::array_iterator it = mFormData.beginArray();
         it != mFormData.endArray();
@@ -769,7 +769,7 @@ bool LLNotification::hasUniquenessConstraints() const
     return (mTemplatep ? mTemplatep->mUnique : false);
 }
 
-bool LLNotification::matchesTag(const std::string& tag)
+bool LLNotification::matchesTag(std::string_view tag)
 {
     bool result = false;
 
@@ -1443,11 +1443,12 @@ void LLNotifications::createDefaultChannels()
 }
 
 
-LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name)
+LLNotificationTemplatePtr LLNotifications::getTemplate(std::string_view name)
 {
-    if (mTemplates.count(name))
+    auto it = mTemplates.find(name);
+    if (it != mTemplates.end())
     {
-        return mTemplates[name];
+        return it->second;
     }
     else
     {
@@ -1455,7 +1456,7 @@ LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name)
     }
 }
 
-bool LLNotifications::templateExists(const std::string& name)
+bool LLNotifications::templateExists(std::string_view name)
 {
     return (mTemplates.count(name) != 0);
 }
@@ -1740,7 +1741,7 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
     }
 }
 
-void LLNotifications::cancelByName(const std::string& name)
+void LLNotifications::cancelByName(std::string_view name)
 {
     LLMutexLock lock(&mItemsMutex);
     std::vector<LLNotificationPtr> notifs_to_cancel;
@@ -1815,7 +1816,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
     }
 }
 
-std::string LLNotifications::getGlobalString(const std::string& key) const
+std::string LLNotifications::getGlobalString(std::string_view key) const
 {
     GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
     if (it != mGlobalStrings.end())
@@ -1826,7 +1827,7 @@ std::string LLNotifications::getGlobalString(const std::string& key) const
     {
         // if we don't have the key as a global, return the key itself so that the error
         // is self-diagnosing.
-        return key;
+        return std::string(key);
     }
 }
 
@@ -1839,13 +1840,13 @@ bool LLNotifications::getIgnoreAllNotifications()
     return mIgnoreAllNotifications;
 }
 
-void LLNotifications::setIgnored(const std::string& name, bool ignored)
+void LLNotifications::setIgnored(std::string_view name, bool ignored)
 {
     LLNotificationTemplatePtr templatep = getTemplate(name);
     templatep->mForm->setIgnored(ignored);
 }
 
-bool LLNotifications::getIgnored(const std::string& name)
+bool LLNotifications::getIgnored(std::string_view name)
 {
     LLNotificationTemplatePtr templatep = getTemplate(name);
     return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) );
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index d3615b6601..1a197f8a17 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -251,11 +251,11 @@ public:
 
     S32 getNumElements() { return static_cast<S32>(mFormData.size()); }
     LLSD getElement(S32 index) { return mFormData.get(index); }
-    LLSD getElement(const std::string& element_name);
+    LLSD getElement(std::string_view element_name);
     void getElements(LLSD& elements, S32 offset = 0);
-    bool hasElement(const std::string& element_name) const;
-    bool getElementEnabled(const std::string& element_name) const;
-    void setElementEnabled(const std::string& element_name, bool enabled);
+    bool hasElement(std::string_view element_name) const;
+    bool getElementEnabled(std::string_view element_name) const;
+    void setElementEnabled(std::string_view element_name, bool enabled);
     void addElement(const std::string& type, const std::string& name, const LLSD& value = LLSD(), bool enabled = true);
     void formatElements(const LLSD& substitutions);
     // appends form elements from another form serialized as LLSD
@@ -641,7 +641,7 @@ public:
 
     bool hasUniquenessConstraints() const;
 
-    bool matchesTag(const std::string& tag);
+    bool matchesTag(std::string_view tag);
 
     virtual ~LLNotification() {}
 };
@@ -926,7 +926,7 @@ public:
     void add(const LLNotificationPtr pNotif);
     void load(const LLNotificationPtr pNotif);
     void cancel(LLNotificationPtr pNotif);
-    void cancelByName(const std::string& name);
+    void cancelByName(std::string_view name);
     void cancelByOwner(const LLUUID ownerId);
     void update(const LLNotificationPtr pNotif);
 
@@ -934,19 +934,19 @@ public:
 
     // This is all stuff for managing the templates
     // take your template out
-    LLNotificationTemplatePtr getTemplate(const std::string& name);
+    LLNotificationTemplatePtr getTemplate(std::string_view name);
 
     // get the whole collection
     typedef std::vector<std::string> TemplateNames;
     TemplateNames getTemplateNames() const;  // returns a list of notification names
 
-    typedef std::map<std::string, LLNotificationTemplatePtr> TemplateMap;
+    typedef std::map<std::string, LLNotificationTemplatePtr, std::less<>> TemplateMap;
 
     TemplateMap::const_iterator templatesBegin() { return mTemplates.begin(); }
     TemplateMap::const_iterator templatesEnd() { return mTemplates.end(); }
 
     // test for existence
-    bool templateExists(const std::string& name);
+    bool templateExists(std::string_view name);
 
     typedef std::list<LLNotificationVisibilityRulePtr> VisibilityRuleList;
 
@@ -956,13 +956,13 @@ public:
 
     LLNotificationChannelPtr getChannel(const std::string& channelName);
 
-    std::string getGlobalString(const std::string& key) const;
+    std::string getGlobalString(std::string_view key) const;
 
     void setIgnoreAllNotifications(bool ignore);
     bool getIgnoreAllNotifications();
 
-    void setIgnored(const std::string& name, bool ignored);
-    bool getIgnored(const std::string& name);
+    void setIgnored(std::string_view name, bool ignored);
+    bool getIgnored(std::string_view name);
 
     bool isVisibleByRules(LLNotificationPtr pNotification);
 
@@ -988,7 +988,7 @@ private:
 
     LLNotificationMap mUniqueNotifications;
 
-    typedef std::map<std::string, std::string> GlobalStringMap;
+    typedef std::map<std::string, std::string, std::less<>> GlobalStringMap;
     GlobalStringMap mGlobalStrings;
 
     bool mIgnoreAllNotifications;
diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index ace9e37e25..9c1fc27c51 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -191,7 +191,7 @@ void LLNotificationsListener::ignore(const LLSD& params) const
     if (params["name"].isDefined())
     {
         // ["name"] was passed: ignore just that notification
-        LLNotificationTemplatePtr templatep = mNotifications.getTemplate(params["name"]);
+        LLNotificationTemplatePtr templatep = mNotifications.getTemplate(params["name"].asStringRef());
         if (templatep)
         {
             templatep->mForm->setIgnored(ignore);
-- 
cgit v1.2.3


From 6ad1957b3163b661d7ea8c501b0a113b94f01558 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 2 Jul 2024 08:55:52 -0400
Subject: Reduce string temporaries from LLPanel using string_view

---
 indra/llui/llpanel.cpp | 42 +++++++++++++++++++++---------------------
 indra/llui/llpanel.h   | 48 ++++++++++++++++++++++++------------------------
 2 files changed, 45 insertions(+), 45 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 01d0097eab..ab3433af98 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -277,7 +277,7 @@ void LLPanel::setDefaultBtn(LLButton* btn)
     }
 }
 
-void LLPanel::setDefaultBtn(const std::string& id)
+void LLPanel::setDefaultBtn(std::string_view id)
 {
     LLButton *button = getChild<LLButton>(id);
     if (button)
@@ -593,12 +593,12 @@ bool LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
     return true;
 }
 
-bool LLPanel::hasString(const std::string& name)
+bool LLPanel::hasString(std::string_view name)
 {
     return mUIStrings.find(name) != mUIStrings.end();
 }
 
-std::string LLPanel::getString(const std::string& name, const LLStringUtil::format_map_t& args) const
+std::string LLPanel::getString(std::string_view name, const LLStringUtil::format_map_t& args) const
 {
     ui_string_map_t::const_iterator found_it = mUIStrings.find(name);
     if (found_it != mUIStrings.end())
@@ -608,7 +608,7 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
         formatted_string.setArgList(args);
         return formatted_string.getString();
     }
-    std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
+    std::string err_str("Failed to find string " + std::string(name) + " in panel " + getName()); //*TODO: Translate
     if(LLUI::getInstance()->mSettingGroups["config"]->getBOOL("QAMode"))
     {
         LL_ERRS() << err_str << LL_ENDL;
@@ -620,14 +620,14 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
     return LLStringUtil::null;
 }
 
-std::string LLPanel::getString(const std::string& name) const
+std::string LLPanel::getString(std::string_view name) const
 {
     ui_string_map_t::const_iterator found_it = mUIStrings.find(name);
     if (found_it != mUIStrings.end())
     {
         return found_it->second;
     }
-    std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
+    std::string err_str("Failed to find string " + std::string(name) +" in panel " + getName()); //*TODO: Translate
     if(LLUI::getInstance()->mSettingGroups["config"]->getBOOL("QAMode"))
     {
         LL_ERRS() << err_str << LL_ENDL;
@@ -640,7 +640,7 @@ std::string LLPanel::getString(const std::string& name) const
 }
 
 
-void LLPanel::childSetVisible(const std::string& id, bool visible)
+void LLPanel::childSetVisible(std::string_view id, bool visible)
 {
     LLView* child = findChild<LLView>(id);
     if (child)
@@ -649,7 +649,7 @@ void LLPanel::childSetVisible(const std::string& id, bool visible)
     }
 }
 
-void LLPanel::childSetEnabled(const std::string& id, bool enabled)
+void LLPanel::childSetEnabled(std::string_view id, bool enabled)
 {
     LLView* child = findChild<LLView>(id);
     if (child)
@@ -658,7 +658,7 @@ void LLPanel::childSetEnabled(const std::string& id, bool enabled)
     }
 }
 
-void LLPanel::childSetFocus(const std::string& id, bool focus)
+void LLPanel::childSetFocus(std::string_view id, bool focus)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -667,7 +667,7 @@ void LLPanel::childSetFocus(const std::string& id, bool focus)
     }
 }
 
-bool LLPanel::childHasFocus(const std::string& id)
+bool LLPanel::childHasFocus(std::string_view id)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -684,7 +684,7 @@ bool LLPanel::childHasFocus(const std::string& id)
 // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
 // which takes a generic slot.  Or use mCommitCallbackRegistrar.add() with
 // a named callback and reference it in XML.
-void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
+void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -693,7 +693,7 @@ void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void
     }
 }
 
-void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
+void LLPanel::childSetColor(std::string_view id, const LLColor4& color)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -702,7 +702,7 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
     }
 }
 
-LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const
+LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(std::string_view id) const
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -712,7 +712,7 @@ LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string&
     return NULL;
 }
 
-LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
+LLCtrlListInterface* LLPanel::childGetListInterface(std::string_view id) const
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -722,7 +722,7 @@ LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
     return NULL;
 }
 
-LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) const
+LLCtrlScrollInterface* LLPanel::childGetScrollInterface(std::string_view id) const
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -732,7 +732,7 @@ LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) c
     return NULL;
 }
 
-void LLPanel::childSetValue(const std::string& id, LLSD value)
+void LLPanel::childSetValue(std::string_view id, LLSD value)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -741,7 +741,7 @@ void LLPanel::childSetValue(const std::string& id, LLSD value)
     }
 }
 
-LLSD LLPanel::childGetValue(const std::string& id) const
+LLSD LLPanel::childGetValue(std::string_view id) const
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -752,7 +752,7 @@ LLSD LLPanel::childGetValue(const std::string& id) const
     return LLSD();
 }
 
-bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
+bool LLPanel::childSetTextArg(std::string_view id, const std::string& key, const LLStringExplicit& text)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
@@ -762,7 +762,7 @@ bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, con
     return false;
 }
 
-bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
+bool LLPanel::childSetLabelArg(std::string_view id, const std::string& key, const LLStringExplicit& text)
 {
     LLView* child = findChild<LLView>(id);
     if (child)
@@ -772,7 +772,7 @@ bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, co
     return false;
 }
 
-void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_type& function)
+void LLPanel::childSetAction(std::string_view id, const commit_signal_t::slot_type& function)
 {
     LLButton* button = findChild<LLButton>(id);
     if (button)
@@ -781,7 +781,7 @@ void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_
     }
 }
 
-void LLPanel::childSetAction(const std::string& id, boost::function<void(void*)> function, void* value)
+void LLPanel::childSetAction(std::string_view id, boost::function<void(void*)> function, void* value)
 {
     LLButton* button = findChild<LLButton>(id);
     if (button)
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 6d1be519e4..f6aa91fb30 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -149,7 +149,7 @@ public:
     void            setBackgroundOpaque(bool b)     { mBgOpaque = b; }
     bool            isBackgroundOpaque() const { return mBgOpaque; }
     void            setDefaultBtn(LLButton* btn = NULL);
-    void            setDefaultBtn(const std::string& id);
+    void            setDefaultBtn(std::string_view id);
     void            updateDefaultBtn();
     void            setLabel(const LLStringExplicit& label) { mLabel = label; }
     std::string     getLabel() const { return mLabel; }
@@ -169,47 +169,47 @@ public:
     void initFromParams(const Params& p);
     bool initPanelXML(  LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node, const LLPanel::Params& default_params);
 
-    bool hasString(const std::string& name);
-    std::string getString(const std::string& name, const LLStringUtil::format_map_t& args) const;
-    std::string getString(const std::string& name) const;
+    bool hasString(std::string_view name);
+    std::string getString(std::string_view name, const LLStringUtil::format_map_t& args) const;
+    std::string getString(std::string_view name) const;
 
     // ** Wrappers for setting child properties by name ** -TomY
     // WARNING: These are deprecated, please use getChild<T>("name")->doStuff() idiom instead
 
     // LLView
-    void childSetVisible(const std::string& name, bool visible);
+    void childSetVisible(std::string_view name, bool visible);
 
-    void childSetEnabled(const std::string& name, bool enabled);
-    void childEnable(const std::string& name)   { childSetEnabled(name, true); }
-    void childDisable(const std::string& name) { childSetEnabled(name, false); };
+    void childSetEnabled(std::string_view name, bool enabled);
+    void childEnable(std::string_view name)   { childSetEnabled(name, true); }
+    void childDisable(std::string_view name) { childSetEnabled(name, false); };
 
     // LLUICtrl
-    void childSetFocus(const std::string& id, bool focus = true);
-    bool childHasFocus(const std::string& id);
+    void childSetFocus(std::string_view id, bool focus = true);
+    bool childHasFocus(std::string_view id);
 
     // *TODO: Deprecate; for backwards compatability only:
     // Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
     // which takes a generic slot.  Or use mCommitCallbackRegistrar.add() with
     // a named callback and reference it in XML.
-    void childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
-    void childSetColor(const std::string& id, const LLColor4& color);
+    void childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
+    void childSetColor(std::string_view id, const LLColor4& color);
 
-    LLCtrlSelectionInterface* childGetSelectionInterface(const std::string& id) const;
-    LLCtrlListInterface* childGetListInterface(const std::string& id) const;
-    LLCtrlScrollInterface* childGetScrollInterface(const std::string& id) const;
+    LLCtrlSelectionInterface* childGetSelectionInterface(std::string_view id) const;
+    LLCtrlListInterface* childGetListInterface(std::string_view id) const;
+    LLCtrlScrollInterface* childGetScrollInterface(std::string_view id) const;
 
     // This is the magic bullet for data-driven UI
-    void childSetValue(const std::string& id, LLSD value);
-    LLSD childGetValue(const std::string& id) const;
+    void childSetValue(std::string_view id, LLSD value);
+    LLSD childGetValue(std::string_view id) const;
 
     // For setting text / label replacement params, e.g. "Hello [NAME]"
     // Not implemented for all types, defaults to noop, returns false if not applicaple
-    bool childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
-    bool childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
+    bool childSetTextArg(std::string_view id, const std::string& key, const LLStringExplicit& text);
+    bool childSetLabelArg(std::string_view id, const std::string& key, const LLStringExplicit& text);
 
     // LLButton
-    void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value);
-    void childSetAction(const std::string& id, const commit_signal_t::slot_type& function);
+    void childSetAction(std::string_view id, boost::function<void(void*)> function, void* value);
+    void childSetAction(std::string_view id, const commit_signal_t::slot_type& function);
 
     static LLView*  fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
 
@@ -250,7 +250,7 @@ private:
     LLButton*       mDefaultBtn;
     LLUIString      mLabel;
 
-    typedef std::map<std::string, std::string> ui_string_map_t;
+    typedef std::map<std::string, std::string, std::less<>> ui_string_map_t;
     ui_string_map_t mUIStrings;
 
 
@@ -277,7 +277,7 @@ public:
         mPanelClassesNames[tag] = func;
     }
 
-    LLPanel* createPanelClass(const std::string& tag)
+    LLPanel* createPanelClass(std::string_view tag)
     {
         param_name_map_t::iterator iT =  mPanelClassesNames.find(tag);
         if(iT == mPanelClassesNames.end())
@@ -292,7 +292,7 @@ public:
     }
 
 private:
-    typedef std::map< std::string, LLPanelClassCreatorFunc> param_name_map_t;
+    typedef std::map< std::string, LLPanelClassCreatorFunc, std::less<>> param_name_map_t;
 
     param_name_map_t mPanelClassesNames;
 };
-- 
cgit v1.2.3


From 14cbf331cbf345bac83606ee5f56c994694420b3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 2 Jul 2024 08:56:42 -0400
Subject: Reduce string temporaries from LLTabContainer, LLMenuGL,
 LLLayoutStack, and LLKeywords using string_view

---
 indra/llui/llkeywords.cpp             | 8 ++++----
 indra/llui/llkeywords.h               | 8 ++++----
 indra/llui/lllayoutstack.cpp          | 2 +-
 indra/llui/lllayoutstack.h            | 2 +-
 indra/llui/llmenugl.cpp               | 6 +++---
 indra/llui/llmenugl.h                 | 6 +++---
 indra/llui/lltabcontainer.cpp         | 6 +++---
 indra/llui/lltabcontainer.h           | 6 +++---
 indra/newview/llfloaterpreference.cpp | 2 +-
 9 files changed, 23 insertions(+), 23 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 5e184b5ddb..ea84594ad6 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -164,13 +164,13 @@ std::string LLKeywords::getArguments(LLSD& arguments)
     return argString;
 }
 
-std::string LLKeywords::getAttribute(const std::string& key)
+std::string LLKeywords::getAttribute(std::string_view key)
 {
     attribute_iterator_t it = mAttributes.find(key);
     return (it != mAttributes.end()) ? it->second : "";
 }
 
-LLColor4 LLKeywords::getColorGroup(const std::string& key_in)
+LLColor4 LLKeywords::getColorGroup(std::string_view key_in)
 {
     std::string color_group = "ScriptText";
     if (key_in == "functions")
@@ -261,7 +261,7 @@ void LLKeywords::processTokens()
     LL_INFOS("SyntaxLSL") << "Finished processing tokens." << LL_ENDL;
 }
 
-void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group)
+void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
 {
     LLColor4 color;
     LLColor4 color_group;
@@ -333,7 +333,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group
                     case LLKeywordToken::TT_CONSTANT:
                         if (getAttribute("type").length() > 0)
                         {
-                            color_group = getColorGroup(group + "-" + getAttribute("type"));
+                            color_group = getColorGroup(std::string(group) + "-" + getAttribute("type"));
                         }
                         else
                         {
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index f498b3ddee..6df2da7cd3 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -111,7 +111,7 @@ public:
     ~LLKeywords();
 
     void        clearLoaded() { mLoaded = false; }
-    LLColor4    getColorGroup(const std::string& key_in);
+    LLColor4    getColorGroup(std::string_view key_in);
     bool        isLoaded() const    { return mLoaded; }
 
     void        findSegments(std::vector<LLTextSegmentPtr> *seg_list,
@@ -170,7 +170,7 @@ public:
 #endif
 
 protected:
-    void        processTokensGroup(const LLSD& Tokens, const std::string& Group);
+    void        processTokensGroup(const LLSD& Tokens, std::string_view Group);
     void        insertSegment(std::vector<LLTextSegmentPtr>& seg_list,
                               LLTextSegmentPtr new_segment,
                               S32 text_len,
@@ -194,10 +194,10 @@ protected:
     token_list_t mLineTokenList;
     token_list_t mDelimiterTokenList;
 
-    typedef  std::map<std::string, std::string> element_attributes_t;
+    typedef  std::map<std::string, std::string, std::less<>> element_attributes_t;
     typedef element_attributes_t::const_iterator attribute_iterator_t;
     element_attributes_t mAttributes;
-    std::string getAttribute(const std::string& key);
+    std::string getAttribute(std::string_view key);
 
     std::string getArguments(LLSD& arguments);
 };
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 6db9f64a97..bb09f7a26e 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -548,7 +548,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
     return NULL;
 }
 
-LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) const
+LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(std::string_view name) const
 {
     LLLayoutPanel* result = NULL;
 
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 9e5f8048ba..8459921c60 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -111,7 +111,7 @@ private:
     e_panel_list_t mPanels;
 
     LLLayoutPanel* findEmbeddedPanel(LLPanel* panelp) const;
-    LLLayoutPanel* findEmbeddedPanelByName(const std::string& name) const;
+    LLLayoutPanel* findEmbeddedPanelByName(std::string_view name) const;
     void updateFractionalSizes();
     void normalizeFractionalSizes();
     void updatePanelRect( LLLayoutPanel* param1, const LLRect& new_rect );
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 9ab210e003..0038a8ae18 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -2752,7 +2752,7 @@ void LLMenuGL::setEnabledSubMenus(bool enable)
 
 // setItemEnabled() - pass the label and the enable flag for a menu
 // item. true will make sure it's enabled, false will disable it.
-void LLMenuGL::setItemEnabled( const std::string& name, bool enable )
+void LLMenuGL::setItemEnabled(std::string_view name, bool enable )
 {
     item_list_t::iterator item_iter;
     for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
@@ -2766,7 +2766,7 @@ void LLMenuGL::setItemEnabled( const std::string& name, bool enable )
     }
 }
 
-void LLMenuGL::setItemVisible( const std::string& name, bool visible )
+void LLMenuGL::setItemVisible(std::string_view name, bool visible )
 {
     item_list_t::iterator item_iter;
     for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
@@ -3277,7 +3277,7 @@ void LLMenuGL::setVisible(bool visible)
     }
 }
 
-LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, bool recurse) const
+LLMenuGL* LLMenuGL::findChildMenuByName(std::string_view name, bool recurse) const
 {
     LLView* view = findChildView(name, recurse);
     if (view)
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 300a669d52..66f84393fe 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -456,7 +456,7 @@ public:
     virtual bool hasAccelerator(const KEY &key, const MASK &mask) const;
     virtual bool handleAcceleratorKey(KEY key, MASK mask);
 
-    LLMenuGL* findChildMenuByName(const std::string& name, bool recurse) const;
+    LLMenuGL* findChildMenuByName(std::string_view name, bool recurse) const;
 
     bool clearHoverItem();
 
@@ -479,12 +479,12 @@ public:
     // setItemEnabled() - pass the name and the enable flag for a
     // menu item. true will make sure it's enabled, false will disable
     // it.
-    void setItemEnabled( const std::string& name, bool enable );
+    void setItemEnabled(std::string_view name, bool enable );
 
     // propagate message to submenus
     void setEnabledSubMenus(bool enable);
 
-    void setItemVisible( const std::string& name, bool visible);
+    void setItemVisible(std::string_view name, bool visible);
 
     void setItemLabel(const std::string &name, const std::string &label);
 
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index f10d545126..0a617558d2 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1401,7 +1401,7 @@ S32 LLTabContainer::getIndexForPanel(LLPanel* panel)
     return -1;
 }
 
-S32 LLTabContainer::getPanelIndexByTitle(const std::string& title)
+S32 LLTabContainer::getPanelIndexByTitle(std::string_view title)
 {
     for (S32 index = 0 ; index < (S32)mTabList.size(); index++)
     {
@@ -1413,7 +1413,7 @@ S32 LLTabContainer::getPanelIndexByTitle(const std::string& title)
     return -1;
 }
 
-LLPanel* LLTabContainer::getPanelByName(const std::string& name)
+LLPanel* LLTabContainer::getPanelByName(std::string_view name)
 {
     for (S32 index = 0 ; index < (S32)mTabList.size(); index++)
     {
@@ -1637,7 +1637,7 @@ bool LLTabContainer::setTab(S32 which)
     return is_visible;
 }
 
-bool LLTabContainer::selectTabByName(const std::string& name)
+bool LLTabContainer::selectTabByName(std::string_view name)
 {
     LLPanel* panel = getPanelByName(name);
     if (!panel)
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 4f0a0b2a57..40f272ffa8 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -190,8 +190,8 @@ public:
     S32         getTabCount();
     LLPanel*    getPanelByIndex(S32 index);
     S32         getIndexForPanel(LLPanel* panel);
-    S32         getPanelIndexByTitle(const std::string& title);
-    LLPanel*    getPanelByName(const std::string& name);
+    S32         getPanelIndexByTitle(std::string_view title);
+    LLPanel*    getPanelByName(std::string_view name);
     S32         getTotalTabWidth() const;
     void        setCurrentTabName(const std::string& name);
 
@@ -201,7 +201,7 @@ public:
     void        selectPrevTab();
     bool        selectTabPanel( LLPanel* child );
     bool        selectTab(S32 which);
-    bool        selectTabByName(const std::string& title);
+    bool        selectTabByName(std::string_view title);
     void        setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; }
 
     bool        getTabPanelFlashing(LLPanel* child);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 85a07f23a4..0ec2024994 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1910,7 +1910,7 @@ void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location)
 void LLFloaterPreference::selectPanel(const LLSD& name)
 {
     LLTabContainer * tab_containerp = getChild<LLTabContainer>("pref core");
-    LLPanel * panel = tab_containerp->getPanelByName(name);
+    LLPanel * panel = tab_containerp->getPanelByName(name.asStringRef());
     if (NULL != panel)
     {
         tab_containerp->selectTabPanel(panel);
-- 
cgit v1.2.3


From c19d766812dd744fdd1c91992f92f27794735c79 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 18:23:03 +0300
Subject: viewer#1907 Shader initialization error

---
 .../newview/app_settings/shaders/class1/deferred/normgenF.glsl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
index 6d05d983f3..607a8c6ef6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -64,14 +64,14 @@ float getBumpValue(vec2 texcoord)
 
 void main()
 {
-    float c = getBumpValue(vary_texcoord0).r;
+    float c = getBumpValue(vary_texcoord0);
 
     float scaler = 512.0;
 
-    vec3 right = vec3(norm_scale, 0, (getBumpValue(vary_texcoord0+vec2(stepX, 0)).r-c)*scaler);
-    vec3 left = vec3(-norm_scale, 0, (getBumpValue(vary_texcoord0-vec2(stepX, 0)).r-c)*scaler);
-    vec3 up = vec3(0, -norm_scale, (getBumpValue(vary_texcoord0-vec2(0, stepY)).r-c)*scaler);
-    vec3 down = vec3(0, norm_scale, (getBumpValue(vary_texcoord0+vec2(0, stepY)).r-c)*scaler);
+    vec3 right = vec3(norm_scale, 0, (getBumpValue(vary_texcoord0+vec2(stepX, 0))-c)*scaler);
+    vec3 left = vec3(-norm_scale, 0, (getBumpValue(vary_texcoord0-vec2(stepX, 0))-c)*scaler);
+    vec3 up = vec3(0, -norm_scale, (getBumpValue(vary_texcoord0-vec2(0, stepY))-c)*scaler);
+    vec3 down = vec3(0, norm_scale, (getBumpValue(vary_texcoord0+vec2(0, stepY))-c)*scaler);
 
     vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right);
 
-- 
cgit v1.2.3


From cb2795748eec373b11154c2825a3ecf2633938be Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 19:01:46 +0300
Subject: viewer#1905 Fix "Share" and "Pay" buttons' state in nearby list

---
 indra/newview/llpanelpeoplemenus.cpp                               | 7 +++++--
 .../skins/default/xui/en/menu_people_nearby_multiselect.xml        | 6 ++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 172c7d0828..f8a73ddb46 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -245,11 +245,14 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
     {
         return LLLogChat::isTranscriptExist(mUUIDs.front());
     }
-    else if (item == std::string("can_im") || item == std::string("can_invite") ||
-             item == std::string("can_share") || item == std::string("can_pay"))
+    else if (item == std::string("can_im") || item == std::string("can_invite"))
     {
         return true;
     }
+    else if (item == std::string("can_share") || item == std::string("can_pay"))
+    {
+        return mUUIDs.size() == 1;
+    }
     return false;
 }
 
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index 63185b537c..61738e73db 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -48,6 +48,9 @@
      name="share">
         <on_click
          function="Avatar.Share" />
+        <on_enable
+         function="Avatar.EnableItem"
+         parameter="can_share" />
     </menu_item_call>
     <menu_item_call
      enabled="false"
@@ -56,6 +59,9 @@
      name="pay">
         <on_click
          function="Avatar.Pay" />
+        <on_enable
+         function="Avatar.EnableItem"
+         parameter="can_pay" />
     </menu_item_call>
     <menu_item_call
     label="Offer Teleport"
-- 
cgit v1.2.3


From 886be2faf19343843d8b2bf7a24c91bdeb1a9294 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 11:44:14 +0300
Subject: viewer#1857 Reset texture transforms when terrain PBR is applied

ctrls aren't dynamically alocated so getChild is preferable, but since other elements use findchild and validy checks used findChild as well
---
 indra/newview/llfloaterregioninfo.cpp | 27 ++++++++++++++++++++++++++-
 indra/newview/llfloaterregioninfo.h   |  2 ++
 2 files changed, 28 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index c019bd047d..d6ffab5825 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1561,7 +1561,7 @@ bool LLPanelRegionTerrainInfo::postBuild()
         {
             mTextureDetailCtrl[i]->setBakeTextureEnabled(false);
         }
-        initAndSetCtrl(mMaterialDetailCtrl[i], llformat("material_detail_%d", i));
+        initMaterialCtrl(mMaterialDetailCtrl[i], llformat("material_detail_%d", i), i);
 
         initAndSetCtrl(mMaterialScaleUCtrl[i], llformat("terrain%dScaleU", i));
         initAndSetCtrl(mMaterialScaleVCtrl[i], llformat("terrain%dScaleV", i));
@@ -1958,6 +1958,31 @@ bool LLPanelRegionTerrainInfo::sendUpdate()
     return true;
 }
 
+void LLPanelRegionTerrainInfo::initMaterialCtrl(LLTextureCtrl*& ctrl, const std::string& name, S32 index)
+{
+    ctrl = findChild<LLTextureCtrl>(name, true);
+    if (!ctrl) return;
+
+    // consume cancel events, otherwise they will trigger commit callbacks
+    ctrl->setOnCancelCallback([](LLUICtrl* ctrl, const LLSD& param) {});
+    ctrl->setCommitCallback(
+        [this, index](LLUICtrl* ctrl, const LLSD& param)
+    {
+        if (!mMaterialScaleUCtrl[index]
+            || !mMaterialScaleVCtrl[index]
+            || !mMaterialRotationCtrl[index]
+            || !mMaterialOffsetUCtrl[index]
+            || !mMaterialOffsetVCtrl[index]) return;
+
+        mMaterialScaleUCtrl[index]->setValue(1.f);
+        mMaterialScaleVCtrl[index]->setValue(1.f);
+        mMaterialRotationCtrl[index]->setValue(0.f);
+        mMaterialOffsetUCtrl[index]->setValue(0.f);
+        mMaterialOffsetVCtrl[index]->setValue(0.f);
+        onChangeAnything();
+    });
+}
+
 bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response)
 {
     S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 5623bc20cb..60564435d7 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -273,6 +273,8 @@ public:
 protected:
     bool sendUpdate() override;
 
+    void initMaterialCtrl(LLTextureCtrl*& ctrl, const std::string& name, S32 index);
+
 private:
     bool mConfirmedTextureHeights;
     bool mAskedTextureHeights;
-- 
cgit v1.2.3


From 475d0df4c152972665c978f7b0991f8726def03a Mon Sep 17 00:00:00 2001
From: Beq Janus <beqjanus@gmail.com>
Date: Tue, 2 Jul 2024 18:57:39 +0100
Subject: Experimental fix for blurry textures (#1875)

This change removes the distance based bias (which is a large contributor to premature blurring) but adds a check using the importance factor to give some balance.
importance should be between 0 and 1 and is higher when the texture is facing the camera, lower when it is side on,
The unimportance setting defines the cutoff vaklue below which we'll consider the textures worth "down scaling" by the bias factor. The setting is inplace to allow us to play with this, 0.25 is current default.

Note this change moves the calcPixelArea() call to the top BEFORE we user getPixelArea(). Either that call is entirely redundant (i.e. if calc was called earlier in the frame)  or we were using the stale pixelArea (one frame behind). If the former is true then it might be faster to just do an AABB frustum check.
---
 indra/newview/app_settings/settings.xml | 13 +++++++++++++
 indra/newview/llviewertexturelist.cpp   | 12 +++++-------
 2 files changed, 18 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c455b6f5f1..e56facd615 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11289,6 +11289,19 @@
       <key>Value</key>
       <real>8.0</real>
     </map>
+    <key>TextureBiasUnimportantFactor</key>
+    <map>
+      <key>Comment</key>
+      <string>When biasing textures to lower resolution due to lack of vram, the importance threshold below which is considered unimportant and getting an extra bias.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+      <real>0.25</real>
+      <key>Backup</key>
+      <integer>0</integer>
+    </map>
     <key>TextureDecodeDisabled</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 4d8fd8ddd5..2f685474e1 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -931,6 +931,10 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
 
                 if (face && face->getViewerObject() && face->getTextureEntry())
                 {
+                    F32 radius;
+                    F32 cos_angle_to_view_dir;
+                    BOOL in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
+                    static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
                     F32 vsize = face->getPixelArea();
 
                     // Scale desired texture resolution higher or lower depending on texture scale
@@ -944,13 +948,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                     min_scale = llclamp(min_scale*min_scale, texture_scale_min(), texture_scale_max());
 
                     vsize /= min_scale;
-                    vsize /= LLViewerTexture::sDesiredDiscardBias;
-                    vsize /= llmax(1.f, (LLViewerTexture::sDesiredDiscardBias-1.f) * (1.f + face->getDrawable()->mDistanceWRTCamera * bias_distance_scale));
-
-                    F32 radius;
-                    F32 cos_angle_to_view_dir;
-                    bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
-                    if (!in_frustum || !face->getDrawable()->isVisible())
+                    if (!in_frustum || !face->getDrawable()->isVisible() || face->getImportanceToCamera() < bias_unimportant_threshold)
                     { // further reduce by discard bias when off screen or occluded
                         vsize /= LLViewerTexture::sDesiredDiscardBias;
                     }
-- 
cgit v1.2.3


From 2e836ab06f934038394b46e9c861312c0441b657 Mon Sep 17 00:00:00 2001
From: Beq Janus <beqjanus@gmail.com>
Date: Tue, 2 Jul 2024 18:59:30 +0100
Subject: LL Issue#1835 - Input delays introduced in PBR viewers. (#1889)

---
 indra/newview/llappviewer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 08fbbaa390..32d3df4f83 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -338,7 +338,7 @@ private:
 };
 
 // consts from viewer.h
-const S32 AGENT_UPDATES_PER_SECOND  = 10;
+const S32 AGENT_UPDATES_PER_SECOND  = 125; // Value derived experimentally to avoid Input Delays with latest PBR-Capable Viewers when viewer FPS is highly volatile.
 const S32 AGENT_FORCE_UPDATES_PER_SECOND  = 1;
 
 // Globals with external linkage. From viewer.h
-- 
cgit v1.2.3


From b276936ef336a17e4c124da40c1c63b2829fc680 Mon Sep 17 00:00:00 2001
From: "Jonathan \"Geenz\" Goodman" <geenz@lindenlab.com>
Date: Tue, 2 Jul 2024 11:01:35 -0700
Subject: Quick fix for a possible merge bug from featurettes. (#1715)

---
 indra/newview/pipeline.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6c9c4751d7..b9b1264b16 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -776,9 +776,11 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     if (mRT == &mMainRT)
     { // hacky -- allocate auxillary buffer
+
+        gCubeSnapshot = TRUE;
+
         if (sReflectionProbesEnabled)
         {
-            gCubeSnapshot = true;
             mReflectionMapManager.initReflectionMaps();
         }
 
-- 
cgit v1.2.3


From 1adb94a89c106176e01d950170b9c4d623dd2250 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 20:39:39 +0300
Subject: viewer#1666 Allow switching 2k textures off in bulk uploads

---
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/app_settings/settings.xml            |  11 ++
 indra/newview/llfloaterbulkupload.cpp              | 139 ++++++++++++++++++++
 indra/newview/llfloaterbulkupload.h                |  66 ++++++++++
 indra/newview/llmaterialeditor.cpp                 |   4 +-
 indra/newview/llviewerassetupload.cpp              |   5 +-
 indra/newview/llviewerassetupload.h                |   4 +-
 indra/newview/llviewerfloaterreg.cpp               |  10 +-
 indra/newview/llviewermenufile.cpp                 | 122 +++++++++++------
 indra/newview/llviewermenufile.h                   |  16 ++-
 .../skins/default/xui/en/floater_bulk_upload.xml   | 144 +++++++++++++++++++++
 .../newview/skins/default/xui/en/notifications.xml |  11 --
 12 files changed, 468 insertions(+), 66 deletions(-)
 create mode 100644 indra/newview/llfloaterbulkupload.cpp
 create mode 100644 indra/newview/llfloaterbulkupload.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_bulk_upload.xml

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index cbcc85cc1c..d4c2875c6c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -189,6 +189,7 @@ set(viewer_SOURCE_FILES
     llfloaterbigpreview.cpp
     llfloaterbuildoptions.cpp
     llfloaterbulkpermission.cpp
+    llfloaterbulkupload.cpp
     llfloaterbump.cpp
     llfloaterbuy.cpp
     llfloaterbuycontents.cpp
@@ -852,6 +853,7 @@ set(viewer_HEADER_FILES
     llfloaterbigpreview.h
     llfloaterbuildoptions.h
     llfloaterbulkpermission.h
+    llfloaterbulkupload.h
     llfloaterbump.h
     llfloaterbuy.h
     llfloaterbuycontents.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index e56facd615..09909aa9c4 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1094,6 +1094,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>BulkUpload2KTextures</key>
+    <map>
+        <key>Comment</key>
+        <string>Bulk upload scales textures to 2K if true, to 1K if false</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>1</integer>
+    </map>
     <key>EnableButtonFlashing</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp
new file mode 100644
index 0000000000..98875ee84d
--- /dev/null
+++ b/indra/newview/llfloaterbulkupload.cpp
@@ -0,0 +1,139 @@
+/**
+ * @file llfloaterbulkupload.cpp
+ * @author Andrey Kleshchev
+ * @brief LLFloaterBulkUpload class implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterbulkupload.h"
+
+#include "lltextbox.h"
+#include "llviewercontrol.h"
+#include "llviewermenufile.h"
+
+constexpr S32 MAX_HEIGH = 211;
+
+LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key)
+:   LLModalDialog(key, true)
+{
+    mUploadCost = key["upload_cost"].asInteger();
+    mUploadCount = key["upload_count"].asInteger();
+    mHas2kTextures = key["has_2k_textures"].asBoolean();
+    if (key["files"].isArray())
+    {
+        const LLSD& files = key["files"];
+        for (LLSD::array_const_iterator it = files.beginArray();
+            it != files.endArray();
+            ++it)
+        {
+            mFiles.push_back(it->asString());
+        }
+    }
+}
+
+LLFloaterBulkUpload::~LLFloaterBulkUpload()
+{
+}
+
+bool LLFloaterBulkUpload::postBuild()
+{
+    childSetAction("upload_btn", [this](void*) { onClickUpload(); }, this);
+    childSetAction("cancel_btn", [this](void*) { onClickCancel(); }, this);
+
+    mCountLabel = getChild<LLTextBox>("number_of_items", true);
+    mCostLabel = getChild<LLTextBox>("upload_cost", true);
+
+    mCheckboxPanel = getChild<LLPanel>("checkbox_panel", true);
+    mLinkPanel = getChild<LLPanel>("link_panel", true);
+    mWarningPanel = getChild<LLPanel>("warning_panel", true);
+
+    mCheckboxUpload2K = getChild<LLUICtrl>("upload_2k");
+    mCheckboxUpload2K->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data) { onUpload2KCheckBox(); });
+
+    mAllow2kTextures = gSavedSettings.getBOOL("BulkUpload2KTextures");
+    mCheckboxUpload2K->setValue(!mAllow2kTextures);
+
+    if (!mAllow2kTextures && mHas2kTextures)
+    {
+        // provided cost is for 2K textures, recalculate cost
+        S32 bvh_count;
+        S32 textures_2k_count;
+        get_bulk_upload_expected_cost(mFiles, mAllow2kTextures, mUploadCost, mUploadCount, bvh_count, textures_2k_count);
+
+        update();
+    }
+
+
+    update();
+
+    return LLModalDialog::postBuild();
+}
+
+void LLFloaterBulkUpload::update()
+{
+    mCountLabel->setTextArg("[COUNT]", llformat("%d", mUploadCount));
+    mCostLabel->setTextArg("[COST]", llformat("%d", mUploadCost));
+
+    mCheckboxPanel->setVisible(mHas2kTextures);
+    mLinkPanel->setVisible(mHas2kTextures);
+    mWarningPanel->setVisible(mAllow2kTextures);
+
+    S32 new_height = MAX_HEIGH;
+    if (!mHas2kTextures)
+    {
+        new_height -= mCheckboxPanel->getRect().getHeight();
+        new_height -= mLinkPanel->getRect().getHeight();
+    }
+    if (!mAllow2kTextures)
+    {
+        new_height -= mWarningPanel->getRect().getHeight();
+    }
+    reshape(getRect().getWidth(), new_height, false);
+}
+
+void LLFloaterBulkUpload::onUpload2KCheckBox()
+{
+    mAllow2kTextures = !mCheckboxUpload2K->getValue().asBoolean();
+    gSavedSettings.setBOOL("BulkUpload2KTextures", mAllow2kTextures);
+
+    S32 bvh_count;
+    S32 textures_2k_count;
+    get_bulk_upload_expected_cost(mFiles, mAllow2kTextures, mUploadCost, mUploadCount, bvh_count, textures_2k_count);
+    // keep old value of mHas2kTextures to show checkbox
+
+    update();
+}
+
+void LLFloaterBulkUpload::onClickUpload()
+{
+    do_bulk_upload(mFiles, mAllow2kTextures);
+    closeFloater();
+}
+
+
+void LLFloaterBulkUpload::onClickCancel()
+{
+    closeFloater();
+}
diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h
new file mode 100644
index 0000000000..d07dc8eabe
--- /dev/null
+++ b/indra/newview/llfloaterbulkupload.h
@@ -0,0 +1,66 @@
+/**
+ * @file llfloaterbulkupload.h
+ * @author Andrey Kleshchev
+ * @brief LLFloaterBulkUpload class definition
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERBULKUPLOAD_H
+#define LL_LLFLOATERBULKUPLOAD_H
+
+#include "llmodaldialog.h"
+
+class LLTextBox;
+
+class LLFloaterBulkUpload : public LLModalDialog
+{
+public:
+    LLFloaterBulkUpload(const LLSD& key);
+    ~LLFloaterBulkUpload();
+
+    bool postBuild() override;
+
+    void update();
+
+protected:
+    void onUpload2KCheckBox();
+
+    void onClickUpload();
+    void onClickCancel();
+
+private:
+    LLUICtrl* mCheckboxUpload2K = nullptr;
+    LLTextBox* mCountLabel = nullptr;
+    LLTextBox* mCostLabel = nullptr;
+    LLPanel* mCheckboxPanel = nullptr;
+    LLPanel* mLinkPanel = nullptr;
+    LLPanel* mWarningPanel = nullptr;
+
+    std::vector<std::string> mFiles;
+    bool mAllow2kTextures = true;
+    bool mHas2kTextures = false;
+    S32 mUploadCost = 0;
+    S32 mUploadCount = 0;
+};
+
+#endif
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 92f8ed949e..3987c6d9a3 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2430,14 +2430,14 @@ void LLMaterialEditor::onSaveObjectsMaterialAsMsgCallback(const LLSD& notificati
     createInventoryItem(str.str(), new_name, std::string(), permissions);
 }
 
-const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type);
+const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k);
 
 void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::string &filename, S32 index, bool open_floater)
 {
     if (index == model_in.materials.size())
     {
         // bulk upload all the things
-        upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL);
+        upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true);
         return;
     }
 
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 337c18f218..3c70d46d36 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -370,7 +370,8 @@ LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo(
     LLResourceUploadInfo(name, description, compressionInfo,
     destinationType, inventoryType,
     nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory),
-    mFileName(fileName)
+    mFileName(fileName),
+    mMaxImageSize(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT)
 {
 }
 
@@ -422,7 +423,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
     else if (assetType == LLAssetType::AT_TEXTURE)
     {
         // It's an image file, the upload procedure is the same for all
-        if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec))
+        if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec, mMaxImageSize))
         {
             errorMessage = llformat("Problem with file %s:\n\n%s\n",
                 getFileName().c_str(), LLImage::getLastThreadError().c_str());
diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h
index 5a07fbf802..365436ede0 100644
--- a/indra/newview/llviewerassetupload.h
+++ b/indra/newview/llviewerassetupload.h
@@ -161,13 +161,15 @@ public:
 
     std::string         getFileName() const { return mFileName; };
 
+    void setMaxImageSize(U32 maxUploadSize) { mMaxImageSize = maxUploadSize; }
+
 protected:
 
     virtual LLSD        exportTempFile();
 
 private:
     std::string         mFileName;
-
+    S32                 mMaxImageSize;
 };
 
 //-------------------------------------------------------------------------
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 3e1705b8a1..c97a512a57 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -47,6 +47,7 @@
 #include "llfloaterbeacons.h"
 #include "llfloaterbuildoptions.h"
 #include "llfloaterbulkpermission.h"
+#include "llfloaterbulkupload.h"
 #include "llfloaterbump.h"
 #include "llfloaterbuy.h"
 #include "llfloaterbuycontents.h"
@@ -207,6 +208,7 @@ public:
                 "camera_presets",
                 "delete_pref_preset",
                 "forget_username",
+                "gltf_asset_editor",
                 "god_tools",
                 "group_picker",
                 "hud",
@@ -223,7 +225,8 @@ public:
                 "upload_image",
                 "upload_model",
                 "upload_script",
-                "upload_sound"
+                "upload_sound",
+                "bulk_upload"
             };
             return std::find(blacklist_clicked.begin(), blacklist_clicked.end(), fl_name) == blacklist_clicked.end();
         }
@@ -247,6 +250,7 @@ public:
                 "env_edit_extdaycycle",
                 "font_test",
                 "forget_username",
+                "gltf_asset_editor",
                 "god_tools",
                 "group_picker",
                 "hud",
@@ -272,7 +276,8 @@ public:
                 "upload_image",
                 "upload_model",
                 "upload_script",
-                "upload_sound"
+                "upload_sound",
+                "bulk_upload"
             };
             return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end();
         }
@@ -337,6 +342,7 @@ void LLViewerFloaterReg::registerFloaters()
     LLFloaterReg::add("buy_object_contents", "floater_buy_contents.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyContents>);
     LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
     LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
+    LLFloaterReg::add("bulk_upload", "floater_bulk_upload.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBulkUpload>);
     LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
 
     LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index e3da52fc78..c4fecf8dff 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -523,15 +523,8 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP
     return;
 }
 
-void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification, const LLSD& response)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
 {
-    S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-    if (option != 0)
-    {
-        // Cancel upload
-        return;
-    }
-
     for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
     {
         std::string filename = (*in_iter);
@@ -551,7 +544,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
         if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec))
         {
             bool resource_upload = false;
-            if (asset_type == LLAssetType::AT_TEXTURE)
+            if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
             {
                 LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
                 if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
@@ -567,7 +560,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
 
             if (resource_upload)
             {
-                LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo(
+                LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo(
                     filename,
                     asset_name,
                     asset_name, 0,
@@ -575,7 +568,13 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
                     LLFloaterPerms::getNextOwnerPerms("Uploads"),
                     LLFloaterPerms::getGroupPerms("Uploads"),
                     LLFloaterPerms::getEveryonePerms("Uploads"),
-                    expected_upload_cost));
+                    expected_upload_cost);
+
+                if (!allow_2k)
+                {
+                    info_p->setMaxImageSize(1024);
+                }
+                LLResourceUploadInfo::ptr_t uploadInfo(info_p);
 
                 upload_new_resource(uploadInfo);
             }
@@ -601,11 +600,30 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
     }
 }
 
-bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S32& total_cost, S32& file_count, S32& bvh_count)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response)
+{
+    S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+    if (option != 0)
+    {
+        // Cancel upload
+        return;
+    }
+
+    do_bulk_upload(filenames, allow_2k);
+}
+
+bool get_bulk_upload_expected_cost(
+    const std::vector<std::string>& filenames,
+    bool allow_2k,
+    S32& total_cost,
+    S32& file_count,
+    S32& bvh_count,
+    S32& textures_2k_count)
 {
     total_cost = 0;
     file_count = 0;
     bvh_count = 0;
+    textures_2k_count = 0;
     for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
     {
         std::string filename = (*in_iter);
@@ -622,12 +640,20 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3
 
         if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec))
         {
-            if (asset_type == LLAssetType::AT_TEXTURE)
+            if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
             {
                 LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
                 if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
                 {
                     total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
+                    if (image_frmted)
+                    {
+                        S32 area = image_frmted->getHeight() * image_frmted->getWidth();
+                        if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
+                        {
+                            textures_2k_count++;
+                        }
+                    }
                     file_count++;
                 }
             }
@@ -682,38 +708,27 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3
     return file_count > 0;
 }
 
-const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type)
+const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k)
 {
-    // TODO:
-    // Check user balance for entire cost
-    // Charge user entire cost
-    // Loop, uploading
-    // If an upload fails, refund the user for that one
-    //
-    // Also fix single upload to charge first, then refund
-
-    // FIXME PREMIUM what about known types that can't be bulk uploaded
-    // (bvh)? These will fail in the item by item upload but won't be
-    // mentioned in the notification.
-    std::vector<std::string> filtered_filenames;
-    for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
-    {
-        const std::string& filename = *in_iter;
-        if (check_file_extension(filename, type))
-        {
-            filtered_filenames.push_back(filename);
-        }
-    }
-
     S32 expected_upload_cost;
     S32 expected_upload_count;
     S32 bvh_count;
-    if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost, expected_upload_count, bvh_count))
+    S32 textures_2k_count;
+    if (get_bulk_upload_expected_cost(filtered_filenames, allow_2k, expected_upload_cost, expected_upload_count, bvh_count, textures_2k_count))
     {
-        LLSD args;
-        args["COST"] = expected_upload_cost;
-        args["COUNT"] = expected_upload_count;
-        LLNotificationsUtil::add("BulkUploadCostConfirmation",  args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2));
+        LLSD key;
+        key["upload_cost"] = expected_upload_cost;
+        key["upload_count"] = expected_upload_count;
+        key["has_2k_textures"] = (textures_2k_count > 0);
+
+        LLSD array;
+        for (const std::string& str : filtered_filenames)
+        {
+            array.append(str);
+        }
+        key["files"] = array;
+
+        LLFloaterReg::showInstance("bulk_upload", key);
 
         if (filtered_filenames.size() > expected_upload_count)
         {
@@ -738,6 +753,31 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::
 
 }
 
+const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k)
+{
+    // TODO:
+    // Check user balance for entire cost
+    // Charge user entire cost
+    // Loop, uploading
+    // If an upload fails, refund the user for that one
+    //
+    // Also fix single upload to charge first, then refund
+
+    // FIXME PREMIUM what about known types that can't be bulk uploaded
+    // (bvh)? These will fail in the item by item upload but won't be
+    // mentioned in the notification.
+    std::vector<std::string> filtered_filenames;
+    for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
+    {
+        const std::string& filename = *in_iter;
+        if (check_file_extension(filename, type))
+        {
+            filtered_filenames.push_back(filename);
+        }
+    }
+    upload_bulk(filtered_filenames, allow_2k);
+}
+
 class LLFileUploadImage : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
@@ -803,7 +843,7 @@ class LLFileUploadBulk : public view_listener_t
         {
             gAgentCamera.changeCameraToDefault();
         }
-        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2), LLFilePicker::FFLOAD_ALL, true);
+        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true), LLFilePicker::FFLOAD_ALL, true);
         return true;
     }
 };
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 1acb701d50..d99f9dc4c6 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -64,13 +64,15 @@ void upload_new_resource(
     LLAssetStorage::LLStoreAssetCallback callback = LLAssetStorage::LLStoreAssetCallback(),
     void *userdata = NULL);
 
-
-void assign_defaults_and_show_upload_message(
-    LLAssetType::EType asset_type,
-    LLInventoryType::EType& inventory_type,
-    std::string& name,
-    const std::string& display_name,
-    std::string& description);
+bool get_bulk_upload_expected_cost(
+    const std::vector<std::string>& filenames,
+    bool allow_2k,
+    S32& total_cost,
+    S32& file_count,
+    S32& bvh_count,
+    S32& textures_2k_count);
+
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k);
 
 //consider moving all file pickers below to more suitable place
 class LLFilePickerThread : public LLThread
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_upload.xml b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml
new file mode 100644
index 0000000000..4c639a7c65
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+ can_resize="false"
+ show_title="false"
+ can_minimize="false"
+ can_close="false"
+ header_height="10"
+ bg_opaque_image="Window_NoTitle_Foreground"
+ bg_alpha_image="Window_NoTitle_Background"
+ height="207"
+ layout="topleft"
+ name="bulk_upload"
+ width="430">
+    <layout_stack
+      follows="all"
+      height="203"
+      layout="topleft"
+      left="8"
+      animate="false"
+      top="1"
+      orientation="vertical"
+      name="maint_layout"
+      width="421">
+        <layout_panel
+          follows="all"
+          height="27"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="count_panel">
+            <text
+             follows="left|top"
+             layout="topleft"
+             top="6"
+             left="20"
+             name="number_of_items"
+             height="20"
+             wrap="true">
+                Number of items to upload: [COUNT]
+            </text>
+        </layout_panel>
+        <layout_panel
+          follows="all"
+          height="37"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="warning_panel">
+            <text
+             name="textures_2k_warning"
+             follows="left|top"
+             layout="topleft"
+             top="6"
+             left="20"
+             height="30"
+             right="-20"
+             wrap="true">
+                Because of their dimentions one or more selected textures will be scaled to 2048px.
+            </text>
+        </layout_panel>
+        <layout_panel
+          follows="all"
+          height="23"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="checkbox_panel">
+            <check_box
+             height="16"
+             left="20"
+             label="Scale textures to a maximum of 1024px"
+             layout="topleft"
+             name="upload_2k" />
+        </layout_panel>
+        <layout_panel
+          follows="all"
+          height="27"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="cost_panel">
+            <text
+             name="upload_cost"
+             follows="left|top"
+             layout="topleft"
+             font.style="BOLD"
+             top="6"
+             left="20"
+             height="20"
+             wrap="true">
+                Upload cost: L$[COST]
+            </text>
+        </layout_panel>
+        <layout_panel
+          follows="all"
+          height="29"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="buttoms_panel">
+            <button
+             follows="bottom|left|right"
+             height="23"
+             label="Upload"
+             layout="topleft"
+             mouse_opaque="false"
+             name="upload_btn"
+             top="1"
+             left="84"
+             width="120" />
+            <button
+             follows="bottom|left|right"
+             height="23"
+             label="Cancel"
+             layout="topleft"
+             left_pad="12"
+             top_delta="0"
+             mouse_opaque="false"
+             name="cancel_btn"
+             width="120" />
+        </layout_panel>
+        <layout_panel
+          follows="all"
+          height="40"
+          layout="topleft"
+          auto_resize="false"
+          visible="true"
+          name="link_panel">
+            <text
+             follows="left|top"
+             layout="topleft"
+             top="6"
+             left="20"
+             name="new_folder_textbox"
+             height="39"
+             parse_urls="true"
+             skip_link_underline="true"
+             wrap="true">
+How textures are scaled during upload:
+https://wiki.secondlife.com/wiki/Limits#All_Viewers
+            </text>
+        </layout_panel>
+    </layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index f86b297395..a1e25f48ed 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -9060,17 +9060,6 @@ Your voice has been muted by moderator.
           name="okbutton"
           yestext="OK"/>
     </notification>
-
-   <notification
-    icon="alertmodal.tga"
-    name="BulkUploadCostConfirmation"
-    type="alertmodal">
-This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to continue with the upload?
-    <usetemplate
-     name="okcancelbuttons"
-     notext="Cancel"
-     yestext="Upload"/>
-   </notification>
   
    <notification
     icon="alertmodal.tga"
-- 
cgit v1.2.3


From b63065486b6e24a8518f95b95e0a5ca91a3eec28 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 21:10:48 +0300
Subject: viewer#1666 Make warning universal to avoid shifting notification

---
 indra/newview/llfloaterbulkupload.cpp                      | 5 +----
 indra/newview/skins/default/xui/en/floater_bulk_upload.xml | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp
index 98875ee84d..b898cb28b6 100644
--- a/indra/newview/llfloaterbulkupload.cpp
+++ b/indra/newview/llfloaterbulkupload.cpp
@@ -98,16 +98,13 @@ void LLFloaterBulkUpload::update()
 
     mCheckboxPanel->setVisible(mHas2kTextures);
     mLinkPanel->setVisible(mHas2kTextures);
-    mWarningPanel->setVisible(mAllow2kTextures);
+    mWarningPanel->setVisible(mHas2kTextures);
 
     S32 new_height = MAX_HEIGH;
     if (!mHas2kTextures)
     {
         new_height -= mCheckboxPanel->getRect().getHeight();
         new_height -= mLinkPanel->getRect().getHeight();
-    }
-    if (!mAllow2kTextures)
-    {
         new_height -= mWarningPanel->getRect().getHeight();
     }
     reshape(getRect().getWidth(), new_height, false);
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_upload.xml b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml
index 4c639a7c65..b2d03a5d04 100644
--- a/indra/newview/skins/default/xui/en/floater_bulk_upload.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml
@@ -55,7 +55,7 @@
              height="30"
              right="-20"
              wrap="true">
-                Because of their dimentions one or more selected textures will be scaled to 2048px.
+                By default, one or more selected textures will be scaled to 2048px.
             </text>
         </layout_panel>
         <layout_panel
-- 
cgit v1.2.3


From 42a9690daa127f34ec73120ac8a3580639f8067a Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 2 Jul 2024 21:53:16 +0300
Subject: viewer-private#247 Porperly reload image when uploading a model

---
 indra/newview/llmodelpreview.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index b1a48db0ee..2483308c82 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -3134,6 +3134,13 @@ U32 LLModelPreview::loadTextures(LLImportMaterial& material, void* opaque)
         LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData));
 
         tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, true, LLGLTexture::BOOST_PREVIEW);
+        if (tex->getDiscardLevel() < tex->getMaxDiscardLevel())
+        {
+            // file was loaded previosly, reload image to get potential changes
+            tex->clearFetchedResults();
+        }
+        // Todo: might cause a crash if preview gets closed before we get the callback.
+        // Use a callback list or guard callback in some way
         tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, opaque, NULL, false);
         tex->forceToSaveRawImage(0, F32_MAX);
         material.setDiffuseMap(tex->getID()); // record tex ID
-- 
cgit v1.2.3


From 32f3107a2038a20e056a87ab6bb4f094f12e2ddf Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 3 Jul 2024 14:58:07 +0200
Subject: #1917 The 'No emoji selected' message appears and overlaps emoji name

---
 indra/newview/llfloateremojipicker.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index d38f53eed6..0370182b01 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -849,8 +849,7 @@ void LLFloaterEmojiPicker::createEmojiIcon(const LLEmojiSearchResult& emoji,
 
 void LLFloaterEmojiPicker::showPreview(bool show)
 {
-    //mPreview->setIcon(nullptr);
-    mDummy->setVisible(show);
+    mDummy->setVisible(!show);
     mPreview->setVisible(show);
 }
 
-- 
cgit v1.2.3


From 9a38ecee8ef54b3e85a88657d7ba96c3292e350e Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 3 Jul 2024 15:34:03 +0300
Subject: viewer#1131 gltf model upload UI WIP #4

Hooked selection to tree view
---
 indra/newview/llfloatergltfasseteditor.cpp | 108 ++++++++++++++++++++++++++---
 indra/newview/llfloatergltfasseteditor.h   |   8 +++
 indra/newview/llselectmgr.cpp              |  12 ++++
 3 files changed, 119 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index f21b8032d0..c1946e9f96 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -52,8 +52,6 @@ LLFloaterGLTFAssetEditor::LLFloaterGLTFAssetEditor(const LLSD& key)
 
 LLFloaterGLTFAssetEditor::~LLFloaterGLTFAssetEditor()
 {
-    gIdleCallbacks.deleteFunction(idle, this);
-
     if (mScroller)
     {
         removeChild(mScroller);
@@ -120,7 +118,7 @@ void LLFloaterGLTFAssetEditor::initFolderRoot()
     // Insert that scroller into the panel widgets hierarchy
     mItemListPanel->addChild(mScroller);
 
-    // Create the root model and view for all conversation sessions
+    // Create the root model
     LLGLTFFolderItem* base_item = new LLGLTFFolderItem(mGLTFViewModel);
 
     LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>());
@@ -144,15 +142,33 @@ void LLFloaterGLTFAssetEditor::initFolderRoot()
     mFolderRoot->setOpen(true);
     mFolderRoot->setSelectCallback([this](const std::deque<LLFolderViewItem*>& items, bool user_action) { onFolderSelectionChanged(items, user_action); });
     mScroller->setVisible(true);
-
-    gIdleCallbacks.addFunction(idle, this);
 }
 
 void LLFloaterGLTFAssetEditor::onOpen(const LLSD& key)
 {
+    gIdleCallbacks.addFunction(idle, this);
     loadFromSelection();
 }
 
+void LLFloaterGLTFAssetEditor::onClose(bool app_quitting)
+{
+    gIdleCallbacks.deleteFunction(idle, this);
+    mAsset = nullptr;
+    mObject = nullptr;
+
+}
+
+void LLFloaterGLTFAssetEditor::clearRoot()
+{
+    LLFolderViewFolder::folders_t::iterator folders_it = mFolderRoot->getFoldersBegin();
+    while (folders_it != mFolderRoot->getFoldersEnd())
+    {
+        (*folders_it)->destroyView();
+        folders_it = mFolderRoot->getFoldersBegin();
+    }
+    mNodeToItemMap.clear();
+}
+
 void LLFloaterGLTFAssetEditor::idle(void* user_data)
 {
     LLFloaterGLTFAssetEditor* floater = (LLFloaterGLTFAssetEditor*)user_data;
@@ -216,6 +232,8 @@ void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* par
     view->setVisible(true);
     view->setOpen(true);
 
+    mNodeToItemMap[node_id] = view;
+
     for (S32& node_id : node.mChildren)
     {
         loadFromNode(node_id, view);
@@ -246,8 +264,12 @@ void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* par
 
 void LLFloaterGLTFAssetEditor::loadFromSelection()
 {
-    if (!mFolderRoot || LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1)
+    clearRoot();
+
+    if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 1)
     {
+        mAsset = nullptr;
+        mObject = nullptr;
         return;
     }
 
@@ -255,14 +277,19 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
     LLViewerObject* objectp = node->getObject();
     if (!objectp)
     {
+        mAsset = nullptr;
+        mObject = nullptr;
         return;
     }
 
-    mAsset = objectp->mGLTFAsset;
-    if (!mAsset)
+    if (!objectp->mGLTFAsset)
     {
+        mAsset = nullptr;
+        mObject = nullptr;
         return;
     }
+    mAsset = objectp->mGLTFAsset;
+    mObject = objectp;
 
     if (node->mName.empty())
     {
@@ -289,7 +316,6 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
 
         LLGLTFFolderItem* listener = new LLGLTFFolderItem(i, name, LLGLTFFolderItem::TYPE_SCENE, mGLTFViewModel);
 
-
         LLFolderViewFolder::Params p;
         p.name = name;
         p.root = mFolderRoot;
@@ -316,6 +342,50 @@ void LLFloaterGLTFAssetEditor::loadFromSelection()
     mFolderRoot->update();
 }
 
+void LLFloaterGLTFAssetEditor::dirty()
+{
+    if (!mObject || !mAsset || !mFolderRoot)
+    {
+        closeFloater();
+        return;
+    }
+
+    if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1)
+    {
+        closeFloater();
+        return;
+    }
+
+    LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(NULL);
+    if (!node)
+    {
+        // not yet updated?
+        // Todo: Subscribe to deletion in some way
+        return;
+    }
+
+    LLViewerObject* objectp = node->getObject();
+    if (mObject != objectp || !objectp->mGLTFAsset)
+    {
+        closeFloater();
+        return;
+    }
+
+    if (mAsset != objectp->mGLTFAsset)
+    {
+        loadFromSelection();
+        return;
+    }
+
+    auto found = mNodeToItemMap.find(node->mSelectedGLTFNode);
+    if (found != mNodeToItemMap.end())
+    {
+        LLFolderViewItem* itemp = found->second;
+        itemp->arrangeAndSet(true, false);
+        loadNodeTransforms(node->mSelectedGLTFNode);
+    }
+}
+
 void LLFloaterGLTFAssetEditor::onFolderSelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action)
 {
     if (items.empty())
@@ -329,10 +399,30 @@ void LLFloaterGLTFAssetEditor::onFolderSelectionChanged(const std::deque<LLFolde
 
     switch (vmi->getType())
     {
+    case LLGLTFFolderItem::TYPE_SCENE:
+        {
+            setTransformsEnabled(false);
+            LLSelectMgr::getInstance()->selectObjectOnly(mObject, SELECT_ALL_TES, -1, -1);
+            break;
+        }
     case LLGLTFFolderItem::TYPE_NODE:
         {
             setTransformsEnabled(true);
             loadNodeTransforms(vmi->getItemId());
+            LLSelectMgr::getInstance()->selectObjectOnly(mObject, SELECT_ALL_TES, vmi->getItemId(), 0);
+            break;
+        }
+    case LLGLTFFolderItem::TYPE_MESH:
+    case LLGLTFFolderItem::TYPE_SKIN:
+        {
+            if (item->getParent()) // should be a node
+            {
+                LLFolderViewFolder* parent = item->getParentFolder();
+                LLGLTFFolderItem* parent_vmi = static_cast<LLGLTFFolderItem*>(parent->getViewModelItem());
+                LLSelectMgr::getInstance()->selectObjectOnly(mObject, SELECT_ALL_TES, parent_vmi->getItemId(), 0);
+            }
+
+            setTransformsEnabled(false);
             break;
         }
     default:
diff --git a/indra/newview/llfloatergltfasseteditor.h b/indra/newview/llfloatergltfasseteditor.h
index e35ed30ed0..b0ba8941b9 100644
--- a/indra/newview/llfloatergltfasseteditor.h
+++ b/indra/newview/llfloatergltfasseteditor.h
@@ -42,6 +42,7 @@ namespace LL
 
 class LLSpinCtrl;
 class LLMenuButton;
+class LLViewerObject;
 
 class LLFloaterGLTFAssetEditor : public LLFloater
 {
@@ -51,6 +52,7 @@ public:
 
     bool postBuild() override;
     void onOpen(const LLSD& key) override;
+    void onClose(bool app_quitting) override;
     void initFolderRoot();
 
     LLGLTFViewModel& getRootViewModel() { return mGLTFViewModel; }
@@ -60,6 +62,8 @@ public:
     void loadFromNode(S32 node, LLFolderViewFolder* parent);
     void loadFromSelection();
 
+    void dirty();
+
 protected:
     void onFolderSelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action);
     void onCommitTransform();
@@ -69,8 +73,11 @@ protected:
     void setTransformsEnabled(bool val);
     void loadNodeTransforms(S32 id);
 
+    void clearRoot();
+
 private:
 
+    LLPointer<LLViewerObject> mObject;
     std::shared_ptr<LL::GLTF::Asset> mAsset;
 
     // Folder view related
@@ -79,6 +86,7 @@ private:
     LLPanel* mItemListPanel = nullptr;
     LLFolderView* mFolderRoot = nullptr;
     LLScrollContainer* mScroller = nullptr;
+    std::map<S32, LLFolderViewItem*> mNodeToItemMap;
 
     // Transforms panel
     LLVector3       mLastEulerDegrees;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index b3420f9c57..17f968b921 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -56,6 +56,7 @@
 #include "llattachmentsmgr.h"
 #include "llviewerwindow.h"
 #include "lldrawable.h"
+#include "llfloatergltfasseteditor.h"
 #include "llfloaterinspect.h"
 #include "llfloaterreporter.h"
 #include "llfloaterreg.h"
@@ -467,6 +468,11 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
     if (object->isSelected() ) {
         // make sure point at position is updated
         updatePointAt();
+        LLSelectNode* nodep = mSelectedObjects->findNode(object);
+        if (nodep)
+        {
+            nodep->selectGLTFNode(gltf_node, gltf_primitive, true);
+        }
         gEditMenuHandler = this;
         return NULL;
     }
@@ -7187,6 +7193,12 @@ void dialog_refresh_all()
     {
         panel_task_info->dirty();
     }
+
+    LLFloaterGLTFAssetEditor * gltf_editor = LLFloaterReg::getTypedInstance<LLFloaterGLTFAssetEditor>("gltf_asset_editor");
+    if (gltf_editor)
+    {
+        gltf_editor->dirty();
+    }
 }
 
 S32 get_family_count(LLViewerObject *parent)
-- 
cgit v1.2.3


From 08b933a0c67463f06f124420f16c8a3f7dc83f1f Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 3 Jul 2024 17:42:24 -0500
Subject: #1870 Tune up for better experience on integrated intel with low
 memory (#1872)

* More deterministic vsize calculation.   Add control for choosing downscale method.
* Quick hack to make GLTF preview work again
---
 indra/llfilesystem/llfilesystem.cpp     |   1 +
 indra/llmessage/llassetstorage.cpp      |   5 +-
 indra/llrender/llgl.h                   |   3 +
 indra/llrender/llimagegl.cpp            | 126 +++++++++++++++++------
 indra/llrender/llimagegl.h              |   5 +-
 indra/llrender/llrender.h               |   6 +-
 indra/llrender/llrendertarget.cpp       |  12 ++-
 indra/llrender/llrendertarget.h         |   4 +-
 indra/newview/app_settings/settings.xml |  13 ++-
 indra/newview/featuretable.txt          |   4 +-
 indra/newview/gltf/accessor.h           |   2 -
 indra/newview/gltf/asset.cpp            |   1 +
 indra/newview/gltf/common.h             |   2 +
 indra/newview/gltfscenemanager.cpp      |   6 ++
 indra/newview/llappviewer.cpp           |  12 ++-
 indra/newview/lldrawpoolalpha.cpp       |   4 -
 indra/newview/llface.cpp                |   4 +
 indra/newview/lltextureview.cpp         |  15 ++-
 indra/newview/llviewerassetstorage.cpp  |   1 +
 indra/newview/llviewertexture.cpp       |  87 ++++++++++------
 indra/newview/llviewertexture.h         |  23 +++--
 indra/newview/llviewertexturelist.cpp   | 173 +++++++++++++++++++++-----------
 indra/newview/llviewertexturelist.h     |  13 ++-
 indra/newview/llvograss.cpp             |   3 +
 indra/newview/llvotree.cpp              |   8 +-
 indra/newview/llvovolume.cpp            |  27 +++--
 indra/newview/pipeline.cpp              |   6 ++
 indra/newview/pipeline.h                |   3 +
 28 files changed, 404 insertions(+), 165 deletions(-)

(limited to 'indra')

diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 235aae0be3..912f48e216 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -79,6 +79,7 @@ LLFileSystem::~LLFileSystem()
 // static
 bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type)
 {
+    LL_PROFILE_ZONE_SCOPED;
     std::string id_str;
     file_id.toString(id_str);
     const std::string extra_info = "";
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 70a7a34a70..2de59c1b6a 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -484,6 +484,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
                                   void *user_data,
                                   bool is_priority)
 {
+    LL_PROFILE_ZONE_SCOPED;
+
     LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL;
 
     LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << LL_ENDL;
@@ -529,6 +531,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
 
     if (size > 0)
     {
+        LL_PROFILE_ZONE_NAMED("gad - file in cache");
         // we've already got the file
         // theoretically, partial files w/o a pending request shouldn't happen
         // unless there's a weird error
@@ -548,7 +551,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
         }
 
         bool duplicate = false;
-
+        LL_PROFILE_ZONE_NAMED("gad - check pending downloads");
         // check to see if there's a pending download of this uuid already
         for (request_list_t::iterator iter = mPendingDownloads.begin();
              iter != mPendingDownloads.end(); ++iter )
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 909dad2e85..be1c0a532a 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -102,6 +102,9 @@ public:
     bool mIsNVIDIA;
     bool mIsIntel;
 
+    // hints to the render pipe
+    U32 mDownScaleMethod = 0; // see settings.xml RenderDownScaleMethod
+
 #if LL_DARWIN
     // Needed to distinguish problem cards on older Macs that break with Materials
     bool mIsMobileGF;
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 956bcef352..34200ef5cb 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -57,6 +57,9 @@ const F32 MIN_TEXTURE_LIFETIME = 10.f;
 U32 wpo2(U32 i);
 
 
+U32 LLImageGL::sFrameCount = 0;
+
+
 // texture memory accounting (for macOS)
 static LLMutex sTexMemMutex;
 static std::unordered_map<U32, U64> sTextureAllocs;
@@ -1003,7 +1006,7 @@ bool should_stagger_image_set(bool compressed)
 #else
     // glTexSubImage2D doesn't work with compressed textures on select tested Nvidia GPUs on Windows 10 -Cosmic,2023-03-08
     // Setting media textures off-thread seems faster when not using sub_image_lines (Nvidia/Windows 10) -Cosmic,2023-03-31
-    return !compressed && on_main_thread();
+    return !compressed && on_main_thread() && !gGLManager.mIsIntel;
 #endif
 }
 
@@ -1185,13 +1188,37 @@ void LLImageGL::generateTextures(S32 numTextures, U32 *textures)
     }
 }
 
+// static
+void LLImageGL::updateClass()
+{
+    sFrameCount++;
+}
+
 // static
 void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
 {
+    // wait a few frames before actually deleting the textures to avoid
+    // synchronization issues with the GPU
+    static std::vector<U32> sFreeList[4];
+
     if (gGLManager.mInited)
     {
-        free_tex_images(numTextures, textures);
-        glDeleteTextures(numTextures, textures);
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+        U32 idx = sFrameCount % 4;
+
+        for (S32 i = 0; i < numTextures; ++i)
+        {
+            sFreeList[idx].push_back(textures[i]);
+        }
+
+        idx = (sFrameCount + 3) % 4;
+
+        if (!sFreeList[idx].empty())
+        {
+            glDeleteTextures((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
+            free_tex_images((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
+            sFreeList[idx].resize(0);
+        }
     }
 }
 
@@ -2335,44 +2362,85 @@ bool LLImageGL::scaleDown(S32 desired_discard)
     S32 desired_width = getWidth(desired_discard);
     S32 desired_height = getHeight(desired_discard);
 
-    U64 size = getBytes(desired_discard);
-    llassert(size <= 2048*2048*4); // we shouldn't be using this method to downscale huge textures, but it'll work
-    gGL.getTexUnit(0)->bind(this);
+    if (gGLManager.mDownScaleMethod == 0)
+    { // use an FBO to downscale the texture
+        // allocate new texture
+        U32 temp_texname = 0;
+        generateTextures(1, &temp_texname);
+        gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, temp_texname, true);
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glTexImage2D");
+            glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, NULL);
+        }
 
+        // account for new texture getting created
+        alloc_tex_image(desired_width, desired_height, mFormatPrimary);
 
-    if (sScratchPBO == 0)
-    {
-        glGenBuffers(1, &sScratchPBO);
-        sScratchPBOSize = 0;
-    }
+        // Use render-to-texture to scale down the texture
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glFramebufferTexture2D");
+            glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, mTarget, temp_texname, 0);
+        }
 
-    glBindBuffer(GL_PIXEL_PACK_BUFFER, sScratchPBO);
+        glViewport(0, 0, desired_width, desired_height);
 
-    if (size > sScratchPBOSize)
-    {
-        glBufferData(GL_PIXEL_PACK_BUFFER, size, NULL, GL_STREAM_COPY);
-        sScratchPBOSize = size;
+        // draw a full screen triangle
+        gGL.getTexUnit(0)->bind(this);
+        glDrawArrays(GL_TRIANGLES, 0, 3);
+        gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
+        // delete old texture and assign new texture name
+        deleteTextures(1, &mTexName);
+        mTexName = temp_texname;
+
+        if (mHasMipMaps)
+        { // generate mipmaps if needed
+            LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glGenerateMipmap");
+            gGL.getTexUnit(0)->bind(this);
+            glGenerateMipmap(mTarget);
+            gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+        }
     }
+    else
+    { // use a PBO to downscale the texture
+        U64 size = getBytes(desired_discard);
+        llassert(size <= 2048 * 2048 * 4); // we shouldn't be using this method to downscale huge textures, but it'll work
+        gGL.getTexUnit(0)->bind(this);
+
+        if (sScratchPBO == 0)
+        {
+            glGenBuffers(1, &sScratchPBO);
+            sScratchPBOSize = 0;
+        }
 
-    glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr);
+        glBindBuffer(GL_PIXEL_PACK_BUFFER, sScratchPBO);
 
-    free_tex_image(mTexName);
+        if (size > sScratchPBOSize)
+        {
+            glBufferData(GL_PIXEL_PACK_BUFFER, size, NULL, GL_STREAM_COPY);
+            sScratchPBOSize = size;
+        }
 
-    glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
+        glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr);
 
-    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, sScratchPBO);
-    glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
-    glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
+        free_tex_image(mTexName);
 
-    alloc_tex_image(desired_width, desired_height, mFormatPrimary);
+        glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
 
-    if (mHasMipMaps)
-    {
-        LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glGenerateMipmap");
-        glGenerateMipmap(mTarget);
-    }
+        glBindBuffer(GL_PIXEL_UNPACK_BUFFER, sScratchPBO);
+        glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
+        glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
 
-    gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+        alloc_tex_image(desired_width, desired_height, mFormatPrimary);
+
+        if (mHasMipMaps)
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glGenerateMipmap");
+            glGenerateMipmap(mTarget);
+        }
+
+        gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+    }
 
     mCurrentDiscardLevel = desired_discard;
 
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 3892e9c014..5073701c30 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -62,6 +62,9 @@ class LLImageGL : public LLRefCount
     friend class LLTexUnit;
 public:
 
+    // call once per frame
+    static void updateClass();
+
     // Get an estimate of how many bytes have been allocated in vram for textures.
     // Does not include mipmaps.
     // NOTE: multiplying this number by two gives a good estimate for total
@@ -276,7 +279,7 @@ protected:
 public:
     static std::unordered_set<LLImageGL*> sImageList;
     static S32 sCount;
-
+    static U32 sFrameCount;
     static F32 sLastFrameTime;
 
     // Global memory statistics
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index be9f3895e7..e6b4118beb 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -297,7 +297,11 @@ public:
         ALTERNATE_DIFFUSE_MAP = 1,
         NORMAL_MAP            = 1,
         SPECULAR_MAP          = 2,
-        NUM_TEXTURE_CHANNELS  = 3,
+        BASECOLOR_MAP         = 3,
+        METALLIC_ROUGHNESS_MAP = 4,
+        GLTF_NORMAL_MAP           = 5,
+        EMISSIVE_MAP          = 6,
+        NUM_TEXTURE_CHANNELS  = 7,
     };
 
     enum eVolumeTexIndex : U8
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index efdde77a32..60159a0497 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -426,14 +426,17 @@ void LLRenderTarget::bindTarget()
                             GL_COLOR_ATTACHMENT1,
                             GL_COLOR_ATTACHMENT2,
                             GL_COLOR_ATTACHMENT3};
-    glDrawBuffers(static_cast<GLsizei>(mTex.size()), drawbuffers);
 
     if (mTex.empty())
     { //no color buffer to draw to
         glDrawBuffer(GL_NONE);
         glReadBuffer(GL_NONE);
     }
-
+    else
+    {
+        glDrawBuffers(static_cast<GLsizei>(mTex.size()), drawbuffers);
+        glReadBuffer(GL_COLOR_ATTACHMENT0);
+    }
     check_framebuffer_status();
 
     glViewport(0, 0, mResX, mResY);
@@ -519,7 +522,8 @@ void LLRenderTarget::flush()
     llassert(sCurFBO == mFBO);
     llassert(sBoundTarget == this);
 
-    if (mGenerateMipMaps == LLTexUnit::TMG_AUTO) {
+    if (mGenerateMipMaps == LLTexUnit::TMG_AUTO)
+    {
         LL_PROFILE_GPU_ZONE("rt generate mipmaps");
         bindTexture(0, 0, LLTexUnit::TFO_TRILINEAR);
         glGenerateMipmap(GL_TEXTURE_2D);
@@ -540,6 +544,8 @@ void LLRenderTarget::flush()
         glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
         sCurResX = gGLViewport[2];
         sCurResY = gGLViewport[3];
+        glReadBuffer(GL_BACK);
+        glDrawBuffer(GL_BACK);
     }
 }
 
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 340276a752..a1adf93fa1 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -172,6 +172,8 @@ public:
     // *HACK
     void swapFBORefs(LLRenderTarget& other);
 
+    static LLRenderTarget* sBoundTarget;
+
 protected:
     U32 mResX;
     U32 mResY;
@@ -186,8 +188,6 @@ protected:
     U32 mMipLevels;
 
     LLTexUnit::eTextureType mUsage;
-
-    static LLRenderTarget* sBoundTarget;
 };
 
 #endif
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 09909aa9c4..7f645792a6 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7732,7 +7732,7 @@
     <key>Comment</key>
     <string>Minimum of available physical memory in MB before textures get scaled down</string>
     <key>Persist</key>
-    <integer>1</integer>
+    <integer>0</integer>
     <key>Type</key>
     <string>U32</string>
     <key>Value</key>
@@ -7771,6 +7771,17 @@
     <key>Value</key>
     <integer>2048</integer>
   </map>
+    <key>RenderDownScaleMethod</key>
+    <map>
+        <key>Comment</key>
+        <string>Method to use to downscale images.  0 - FBO, 1 - PBO</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>U32</string>
+        <key>Value</key>
+        <integer>1</integer>
+    </map>
     <key>RenderDebugTextureBind</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 03849a0326..af1587bd07 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 60
+version 61
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -76,6 +76,7 @@ RenderGLMultiThreadedMedia         1   1
 RenderReflectionProbeResolution 1 128
 RenderScreenSpaceReflections 1  1
 RenderMirrors				1	1
+RenderDownScaleMethod       1   1
 
 
 //
@@ -366,6 +367,7 @@ RenderAnisotropic			1	0
 RenderFSAASamples			1	0
 RenderGLContextCoreProfile  1   0
 RenderGLMultiThreadedMedia  1   0
+RenderDownScaleMethod       1   0
 
 list AMD
 RenderGLMultiThreadedTextures       1   1
diff --git a/indra/newview/gltf/accessor.h b/indra/newview/gltf/accessor.h
index ec68c5f624..85ea0f2967 100644
--- a/indra/newview/gltf/accessor.h
+++ b/indra/newview/gltf/accessor.h
@@ -36,8 +36,6 @@ namespace LL
 {
     namespace GLTF
     {
-        constexpr S32 INVALID_INDEX = -1;
-
         class Buffer
         {
         public:
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index a454e68a92..e07befef3b 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -476,6 +476,7 @@ void Asset::update()
                 { // HACK - force texture to be loaded full rez
                     // TODO: calculate actual vsize
                     image.mTexture->addTextureStats(2048.f * 2048.f);
+                    image.mTexture->setBoostLevel(LLViewerTexture::BOOST_HIGH);
                 }
             }
         }
diff --git a/indra/newview/gltf/common.h b/indra/newview/gltf/common.h
index b9698d4017..742daff715 100644
--- a/indra/newview/gltf/common.h
+++ b/indra/newview/gltf/common.h
@@ -43,6 +43,8 @@ namespace LL
 {
     namespace GLTF
     {
+        constexpr S32 INVALID_INDEX = -1;
+
         using Value = boost::json::value;
 
         using mat4 = glm::mat4;
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index b161ec8492..58179f9dc3 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -345,6 +345,12 @@ void GLTFSceneManager::addGLTFObject(LLViewerObject* obj, LLUUID gltf_id)
     llassert(obj->getVolume()->getParams().getSculptID() == gltf_id);
     llassert(obj->getVolume()->getParams().getSculptType() == LL_SCULPT_TYPE_GLTF);
 
+    if (obj->mGLTFAsset)
+    { // object already has a GLTF asset, don't reload it
+        llassert(std::find(mObjects.begin(), mObjects.end(), obj) != mObjects.end());
+        return;
+    }
+
     obj->ref();
     gAssetStorage->getAssetData(gltf_id, LLAssetType::AT_GLTF, onGLTFLoadComplete, obj);
 }
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 51099a480d..ac689f7319 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2210,10 +2210,10 @@ bool LLAppViewer::initThreads()
         cores = llmin(cores, (S32) max_cores);
     }
 
-    // The only configurable thread count right now is ImageDecode
-    // The viewer typically starts around 8 threads not including image decode,
-    // so try to leave at least one core free
-    S32 image_decode_count = llclamp(cores - 9, 1, 8);
+    // always use at least 2 threads for image decoding to prevent
+    // a single texture blocking all other textures from decoding
+    S32 image_decode_count = llclamp(cores - 6, 2, 16);
+
     threadCounts["ImageDecode"] = image_decode_count;
     gSavedSettings.setLLSD("ThreadPoolSizes", threadCounts);
 
@@ -4609,6 +4609,10 @@ void LLAppViewer::idle()
 
     LLGLTFMaterialList::flushUpdates();
 
+    static LLCachedControl<U32> downscale_method(gSavedSettings, "RenderDownScaleMethod");
+    gGLManager.mDownScaleMethod = downscale_method;
+    LLImageGL::updateClass();
+
     // Service the WorkQueue we use for replies from worker threads.
     // Use function statics for the timeslice setting so we only have to fetch
     // and convert MainWorkTime once.
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 34da5b29d4..2d702ecf32 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -81,10 +81,6 @@ LLDrawPoolAlpha::~LLDrawPoolAlpha()
 void LLDrawPoolAlpha::prerender()
 {
     mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
-
-    // TODO: is this even necessay?  These are probably set to never discard
-    LLViewerFetchedTexture::sFlatNormalImagep->addTextureStats(1024.f*1024.f);
-    LLViewerFetchedTexture::sWhiteImagep->addTextureStats(1024.f * 1024.f);
 }
 
 S32 LLDrawPoolAlpha::getNumPostDeferredPasses()
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 0e8e64af69..777ea611b0 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -169,6 +169,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
     mImportanceToCamera = 0.f ;
     mBoundingSphereRadius = 0.0f ;
 
+    mTexExtents[0].set(0, 0);
+    mTexExtents[1].set(1, 1);
     mHasMedia = false ;
     mIsMediaAllowed = true;
 }
@@ -2047,10 +2049,12 @@ void LLFace::resetVirtualSize()
 F32 LLFace::getTextureVirtualSize()
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+
     F32 radius;
     F32 cos_angle_to_view_dir;
     bool in_frustum = calcPixelArea(cos_angle_to_view_dir, radius);
 
+
     if (mPixelArea < F_ALMOST_ZERO || !in_frustum)
     {
         setVirtualSize(0.f) ;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 9d7319d5b8..9e86548c2d 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -530,6 +530,9 @@ void LLGLTexMemBar::draw()
    F64 raw_image_bytes_MB = raw_image_bytes / (1024.0 * 1024.0);
    F64 saved_raw_image_bytes_MB = saved_raw_image_bytes / (1024.0 * 1024.0);
    F64 aux_raw_image_bytes_MB = aux_raw_image_bytes / (1024.0 * 1024.0);
+   F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 1024.0 * 1.3333f; // add 33% for mipmaps
+   F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 1024.0;
+   F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 1024.0;
 
     //----------------------------------------------------------------------------
     LLGLSUIDefault gls_ui;
@@ -559,7 +562,7 @@ void LLGLTexMemBar::draw()
 
     // draw a background above first line.... no idea where the rest of the background comes from for the below text
     gGL.color4f(0.f, 0.f, 0.f, 0.25f);
-    gl_rect_2d(-10, getRect().getHeight() + line_height + 1, getRect().getWidth()+2, getRect().getHeight()+2);
+    gl_rect_2d(-10, getRect().getHeight() + line_height*2 + 1, getRect().getWidth()+2, getRect().getHeight()+2);
 
     text = llformat("Est. Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
                     (S32)LLViewerTexture::sFreeVRAMMegabytes,
@@ -568,12 +571,20 @@ void LLGLTexMemBar::draw()
                     discard_bias,
                     cache_usage,
                     cache_max_usage);
-    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*7,
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*8,
                                              text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
     text = llformat("Images: %d   Raw: %d (%.2f MB)  Saved: %d (%.2f MB) Aux: %d (%.2f MB)", image_count, raw_image_count, raw_image_bytes_MB,
         saved_raw_image_count, saved_raw_image_bytes_MB,
         aux_raw_image_count, aux_raw_image_bytes_MB);
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height * 7,
+        text_color, LLFontGL::LEFT, LLFontGL::TOP);
+
+    text = llformat("Textures: %.2f MB  Vertex: %.2f MB  Render: %.2f MB  Total: %.2f MB",
+                    texture_bytes_alloc,
+                    vertex_bytes_alloc,
+                    render_bytes_alloc,
+        texture_bytes_alloc+vertex_bytes_alloc+render_bytes_alloc);
     LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height * 6,
         text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 26707f5d9a..5ab9f76e47 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -376,6 +376,7 @@ void LLViewerAssetStorage::queueRequestHttp(
     bool duplicate,
     bool is_priority)
 {
+    LL_PROFILE_ZONE_SCOPED;
     LL_DEBUGS("ViewerAsset") << "Request asset via HTTP " << uuid << " type " << LLAssetType::lookup(atype) << LL_ENDL;
 
     bool with_http = true;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index b2ed86707c..99c917ca6f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -89,7 +89,7 @@ S32 LLViewerTexture::sRawCount = 0;
 S32 LLViewerTexture::sAuxCount = 0;
 LLFrameTimer LLViewerTexture::sEvaluationTimer;
 F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
-F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
+
 S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
 const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
 const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez;
@@ -513,15 +513,18 @@ void LLViewerTexture::updateClass()
     F32 target = llmax(budget - 512.f, MIN_VRAM_BUDGET);
     sFreeVRAMMegabytes = target - used;
 
-    F32 over_pct = llmax((used-target) / target, 0.f);
+    F32 over_pct = (used - target) / target;
+
+    bool is_low = over_pct > 0.f;
 
     if (isSystemMemoryLow())
     {
+        is_low = true;
         // System RAM is low -> ramp up discard bias over time to free memory
         if (sEvaluationTimer.getElapsedTimeF32() > MEMORY_CHECK_WAIT_TIME)
         {
             static LLCachedControl<F32> low_mem_min_discard_increment(gSavedSettings, "RenderLowMemMinDiscardIncrement", .1f);
-            sDesiredDiscardBias += llmax(low_mem_min_discard_increment, over_pct);
+            sDesiredDiscardBias += (F32) low_mem_min_discard_increment * (F32) gFrameIntervalSeconds;
             sEvaluationTimer.reset();
         }
     }
@@ -529,12 +532,28 @@ void LLViewerTexture::updateClass()
     {
         sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);
 
-        if (sDesiredDiscardBias > 1.f)
+        if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
         {
             sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01;
         }
     }
 
+    static bool was_low = false;
+    if (is_low && !was_low)
+    {
+        LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
+        sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
+
+        for (auto image : gTextureList)
+        {
+            gTextureList.updateImageDecodePriority(image);
+        }
+    }
+
+    was_low = is_low;
+
+    sDesiredDiscardBias = llclamp(sDesiredDiscardBias, 1.f, 3.f);
+
     LLViewerTexture::sFreezeImageUpdates = false;
 }
 
@@ -615,16 +634,15 @@ void LLViewerTexture::init(bool firstinit)
     mParcelMedia = NULL;
 
     memset(&mNumVolumes, 0, sizeof(U32)* LLRender::NUM_VOLUME_TEXTURE_CHANNELS);
-    mFaceList[LLRender::DIFFUSE_MAP].clear();
-    mFaceList[LLRender::NORMAL_MAP].clear();
-    mFaceList[LLRender::SPECULAR_MAP].clear();
-    mNumFaces[LLRender::DIFFUSE_MAP] =
-    mNumFaces[LLRender::NORMAL_MAP] =
-    mNumFaces[LLRender::SPECULAR_MAP] = 0;
-
     mVolumeList[LLRender::LIGHT_TEX].clear();
     mVolumeList[LLRender::SCULPT_TEX].clear();
 
+    for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; i++)
+    {
+        mNumFaces[i] = 0;
+        mFaceList[i].clear();
+    }
+
     mMainQueue  = LL::WorkQueue::getInstance("mainloop");
     mImageQueue = LL::WorkQueue::getInstance("LLImageGL");
 }
@@ -1608,7 +1626,11 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
             }
             else
             {
-                gTextureList.mCreateTextureList.insert(this);
+                if (!mCreatePending)
+                {
+                    mCreatePending = true;
+                    gTextureList.mCreateTextureList.push(this);
+                }
             }
         }
     }
@@ -1632,13 +1654,12 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
 
 void LLViewerFetchedTexture::setDebugText(const std::string& text)
 {
-    for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+    for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
     {
-        llassert(mNumFaces[ch] <= mFaceList[ch].size());
-
-        for (U32 i = 0; i < mNumFaces[ch]; i++)
+        for (S32 fi = 0; fi < getNumFaces(i); ++fi)
         {
-            LLFace* facep = mFaceList[ch][i];
+            LLFace* facep = (*(getFaceList(i)))[fi];
+
             if (facep)
             {
                 LLDrawable* drawable = facep->getDrawable();
@@ -1651,10 +1672,15 @@ void LLViewerFetchedTexture::setDebugText(const std::string& text)
     }
 }
 
+extern bool gCubeSnapshot;
+
 //virtual
 void LLViewerFetchedTexture::processTextureStats()
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+    llassert(!gCubeSnapshot);  // should only be called when the main camera is active
+    llassert(!LLPipeline::sShadowRender);
+
     if(mFullyLoaded)
     {
         if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more
@@ -2859,6 +2885,8 @@ void LLViewerLODTexture::processTextureStats()
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     updateVirtualSize();
 
+    bool did_downscale = false;
+
     static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
 
     { // restrict texture resolution to download based on RenderMaxTextureResolution
@@ -2916,10 +2944,7 @@ void LLViewerLODTexture::processTextureStats()
             mDiscardVirtualSize = mMaxVirtualSize;
             mCalculatedDiscardLevel = discard_level;
         }
-        if (mBoostLevel < LLGLTexture::BOOST_SCULPTED)
-        {
-            discard_level *= sDesiredDiscardScale; // scale (default 1.1f)
-        }
+
         discard_level = floorf(discard_level);
 
         F32 min_discard = 0.f;
@@ -2945,10 +2970,9 @@ void LLViewerLODTexture::processTextureStats()
         //
 
         S32 current_discard = getDiscardLevel();
-        if (mBoostLevel < LLGLTexture::BOOST_AVATAR_BAKED &&
-            current_discard >= 0)
+        if (mBoostLevel < LLGLTexture::BOOST_AVATAR_BAKED)
         {
-            if (current_discard < (mDesiredDiscardLevel-1) && !mForceToSaveRawImage)
+            if (current_discard < mDesiredDiscardLevel && !mForceToSaveRawImage)
             { // should scale down
                 scaleDown();
             }
@@ -2968,9 +2992,6 @@ void LLViewerLODTexture::processTextureStats()
         mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
     }
 
-    // decay max virtual size over time
-    mMaxVirtualSize *= 0.8f;
-
     // selection manager will immediately reset BOOST_SELECTED but never unsets it
     // unset it immediately after we consume it
     if (getBoostLevel() == BOOST_SELECTED)
@@ -2979,14 +3000,22 @@ void LLViewerLODTexture::processTextureStats()
     }
 }
 
+extern LLGLSLShader gCopyProgram;
+
 bool LLViewerLODTexture::scaleDown()
 {
-    if (mGLTexturep.isNull())
+    if (mGLTexturep.isNull() || !mGLTexturep->getHasGLTexture())
     {
         return false;
     }
 
-    return mGLTexturep->scaleDown(mDesiredDiscardLevel);
+    if (!mDownScalePending)
+    {
+        mDownScalePending = true;
+        gTextureList.mDownScaleQueue.push(this);
+    }
+
+    return true;
 }
 
 //----------------------------------------------------------------------------------------------
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index b1e0494a30..5b2e3aaab7 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -37,6 +37,7 @@
 #include "llmetricperformancetester.h"
 #include "httpcommon.h"
 #include "workqueue.h"
+#include "gltf/common.h"
 
 #include <map>
 #include <list>
@@ -102,7 +103,6 @@ public:
         DYNAMIC_TEXTURE,
         FETCHED_TEXTURE,
         LOD_TEXTURE,
-        ATLAS_TEXTURE,
         INVALID_TEXTURE_TYPE
     };
 
@@ -173,6 +173,15 @@ public:
     LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;}
 
     /*virtual*/ void updateBindStatsForTester() ;
+
+    struct MaterialEntry
+    {
+        S32 mIndex = LL::GLTF::INVALID_INDEX;
+        std::shared_ptr<LL::GLTF::Asset> mAsset;
+    };
+    typedef std::vector<MaterialEntry> material_list_t;
+    material_list_t   mMaterialList;  // reverse pointer pointing to LL::GLTF::Materials using this image as texture
+
 protected:
     void cleanup() ;
     void init(bool firstinit) ;
@@ -214,7 +223,6 @@ public:
     static S32 sAuxCount;
     static LLFrameTimer sEvaluationTimer;
     static F32 sDesiredDiscardBias;
-    static F32 sDesiredDiscardScale;
     static S32 sMaxSculptRez ;
     static U32 sMinLargeImageSize ;
     static U32 sMaxSmallImageSize ;
@@ -414,6 +422,9 @@ public:
 
     /*virtual*/bool  isActiveFetching() override; //is actively in fetching by the fetching pipeline.
 
+    bool mCreatePending = false;    // if true, this is in gTextureList.mCreateTextureList
+    mutable bool mDownScalePending = false; // if true, this is in gTextureList.mDownScaleQueue
+
 protected:
     S32 getCurrentDiscardLevelForFetching() ;
     void forceToRefetchTexture(S32 desired_discard = 0, F32 kept_time = 60.f);
@@ -424,11 +435,6 @@ private:
 
     void saveRawImage() ;
 
-    //for atlas
-    void resetFaceAtlas() ;
-    void invalidateAtlas(bool rebuild_geom) ;
-    bool insertToAtlas() ;
-
 private:
     bool  mFullyLoaded;
     bool  mInDebug;
@@ -539,9 +545,10 @@ public:
     /*virtual*/ void processTextureStats();
     bool isUpdateFrozen() ;
 
+    bool scaleDown();
+
 private:
     void init(bool firstinit) ;
-    bool scaleDown() ;
 
 private:
     F32 mDiscardVirtualSize;        // Virtual size used to calculate desired discard
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 2f685474e1..c436566297 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -70,6 +70,8 @@ S32 LLViewerTextureList::sNumImages = 0;
 
 LLViewerTextureList gTextureList;
 
+extern LLGLSLShader gCopyProgram;
+
 ETexListType get_element_type(S32 priority)
 {
     return (priority == LLViewerFetchedTexture::BOOST_ICON || priority == LLViewerFetchedTexture::BOOST_THUMBNAIL) ? TEX_LIST_SCALE : TEX_LIST_STANDARD;
@@ -352,8 +354,11 @@ void LLViewerTextureList::shutdown()
     mCallbackList.clear();
 
     // Flush all of the references
-    mLoadingStreamList.clear();
-    mCreateTextureList.clear();
+    while (!mCreateTextureList.empty())
+    {
+        mCreateTextureList.front()->mCreatePending = false;
+        mCreateTextureList.pop();
+    }
     mFastCacheList.clear();
 
     mUUIDMap.clear();
@@ -897,14 +902,6 @@ void LLViewerTextureList::clearFetchingRequests()
     }
 }
 
-static void touch_texture(LLViewerFetchedTexture* tex, F32 vsize)
-{
-    if (tex)
-    {
-        tex->addTextureStats(vsize);
-    }
-}
-
 extern bool gCubeSnapshot;
 
 void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep)
@@ -921,58 +918,67 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
     static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
 
+    if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
+    { // reset max virtual size for unboosted LOD_TEXTURES
+        // this is an alternative to decaying mMaxVirtualSize over time
+        // that keeps textures from continously downrezzing and uprezzing in the background
+        imagep->mMaxVirtualSize = 0.f;
+    }
+
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE
+    for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
     {
-        for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
+        for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
         {
-            for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
+            LLFace* face = (*(imagep->getFaceList(i)))[fi];
+
+            if (face && face->getViewerObject())
             {
-                LLFace* face = (*(imagep->getFaceList(i)))[fi];
+                F32 radius;
+                F32 cos_angle_to_view_dir;
+                bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
+                static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
+                F32 vsize = face->getPixelArea();
+
+                // Scale desired texture resolution higher or lower depending on texture scale
+                //
+                // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
+                // shows one letter at a time
+                //
+                // Maximum usage examples: huge chunk of terrain repeats texture
+                const LLTextureEntry* te = face->getTextureEntry();
+                F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
+                min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
+                vsize /= min_scale;
+
+                // if bias is > 2, apply to on-screen textures as well
+                bool apply_bias = LLViewerTexture::sDesiredDiscardBias > 2.f;
+
+                // apply bias to off screen objects or objects that are small on screen all the time
+                if (!in_frustum || !face->getDrawable()->isVisible() || face->getImportanceToCamera() < bias_unimportant_threshold)
+                { // further reduce by discard bias when off screen or occluded
+                    apply_bias = true;
+                }
 
-                if (face && face->getViewerObject() && face->getTextureEntry())
+                if (apply_bias)
                 {
-                    F32 radius;
-                    F32 cos_angle_to_view_dir;
-                    BOOL in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
-                    static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
-                    F32 vsize = face->getPixelArea();
-
-                    // Scale desired texture resolution higher or lower depending on texture scale
-                    //
-                    // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
-                    // shows one letter at a time
-                    //
-                    // Maximum usage examples: huge chunk of terrain repeats texture
-                    const LLTextureEntry* te = face->getTextureEntry();
-                    F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
-                    min_scale = llclamp(min_scale*min_scale, texture_scale_min(), texture_scale_max());
-
-                    vsize /= min_scale;
-                    if (!in_frustum || !face->getDrawable()->isVisible() || face->getImportanceToCamera() < bias_unimportant_threshold)
-                    { // further reduce by discard bias when off screen or occluded
-                        vsize /= LLViewerTexture::sDesiredDiscardBias;
-                    }
-                    // if a GLTF material is present, ignore that face
-                    // as far as this texture stats go, but update the GLTF material
-                    // stats
-                    LLFetchedGLTFMaterial* mat = te ? (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial() : nullptr;
-                    llassert(mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(te->getGLTFRenderMaterial()) != nullptr);
-                    if (mat)
-                    {
-                        touch_texture(mat->mBaseColorTexture, vsize);
-                        touch_texture(mat->mNormalTexture, vsize);
-                        touch_texture(mat->mMetallicRoughnessTexture, vsize);
-                        touch_texture(mat->mEmissiveTexture, vsize);
-                    }
-                    else
-                    {
-                        imagep->addTextureStats(vsize);
-                    }
+                    F32 bias = powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f);
+                    bias = llround(bias);
+                    vsize /= bias;
                 }
+
+                imagep->addTextureStats(vsize);
             }
         }
     }
 
+    // make sure to addTextureStats for any spotlights that are using this texture
+    for (S32 vi = 0; vi < imagep->getNumVolumes(LLRender::LIGHT_TEX); ++vi)
+    {
+        LLVOVolume* volume = (*imagep->getVolumeList(LLRender::LIGHT_TEX))[vi];
+        volume->updateSpotLightPriority();
+    }
+
     //imagep->setDebugText(llformat("%.3f - %d", sqrtf(imagep->getMaxVirtualSize()), imagep->getBoostLevel()));
 
     F32 lazy_flush_timeout = 30.f; // stop decoding
@@ -1066,22 +1072,65 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
     //
 
     LLTimer create_timer;
-    image_list_t::iterator enditer = mCreateTextureList.begin();
-    for (image_list_t::iterator iter = mCreateTextureList.begin();
-         iter != mCreateTextureList.end();)
+
+    if (!mDownScaleQueue.empty() && gPipeline.mDownResMap.isComplete())
     {
-        image_list_t::iterator curiter = iter++;
-        enditer = iter;
-        LLViewerFetchedTexture *imagep = *curiter;
+        // just in case we downres textures, bind downresmap and copy program
+        gPipeline.mDownResMap.bindTarget();
+        gCopyProgram.bind();
+        gPipeline.mScreenTriangleVB->setBuffer();
+
+        // give time to downscaling first -- if mDownScaleQueue is not empty, we're running out of memory and need
+        // to free up memory by discarding off screen textures quickly
+
+        // do at least 5 and make sure we don't get too far behind even if it violates
+        // the time limit.  If we don't downscale quickly the viewer will hit swap and may
+        // freeze.
+        S32 min_count = (S32)mCreateTextureList.size() / 20 + 5;
+
+        while (!mDownScaleQueue.empty())
+        {
+            LLViewerFetchedTexture* image = mDownScaleQueue.front();
+            llassert(image->mDownScalePending);
+
+            LLImageGL* img = image->getGLTexture();
+            if (img && img->getHasGLTexture())
+            {
+                img->scaleDown(image->getDesiredDiscardLevel());
+            }
+
+            image->mDownScalePending = false;
+            mDownScaleQueue.pop();
+
+            if (create_timer.getElapsedTimeF32() > max_time && --min_count <= 0)
+            {
+                break;
+            }
+        }
+
+        gCopyProgram.unbind();
+        gPipeline.mDownResMap.flush();
+    }
+
+    // do at least 5 and make sure we don't get too far behind even if it violates
+    // the time limit.  Textures pending creation have a copy of their texture data
+    // in system memory, so we don't want to let them pile up.
+    S32 min_count = (S32) mCreateTextureList.size() / 20 + 5;
+
+    while (!mCreateTextureList.empty())
+    {
+        LLViewerFetchedTexture *imagep =  mCreateTextureList.front();
+        llassert(imagep->mCreatePending);
         imagep->createTexture();
         imagep->postCreateTexture();
+        imagep->mCreatePending = false;
+        mCreateTextureList.pop();
 
-        if (create_timer.getElapsedTimeF32() > max_time)
+        if (create_timer.getElapsedTimeF32() > max_time && --min_count <= 0)
         {
             break;
         }
     }
-    mCreateTextureList.erase(mCreateTextureList.begin(), enditer);
     return create_timer.getElapsedTimeF32();
 }
 
@@ -1124,7 +1173,10 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
         removeImageFromList(imagep);
     }
 
-    imagep->processTextureStats();
+    if (!gCubeSnapshot)
+    { // never call processTextureStats in a cube snapshot
+        imagep->processTextureStats();
+    }
     imagep->sMaxVirtualSize = LLViewerFetchedTexture::sMaxVirtualSize;
     addImageToList(imagep);
 
@@ -1134,6 +1186,7 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
 F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+
     typedef std::vector<LLPointer<LLViewerFetchedTexture> > entries_list_t;
     entries_list_t entries;
 
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 2779ad9f91..813fda1647 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -144,12 +144,13 @@ public:
     void clearFetchingRequests();
     void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
 
-private:
     // do some book keeping on the specified texture
     // - updates decode priority
     // - updates desired discard level
     // - cleans up textures that haven't been referenced in awhile
     void updateImageDecodePriority(LLViewerFetchedTexture* imagep);
+
+private:
     F32  updateImagesCreateTextures(F32 max_time);
     F32  updateImagesFetchTextures(F32 max_time);
     void updateImagesUpdateStats();
@@ -211,8 +212,14 @@ private:
 
 public:
     typedef std::unordered_set<LLPointer<LLViewerFetchedTexture> > image_list_t;
-    image_list_t mLoadingStreamList;
-    image_list_t mCreateTextureList;
+    typedef std::queue<LLPointer<LLViewerFetchedTexture> > image_queue_t;
+
+    // images that have been loaded but are waiting to be uploaded to GL
+    image_queue_t mCreateTextureList;
+
+    // images that must be downscaled quickly so we don't run out of memory
+    image_queue_t mDownScaleQueue;
+
     image_list_t mCallbackList;
     image_list_t mFastCacheList;
 
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index e04bdbf1d9..6903af2619 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -451,6 +451,9 @@ void LLVOGrass::plantBlades()
         face->setVertexBuffer(NULL);
         face->setTEOffset(0);
         face->mCenterLocal = mPosition + mRegionp->getOriginAgent();
+        const LLVector4a* ext = mDrawable->getSpatialExtents();
+        face->mExtents[0] = ext[0];
+        face->mExtents[1] = ext[1];
     }
 
     mDepth = (face->mCenterLocal - LLViewerCamera::getInstance()->getOrigin())*LLViewerCamera::getInstance()->getAtAxis();
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index a981c60ef2..d982592ee7 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -461,9 +461,7 @@ void LLVOTree::updateTextures()
         {
             setDebugText(llformat("%4.0f", (F32) sqrt(mPixelArea)));
         }
-        mTreeImagep->addTextureStats(mPixelArea);
     }
-
 }
 
 
@@ -479,7 +477,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline)
     // Just a placeholder for an actual object...
     LLFace *facep = mDrawable->addFace(poolp, mTreeImagep);
     facep->setSize(1, 3);
-
+    facep->setTexture(LLRender::DIFFUSE_MAP, mTreeImagep);
     updateRadius();
 
     return mDrawable;
@@ -1169,6 +1167,10 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
     LLVector4a pos;
     pos.load3(center.mV);
     mDrawable->setPositionGroup(pos);
+
+    LLFace* facep = mDrawable->getFace(0);
+    facep->mExtents[0] = newMin;
+    facep->mExtents[1] = newMax;
 }
 
 bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7ca3fbd1ad..45713071bb 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5745,18 +5745,23 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                 {
                     continue;
                 }
-#if 0
-#if LL_RELEASE_WITH_DEBUG_INFO
-                const LLUUID pbr_id( "49c88210-7238-2a6b-70ac-92d4f35963cf" );
-                const LLUUID obj_id( vobj->getID() );
-                bool is_pbr = (obj_id == pbr_id);
-#else
-                bool is_pbr = false;
-#endif
-#else
-                LLGLTFMaterial *gltf_mat = facep->getTextureEntry()->getGLTFRenderMaterial();
+
+                LLFetchedGLTFMaterial *gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial();
                 bool is_pbr = gltf_mat != nullptr;
-#endif
+
+                if (is_pbr)
+                {
+                    // tell texture streaming system to ignore blinn-phong textures
+                    facep->setTexture(LLRender::DIFFUSE_MAP, nullptr);
+                    facep->setTexture(LLRender::NORMAL_MAP, nullptr);
+                    facep->setTexture(LLRender::SPECULAR_MAP, nullptr);
+
+                    // let texture streaming system know about PBR textures
+                    facep->setTexture(LLRender::BASECOLOR_MAP, gltf_mat->mBaseColorTexture);
+                    facep->setTexture(LLRender::GLTF_NORMAL_MAP, gltf_mat->mNormalTexture);
+                    facep->setTexture(LLRender::METALLIC_ROUGHNESS_MAP, gltf_mat->mMetallicRoughnessTexture);
+                    facep->setTexture(LLRender::EMISSIVE_MAP, gltf_mat->mEmissiveTexture);
+                }
 
                 //ALWAYS null out vertex buffer on rebuild -- if the face lands in a render
                 // batch, it will recover its vertex buffer reference from the spatial group
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b9b1264b16..f83774c39e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -865,6 +865,10 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
     const U32 post_color_fmt = post_hdr ? GL_RGBA16F : GL_RGBA;
     mPostMap.allocate(resX, resY, post_color_fmt);
 
+    // used to scale down textures
+    // See LLViwerTextureList::updateImagesCreateTextures and LLImageGL::scaleDown
+    mDownResMap.allocate(4, 4, GL_RGBA);
+
     //HACK make screenbuffer allocations start failing after 30 seconds
     if (gSavedSettings.getBOOL("SimulateFBOFailure"))
     {
@@ -1111,6 +1115,8 @@ void LLPipeline::releaseGLBuffers()
 
     mPostMap.release();
 
+    mDownResMap.release();
+
     for (U32 i = 0; i < 3; i++)
     {
         mGlow[i].release();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 1d2033b4f0..6c79d20149 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -725,6 +725,9 @@ public:
     // tonemapped and gamma corrected render ready for post
     LLRenderTarget          mPostMap;
 
+    // downres scratch space for GPU downscaling of textures
+    LLRenderTarget          mDownResMap;
+
     LLCullResult            mSky;
     LLCullResult            mReflectedObjects;
     LLCullResult            mRefractedObjects;
-- 
cgit v1.2.3


From b099dbef27f2af47a421bb9848cfbca1aaa08327 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 4 Jul 2024 07:19:15 +0300
Subject: viewer#1131 Sync 'transform' arrows with UI

---
 indra/newview/llfloatergltfasseteditor.cpp | 2 +-
 indra/newview/llviewerobject.cpp           | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index c1946e9f96..13e0d36c35 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -155,7 +155,6 @@ void LLFloaterGLTFAssetEditor::onClose(bool app_quitting)
     gIdleCallbacks.deleteFunction(idle, this);
     mAsset = nullptr;
     mObject = nullptr;
-
 }
 
 void LLFloaterGLTFAssetEditor::clearRoot()
@@ -458,6 +457,7 @@ void LLFloaterGLTFAssetEditor::loadNodeTransforms(S32 node_id)
     }
 
     LL::GLTF::Node& node = mAsset->mNodes[node_id];
+    node.makeTRSValid();
 
     mCtrlPosX->set(node.mTranslation[0]);
     mCtrlPosY->set(node.mTranslation[1]);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 232b020d3d..85017c61ed 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4418,6 +4418,7 @@ void LLViewerObject::moveGLTFNode(S32 node_index, const LLVector3& offset)
         matMul(trans, mat, mat);
 
         node.mMatrix = glm::make_mat4(mat.getF32ptr());
+        node.mTRSValid = false;
 
         // TODO -- only update transforms for this node and its children (or use a dirty flag)
         mGLTFAsset->updateTransforms();
-- 
cgit v1.2.3


From 59312bf209c5fcdb27c283caaa2ed36502ec7a33 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 3 Jul 2024 17:32:45 -0400
Subject: Introduce string_view to LLSD map functions to reduce string
 temporaries

---
 indra/llcommon/llsd.cpp        | 55 ++++++++++++++++++++++++------------------
 indra/llcommon/llsd.h          | 28 ++++++++++-----------
 indra/llui/llnotifications.cpp |  2 +-
 3 files changed, 45 insertions(+), 40 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index b36ff7d263..a9cd8c597e 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -145,11 +145,11 @@ public:
 
     virtual String asXMLRPCValue() const { return "<nil/>"; }
 
-    virtual bool has(const String&) const       { return false; }
-    virtual LLSD get(const String&) const       { return LLSD(); }
+    virtual bool has(std::string_view) const      { return false; }
+    virtual LLSD get(std::string_view) const      { return LLSD(); }
     virtual LLSD getKeys() const                { return LLSD::emptyArray(); }
     virtual void erase(const String&)           { }
-    virtual const LLSD& ref(const String&) const{ return undef(); }
+    virtual const LLSD& ref(std::string_view) const{ return undef(); }
 
     virtual size_t size() const                 { return 0; }
     virtual LLSD get(size_t) const              { return LLSD(); }
@@ -390,7 +390,7 @@ namespace
     class ImplMap : public LLSD::Impl
     {
     private:
-        typedef std::map<LLSD::String, LLSD> DataMap;
+        typedef std::map<LLSD::String, LLSD, std::less<>> DataMap;
 
         DataMap mData;
 
@@ -419,17 +419,17 @@ namespace
             return os.str();
         }
 
-        virtual bool has(const LLSD::String&) const;
+        virtual bool has(std::string_view) const;
 
         using LLSD::Impl::get; // Unhiding get(size_t)
         using LLSD::Impl::erase; // Unhiding erase(size_t)
         using LLSD::Impl::ref; // Unhiding ref(size_t)
-        virtual LLSD get(const LLSD::String&) const;
+        virtual LLSD get(std::string_view) const;
         virtual LLSD getKeys() const;
-                void insert(const LLSD::String& k, const LLSD& v);
+        void insert(std::string_view k, const LLSD& v);
         virtual void erase(const LLSD::String&);
-                      LLSD& ref(const LLSD::String&);
-        virtual const LLSD& ref(const LLSD::String&) const;
+                      LLSD& ref(std::string_view);
+        virtual const LLSD& ref(std::string_view) const;
 
         virtual size_t size() const { return mData.size(); }
 
@@ -457,14 +457,14 @@ namespace
         }
     }
 
-    bool ImplMap::has(const LLSD::String& k) const
+    bool ImplMap::has(const std::string_view k) const
     {
         LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
         DataMap::const_iterator i = mData.find(k);
         return i != mData.end();
     }
 
-    LLSD ImplMap::get(const LLSD::String& k) const
+    LLSD ImplMap::get(const std::string_view k) const
     {
         LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
         DataMap::const_iterator i = mData.find(k);
@@ -484,10 +484,10 @@ namespace
         return keys;
     }
 
-    void ImplMap::insert(const LLSD::String& k, const LLSD& v)
+    void ImplMap::insert(std::string_view k, const LLSD& v)
     {
         LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
-        mData.insert(DataMap::value_type(k, v));
+        mData.emplace(k, v);
     }
 
     void ImplMap::erase(const LLSD::String& k)
@@ -496,15 +496,22 @@ namespace
         mData.erase(k);
     }
 
-    LLSD& ImplMap::ref(const LLSD::String& k)
+    LLSD& ImplMap::ref(std::string_view k)
     {
-        return mData[k];
+        DataMap::iterator i = mData.lower_bound(k);
+        if (i == mData.end() || mData.key_comp()(k, i->first))
+        {
+            
+            return mData.emplace_hint(i, std::make_pair(k, LLSD()))->second;
+        }
+
+        return i->second;
     }
 
-    const LLSD& ImplMap::ref(const LLSD::String& k) const
+    const LLSD& ImplMap::ref(std::string_view k) const
     {
         DataMap::const_iterator i = mData.lower_bound(k);
-        if (i == mData.end()  ||  mData.key_comp()(k, i->first))
+        if (i == mData.end() || mData.key_comp()(k, i->first))
         {
             return undef();
         }
@@ -691,7 +698,7 @@ namespace
         while (iter != endArray())
         {   // Add values for all items held in the array
             Impl::calcStats((*iter), type_counts, share_counts);
-            iter++;
+            ++iter;
         }
 
         // Add in the values for this array
@@ -1081,24 +1088,24 @@ LLSD LLSD::emptyMap()
     return v;
 }
 
-bool LLSD::has(const String& k) const   { return safe(impl).has(k); }
-LLSD LLSD::get(const String& k) const   { return safe(impl).get(k); }
+bool LLSD::has(const std::string_view k) const  { return safe(impl).has(k); }
+LLSD LLSD::get(const std::string_view k) const  { return safe(impl).get(k); }
 LLSD LLSD::getKeys() const              { return safe(impl).getKeys(); }
-void LLSD::insert(const String& k, const LLSD& v) { makeMap(impl).insert(k, v); }
+void LLSD::insert(std::string_view k, const LLSD& v) { makeMap(impl).insert(k, v); }
 
-LLSD& LLSD::with(const String& k, const LLSD& v)
+LLSD& LLSD::with(std::string_view k, const LLSD& v)
                                         {
                                             makeMap(impl).insert(k, v);
                                             return *this;
                                         }
 void LLSD::erase(const String& k)       { makeMap(impl).erase(k); }
 
-LLSD& LLSD::operator[](const String& k)
+LLSD& LLSD::operator[](const std::string_view k)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     return makeMap(impl).ref(k);
 }
-const LLSD& LLSD::operator[](const String& k) const
+const LLSD& LLSD::operator[](const std::string_view k) const
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     return safe(impl).ref(k);
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 5532decfc3..675cbb0edb 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -306,25 +306,23 @@ public:
     //@{
         static LLSD emptyMap();
 
-        bool has(const String&) const;
-        LLSD get(const String&) const;
+        bool has(const std::string_view) const;
+        LLSD get(const std::string_view) const;
         LLSD getKeys() const;               // Return an LLSD array with keys as strings
-        void insert(const String&, const LLSD&);
+        void insert(std::string_view, const LLSD&);
         void erase(const String&);
-        LLSD& with(const String&, const LLSD&);
+        LLSD& with(std::string_view, const LLSD&);
 
-        LLSD& operator[](const String&);
+        LLSD& operator[](const std::string_view);
         LLSD& operator[](const char* c)
-        {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
-            return (*this)[String(c)];
-        }
-        const LLSD& operator[](const String&) const;
-        const LLSD& operator[](const char* c) const
-        {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
-            return (*this)[String(c)];
-        }
+		{
+			return c ? (*this)[std::string_view(c)] : *this;
+		}
+        const LLSD& operator[](const std::string_view) const;
+        const LLSD& operator[](const char* c) const 
+		{
+			return c ? (*this)[std::string_view(c)] : *this;
+		}
     //@}
 
     /** @name Array Values */
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 8a73148631..cd80e7f63f 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -861,7 +861,7 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele
     for (LLStringUtil::format_map_t::const_iterator iter = default_args.begin();
          iter != default_args.end(); ++iter)
     {
-        mSubstitutions[iter->first] = iter->second;
+        mSubstitutions[std::string(iter->first)] = iter->second;
     }
     mSubstitutions["_URL"] = getURL();
     mSubstitutions["_NAME"] = template_name;
-- 
cgit v1.2.3


From 7df1edbde100d1c07bd4d2edcfa76ea7a870de42 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 4 Jul 2024 00:49:45 -0400
Subject: Introduce move assignment operators for various LLSD types

---
 indra/llcommon/llsd.cpp | 100 ++++++++++++++++++++++++++++++++++++++++++------
 indra/llcommon/llsd.h   |  15 ++++++++
 2 files changed, 104 insertions(+), 11 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index a9cd8c597e..0576182c98 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -123,11 +123,17 @@ public:
     virtual void assign(Impl*& var, LLSD::Boolean);
     virtual void assign(Impl*& var, LLSD::Integer);
     virtual void assign(Impl*& var, LLSD::Real);
+    virtual void assign(Impl*& var, const char*);
     virtual void assign(Impl*& var, const LLSD::String&);
     virtual void assign(Impl*& var, const LLSD::UUID&);
     virtual void assign(Impl*& var, const LLSD::Date&);
     virtual void assign(Impl*& var, const LLSD::URI&);
     virtual void assign(Impl*& var, const LLSD::Binary&);
+    virtual void assign(Impl*& var, LLSD::String&&);
+    virtual void assign(Impl*& var, LLSD::UUID&&);
+    virtual void assign(Impl*& var, LLSD::Date&&);
+    virtual void assign(Impl*& var, LLSD::URI&&);
+    virtual void assign(Impl*& var, LLSD::Binary&&);
         ///< If the receiver is the right type and unshared, these are simple
         //   data assignments, othewise the default implementation handless
         //   constructing the proper Impl subclass
@@ -185,7 +191,7 @@ namespace LLSDUnnamedNamespace
 namespace
 #endif
 {
-    template<LLSD::Type T, class Data, class DataRef = Data>
+    template<LLSD::Type T, class Data, class DataRef = Data, class DataMove = Data>
     class ImplBase : public LLSD::Impl
         ///< This class handles most of the work for a subclass of Impl
         //   for a given simple data type.  Subclasses of this provide the
@@ -198,6 +204,7 @@ namespace
 
     public:
         ImplBase(DataRef value) : mValue(value) { }
+        ImplBase(DataMove value) : mValue(std::move(value)) { }
 
         virtual LLSD::Type type() const { return T; }
 
@@ -212,11 +219,21 @@ namespace
                 mValue = value;
             }
         }
+        virtual void assign(LLSD::Impl*& var, DataMove value) {
+            if (shared())
+            {
+                Impl::assign(var, std::move(value));
+            }
+            else
+            {
+                mValue = std::move(value);
+            }
+        }
     };
 
 
     class ImplBoolean
-        : public ImplBase<LLSD::TypeBoolean, LLSD::Boolean>
+        : public ImplBase<LLSD::TypeBoolean, LLSD::Boolean, LLSD::Boolean, LLSD::Boolean&&>
     {
     public:
         ImplBoolean(LLSD::Boolean v) : Base(v) { }
@@ -239,7 +256,7 @@ namespace
 
 
     class ImplInteger
-        : public ImplBase<LLSD::TypeInteger, LLSD::Integer>
+        : public ImplBase<LLSD::TypeInteger, LLSD::Integer, LLSD::Integer, LLSD::Integer&&>
     {
     public:
         ImplInteger(LLSD::Integer v) : Base(v) { }
@@ -257,7 +274,7 @@ namespace
 
 
     class ImplReal
-        : public ImplBase<LLSD::TypeReal, LLSD::Real>
+        : public ImplBase<LLSD::TypeReal, LLSD::Real, LLSD::Real, LLSD::Real&&>
     {
     public:
         ImplReal(LLSD::Real v) : Base(v) { }
@@ -281,10 +298,11 @@ namespace
 
 
     class ImplString
-        : public ImplBase<LLSD::TypeString, LLSD::String, const LLSD::String&>
+        : public ImplBase<LLSD::TypeString, LLSD::String, const LLSD::String&, LLSD::String&&>
     {
     public:
         ImplString(const LLSD::String& v) : Base(v) { }
+        ImplString(LLSD::String&& v) : Base(std::move(v)) {}
 
         virtual LLSD::Boolean   asBoolean() const   { return !mValue.empty(); }
         virtual LLSD::Integer   asInteger() const;
@@ -297,6 +315,19 @@ namespace
         virtual const LLSD::String& asStringRef() const { return mValue; }
 
         virtual LLSD::String asXMLRPCValue() const { return "<string>" + LLStringFn::xml_encode(mValue) + "</string>"; }
+
+        using LLSD::Impl::assign; // Unhiding base class virtuals...
+        virtual void assign(LLSD::Impl*& var, const char* value)
+        {
+            if (shared())
+            {
+                Impl::assign(var, value);
+            }
+            else
+            {
+                mValue = value;
+            }
+        }
     };
 
     LLSD::Integer ImplString::asInteger() const
@@ -327,10 +358,11 @@ namespace
 
 
     class ImplUUID
-        : public ImplBase<LLSD::TypeUUID, LLSD::UUID, const LLSD::UUID&>
+        : public ImplBase<LLSD::TypeUUID, LLSD::UUID, const LLSD::UUID&, LLSD::UUID&&>
     {
     public:
         ImplUUID(const LLSD::UUID& v) : Base(v) { }
+        ImplUUID(LLSD::UUID&& v) : Base(std::move(v)) { }
 
         virtual LLSD::String    asString() const{ return mValue.asString(); }
         virtual LLSD::UUID      asUUID() const  { return mValue; }
@@ -340,13 +372,17 @@ namespace
 
 
     class ImplDate
-        : public ImplBase<LLSD::TypeDate, LLSD::Date, const LLSD::Date&>
+        : public ImplBase<LLSD::TypeDate, LLSD::Date, const LLSD::Date&, LLSD::Date&&>
     {
     public:
         ImplDate(const LLSD::Date& v)
-            : ImplBase<LLSD::TypeDate, LLSD::Date, const LLSD::Date&>(v)
+            : ImplBase(v)
             { }
 
+        ImplDate(LLSD::Date&& v)
+            : ImplBase(std::move(v))
+        { }
+
         virtual LLSD::Integer asInteger() const
         {
             return (LLSD::Integer)(mValue.secondsSinceEpoch());
@@ -363,10 +399,11 @@ namespace
 
 
     class ImplURI
-        : public ImplBase<LLSD::TypeURI, LLSD::URI, const LLSD::URI&>
+        : public ImplBase<LLSD::TypeURI, LLSD::URI, const LLSD::URI&, LLSD::URI&&>
     {
     public:
         ImplURI(const LLSD::URI& v) : Base(v) { }
+        ImplURI(LLSD::URI&& v) : Base(std::move(v)) { }
 
         virtual LLSD::String    asString() const{ return mValue.asString(); }
         virtual LLSD::URI       asURI() const   { return mValue; }
@@ -376,10 +413,11 @@ namespace
 
 
     class ImplBinary
-        : public ImplBase<LLSD::TypeBinary, LLSD::Binary, const LLSD::Binary&>
+        : public ImplBase<LLSD::TypeBinary, LLSD::Binary, const LLSD::Binary&, LLSD::Binary&&>
     {
     public:
         ImplBinary(const LLSD::Binary& v) : Base(v) { }
+        ImplBinary(LLSD::Binary&& v) : Base(std::move(v)) { }
 
         virtual const LLSD::Binary& asBinary() const{ return mValue; }
 
@@ -789,6 +827,11 @@ void LLSD::Impl::assign(Impl*& var, LLSD::Real v)
     reset(var, new ImplReal(v));
 }
 
+void LLSD::Impl::assign(Impl*& var, const char* v)
+{
+    reset(var, new ImplString(v));
+}
+
 void LLSD::Impl::assign(Impl*& var, const LLSD::String& v)
 {
     reset(var, new ImplString(v));
@@ -814,6 +857,31 @@ void LLSD::Impl::assign(Impl*& var, const LLSD::Binary& v)
     reset(var, new ImplBinary(v));
 }
 
+void LLSD::Impl::assign(Impl*& var, LLSD::String&& v)
+{
+    reset(var, new ImplString(std::move(v)));
+}
+
+void LLSD::Impl::assign(Impl*& var, LLSD::UUID&& v)
+{
+    reset(var, new ImplUUID(std::move(v)));
+}
+
+void LLSD::Impl::assign(Impl*& var, LLSD::Date&& v)
+{
+    reset(var, new ImplDate(std::move(v)));
+}
+
+void LLSD::Impl::assign(Impl*& var, LLSD::URI&& v)
+{
+    reset(var, new ImplURI(std::move(v)));
+}
+
+void LLSD::Impl::assign(Impl*& var, LLSD::Binary&& v)
+{
+    reset(var, new ImplBinary(std::move(v)));
+}
+
 
 const LLSD& LLSD::Impl::undef()
 {
@@ -900,6 +968,11 @@ LLSD::LLSD(const String& v) : impl(0)   { ALLOC_LLSD_OBJECT;    assign(v); }
 LLSD::LLSD(const Date& v) : impl(0)     { ALLOC_LLSD_OBJECT;    assign(v); }
 LLSD::LLSD(const URI& v) : impl(0)      { ALLOC_LLSD_OBJECT;    assign(v); }
 LLSD::LLSD(const Binary& v) : impl(0)   { ALLOC_LLSD_OBJECT;    assign(v); }
+LLSD::LLSD(UUID&& v) : impl(0)          { ALLOC_LLSD_OBJECT;    assign(std::move(v)); }
+LLSD::LLSD(String&& v) : impl(0)        { ALLOC_LLSD_OBJECT;    assign(std::move(v)); }
+LLSD::LLSD(Date&& v) : impl(0)          { ALLOC_LLSD_OBJECT;    assign(std::move(v)); }
+LLSD::LLSD(URI&& v) : impl(0)           { ALLOC_LLSD_OBJECT;    assign(std::move(v)); }
+LLSD::LLSD(Binary&& v) : impl(0)        { ALLOC_LLSD_OBJECT;    assign(std::move(v)); }
 
 // Scalar Assignment
 void LLSD::assign(Boolean v)            { safe(impl).assign(impl, v); }
@@ -910,6 +983,11 @@ void LLSD::assign(const UUID& v)        { safe(impl).assign(impl, v); }
 void LLSD::assign(const Date& v)        { safe(impl).assign(impl, v); }
 void LLSD::assign(const URI& v)         { safe(impl).assign(impl, v); }
 void LLSD::assign(const Binary& v)      { safe(impl).assign(impl, v); }
+void LLSD::assign(String&& v)           { safe(impl).assign(impl, std::move(v)); }
+void LLSD::assign(UUID&& v)             { safe(impl).assign(impl, std::move(v)); }
+void LLSD::assign(Date&& v)             { safe(impl).assign(impl, std::move(v)); }
+void LLSD::assign(URI&& v)              { safe(impl).assign(impl, std::move(v)); }
+void LLSD::assign(Binary&& v)           { safe(impl).assign(impl, std::move(v)); }
 
 // Scalar Accessors
 LLSD::Boolean   LLSD::asBoolean() const { return safe(impl).asBoolean(); }
@@ -1076,7 +1154,7 @@ bool LLSD::fromXMLRPCValue(TreeNode* node)
 LLSD::LLSD(const char* v) : impl(0)     { ALLOC_LLSD_OBJECT;    assign(v); }
 void LLSD::assign(const char* v)
 {
-    if(v) assign(std::string(v));
+    if(v) safe(impl).assign(impl, v);
     else assign(std::string());
 }
 
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 675cbb0edb..77f1606554 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -188,6 +188,11 @@ public:
         LLSD(const Date&);
         LLSD(const URI&);
         LLSD(const Binary&);
+        LLSD(String&&);
+        LLSD(UUID&&);
+        LLSD(Date&&);
+        LLSD(URI&&);
+        LLSD(Binary&&);
     //@}
 
     /** @name Convenience Constructors */
@@ -215,6 +220,11 @@ public:
         void assign(const Date&);
         void assign(const URI&);
         void assign(const Binary&);
+        void assign(String&&);
+        void assign(UUID&&);
+        void assign(Date&&);
+        void assign(URI&&);
+        void assign(Binary&&);
 
         LLSD& operator=(Boolean v)          { assign(v); return *this; }
         LLSD& operator=(Integer v)          { assign(v); return *this; }
@@ -224,6 +234,11 @@ public:
         LLSD& operator=(const Date& v)      { assign(v); return *this; }
         LLSD& operator=(const URI& v)       { assign(v); return *this; }
         LLSD& operator=(const Binary& v)    { assign(v); return *this; }
+        LLSD& operator=(String&& v)         { assign(std::move(v)); return *this; }
+        LLSD& operator=(UUID&& v)               { assign(std::move(v)); return *this; }
+        LLSD& operator=(Date&& v)               { assign(std::move(v)); return *this; }
+        LLSD& operator=(URI&& v)                { assign(std::move(v)); return *this; }
+        LLSD& operator=(Binary&& v)         { assign(std::move(v)); return *this; }
     //@}
 
     /**
-- 
cgit v1.2.3


From 6cf176900f0c89e20557742dbcd1174799440f8f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 4 Jul 2024 05:02:46 -0400
Subject: Add move construction/assignment support for LLSD type

---
 indra/llcommon/llsd.cpp | 37 ++++++++++++++++++++++++++-----------
 indra/llcommon/llsd.h   | 21 ++++++++++++++-------
 2 files changed, 40 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 0576182c98..2bbe06e72f 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -106,6 +106,9 @@ public:
     static void reset(Impl*& var, Impl* impl);
         ///< safely set var to refer to the new impl (possibly shared)
 
+    static void move(Impl*& var, Impl*& impl);
+        ///< safely move impl from one object to another
+
     static       Impl& safe(      Impl*);
     static const Impl& safe(const Impl*);
         ///< since a NULL Impl* is used for undefined, this ensures there is
@@ -232,7 +235,7 @@ namespace
     };
 
 
-    class ImplBoolean
+    class ImplBoolean final
         : public ImplBase<LLSD::TypeBoolean, LLSD::Boolean, LLSD::Boolean, LLSD::Boolean&&>
     {
     public:
@@ -255,7 +258,7 @@ namespace
         { return mValue ? "true" : ""; }
 
 
-    class ImplInteger
+    class ImplInteger final
         : public ImplBase<LLSD::TypeInteger, LLSD::Integer, LLSD::Integer, LLSD::Integer&&>
     {
     public:
@@ -273,7 +276,7 @@ namespace
         { return llformat("%d", mValue); }
 
 
-    class ImplReal
+    class ImplReal final
         : public ImplBase<LLSD::TypeReal, LLSD::Real, LLSD::Real, LLSD::Real&&>
     {
     public:
@@ -297,7 +300,7 @@ namespace
         { return llformat("%lg", mValue); }
 
 
-    class ImplString
+    class ImplString final
         : public ImplBase<LLSD::TypeString, LLSD::String, const LLSD::String&, LLSD::String&&>
     {
     public:
@@ -357,7 +360,7 @@ namespace
     }
 
 
-    class ImplUUID
+    class ImplUUID final
         : public ImplBase<LLSD::TypeUUID, LLSD::UUID, const LLSD::UUID&, LLSD::UUID&&>
     {
     public:
@@ -371,7 +374,7 @@ namespace
     };
 
 
-    class ImplDate
+    class ImplDate final
         : public ImplBase<LLSD::TypeDate, LLSD::Date, const LLSD::Date&, LLSD::Date&&>
     {
     public:
@@ -398,7 +401,7 @@ namespace
     };
 
 
-    class ImplURI
+    class ImplURI final
         : public ImplBase<LLSD::TypeURI, LLSD::URI, const LLSD::URI&, LLSD::URI&&>
     {
     public:
@@ -412,7 +415,7 @@ namespace
     };
 
 
-    class ImplBinary
+    class ImplBinary final
         : public ImplBase<LLSD::TypeBinary, LLSD::Binary, const LLSD::Binary&, LLSD::Binary&&>
     {
     public:
@@ -425,7 +428,7 @@ namespace
     };
 
 
-    class ImplMap : public LLSD::Impl
+    class ImplMap final : public LLSD::Impl
     {
     private:
         typedef std::map<LLSD::String, LLSD, std::less<>> DataMap;
@@ -539,7 +542,6 @@ namespace
         DataMap::iterator i = mData.lower_bound(k);
         if (i == mData.end() || mData.key_comp()(k, i->first))
         {
-            
             return mData.emplace_hint(i, std::make_pair(k, LLSD()))->second;
         }
 
@@ -577,7 +579,7 @@ namespace
         {
             //std::cout << "  " << (*iter).first << ": " << (*iter).second << std::endl;
             Impl::calcStats((*iter).second, type_counts, share_counts);
-            iter++;
+            ++iter;
         }
 
         // Add in the values for this map
@@ -774,6 +776,16 @@ void LLSD::Impl::reset(Impl*& var, Impl* impl)
     var = impl;
 }
 
+void LLSD::Impl::move(Impl*& var, Impl*& impl)
+{
+    if (var && var->mUseCount != STATIC_USAGE_COUNT && --var->mUseCount == 0)
+    {
+        delete var; // destroy var if usage falls to 0 and not static
+    }
+    var = impl; // Steal impl to var without incrementing use since this is a move
+    impl = nullptr; // null out old-impl pointer
+}
+
 LLSD::Impl& LLSD::Impl::safe(Impl* impl)
 {
     static Impl theUndefined(STATIC_USAGE_COUNT);
@@ -954,6 +966,9 @@ LLSD::~LLSD()                           { FREE_LLSD_OBJECT; Impl::reset(impl, 0)
 LLSD::LLSD(const LLSD& other) : impl(0) { ALLOC_LLSD_OBJECT;  assign(other); }
 void LLSD::assign(const LLSD& other)    { Impl::assign(impl, other.impl); }
 
+LLSD::LLSD(LLSD&& other) noexcept : impl(nullptr) { ALLOC_LLSD_OBJECT;  Impl::move(impl, other.impl); }
+void  LLSD::assign(LLSD&& other) { Impl::move(impl, other.impl); }
+LLSD& LLSD::operator=(LLSD&& other) noexcept { Impl::move(impl, other.impl); return *this; }
 
 void LLSD::clear()                      { Impl::assignUndefined(impl); }
 
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 77f1606554..781e8d58e9 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -161,6 +161,13 @@ public:
 
     //@}
 
+    /** @name Movable */
+    //@{
+        LLSD(LLSD&& other) noexcept;
+        void  assign(LLSD&& other);
+        LLSD& operator=(LLSD&& other) noexcept;
+    //@}
+
     void clear();   ///< resets to Undefined
 
 
@@ -330,14 +337,14 @@ public:
 
         LLSD& operator[](const std::string_view);
         LLSD& operator[](const char* c)
-		{
-			return c ? (*this)[std::string_view(c)] : *this;
-		}
+        {
+            return c ? (*this)[std::string_view(c)] : *this;
+        }
         const LLSD& operator[](const std::string_view) const;
-        const LLSD& operator[](const char* c) const 
-		{
-			return c ? (*this)[std::string_view(c)] : *this;
-		}
+        const LLSD& operator[](const char* c) const
+        {
+            return c ? (*this)[std::string_view(c)] : *this;
+        }
     //@}
 
     /** @name Array Values */
-- 
cgit v1.2.3


From f6d2536e4f2633757cce75f45a1ee9f6003be90a Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 4 Jul 2024 13:01:02 -0400
Subject: Make LLDate a trivial copyable/movable type

---
 indra/llcommon/lldate.cpp | 9 ---------
 indra/llcommon/lldate.h   | 9 +++------
 2 files changed, 3 insertions(+), 15 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index c63c7012d1..b38864688d 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -41,20 +41,11 @@
 #include "llstring.h"
 #include "llfasttimer.h"
 
-static const F64 DATE_EPOCH = 0.0;
-
 static const F64 LL_APR_USEC_PER_SEC = 1000000.0;
     // should be APR_USEC_PER_SEC, but that relies on INT64_C which
     // isn't defined in glib under our build set up for some reason
 
 
-LLDate::LLDate() : mSecondsSinceEpoch(DATE_EPOCH)
-{}
-
-LLDate::LLDate(const LLDate& date) :
-    mSecondsSinceEpoch(date.mSecondsSinceEpoch)
-{}
-
 LLDate::LLDate(F64SecondsImplicit seconds_since_epoch) :
     mSecondsSinceEpoch(seconds_since_epoch.value())
 {}
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index 81f2dd0d1c..1a69a04232 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -43,16 +43,13 @@
  */
 class LL_COMMON_API LLDate
 {
+    static constexpr F64 DATE_EPOCH = 0.0;
 public:
     /**
      * @brief Construct a date equal to epoch.
      */
-    LLDate();
-
-    /**
-     * @brief Construct a date equal to the source date.
-     */
-    LLDate(const LLDate& date);
+    constexpr LLDate() : mSecondsSinceEpoch(DATE_EPOCH)
+    {}
 
     /**
      * @brief Construct a date from a seconds since epoch value.
-- 
cgit v1.2.3


From 1296afd96a74877feb91690ec8dcd99b225554b8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 4 Jul 2024 13:02:34 -0400
Subject: Reduce LLSD::Binary temporaries

---
 indra/llcommon/llsdutil.cpp                     | 21 ++++++++++-----------
 indra/llmath/llvolume.cpp                       | 12 ++++++------
 indra/llmessage/llcorehttputil.cpp              |  2 +-
 indra/llmessage/lltemplatemessagedispatcher.cpp |  6 +++---
 indra/llprimitive/llmaterialid.cpp              |  2 +-
 5 files changed, 21 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index dd3a58c26d..34aa0bc070 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -51,7 +51,7 @@
 // U32
 LLSD ll_sd_from_U32(const U32 val)
 {
-    std::vector<U8> v;
+    LLSD::Binary v;
     U32 net_order = htonl(val);
 
     v.resize(4);
@@ -63,7 +63,7 @@ LLSD ll_sd_from_U32(const U32 val)
 U32 ll_U32_from_sd(const LLSD& sd)
 {
     U32 ret;
-    std::vector<U8> v = sd.asBinary();
+    const LLSD::Binary& v = sd.asBinary();
     if (v.size() < 4)
     {
         return 0;
@@ -76,7 +76,7 @@ U32 ll_U32_from_sd(const LLSD& sd)
 //U64
 LLSD ll_sd_from_U64(const U64 val)
 {
-    std::vector<U8> v;
+    LLSD::Binary v;
     U32 high, low;
 
     high = (U32)(val >> 32);
@@ -94,7 +94,7 @@ LLSD ll_sd_from_U64(const U64 val)
 U64 ll_U64_from_sd(const LLSD& sd)
 {
     U32 high, low;
-    std::vector<U8> v = sd.asBinary();
+    const LLSD::Binary& v = sd.asBinary();
 
     if (v.size() < 8)
     {
@@ -112,7 +112,7 @@ U64 ll_U64_from_sd(const LLSD& sd)
 // IP Address (stored in net order in a U32, so don't need swizzling)
 LLSD ll_sd_from_ipaddr(const U32 val)
 {
-    std::vector<U8> v;
+    LLSD::Binary v;
 
     v.resize(4);
     memcpy(&(v[0]), &val, 4);       /* Flawfinder: ignore */
@@ -123,7 +123,7 @@ LLSD ll_sd_from_ipaddr(const U32 val)
 U32 ll_ipaddr_from_sd(const LLSD& sd)
 {
     U32 ret;
-    std::vector<U8> v = sd.asBinary();
+    const LLSD::Binary& v = sd.asBinary();
     if (v.size() < 4)
     {
         return 0;
@@ -135,17 +135,17 @@ U32 ll_ipaddr_from_sd(const LLSD& sd)
 // Converts an LLSD binary to an LLSD string
 LLSD ll_string_from_binary(const LLSD& sd)
 {
-    std::vector<U8> value = sd.asBinary();
+    const LLSD::Binary& value = sd.asBinary();
     std::string str;
     str.resize(value.size());
-    memcpy(&str[0], &value[0], value.size());
+    memcpy(&str[0], value.data(), value.size());
     return str;
 }
 
 // Converts an LLSD string to an LLSD binary
 LLSD ll_binary_from_string(const LLSD& sd)
 {
-    std::vector<U8> binary_value;
+    LLSD::Binary binary_value;
 
     std::string string_value = sd.asString();
     for (const U8 c : string_value)
@@ -990,8 +990,7 @@ LLSD llsd_clone(LLSD value, LLSD filter)
 
     case LLSD::TypeBinary:
     {
-        LLSD::Binary bin(value.asBinary().begin(), value.asBinary().end());
-        clone = LLSD::Binary(bin);
+        clone = LLSD::Binary(value.asBinary().begin(), value.asBinary().end());
         break;
     }
     default:
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index f3db9424d9..b56ecc9075 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2345,11 +2345,11 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
                 continue;
             }
 
-            LLSD::Binary pos = mdl[i]["Position"];
-            LLSD::Binary norm = mdl[i]["Normal"];
-            LLSD::Binary tangent = mdl[i]["Tangent"];
-            LLSD::Binary tc = mdl[i]["TexCoord0"];
-            LLSD::Binary idx = mdl[i]["TriangleList"];
+            const LLSD::Binary& pos = mdl[i]["Position"].asBinary();
+            const LLSD::Binary& norm = mdl[i]["Normal"].asBinary();
+            const LLSD::Binary& tangent = mdl[i]["Tangent"].asBinary();
+            const LLSD::Binary& tc = mdl[i]["TexCoord0"].asBinary();
+            const LLSD::Binary& idx = mdl[i]["TriangleList"].asBinary();
 
             //copy out indices
             auto num_indices = idx.size() / 2;
@@ -2538,7 +2538,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
                     continue;
                 }
 
-                LLSD::Binary weights = mdl[i]["Weights"];
+                const LLSD::Binary& weights = mdl[i]["Weights"].asBinary();
 
                 U32 idx = 0;
 
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index 684e96883f..3fdc691141 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -523,7 +523,7 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore::
     bas >> std::noskipws;
     data.assign(std::istream_iterator<U8>(bas), std::istream_iterator<U8>());
 
-    result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = data;
+    result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = std::move(data);
 
 #else
     // This is disabled because it's dangerous.  See the other case for an
diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp
index 0e709d6c75..edbeb4acc1 100644
--- a/indra/llmessage/lltemplatemessagedispatcher.cpp
+++ b/indra/llmessage/lltemplatemessagedispatcher.cpp
@@ -43,7 +43,7 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name,
                                            const LLSD& message,
                                            LLHTTPNode::ResponsePtr responsep)
 {
-    std::vector<U8> data = message["body"]["binary-template-data"].asBinary();
+    const LLSD::Binary& data = message["body"]["binary-template-data"].asBinary();
     auto size = data.size();
     if(size == 0)
     {
@@ -53,11 +53,11 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name,
     LLHost host;
     host = gMessageSystem->getSender();
 
-    bool validate_message = mTemplateMessageReader.validateMessage(&(data[0]), static_cast<S32>(size), host, true);
+    bool validate_message = mTemplateMessageReader.validateMessage(data.data(), static_cast<S32>(size), host, true);
 
     if (validate_message)
     {
-        mTemplateMessageReader.readMessage(&(data[0]),host);
+        mTemplateMessageReader.readMessage(data.data(),host);
     }
     else
     {
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp
index 847824d770..4992b282f3 100644
--- a/indra/llprimitive/llmaterialid.cpp
+++ b/indra/llprimitive/llmaterialid.cpp
@@ -136,7 +136,7 @@ LLSD LLMaterialID::asLLSD() const
     materialIDBinary.resize(MATERIAL_ID_SIZE * sizeof(U8));
     memcpy(materialIDBinary.data(), mID, MATERIAL_ID_SIZE * sizeof(U8));
 
-    LLSD materialID = materialIDBinary;
+    LLSD materialID = std::move(materialIDBinary);
     return materialID;
 }
 
-- 
cgit v1.2.3


From 9ddf64c65183960ffed4fe61c5d85e8bacaea030 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Fri, 5 Jul 2024 18:46:30 +0200
Subject: #1931 BugSplat Crash: SecondLifeViewer!LLRenderTarget::release(387)

---
 indra/llrender/llrendertarget.cpp  |   4 ++
 indra/llrender/llrendertarget.h    |   4 +-
 indra/llwindow/llwindow.cpp        |   2 +-
 indra/newview/llappviewer.cpp      | 143 ++++++++++++++++++++-----------------
 indra/newview/llappviewerwin32.cpp |   4 +-
 5 files changed, 88 insertions(+), 69 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 60159a0497..410efe9a70 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -50,6 +50,7 @@ void check_framebuffer_status()
     }
 }
 
+bool LLRenderTarget::sInitFailed = false;
 bool LLRenderTarget::sUseFBO = false;
 U32 LLRenderTarget::sCurFBO = 0;
 
@@ -352,6 +353,9 @@ void LLRenderTarget::release()
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     llassert(!isBoundInStack());
 
+    if (sInitFailed)
+        return;
+
     if (mDepth)
     {
         LLImageGL::deleteTextures(1, &mDepth);
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index a1adf93fa1..fc78f059e0 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -61,7 +61,9 @@
 class LLRenderTarget
 {
 public:
-    //whether or not to use FBO implementation
+    // Whether app initialization failed
+    static bool sInitFailed;
+    // Whether or not to use FBO implementation
     static bool sUseFBO;
     static U32 sBytesAllocated;
     static U32 sCurFBO;
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 56c393be0f..378e633cd2 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -71,8 +71,8 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
     }
 
     S32 result = 0;
-#if LL_MESA_HEADLESS // !!! *FIX: (?)
     LL_WARNS() << "OSMessageBox: " << text << LL_ENDL;
+#if LL_MESA_HEADLESS // !!! *FIX: (?)
     return OSBTN_OK;
 #elif LL_WINDOWS
     result = OSMessageBoxWin32(text, caption, type);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index ac689f7319..968e863496 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -340,24 +340,24 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
 S32 gPendingMetricsUploads = 0;
 
 
-bool                gDisconnected = false;
+bool gDisconnected = false;
 
-// used to restore texture state after a mode switch
-LLFrameTimer    gRestoreGLTimer;
-bool            gRestoreGL = false;
-bool            gUseWireframe = false;
+// Used to restore texture state after a mode switch
+LLFrameTimer gRestoreGLTimer;
+bool gRestoreGL = false;
+bool gUseWireframe = false;
 
 LLMemoryInfo gSysMemory;
 U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp
 
 std::string gLastVersionChannel;
 
-LLVector3           gWindVec(3.0, 3.0, 0.0);
-LLVector3           gRelativeWindVec(0.0, 0.0, 0.0);
+LLVector3 gWindVec(3.0, 3.0, 0.0);
+LLVector3 gRelativeWindVec(0.0, 0.0, 0.0);
 
-U32     gPacketsIn = 0;
+U32 gPacketsIn = 0;
 
-bool                gPrintMessagesThisFrame = false;
+bool gPrintMessagesThisFrame = false;
 
 bool gRandomizeFramerate = false;
 bool gPeriodicSlowFrame = false;
@@ -723,6 +723,19 @@ public:
 
 bool LLAppViewer::init()
 {
+    struct ResultHandler
+    {
+        bool success = false; // Should be set in case of successful result
+        ~ResultHandler()
+        {
+            if (!success)
+            {
+                // Mark critical flags in case of unsuccessful initialization
+                LLRenderTarget::sInitFailed = true;
+            }
+        }
+    } result_handler;
+
     setupErrorHandling(mSecondInstance);
 
     //
@@ -752,7 +765,10 @@ bool LLAppViewer::init()
 
     // inits from settings.xml and from strings.xml
     if (!initConfiguration())
+    {
+        LL_WARNS("InitInfo") << "initConfiguration() failed." << LL_ENDL;
         return false;
+    }
 
     LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
 
@@ -760,7 +776,6 @@ bool LLAppViewer::init()
     initMaxHeapSize() ;
     LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));
 
-
     // Although initLoggingAndGetLastDuration() is the right place to mess with
     // setFatalFunction(), we can't query gSavedSettings until after
     // initConfiguration().
@@ -783,14 +798,12 @@ bool LLAppViewer::init()
 
     LLMachineID::init();
 
+    if (gSavedSettings.getBOOL("QAModeMetrics"))
     {
-        if (gSavedSettings.getBOOL("QAModeMetrics"))
-        {
-            app_metrics_qa_mode = true;
-            app_metrics_interval = METRICS_INTERVAL_QA;
-        }
-        LLViewerAssetStatsFF::init();
+        app_metrics_qa_mode = true;
+        app_metrics_interval = METRICS_INTERVAL_QA;
     }
+    LLViewerAssetStatsFF::init();
 
     initThreads();
     LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
@@ -906,8 +919,9 @@ bool LLAppViewer::init()
     // do any necessary set-up for accepting incoming SLURLs from apps
     initSLURLHandler();
 
-    if(false == initHardwareTest())
+    if (!initHardwareTest())
     {
+        LL_WARNS("InitInfo") << "initHardwareTest() failed." << LL_ENDL;
         // Early out from user choice.
         return false;
     }
@@ -927,7 +941,7 @@ bool LLAppViewer::init()
         std::ostringstream msg;
         msg << LLTrans::getString("MBUnableToAccessFile");
         OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
-        return 0;
+        return false;
     }
     LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ;
 
@@ -958,8 +972,9 @@ bool LLAppViewer::init()
     // If we don't have the right GL requirements, exit.
     if (!gGLManager.mHasRequirements)
     {
+        LL_WARNS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL;
         // already handled with a MBVideoDrvErr
-        return 0;
+        return false;
     }
 
     // Without SSE2 support we will crash almost immediately, warn here.
@@ -971,11 +986,11 @@ bool LLAppViewer::init()
             LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2"),
             LLStringUtil::null,
             OSMB_OK);
-        return 0;
+        return false;
     }
 
     // alert the user if they are using unsupported hardware
-    if(!gSavedSettings.getBOOL("AlertedUnsupportedHardware"))
+    if (!gSavedSettings.getBOOL("AlertedUnsupportedHardware"))
     {
         bool unsupported = false;
         LLSD args;
@@ -991,19 +1006,19 @@ bool LLAppViewer::init()
         U64Bytes minRAM;
         minRAMString >> minRAM;
 
-        if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
+        if (!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
         {
             minSpecs += LLNotifications::instance().getGlobalString("UnsupportedGPU");
             minSpecs += "\n";
             unsupported = true;
         }
-        if(gSysCPU.getMHz() < minCPU)
+        if (gSysCPU.getMHz() < minCPU)
         {
             minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
             minSpecs += "\n";
             unsupported = true;
         }
-        if(gSysMemory.getPhysicalMemoryKB() < minRAM)
+        if (gSysMemory.getPhysicalMemoryKB() < minRAM)
         {
             minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM");
             minSpecs += "\n";
@@ -1015,15 +1030,14 @@ bool LLAppViewer::init()
             LLNotificationsUtil::add("UnknownGPU");
         }
 
-        if(unsupported)
+        if (unsupported)
         {
-            if(!gSavedSettings.controlExists("WarnUnsupportedHardware")
+            if (!gSavedSettings.controlExists("WarnUnsupportedHardware")
                 || gSavedSettings.getBOOL("WarnUnsupportedHardware"))
             {
                 args["MINSPECS"] = minSpecs;
                 LLNotificationsUtil::add("UnsupportedHardware", args );
             }
-
         }
     }
 
@@ -1115,12 +1129,13 @@ bool LLAppViewer::init()
         LLViewerJoystick::getInstance()->init(false);
     }
 
-    try {
+    try
+    {
         initializeSecHandler();
     }
     catch (LLProtectedDataException&)
     {
-      LLNotificationsUtil::add("CorruptedProtectedDataStore");
+        LLNotificationsUtil::add("CorruptedProtectedDataStore");
     }
 
     gGLActive = false;
@@ -1227,7 +1242,7 @@ bool LLAppViewer::init()
     //datetime formatting functions didn't support some parameters such as "weekday".
     //Names for days and months localized in xml are also useful for Polish locale(STORM-107).
     std::string language = gSavedSettings.getString("Language");
-    if(language == "ja" || language == "pl")
+    if (language == "ja" || language == "pl")
     {
         LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames"));
         LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames"));
@@ -1284,6 +1299,8 @@ bool LLAppViewer::init()
     }
 #endif
 
+    result_handler.success = true;
+
     return true;
 }
 
@@ -2513,7 +2530,7 @@ bool tempSetControl(const std::string& name, const std::string& value)
 
 bool LLAppViewer::initConfiguration()
 {
-    //Load settings files list
+    // Load settings files list
     std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml");
     LLXMLNodePtr root;
     bool success = LLXMLNode::parseFile(settings_file_list, root, NULL);
@@ -2560,7 +2577,7 @@ bool LLAppViewer::initConfiguration()
 
     // - load defaults
     bool set_defaults = true;
-    if(!loadSettingsFromDirectory("Default", set_defaults))
+    if (!loadSettingsFromDirectory("Default", set_defaults))
     {
         OSMessageBox(
             "Unable to load default settings file. The installation may be corrupted.",
@@ -2577,13 +2594,12 @@ bool LLAppViewer::initConfiguration()
 #ifndef LL_RELEASE_FOR_DOWNLOAD
     // provide developer build only overrides for these control variables that are not
     // persisted to settings.xml
-    LLControlVariable* c = gSavedSettings.getControl("AllowMultipleViewers");
-    if (c)
+    if (LLControlVariable* c = gSavedSettings.getControl("AllowMultipleViewers"))
     {
         c->setValue(true, false);
     }
 
-    gSavedSettings.setBOOL("QAMode", true );
+    gSavedSettings.setBOOL("QAMode", true);
     gSavedSettings.setS32("WatchdogEnabled", 0);
 #endif
 
@@ -2616,7 +2632,7 @@ bool LLAppViewer::initConfiguration()
 
     clp.configure(cmd_line_config, &gSavedSettings);
 
-    if(!initParseCommandLine(clp))
+    if (!initParseCommandLine(clp))
     {
         handleCommandLineError(clp);
         return false;
@@ -2626,7 +2642,7 @@ bool LLAppViewer::initConfiguration()
 
     // If the user has specified a alternate settings file name.
     // Load it now before loading the user_settings/settings.xml
-    if(clp.hasOption("settings"))
+    if (clp.hasOption("settings"))
     {
         std::string user_settings_filename =
             gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
@@ -2668,7 +2684,7 @@ bool LLAppViewer::initConfiguration()
     loadSettingsFromDirectory("UserSession");
 
     // - apply command line settings
-    if (! clp.notify())
+    if (!clp.notify())
     {
         handleCommandLineError(clp);
         return false;
@@ -2677,7 +2693,7 @@ bool LLAppViewer::initConfiguration()
     // Register the core crash option as soon as we can
     // if we want gdb post-mortem on cores we need to be up and running
     // ASAP or we might miss init issue etc.
-    if(gSavedSettings.getBOOL("DisableCrashLogger"))
+    if (gSavedSettings.getBOOL("DisableCrashLogger"))
     {
         LL_WARNS() << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << LL_ENDL;
         disableCrashlogger();
@@ -2691,7 +2707,7 @@ bool LLAppViewer::initConfiguration()
         initConsole();
     }
 
-    if(clp.hasOption("help"))
+    if (clp.hasOption("help"))
     {
         std::ostringstream msg;
         msg << LLTrans::getString("MBCmdLineUsg") << "\n" << clp;
@@ -2705,17 +2721,17 @@ bool LLAppViewer::initConfiguration()
         return false;
     }
 
-    if(clp.hasOption("set"))
+    if (clp.hasOption("set"))
     {
         const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set");
-        if(0x1 & set_values.size())
+        if (0x1 & set_values.size())
         {
             LL_WARNS() << "Invalid '--set' parameter count." << LL_ENDL;
         }
         else
         {
             LLCommandLineParser::token_vector_t::const_iterator itr = set_values.begin();
-            for(; itr != set_values.end(); ++itr)
+            for (; itr != set_values.end(); ++itr)
             {
                 const std::string& name = *itr;
                 const std::string& value = *(++itr);
@@ -2727,12 +2743,13 @@ bool LLAppViewer::initConfiguration()
         }
     }
 
-    if  (clp.hasOption("logevents")) {
+    if (clp.hasOption("logevents"))
+    {
         LLViewerEventRecorder::instance().setEventLoggingOn();
     }
 
     std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel"));
-    if(! CmdLineChannel.empty())
+    if (!CmdLineChannel.empty())
     {
         LLVersionInfo::instance().resetChannel(CmdLineChannel);
     }
@@ -2747,7 +2764,7 @@ bool LLAppViewer::initConfiguration()
     }
 
     std::string test_name(gSavedSettings.getString("LogMetrics"));
-    if (! test_name.empty())
+    if (!test_name.empty())
     {
         LLTrace::BlockTimer::sMetricLog = true;
         // '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
@@ -2789,7 +2806,7 @@ bool LLAppViewer::initConfiguration()
     }
 
     const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
-    if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
+    if (skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
     {
         // Examining "Language" may not suffice -- see LLUI::getLanguage()
         // logic. Unfortunately LLUI::getLanguage() doesn't yet do us much
@@ -2823,7 +2840,6 @@ bool LLAppViewer::initConfiguration()
         llassert_always(!gSavedSettings.getBOOL("SLURLPassToOtherInstance"));
     }
 
-
     // Handle slurl use. NOTE: Don't let SL-55321 reappear.
     // This initial-SLURL logic, up through the call to
     // sendURLToOtherInstance(), must precede LLSplashScreen::show() --
@@ -2849,21 +2865,21 @@ bool LLAppViewer::initConfiguration()
     std::string starting_location;
 
     std::string cmd_line_login_location(gSavedSettings.getString("CmdLineLoginLocation"));
-    if(! cmd_line_login_location.empty())
+    if (!cmd_line_login_location.empty())
     {
         starting_location = cmd_line_login_location;
     }
     else
     {
         std::string default_login_location(gSavedSettings.getString("DefaultLoginLocation"));
-        if (! default_login_location.empty())
+        if (!default_login_location.empty())
         {
             starting_location = default_login_location;
         }
     }
 
     LLSLURL start_slurl;
-    if (! starting_location.empty())
+    if (!starting_location.empty())
     {
         start_slurl = starting_location;
         LLStartUp::setStartSLURL(start_slurl);
@@ -2875,12 +2891,12 @@ bool LLAppViewer::initConfiguration()
 
     // NextLoginLocation is set as a side effect of LLStartUp::setStartSLURL()
     std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
-    if ( !nextLoginLocation.empty() )
+    if (!nextLoginLocation.empty())
     {
         LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
         LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
     }
-    else if (   (   clp.hasOption("login") || clp.hasOption("autologin"))
+    else if ((clp.hasOption("login") || clp.hasOption("autologin"))
              && gSavedSettings.getString("CmdLineLoginLocation").empty())
     {
         // If automatic login from command line with --login switch
@@ -2936,7 +2952,7 @@ bool LLAppViewer::initConfiguration()
 #endif
     if (!gArgs.empty())
     {
-    gWindowTitle += std::string(" ") + gArgs;
+        gWindowTitle += std::string(" ") + gArgs;
     }
     LLStringUtil::truncate(gWindowTitle, 255);
 
@@ -2960,7 +2976,7 @@ bool LLAppViewer::initConfiguration()
         // but make sure the setting is *not* persisted.
         // Also see LLVivoxVoiceClient::voiceEnabled()
         LLControlVariable* enable_voice = gSavedSettings.getControl("EnableVoiceChat");
-        if(enable_voice)
+        if (enable_voice)
         {
             const bool DO_NOT_PERSIST = false;
             enable_voice->setValue(LLSD(false), DO_NOT_PERSIST);
@@ -3164,8 +3180,8 @@ bool LLAppViewer::initWindow()
     gSavedSettings.setBOOL("RenderInitError", false);
     gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), true );
 
-    //If we have a startup crash, it's usually near GL initialization, so simulate that.
-    if(gCrashOnStartup)
+    // If we have a startup crash, it's usually near GL initialization, so simulate that.
+    if (gCrashOnStartup)
     {
         LLAppViewer::instance()->forceErrorLLError();
     }
@@ -3990,11 +4006,11 @@ void LLAppViewer::requestQuit()
 
     LLViewerRegion* region = gAgent.getRegion();
 
-    if( (LLStartUp::getStartupState() < STATE_STARTED) || !region )
+    if ((LLStartUp::getStartupState() < STATE_STARTED) || !region)
     {
         // If we have a region, make some attempt to send a logout request first.
         // This prevents the halfway-logged-in avatar from hanging around inworld for a couple minutes.
-        if(region)
+        if (region)
         {
             sendLogoutRequest();
         }
@@ -5043,9 +5059,6 @@ void LLAppViewer::idleShutdown()
         return;
     }
 
-
-
-
     // ProductEngine: Try moving this code to where we shut down sTextureCache in cleanup()
     // *TODO: ugly
     static bool saved_teleport_history = false;
@@ -5094,7 +5107,7 @@ void LLAppViewer::idleShutdown()
     }
 
     // All floaters are closed.  Tell server we want to quit.
-    if( !logoutRequestSent() )
+    if (!logoutRequestSent())
     {
         sendLogoutRequest();
 
@@ -5106,8 +5119,8 @@ void LLAppViewer::idleShutdown()
     }
 
     // Make sure that we quit if we haven't received a reply from the server.
-    if( logoutRequestSent()
-        && gLogoutTimer.getElapsedTimeF32() > gLogoutMaxTime )
+    if (logoutRequestSent()
+        && gLogoutTimer.getElapsedTimeF32() > gLogoutMaxTime)
     {
         forceQuit();
         return;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 3cdae041fc..83fa4a3ca9 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -240,7 +240,7 @@ bool create_app_mutex()
     LPCWSTR unique_mutex_name = L"SecondLifeAppMutex";
     HANDLE hMutex;
     hMutex = CreateMutex(NULL, TRUE, unique_mutex_name);
-    if(GetLastError() == ERROR_ALREADY_EXISTS)
+    if (GetLastError() == ERROR_ALREADY_EXISTS)
     {
         result = false;
     }
@@ -464,7 +464,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
     gDebugInfo["FoundOtherInstanceAtStartup"] = LLSD::Boolean(found_other_instance);
 
     bool ok = viewer_app_ptr->init();
-    if(!ok)
+    if (!ok)
     {
         LL_WARNS() << "Application init failed." << LL_ENDL;
         return -1;
-- 
cgit v1.2.3


From 77a8bd878bad5a28472eda8b8c7dff33ca5e3d10 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 4 Jul 2024 16:37:07 +0300
Subject: viewer#1916 Updated default Chat Window behavior

---
 indra/newview/llstartup.cpp                                 | 6 +++++-
 indra/newview/skins/default/xui/en/floater_im_container.xml | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index dd005874a5..df396b6dbc 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1508,7 +1508,11 @@ bool idle_startup()
 
         // create a container's instance for start a controlling conversation windows
         // by the voice's events
-        LLFloaterIMContainer::getInstance();
+        LLFloaterIMContainer *im_inst = LLFloaterIMContainer::getInstance();
+        if(gAgent.isFirstLogin())
+        {
+            im_inst->openFloater(im_inst->getKey());
+        }
         if (gSavedSettings.getS32("ParcelMediaAutoPlayEnable") == 2)
         {
             LLViewerParcelAskPlay::getInstance()->loadSettings();
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 4df29c47de..176a2ca1a4 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -14,7 +14,7 @@
  reuse_instance="true"
  title="CONVERSATIONS"
  bottom="-50"
- right="-5"
+ left="5"
  width="450"
  min_width="38">
     <string
-- 
cgit v1.2.3


From d996497c5e0a45e1bc68a06f4d4cdab5f706a53b Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 8 Jul 2024 08:11:26 +0300
Subject: SL-15354 Fixed object IMs not respecting chat settings

---
 indra/newview/llfloaterimnearbychathandler.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index ef7ec9e950..b208ac17e7 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -643,8 +643,18 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
             }
         }
 
+        std::string user_preferences;
+        if (chat_msg.mSourceType == CHAT_SOURCE_OBJECT)
+        {
+            user_preferences = gSavedSettings.getString("NotificationObjectIMOptions");
+        }
+        else
+        {
+            user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+        }
+
         //Will show toast when chat preference is set
-        if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !nearby_chat->isMessagePaneExpanded())
+        if((user_preferences == "toast") || !nearby_chat->isMessagePaneExpanded())
         {
             // Add a nearby chat toast.
             LLUUID id;
-- 
cgit v1.2.3


From d0173ac7fc1f999b31aad70c3abfa2c57f872899 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Sat, 6 Jul 2024 09:23:39 +0200
Subject: #1931 Terminate AppViewer immediately in case of initialization
 failed

---
 indra/llrender/llrendertarget.cpp |  4 ----
 indra/llrender/llrendertarget.h   |  2 --
 indra/newview/llappviewer.cpp     | 45 +++++++++++----------------------------
 3 files changed, 13 insertions(+), 38 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 410efe9a70..60159a0497 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -50,7 +50,6 @@ void check_framebuffer_status()
     }
 }
 
-bool LLRenderTarget::sInitFailed = false;
 bool LLRenderTarget::sUseFBO = false;
 U32 LLRenderTarget::sCurFBO = 0;
 
@@ -353,9 +352,6 @@ void LLRenderTarget::release()
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     llassert(!isBoundInStack());
 
-    if (sInitFailed)
-        return;
-
     if (mDepth)
     {
         LLImageGL::deleteTextures(1, &mDepth);
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index fc78f059e0..cd3290cf66 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -61,8 +61,6 @@
 class LLRenderTarget
 {
 public:
-    // Whether app initialization failed
-    static bool sInitFailed;
     // Whether or not to use FBO implementation
     static bool sUseFBO;
     static U32 sBytesAllocated;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 968e863496..525bd31c72 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -723,19 +723,6 @@ public:
 
 bool LLAppViewer::init()
 {
-    struct ResultHandler
-    {
-        bool success = false; // Should be set in case of successful result
-        ~ResultHandler()
-        {
-            if (!success)
-            {
-                // Mark critical flags in case of unsuccessful initialization
-                LLRenderTarget::sInitFailed = true;
-            }
-        }
-    } result_handler;
-
     setupErrorHandling(mSecondInstance);
 
     //
@@ -766,8 +753,7 @@ bool LLAppViewer::init()
     // inits from settings.xml and from strings.xml
     if (!initConfiguration())
     {
-        LL_WARNS("InitInfo") << "initConfiguration() failed." << LL_ENDL;
-        return false;
+        LL_ERRS("InitInfo") << "initConfiguration() failed." << LL_ENDL;
     }
 
     LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
@@ -921,9 +907,8 @@ bool LLAppViewer::init()
 
     if (!initHardwareTest())
     {
-        LL_WARNS("InitInfo") << "initHardwareTest() failed." << LL_ENDL;
         // Early out from user choice.
-        return false;
+        LL_ERRS("InitInfo") << "initHardwareTest() failed." << LL_ENDL;
     }
     LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ;
 
@@ -937,11 +922,9 @@ bool LLAppViewer::init()
 
     if (!initCache())
     {
-        LL_WARNS("InitInfo") << "Failed to init cache" << LL_ENDL;
-        std::ostringstream msg;
-        msg << LLTrans::getString("MBUnableToAccessFile");
-        OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
-        return false;
+        std::string msg = LLTrans::getString("MBUnableToAccessFile");
+        OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK);
+        LL_ERRS("InitInfo") << "Failed to init cache" << LL_ENDL;
     }
     LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ;
 
@@ -970,11 +953,11 @@ bool LLAppViewer::init()
     gGLManager.printGLInfoString();
 
     // If we don't have the right GL requirements, exit.
+    // ? AG: It seems we never set mHasRequirements to false
     if (!gGLManager.mHasRequirements)
     {
-        LL_WARNS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL;
-        // already handled with a MBVideoDrvErr
-        return false;
+        // Already handled with a MBVideoDrvErr
+        LL_ERRS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL;
     }
 
     // Without SSE2 support we will crash almost immediately, warn here.
@@ -982,11 +965,9 @@ bool LLAppViewer::init()
     {
         // can't use an alert here since we're exiting and
         // all hell breaks lose.
-        OSMessageBox(
-            LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2"),
-            LLStringUtil::null,
-            OSMB_OK);
-        return false;
+        std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
+        OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK);
+        LL_ERRS("InitInfo") << "SSE2 is not supported" << LL_ENDL;
     }
 
     // alert the user if they are using unsupported hardware
@@ -1012,12 +993,14 @@ bool LLAppViewer::init()
             minSpecs += "\n";
             unsupported = true;
         }
+
         if (gSysCPU.getMHz() < minCPU)
         {
             minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
             minSpecs += "\n";
             unsupported = true;
         }
+
         if (gSysMemory.getPhysicalMemoryKB() < minRAM)
         {
             minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM");
@@ -1299,8 +1282,6 @@ bool LLAppViewer::init()
     }
 #endif
 
-    result_handler.success = true;
-
     return true;
 }
 
-- 
cgit v1.2.3


From 22782a0c68e0d310f65c80cca47daec9b7b23f2b Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 8 Jul 2024 13:11:07 +0300
Subject: viewer#1131 Fix gltf editor being a bit spamy

---
 indra/newview/llfloatergltfasseteditor.cpp | 13 +++++++++----
 indra/newview/llselectmgr.cpp              |  2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp
index 13e0d36c35..d2cf24f1dd 100644
--- a/indra/newview/llfloatergltfasseteditor.cpp
+++ b/indra/newview/llfloatergltfasseteditor.cpp
@@ -54,7 +54,7 @@ LLFloaterGLTFAssetEditor::~LLFloaterGLTFAssetEditor()
 {
     if (mScroller)
     {
-        removeChild(mScroller);
+        mItemListPanel->removeChild(mScroller);
         delete mScroller;
         mScroller = NULL;
     }
@@ -345,13 +345,15 @@ void LLFloaterGLTFAssetEditor::dirty()
 {
     if (!mObject || !mAsset || !mFolderRoot)
     {
-        closeFloater();
         return;
     }
 
     if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1)
     {
-        closeFloater();
+        if (getVisible())
+        {
+            closeFloater();
+        }
         return;
     }
 
@@ -366,7 +368,10 @@ void LLFloaterGLTFAssetEditor::dirty()
     LLViewerObject* objectp = node->getObject();
     if (mObject != objectp || !objectp->mGLTFAsset)
     {
-        closeFloater();
+        if (getVisible())
+        {
+            closeFloater();
+        }
         return;
     }
 
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 17f968b921..70356e8e96 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -7194,7 +7194,7 @@ void dialog_refresh_all()
         panel_task_info->dirty();
     }
 
-    LLFloaterGLTFAssetEditor * gltf_editor = LLFloaterReg::getTypedInstance<LLFloaterGLTFAssetEditor>("gltf_asset_editor");
+    LLFloaterGLTFAssetEditor * gltf_editor = LLFloaterReg::findTypedInstance<LLFloaterGLTFAssetEditor>("gltf_asset_editor");
     if (gltf_editor)
     {
         gltf_editor->dirty();
-- 
cgit v1.2.3


From 38fdee7673a2067733d69244de54312c3ae200db Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 5 Jul 2024 15:01:06 -0400
Subject: Introduce move assignment and construction to LLPointer

---
 indra/llcommon/llpointer.h | 111 ++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 94 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
index f5916f9d58..6edff9fa5e 100644
--- a/indra/llcommon/llpointer.h
+++ b/indra/llcommon/llpointer.h
@@ -46,8 +46,11 @@
 template <class Type> class LLPointer
 {
 public:
+    template<typename Subclass>
+    friend class LLPointer;
+
     LLPointer() :
-        mPointer(NULL)
+        mPointer(nullptr)
     {
     }
 
@@ -63,6 +66,12 @@ public:
         ref();
     }
 
+    LLPointer(LLPointer<Type>&& ptr) noexcept
+    {
+        mPointer = ptr.mPointer;
+        ptr.mPointer = nullptr;
+    }
+
     // Support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
     template<typename Subclass>
     LLPointer(const LLPointer<Subclass>& ptr) :
@@ -71,6 +80,13 @@ public:
         ref();
     }
 
+    template<typename Subclass>
+    LLPointer(LLPointer<Subclass>&& ptr) noexcept :
+        mPointer(ptr.get())
+    {
+        ptr.mPointer = nullptr;
+    }
+
     ~LLPointer()
     {
         unref();
@@ -82,11 +98,11 @@ public:
     const Type& operator*() const               { return *mPointer; }
     Type&   operator*()                         { return *mPointer; }
 
-    operator BOOL() const                       { return (mPointer != NULL); }
-    operator bool() const                       { return (mPointer != NULL); }
-    bool operator!() const                      { return (mPointer == NULL); }
-    bool isNull() const                         { return (mPointer == NULL); }
-    bool notNull() const                        { return (mPointer != NULL); }
+    operator BOOL() const                       { return (mPointer != nullptr); }
+    operator bool() const                       { return (mPointer != nullptr); }
+    bool operator!() const                      { return (mPointer == nullptr); }
+    bool isNull() const                         { return (mPointer == nullptr); }
+    bool notNull() const                        { return (mPointer != nullptr); }
 
     operator Type*() const                      { return mPointer; }
     bool operator !=(Type* ptr) const           { return (mPointer != ptr); }
@@ -107,6 +123,17 @@ public:
         return *this;
     }
 
+    LLPointer<Type>& operator =(LLPointer<Type>&& ptr)
+    {
+        if (mPointer != ptr.mPointer)
+        {
+            unref();
+            mPointer = ptr.mPointer;
+            ptr.mPointer = nullptr;
+        }
+        return *this;
+    }
+
     // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
     template<typename Subclass>
     LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr)
@@ -115,6 +142,18 @@ public:
         return *this;
     }
 
+    template<typename Subclass>
+    LLPointer<Type>& operator =(LLPointer<Subclass>&& ptr)
+    {
+        if (mPointer != ptr.mPointer)
+        {
+            unref();
+            mPointer = ptr.mPointer;
+            ptr.mPointer = nullptr;
+        }
+        return *this;
+    }
+
     // Just exchange the pointers, which will not change the reference counts.
     static void swap(LLPointer<Type>& a, LLPointer<Type>& b)
     {
@@ -141,9 +180,9 @@ protected:
         if (mPointer)
         {
             Type *temp = mPointer;
-            mPointer = NULL;
+            mPointer = nullptr;
             temp->unref();
-            if (mPointer != NULL)
+            if (mPointer != nullptr)
             {
                 LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL;
                 unref();
@@ -168,9 +207,11 @@ protected:
 
 template <class Type> class LLConstPointer
 {
+    template<typename Subclass>
+    friend class LLConstPointer;
 public:
     LLConstPointer() :
-        mPointer(NULL)
+        mPointer(nullptr)
     {
     }
 
@@ -186,6 +227,12 @@ public:
         ref();
     }
 
+    LLConstPointer(LLConstPointer<Type>&& ptr) noexcept
+    {
+        mPointer = ptr.mPointer;
+        ptr.mPointer = nullptr;
+    }
+
     // support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
     template<typename Subclass>
     LLConstPointer(const LLConstPointer<Subclass>& ptr) :
@@ -194,6 +241,13 @@ public:
         ref();
     }
 
+    template<typename Subclass>
+    LLConstPointer(LLConstPointer<Subclass>&& ptr) noexcept :
+        mPointer(ptr.get())
+    {
+        ptr.mPointer = nullptr;
+    }
+
     ~LLConstPointer()
     {
         unref();
@@ -203,11 +257,11 @@ public:
     const Type* operator->() const              { return mPointer; }
     const Type& operator*() const               { return *mPointer; }
 
-    operator BOOL() const                       { return (mPointer != NULL); }
-    operator bool() const                       { return (mPointer != NULL); }
-    bool operator!() const                      { return (mPointer == NULL); }
-    bool isNull() const                         { return (mPointer == NULL); }
-    bool notNull() const                        { return (mPointer != NULL); }
+    operator BOOL() const                       { return (mPointer != nullptr); }
+    operator bool() const                       { return (mPointer != nullptr); }
+    bool operator!() const                      { return (mPointer == nullptr); }
+    bool isNull() const                         { return (mPointer == nullptr); }
+    bool notNull() const                        { return (mPointer != nullptr); }
 
     operator const Type*() const                { return mPointer; }
     bool operator !=(const Type* ptr) const     { return (mPointer != ptr); }
@@ -239,6 +293,17 @@ public:
         return *this;
     }
 
+    LLConstPointer<Type>& operator =(LLConstPointer<Type>&& ptr)
+    {
+        if (mPointer != ptr.mPointer)
+        {
+            unref();
+            mPointer = ptr.mPointer;
+            ptr.mPointer = nullptr;
+        }
+        return *this;
+    }
+
     // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
     template<typename Subclass>
     LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr)
@@ -252,6 +317,18 @@ public:
         return *this;
     }
 
+    template<typename Subclass>
+    LLConstPointer<Type>& operator =(LLConstPointer<Subclass>&& ptr)
+    {
+        if (mPointer != ptr.mPointer)
+        {
+            unref();
+            mPointer = ptr.mPointer;
+            ptr.mPointer = nullptr;
+        }
+        return *this;
+    }
+
     // Just exchange the pointers, which will not change the reference counts.
     static void swap(LLConstPointer<Type>& a, LLConstPointer<Type>& b)
     {
@@ -278,9 +355,9 @@ protected:
         if (mPointer)
         {
             const Type *temp = mPointer;
-            mPointer = NULL;
+            mPointer = nullptr;
             temp->unref();
-            if (mPointer != NULL)
+            if (mPointer != nullptr)
             {
                 LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL;
                 unref();
@@ -313,7 +390,7 @@ public:
     :   LLPointer<Type>(ptr),
         mStayUnique(false)
     {
-        if (ptr.mForceUnique)
+        if (ptr.mStayUnique)
         {
             makeUnique();
         }
-- 
cgit v1.2.3


From 9fdca96f8bd2211a99fe88e57b70cbecefa20b6d Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Mon, 8 Jul 2024 20:27:14 +0200
Subject: Re-enable compiler warnings C4244 and C4396 except for
 lltracerecording.h and llunittype.h for now

---
 indra/llappearance/llpolymorph.cpp                 |   2 +-
 indra/llappearance/lltexlayer.cpp                  |   2 +-
 indra/llcharacter/llkeyframewalkmotion.cpp         |   2 +-
 indra/llcommon/llpreprocessor.h                    |   2 -
 indra/llcommon/llqueuedthread.cpp                  |   2 +-
 indra/llcommon/llrand.cpp                          |   2 +-
 indra/llcommon/llsdparam.cpp                       |   2 +-
 indra/llcommon/llsdserialize.cpp                   |   6 +-
 indra/llcommon/llsdserialize_xml.cpp               |   2 +-
 indra/llcommon/llsingleton.h                       |   7 +-
 indra/llcommon/llstring.cpp                        |   2 +-
 indra/llcommon/lltimer.cpp                         |   2 +-
 indra/llcommon/lltraceaccumulators.cpp             |  18 +--
 indra/llcommon/lltraceaccumulators.h               |  26 ++---
 indra/llcommon/lltracerecording.cpp                |  14 +--
 indra/llcommon/lltracerecording.h                  |   9 ++
 indra/llcommon/llunittype.h                        |   9 ++
 indra/llcommon/tests/lleventfilter_test.cpp        |  14 +--
 indra/llcommon/tests/llsdserialize_test.cpp        |   2 +-
 indra/llcommon/tests/lltrace_test.cpp              |   4 +
 indra/llcommon/tests/llunits_test.cpp              |   2 +-
 indra/llcorehttp/_httpinternal.h                   |  52 ++++-----
 indra/llcorehttp/httpstats.h                       |   4 +-
 indra/llcrashlogger/llcrashlock.cpp                |   7 +-
 indra/llfilesystem/lldir.cpp                       |   8 +-
 indra/llfilesystem/lldiskcache.cpp                 |   4 +-
 indra/llfilesystem/llfilesystem.cpp                |   6 +-
 indra/llimage/llimagefilter.cpp                    | 114 +++++++++----------
 indra/llimagej2coj/llimagej2coj.cpp                |   2 +-
 indra/llinventory/llparcel.cpp                     |   2 +-
 indra/llinventory/llsettingsbase.cpp               |  12 +-
 indra/llinventory/llsettingsbase.h                 |   2 +-
 indra/llinventory/llsettingsdaycycle.cpp           |   2 +-
 indra/llinventory/llsettingssky.cpp                |  60 +++++-----
 indra/llinventory/llsettingswater.h                |  14 +--
 indra/llinventory/tests/inventorymisc_test.cpp     |   6 +-
 indra/llmath/llcalcparser.h                        |   2 +-
 indra/llmath/llquaternion.h                        |   8 +-
 indra/llmath/v3color.h                             |   8 +-
 indra/llmath/v4color.h                             |   8 +-
 indra/llmath/v4math.h                              |   8 +-
 indra/llmessage/llbuffer.cpp                       |  16 +--
 indra/llmessage/llbufferstream.cpp                 |   4 +-
 indra/llmessage/llcircuit.cpp                      |   4 +-
 indra/llmessage/lliohttpserver.cpp                 |   2 +-
 indra/llprimitive/lldaeloader.cpp                  | 124 ++++++++++-----------
 indra/llprimitive/llgltfmaterial.cpp               |   8 +-
 indra/llprimitive/llmodel.cpp                      |  10 +-
 indra/llprimitive/lltreeparams.cpp                 |   2 +-
 indra/llrender/llfontfreetype.cpp                  |   2 +-
 indra/llrender/llfontfreetypesvg.cpp               |  20 ++--
 indra/llrender/llfontgl.cpp                        |   4 +-
 indra/llrender/llfontregistry.cpp                  |   2 +-
 indra/llrender/llglslshader.cpp                    |  16 +--
 indra/llrender/llimagegl.cpp                       |   6 +-
 indra/llrender/llpostprocess.cpp                   |   2 +-
 indra/llrender/llrender2dutils.cpp                 |  14 +--
 indra/llrender/llrendertarget.cpp                  |   2 +-
 indra/llrender/llshadermgr.cpp                     |   8 +-
 indra/llrender/lluiimage.cpp                       |   6 +-
 indra/llui/llbadge.cpp                             |  12 +-
 indra/llui/llbutton.cpp                            |   2 +-
 indra/llui/llconsole.cpp                           |   4 +-
 indra/llui/llf32uictrl.cpp                         |   4 +-
 indra/llui/llfloater.cpp                           |  30 ++---
 indra/llui/llfolderviewitem.cpp                    |  10 +-
 indra/llui/llkeywords.cpp                          |  12 +-
 indra/llui/lllayoutstack.cpp                       |   6 +-
 indra/llui/lllineeditor.cpp                        |   4 +-
 indra/llui/llscrolllistcell.cpp                    |   8 +-
 indra/llui/llspellcheck.cpp                        |   2 +-
 indra/llui/llstatbar.cpp                           |  46 ++++----
 indra/llui/llstatgraph.cpp                         |   4 +-
 indra/llui/lltabcontainer.cpp                      |   2 +-
 indra/llui/lltextbase.cpp                          |  44 ++++----
 indra/llui/lltexteditor.cpp                        |   8 +-
 indra/llui/llvirtualtrackball.cpp                  |  30 ++---
 indra/llui/llxyvector.cpp                          |  22 ++--
 indra/llwindow/lldxhardware.cpp                    |   4 +-
 indra/llwindow/llwindowwin32.cpp                   |  38 +++----
 indra/media_plugins/libvlc/media_plugin_libvlc.cpp |   4 +-
 indra/newview/gltf/accessor.cpp                    |   4 +-
 indra/newview/gltf/animation.cpp                   |   4 +-
 indra/newview/gltf/asset.cpp                       |   8 +-
 indra/newview/gltf/buffer_util.h                   |  10 +-
 indra/newview/gltfscenemanager.cpp                 |   2 +-
 indra/newview/llaccountingcostmanager.cpp          |   6 +-
 indra/newview/llagent.cpp                          |   8 +-
 indra/newview/llagentcamera.cpp                    |   4 +-
 indra/newview/llagentlistener.cpp                  |  12 +-
 indra/newview/llagentpilot.cpp                     |   6 +-
 indra/newview/llappearancemgr.cpp                  |   4 +-
 indra/newview/llappviewer.cpp                      |   8 +-
 indra/newview/llavatarpropertiesprocessor.cpp      |   4 +-
 indra/newview/llavatarrenderinfoaccountant.cpp     |   2 +-
 indra/newview/llavatarrendernotifier.cpp           |   6 +-
 indra/newview/llchannelmanager.cpp                 |   2 +-
 indra/newview/llchathistory.cpp                    |   2 +-
 indra/newview/llchatitemscontainerctrl.cpp         |   4 +-
 indra/newview/lldateutil.cpp                       |   2 +-
 indra/newview/lldrawpoolwater.cpp                  |   4 +-
 indra/newview/lldrawpoolwlsky.cpp                  |   8 +-
 indra/newview/llenvironment.cpp                    |  42 +++----
 indra/newview/llexpandabletextbox.cpp              |   4 +-
 indra/newview/llface.cpp                           |   2 +-
 indra/newview/llfasttimerview.cpp                  |  28 ++---
 indra/newview/llflexibleobject.cpp                 |   4 +-
 indra/newview/llfloater360capture.cpp              |   2 +-
 indra/newview/llfloaterbanduration.cpp             |   2 +-
 indra/newview/llfloaterbvhpreview.cpp              |   2 +-
 indra/newview/llfloaterconversationpreview.cpp     |   4 +-
 indra/newview/llfloatereditextdaycycle.cpp         |  22 ++--
 indra/newview/llfloateremojipicker.cpp             |  18 +--
 indra/newview/llfloaterenvironmentadjust.cpp       |  26 ++---
 indra/newview/llfloaterimagepreview.cpp            |   4 +-
 indra/newview/llfloaterimnearbychathandler.cpp     |   4 +-
 indra/newview/llfloaterland.cpp                    |   6 +-
 indra/newview/llfloatermemleak.cpp                 |  13 +--
 indra/newview/llfloatermodelpreview.cpp            |  10 +-
 indra/newview/llfloaterpreference.cpp              |   2 +-
 indra/newview/llfloaterprofiletexture.cpp          |   4 +-
 indra/newview/llfloaterregioninfo.cpp              |  12 +-
 indra/newview/llfloatersettingsdebug.cpp           |   8 +-
 indra/newview/llfloatersnapshot.cpp                |  22 ++--
 indra/newview/llfloatertopobjects.cpp              |   4 +-
 indra/newview/llfloateruipreview.cpp               |  16 +--
 indra/newview/llglsandbox.cpp                      |   6 +-
 indra/newview/llgltfmaterialpreviewmgr.cpp         |   2 +-
 indra/newview/llgroupmgr.cpp                       |   4 +-
 indra/newview/llheroprobemanager.cpp               |   8 +-
 indra/newview/llhttpretrypolicy.cpp                |   2 +-
 indra/newview/llhudnametag.cpp                     |   4 +-
 indra/newview/llimprocessing.cpp                   |   2 +-
 indra/newview/llimview.cpp                         |   2 +-
 indra/newview/llinspecttexture.cpp                 |   2 +-
 indra/newview/llinventoryfilter.cpp                |   6 +-
 indra/newview/llinventorygallery.cpp               |   2 +-
 indra/newview/llinventorypanel.cpp                 |   2 +-
 indra/newview/lljoystickbutton.cpp                 |   8 +-
 indra/newview/llmachineid.cpp                      |   2 +-
 indra/newview/llmanip.cpp                          |  20 ++--
 indra/newview/llmanipscale.cpp                     |  14 +--
 indra/newview/llmaterialeditor.cpp                 |  14 +--
 indra/newview/llmeshrepository.cpp                 |  10 +-
 indra/newview/llmodelpreview.cpp                   |  32 +++---
 indra/newview/llnavigationbar.cpp                  |   2 +-
 indra/newview/llnetmap.cpp                         |  10 +-
 indra/newview/llnotificationtiphandler.cpp         |   4 +-
 indra/newview/llpanelclassified.cpp                |   4 +-
 indra/newview/llpaneleditsky.cpp                   |  92 +++++++--------
 indra/newview/llpaneleditwater.cpp                 |  16 +--
 indra/newview/llpanelemojicomplete.cpp             |  18 +--
 indra/newview/llpanelenvironment.cpp               |  40 +++----
 indra/newview/llpanelexperiencelog.cpp             |   2 +-
 indra/newview/llpanelface.cpp                      |  88 +++++++--------
 indra/newview/llpanelmaininventory.cpp             |   2 +-
 indra/newview/llpanelmarketplaceinbox.cpp          |   2 +-
 indra/newview/llpanelmarketplaceinboxinventory.cpp |   4 +-
 indra/newview/llpanelpermissions.cpp               |   8 +-
 indra/newview/llpanelplaceprofile.cpp              |   6 +-
 indra/newview/llpanelprimmediacontrols.cpp         |   4 +-
 indra/newview/llpanelsnapshot.cpp                  |   6 +-
 indra/newview/llpanelvolume.cpp                    |  24 ++--
 indra/newview/llpathfindingcharacter.cpp           |   6 +-
 indra/newview/llperfstats.cpp                      |  12 +-
 indra/newview/llphysicsmotion.cpp                  |  14 +--
 indra/newview/llpreviewtexture.cpp                 |   4 +-
 indra/newview/llprogressview.cpp                   |   4 +-
 indra/newview/llrecentpeople.cpp                   |   4 +-
 indra/newview/llreflectionmapmanager.cpp           |  10 +-
 indra/newview/llscripteditor.cpp                   |   2 +-
 indra/newview/llsechandler_basic.cpp               |  10 +-
 indra/newview/llsettingsvo.cpp                     |   8 +-
 indra/newview/llsidepanelinventory.cpp             |   4 +-
 indra/newview/llslurl.cpp                          |   4 +-
 indra/newview/llsnapshotlivepreview.cpp            |   2 +-
 indra/newview/llspatialpartition.cpp               |   4 +-
 indra/newview/llstartup.cpp                        |   4 +-
 indra/newview/llteleporthistorystorage.cpp         |   2 +-
 indra/newview/lltexturecache.cpp                   |   4 +-
 indra/newview/lltexturectrl.cpp                    |  10 +-
 indra/newview/lltexturefetch.cpp                   |   2 +-
 indra/newview/lltextureinfo.cpp                    |   2 +-
 indra/newview/lltextureview.cpp                    |  10 +-
 indra/newview/llthumbnailctrl.cpp                  |   4 +-
 indra/newview/lltinygltfhelper.cpp                 |   2 +-
 indra/newview/lltoast.cpp                          |   8 +-
 indra/newview/lltoolbrush.cpp                      |   2 +-
 indra/newview/lltoolfocus.cpp                      |   2 +-
 indra/newview/lltoolmorph.cpp                      |   2 +-
 indra/newview/lltracker.cpp                        |   2 +-
 indra/newview/llurldispatcher.cpp                  |  12 +-
 indra/newview/llviewerassetupload.cpp              |   2 +-
 indra/newview/llviewercamera.cpp                   |   8 +-
 indra/newview/llviewercontrol.cpp                  |   2 +-
 indra/newview/llviewerdisplay.cpp                  |  10 +-
 indra/newview/llviewerinventory.cpp                |   8 +-
 indra/newview/llviewerjoystick.cpp                 |   2 +-
 indra/newview/llviewermedia.cpp                    |  12 +-
 indra/newview/llviewermediafocus.cpp               |   6 +-
 indra/newview/llviewermessage.cpp                  |   4 +-
 indra/newview/llviewerobject.cpp                   |   4 +-
 indra/newview/llviewerobjectlist.cpp               |  16 +--
 indra/newview/llviewerregion.cpp                   |   4 +-
 indra/newview/llviewerstats.cpp                    |   4 +-
 indra/newview/llviewertexteditor.cpp               |   2 +-
 indra/newview/llviewertexture.cpp                  |  20 ++--
 indra/newview/llviewertextureanim.cpp              |   2 +-
 indra/newview/llviewertexturelist.cpp              |   4 +-
 indra/newview/llviewerwindow.cpp                   |  18 +--
 indra/newview/llvoavatar.cpp                       |  12 +-
 indra/newview/llvoavatarself.cpp                   |   2 +-
 indra/newview/llvocache.cpp                        |  10 +-
 indra/newview/llvoicevivox.cpp                     |   2 +-
 indra/newview/llvoicewebrtc.cpp                    |  12 +-
 indra/newview/llvosky.cpp                          |  16 +--
 indra/newview/llvosky.h                            |  10 +-
 indra/newview/llvovolume.cpp                       |  18 +--
 indra/newview/llvowater.cpp                        |   8 +-
 indra/newview/llworld.cpp                          |   6 +-
 indra/newview/llworldmapview.cpp                   |  14 +--
 indra/newview/llxmlrpctransaction.cpp              |   4 +-
 indra/newview/noise.h                              |   2 +-
 indra/newview/pipeline.cpp                         |  48 ++++----
 indra/test/io.cpp                                  |   2 +-
 225 files changed, 1161 insertions(+), 1142 deletions(-)

(limited to 'indra')

diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index 7ae760d312..8df8a9726f 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -557,7 +557,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
     }
     if (mLastWeight != mLastWeight)
     {
-        mLastWeight = mCurWeight+.001;
+        mLastWeight = mCurWeight+.001f;
     }
 
     // perform differential update of morph
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index d376c68c7f..aa48a2d621 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -106,7 +106,7 @@ void LLTexLayerSetBuffer::pushProjection() const
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho(0.0f, getCompositeWidth(), 0.0f, getCompositeHeight(), -1.0f, 1.0f);
+    gGL.ortho(0.0f, (F32)getCompositeWidth(), 0.0f, (F32)getCompositeHeight(), -1.0f, 1.0f);
 
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp
index 605e15f442..f8691b5f59 100644
--- a/indra/llcharacter/llkeyframewalkmotion.cpp
+++ b/indra/llcharacter/llkeyframewalkmotion.cpp
@@ -383,7 +383,7 @@ bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
     F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor;
 
     // roll is critically damped interpolation between current roll and angular velocity-derived target roll
-    mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, U32Milliseconds(100));
+    mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, F32Milliseconds(100.f));
 
     LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f));
     mPelvisState->setRotation(roll);
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 0248e8f8b9..0d87d1e433 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -130,8 +130,6 @@
 #endif
 
 // level 4 warnings that we need to disable:
-#pragma warning (disable : 4244) // possible loss of data on conversions
-#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
 #pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
 #pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
 #endif  //  LL_MSVC
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index 7d77f6f6a9..1c4ac5a7bf 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -483,7 +483,7 @@ void LLQueuedThread::processRequest(LLQueuedThread::QueuedRequest* req)
 
                             if (sleep_time.count() > 0)
                             {
-                                ms_sleep(sleep_time.count());
+                                ms_sleep((U32)sleep_time.count());
                             }
                         }
                         processRequest(req);
diff --git a/indra/llcommon/llrand.cpp b/indra/llcommon/llrand.cpp
index 25d75af568..2c51e6f07f 100644
--- a/indra/llcommon/llrand.cpp
+++ b/indra/llcommon/llrand.cpp
@@ -85,7 +85,7 @@ inline F32 ll_internal_random<F32>()
     // Per Monty, it's important to clamp using the correct fmodf() rather
     // than expanding to F64 for fmod() and then truncating back to F32. Prior
     // to this change, we were getting sporadic ll_frand() == 1.0 results.
-    F32 rv{ narrow<F32>(gRandomGenerator()) };
+    F32 rv{ narrow<F64>(gRandomGenerator()) };
     if(!((rv >= 0.0f) && (rv < 1.0f))) return fmodf(rv, 1.0f);
     return rv;
 }
diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp
index b981be4d0a..3ae153a67c 100644
--- a/indra/llcommon/llsdparam.cpp
+++ b/indra/llcommon/llsdparam.cpp
@@ -149,7 +149,7 @@ bool LLParamSDParser::readF32(Parser& parser, void* val_ptr)
 {
     LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
 
-    *((F32*)val_ptr) = self.mCurReadSD->asReal();
+    *((F32*)val_ptr) = (F32)self.mCurReadSD->asReal();
     return true;
 }
 
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 15002580c9..5e267c6805 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -231,7 +231,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, llssize max_bytes)
         }
         // Since we've already read 'inbuf' bytes into 'hdr_buf', prepend that
         // data to whatever remains in 'str'.
-        LLMemoryStreamBuf already(reinterpret_cast<const U8*>(hdr_buf), inbuf);
+        LLMemoryStreamBuf already(reinterpret_cast<const U8*>(hdr_buf), (S32)inbuf);
         cat_streambuf prebuff(&already, str.rdbuf());
         std::istream  prepend(&prebuff);
 #if 1
@@ -566,7 +566,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) c
                 data,
                 NOTATION_FALSE_SERIAL,
                 false);
-            if(PARSE_FAILURE == cnt) parse_count = cnt;
+            if(PARSE_FAILURE == cnt) parse_count = (S32)cnt;
             else account(cnt);
         }
         else
@@ -592,7 +592,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) c
         if(isalpha(c))
         {
             auto cnt = deserialize_boolean(istr,data,NOTATION_TRUE_SERIAL,true);
-            if(PARSE_FAILURE == cnt) parse_count = cnt;
+            if(PARSE_FAILURE == cnt) parse_count = (S32)cnt;
             else account(cnt);
         }
         else
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index 88cbb3b984..dd00c39180 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -554,7 +554,7 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, llssize len)
     if ( buf != NULL
         && len > 0 )
     {
-        XML_Status status = XML_Parse(mParser, buf, len, false);
+        XML_Status status = XML_Parse(mParser, buf, (int)len, 0);
         if (status == XML_STATUS_ERROR)
         {
             LL_INFOS() << "Unexpected XML parsing error at start" << LL_ENDL;
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 7c6be25309..316831cd74 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -37,7 +37,8 @@
 #include "llmainthreadtask.h"
 
 #ifdef LL_WINDOWS
-#pragma warning( disable : 4506 )   // no definition for inline function
+#pragma warning(push)
+#pragma warning(disable : 4506)   // no definition for inline function
 #endif
 
 class LLSingletonBase: private boost::noncopyable
@@ -861,4 +862,8 @@ private:
 template <class T>
 T* LLSimpleton<T>::sInstance{ nullptr };
 
+#ifdef LL_WINDOWS
+#pragma warning(pop)
+#endif
+
 #endif
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 6f3d193d6b..c57f8b1e96 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -250,7 +250,7 @@ LLWString utf16str_to_wstring(const U16* utf16str, size_t len)
     while (i < len)
     {
         llwchar cur_char;
-        i += utf16chars_to_wchar(chars16+i, &cur_char);
+        i += (S32)utf16chars_to_wchar(chars16+i, &cur_char);
         wout += cur_char;
     }
     return wout;
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index a3e871661c..e5c0970d35 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -101,7 +101,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
     WaitForSingleObject(timer, INFINITE);
     CloseHandle(timer);
 #else
-    Sleep(us / 1000);
+    Sleep((DWORD)(us / 1000));
 #endif
 
     return 0;
diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp
index 8741087f3a..dc9a87eb80 100644
--- a/indra/llcommon/lltraceaccumulators.cpp
+++ b/indra/llcommon/lltraceaccumulators.cpp
@@ -100,7 +100,7 @@ bool AccumulatorBufferGroup::isCurrent() const
     return mCounts.isCurrent();
 }
 
-void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
+void AccumulatorBufferGroup::append(const AccumulatorBufferGroup& other)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
     mCounts.addSamples(other.mCounts, SEQUENTIAL);
@@ -109,7 +109,7 @@ void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
     mStackTimers.addSamples(other.mStackTimers, SEQUENTIAL);
 }
 
-void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
+void AccumulatorBufferGroup::merge(const AccumulatorBufferGroup& other)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
     mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
@@ -140,7 +140,7 @@ void AccumulatorBufferGroup::sync()
 
 F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const SampleAccumulator& b)
 {
-    const F64 epsilon = 0.0000001;
+    constexpr F64 epsilon = 0.0000001;
 
     if (a.getSamplingTime() > epsilon && b.getSamplingTime() > epsilon)
     {
@@ -170,7 +170,7 @@ F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const Samp
     return a.getSumOfSquares();
 }
 
-void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppendType append_type )
+void SampleAccumulator::addSamples(const SampleAccumulator& other, EBufferAppendType append_type)
 {
     if (append_type == NON_SEQUENTIAL)
     {
@@ -205,7 +205,7 @@ void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppen
     }
 }
 
-void SampleAccumulator::reset( const SampleAccumulator* other )
+void SampleAccumulator::reset(const SampleAccumulator* other)
 {
     mLastValue = other ? other->mLastValue : NaN;
     mHasValue = other ? other->mHasValue : false;
@@ -243,7 +243,7 @@ F64 EventAccumulator::mergeSumsOfSquares(const EventAccumulator& a, const EventA
     return a.mSumOfSquares;
 }
 
-void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendType append_type )
+void EventAccumulator::addSamples(const EventAccumulator& other, EBufferAppendType append_type)
 {
     if (other.mNumSamples)
     {
@@ -269,12 +269,12 @@ void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendT
     }
 }
 
-void EventAccumulator::reset( const EventAccumulator* other )
+void EventAccumulator::reset(const EventAccumulator* other)
 {
     mNumSamples = 0;
     mSum = 0;
-    mMin = F32(NaN);
-    mMax = F32(NaN);
+    mMin = NaN;
+    mMax = NaN;
     mMean = NaN;
     mSumOfSquares = 0;
     mLastValue = other ? other->mLastValue : NaN;
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index ba7acf9547..0a2e2bf997 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -39,7 +39,7 @@
 
 namespace LLTrace
 {
-    const F64 NaN   = std::numeric_limits<double>::quiet_NaN();
+    constexpr F64 NaN = std::numeric_limits<double>::quiet_NaN();
 
     enum EBufferAppendType
     {
@@ -251,8 +251,8 @@ namespace LLTrace
 
         EventAccumulator()
         :   mSum(0),
-            mMin(F32(NaN)),
-            mMax(F32(NaN)),
+            mMin(NaN),
+            mMax(NaN),
             mMean(NaN),
             mSumOfSquares(0),
             mNumSamples(0),
@@ -288,11 +288,11 @@ namespace LLTrace
         void sync(F64SecondsImplicit) {}
 
         F64 getSum() const               { return mSum; }
-        F32 getMin() const               { return mMin; }
-        F32 getMax() const               { return mMax; }
+        F64 getMin() const               { return mMin; }
+        F64 getMax() const               { return mMax; }
         F64 getLastValue() const         { return mLastValue; }
         F64 getMean() const              { return mMean; }
-        F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mNumSamples); }
+        F64 getStandardDeviation() const { return sqrt(mSumOfSquares / mNumSamples); }
         F64 getSumOfSquares() const      { return mSumOfSquares; }
         S32 getSampleCount() const       { return mNumSamples; }
         bool hasValue() const            { return mNumSamples > 0; }
@@ -307,7 +307,7 @@ namespace LLTrace
         F64 mMean,
             mSumOfSquares;
 
-        F32 mMin,
+        F64 mMin,
             mMax;
 
         S32 mNumSamples;
@@ -322,8 +322,8 @@ namespace LLTrace
 
         SampleAccumulator()
         :   mSum(0),
-            mMin(F32(NaN)),
-            mMax(F32(NaN)),
+            mMin(NaN),
+            mMax(NaN),
             mMean(NaN),
             mSumOfSquares(0),
             mLastSampleTimeStamp(0),
@@ -378,11 +378,11 @@ namespace LLTrace
         }
 
         F64 getSum() const               { return mSum; }
-        F32 getMin() const               { return mMin; }
-        F32 getMax() const               { return mMax; }
+        F64 getMin() const               { return mMin; }
+        F64 getMax() const               { return mMax; }
         F64 getLastValue() const         { return mLastValue; }
         F64 getMean() const              { return mMean; }
-        F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); }
+        F64 getStandardDeviation() const { return sqrt(mSumOfSquares / mTotalSamplingTime); }
         F64 getSumOfSquares() const      { return mSumOfSquares; }
         F64SecondsImplicit getSamplingTime() const { return mTotalSamplingTime; }
         S32 getSampleCount() const       { return mNumSamples; }
@@ -402,7 +402,7 @@ namespace LLTrace
                 mLastSampleTimeStamp,
                 mTotalSamplingTime;
 
-        F32     mMin,
+        F64     mMin,
                 mMax;
 
         S32     mNumSamples;
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index 1ec83be7cb..c23adca7e8 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -229,7 +229,7 @@ F32 Recording::getPerSec(const StatType<TimeBlockAccumulator::CallCountFacet>& s
     update();
     const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()];
     const TimeBlockAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mStackTimers[stat.getIndex()] : NULL;
-    return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / mElapsedSeconds.value();
+    return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / (F32)mElapsedSeconds.value();
 }
 
 bool Recording::hasValue(const StatType<CountAccumulator>& stat)
@@ -296,11 +296,11 @@ F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
     const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
     if (active_accumulator && active_accumulator->hasValue())
     {
-        F32 t = 0.0f;
+        F64 t = 0.0;
         S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
         if (div > 0)
         {
-            t = active_accumulator->getSampleCount() / div;
+            t = (F64)active_accumulator->getSampleCount() / (F64)div;
         }
         return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
     }
@@ -319,7 +319,7 @@ F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
     if (active_accumulator && active_accumulator->hasValue())
     {
         F64 sum_of_squares = SampleAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
-        return sqrtf(sum_of_squares / (accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
+        return sqrt(sum_of_squares / (F64)(accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
     }
     else
     {
@@ -382,11 +382,11 @@ F64 Recording::getMean( const StatType<EventAccumulator>& stat )
     const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
     if (active_accumulator && active_accumulator->hasValue())
     {
-        F32 t = 0.0f;
+        F64 t = 0.0;
         S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
         if (div > 0)
         {
-            t = active_accumulator->getSampleCount() / div;
+            t = (F64)active_accumulator->getSampleCount() / (F64)div;
         }
         return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
     }
@@ -405,7 +405,7 @@ F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
     if (active_accumulator && active_accumulator->hasValue())
     {
         F64 sum_of_squares = EventAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
-        return sqrtf(sum_of_squares / (accumulator.getSampleCount() + active_accumulator->getSampleCount()));
+        return sqrt(sum_of_squares / (F64)(accumulator.getSampleCount() + active_accumulator->getSampleCount()));
     }
     else
     {
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index 985f06cd59..ad4c91d85b 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -35,6 +35,11 @@
 #include "llpointer.h"
 #include <limits>
 
+#ifdef LL_WINDOWS
+#pragma warning(push)
+#pragma warning(disable : 4244) // possible loss of data on conversions
+#endif
+
 class LLStopWatchControlsMixinCommon
 {
 public:
@@ -714,4 +719,8 @@ namespace LLTrace
     };
 }
 
+#ifdef LL_WINDOWS
+#pragma warning(pop)
+#endif
+
 #endif // LL_LLTRACERECORDING_H
diff --git a/indra/llcommon/llunittype.h b/indra/llcommon/llunittype.h
index 83ce0d05a8..bb1408609a 100644
--- a/indra/llcommon/llunittype.h
+++ b/indra/llcommon/llunittype.h
@@ -31,6 +31,11 @@
 #include "llpreprocessor.h"
 #include "llerror.h"
 
+#ifdef LL_WINDOWS
+#pragma warning(push)
+#pragma warning(disable : 4244) // possible loss of data on conversions
+#endif
+
 //lightweight replacement of type traits for simple type equality check
 template<typename S, typename T>
 struct LLIsSameType
@@ -846,4 +851,8 @@ LL_FORCE_INLINE S2 ll_convert_units(LLUnit<S1, base_unit_name> in, LLUnit<S2, un
     typedef LLUnit<U64, ns::unit_name> U64##unit_name;                  \
     typedef LLUnitImplicit<U64, ns::unit_name> U64##unit_name##Implicit
 
+#ifdef LL_WINDOWS
+#pragma warning(pop)
+#endif
+
 #endif //LL_UNITTYPE_H
diff --git a/indra/llcommon/tests/lleventfilter_test.cpp b/indra/llcommon/tests/lleventfilter_test.cpp
index a01d7fe415..d7b80e2545 100644
--- a/indra/llcommon/tests/lleventfilter_test.cpp
+++ b/indra/llcommon/tests/lleventfilter_test.cpp
@@ -81,13 +81,13 @@ class TestEventThrottle: public LLEventThrottleBase
 public:
     TestEventThrottle(F32 interval):
         LLEventThrottleBase(interval),
-        mAlarmRemaining(-1),
-        mTimerRemaining(-1)
+        mAlarmRemaining(-1.f),
+        mTimerRemaining(-1.f)
     {}
     TestEventThrottle(LLEventPump& source, F32 interval):
         LLEventThrottleBase(source, interval),
-        mAlarmRemaining(-1),
-        mTimerRemaining(-1)
+        mAlarmRemaining(-1.f),
+        mTimerRemaining(-1.f)
     {}
 
     /*----- implementation of LLEventThrottleBase timing functionality -----*/
@@ -100,12 +100,12 @@ public:
     virtual bool alarmRunning() const /*override*/
     {
         // decrementing to exactly 0 should mean the alarm fires
-        return mAlarmRemaining > 0;
+        return mAlarmRemaining > 0.f;
     }
 
     virtual void alarmCancel() /*override*/
     {
-        mAlarmRemaining = -1;
+        mAlarmRemaining = -1.f;
     }
 
     virtual void timerSet(F32 interval) /*override*/
@@ -116,7 +116,7 @@ public:
     virtual F32  timerGetRemaining() const /*override*/
     {
         // LLTimer.getRemainingTimeF32() never returns negative; 0.0 means expired
-        return (mTimerRemaining > 0.0)? mTimerRemaining : 0.0;
+        return (mTimerRemaining > 0.0f)? mTimerRemaining : 0.0f;
     }
 
     /*------------------- methods for manipulating time --------------------*/
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index fb2af1d2db..fae9f7023f 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -1809,7 +1809,7 @@ namespace tut
         std::string q("\"");
         std::string qPYTHON(q + PYTHON + q);
         std::string qscript(q + scriptfile.getName() + q);
-        int rc = _spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
+        int rc = (int)_spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
                          std::forward<ARGS>(args)..., NULL);
         if (rc == -1)
         {
diff --git a/indra/llcommon/tests/lltrace_test.cpp b/indra/llcommon/tests/lltrace_test.cpp
index 8851f87b91..923a67ac8e 100644
--- a/indra/llcommon/tests/lltrace_test.cpp
+++ b/indra/llcommon/tests/lltrace_test.cpp
@@ -32,6 +32,10 @@
 #include "lltracerecording.h"
 #include "../test/lltut.h"
 
+#ifdef LL_WINDOWS
+#pragma warning(disable : 4244) // possible loss of data on conversions
+#endif
+
 namespace LLUnits
 {
     // using powers of 2 to allow strict floating point equality
diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp
index 49f2d3085a..98a58eb47e 100644
--- a/indra/llcommon/tests/llunits_test.cpp
+++ b/indra/llcommon/tests/llunits_test.cpp
@@ -262,7 +262,7 @@ namespace tut
         F32 float_val = quatloos_implicit;
         ensure("implicit units convert implicitly to regular values", float_val == 16);
 
-        S32 int_val = quatloos_implicit;
+        S32 int_val = (S32)quatloos_implicit;
         ensure("implicit units convert implicitly to regular values", int_val == 16);
 
         // conversion of implicits
diff --git a/indra/llcorehttp/_httpinternal.h b/indra/llcorehttp/_httpinternal.h
index 768ef98330..2a191fa550 100644
--- a/indra/llcorehttp/_httpinternal.h
+++ b/indra/llcorehttp/_httpinternal.h
@@ -106,17 +106,17 @@ namespace LLCore
 // Maxium number of policy classes that can be defined.
 // *TODO:  Currently limited to the default class + 1, extend.
 // (TSN: should this be more dynamically sized.  Is there a reason to hard limit the number of policies?)
-const int HTTP_POLICY_CLASS_LIMIT = 32;
+constexpr int HTTP_POLICY_CLASS_LIMIT = 32;
 
 // Debug/informational tracing.  Used both
 // as a global option and in per-request traces.
-const int HTTP_TRACE_OFF = 0;
-const int HTTP_TRACE_LOW = 1;
-const int HTTP_TRACE_CURL_HEADERS = 2;
-const int HTTP_TRACE_CURL_BODIES = 3;
+constexpr int HTTP_TRACE_OFF = 0;
+constexpr int HTTP_TRACE_LOW = 1;
+constexpr int HTTP_TRACE_CURL_HEADERS = 2;
+constexpr int HTTP_TRACE_CURL_BODIES = 3;
 
-const int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
-const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
+constexpr int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
+constexpr int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
 
 // Request retry limits
 //
@@ -127,41 +127,41 @@ const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
 // We want to span a few windows to allow transport to slow
 // after onset of the throttles and then recover without a final
 // failure.  Other systems may need other constants.
-const int HTTP_RETRY_COUNT_DEFAULT = 5;
-const int HTTP_RETRY_COUNT_MIN = 0;
-const int HTTP_RETRY_COUNT_MAX = 100;
-const HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1E6L; // 1 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 5E6L; // 5 sec
-const HttpTime HTTP_RETRY_BACKOFF_MAX = 20E6L; // 20 sec
+constexpr int HTTP_RETRY_COUNT_DEFAULT = 5;
+constexpr int HTTP_RETRY_COUNT_MIN = 0;
+constexpr int HTTP_RETRY_COUNT_MAX = 100;
+constexpr HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1000000UL; // 1 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 50000006UL; // 5 sec
+constexpr HttpTime HTTP_RETRY_BACKOFF_MAX = 20000000UL; // 20 sec
 
-const int HTTP_REDIRECTS_DEFAULT = 10;
+constexpr int HTTP_REDIRECTS_DEFAULT = 10;
 
 // Timeout value used for both connect and protocol exchange.
 // Retries and time-on-queue are not included and aren't
 // accounted for.
-const long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
-const long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
-const long HTTP_REQUEST_TIMEOUT_MIN = 0L;
-const long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
+constexpr long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
+constexpr long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MIN = 0L;
+constexpr long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
 
 // Limits on connection counts
-const int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
-const int HTTP_CONNECTION_LIMIT_MIN = 1;
-const int HTTP_CONNECTION_LIMIT_MAX = 256;
+constexpr int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
+constexpr int HTTP_CONNECTION_LIMIT_MIN = 1;
+constexpr int HTTP_CONNECTION_LIMIT_MAX = 256;
 
 // Pipelining limits
-const long HTTP_PIPELINING_DEFAULT = 0L;
-const long HTTP_PIPELINING_MAX = 20L;
+constexpr long HTTP_PIPELINING_DEFAULT = 0L;
+constexpr long HTTP_PIPELINING_MAX = 20L;
 
 // Miscellaneous defaults
-const bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
-const long HTTP_THROTTLE_RATE_DEFAULT = 0L;
+constexpr bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
+constexpr long HTTP_THROTTLE_RATE_DEFAULT = 0L;
 
 // Tuning parameters
 
 // Time worker thread sleeps after a pass through the
 // request, ready and active queues.
-const int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
+constexpr int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
 
 // Block allocation size (a tuning parameter) is found
 // in bufferarray.h.
diff --git a/indra/llcorehttp/httpstats.h b/indra/llcorehttp/httpstats.h
index e1387d9df5..f12e59da0c 100644
--- a/indra/llcorehttp/httpstats.h
+++ b/indra/llcorehttp/httpstats.h
@@ -47,12 +47,12 @@ namespace LLCore
 
         void    recordDataDown(size_t bytes)
         {
-            mDataDown.push(bytes);
+            mDataDown.push((F32)bytes);
         }
 
         void    recordDataUp(size_t bytes)
         {
-            mDataUp.push(bytes);
+            mDataUp.push((F32)bytes);
         }
 
         void    recordHTTPRequest() { ++mRequests; }
diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp
index 506232ab2a..ecd197b2c1 100644
--- a/indra/llcrashlogger/llcrashlock.cpp
+++ b/indra/llcrashlogger/llcrashlock.cpp
@@ -45,11 +45,10 @@
 
 bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
 {
-    std::wstring wpname;
-    wpname = std::wstring(pname.begin(), pname.end());
+    std::wstring wpname = ll_convert_string_to_wide(pname);
 
     HANDLE snapshot;
-    PROCESSENTRY32 pe32;
+    PROCESSENTRY32 pe32{};
 
     bool matched = false;
 
@@ -65,7 +64,7 @@ bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
         {
             do {
                 std::wstring wexecname = pe32.szExeFile;
-                std::string execname = std::string(wexecname.begin(), wexecname.end());
+                std::string execname = ll_convert_wide_to_string(wexecname);
                 if (!wpname.compare(pe32.szExeFile))
                 {
                     if (pid == (U32)pe32.th32ProcessID)
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index 8ee2c309a5..a18dc0a4f1 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -201,15 +201,15 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name)
         boost::filesystem::path dir_path(dir_name);
 #endif
 
-       if (boost::filesystem::exists (dir_path))
+       if (boost::filesystem::exists(dir_path))
        {
-          if (!boost::filesystem::is_empty (dir_path))
+          if (!boost::filesystem::is_empty(dir_path))
           {   // Directory has content
-             num_deleted = boost::filesystem::remove_all (dir_path);
+             num_deleted = (U32)boost::filesystem::remove_all(dir_path);
           }
           else
           {   // Directory is empty
-             boost::filesystem::remove (dir_path);
+             boost::filesystem::remove(dir_path);
           }
        }
     }
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index da2e960ed3..86b1e2ac81 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -325,8 +325,8 @@ const std::string LLDiskCache::getCacheInfo()
 {
     std::ostringstream cache_info;
 
-    F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0 * 1024.0);
-    F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0;
+    F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0f * 1024.0f);
+    F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0f;
 
     cache_info << std::fixed;
     cache_info << std::setprecision(1);
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 912f48e216..7d2a6bd6f5 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -148,7 +148,7 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi
     if (file.is_open())
     {
         file.seekg(0, std::ios::end);
-        file_size = file.tellg();
+        file_size = (S32)file.tellg();
     }
 
     return file_size;
@@ -176,7 +176,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
         }
         else
         {
-            mBytesRead = file.gcount();
+            mBytesRead = (S32)file.gcount();
         }
 
         file.close();
@@ -217,7 +217,7 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
         {
             ofs.write((const char*)buffer, bytes);
 
-            mPosition = ofs.tellp(); // <FS:Ansariel> Fix asset caching
+            mPosition = (S32)ofs.tellp(); // <FS:Ansariel> Fix asset caching
 
             success = true;
         }
diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp
index 0d15906afd..bfcb1f76de 100644
--- a/indra/llimage/llimagefilter.cpp
+++ b/indra/llimage/llimagefilter.cpp
@@ -253,7 +253,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
             bool abs_value = (mFilterData[i][index++].asReal() > 0.0);
             for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++)
                 for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++)
-                    kernel.mMatrix[k][j] = mFilterData[i][index++].asReal();
+                    kernel.mMatrix[k][j] = (F32)mFilterData[i][index++].asReal();
             convolve(kernel,normalize,abs_value);
         }
         else if (filter_name == "colortransform")
@@ -262,7 +262,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
             S32 index = 1;
             for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++)
                 for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++)
-                    transform.mMatrix[k][j] = mFilterData[i][index++].asReal();
+                    transform.mMatrix[k][j] = (F32)mFilterData[i][index++].asReal();
             transform.transpose();
             colorTransform(transform);
         }
@@ -279,32 +279,32 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
 
 void LLImageFilter::blendStencil(F32 alpha, U8* pixel, U8 red, U8 green, U8 blue)
 {
-    F32 inv_alpha = 1.0 - alpha;
+    F32 inv_alpha = 1.0f - alpha;
     switch (mStencilBlendMode)
     {
         case STENCIL_BLEND_MODE_BLEND:
             // Classic blend of incoming color with the background image
-            pixel[VRED]   = inv_alpha * pixel[VRED]   + alpha * red;
-            pixel[VGREEN] = inv_alpha * pixel[VGREEN] + alpha * green;
-            pixel[VBLUE]  = inv_alpha * pixel[VBLUE]  + alpha * blue;
+            pixel[VRED]   = (U8)(inv_alpha * pixel[VRED]   + alpha * red);
+            pixel[VGREEN] = (U8)(inv_alpha * pixel[VGREEN] + alpha * green);
+            pixel[VBLUE]  = (U8)(inv_alpha * pixel[VBLUE]  + alpha * blue);
             break;
         case STENCIL_BLEND_MODE_ADD:
             // Add incoming color to the background image
-            pixel[VRED]   = llclampb(pixel[VRED]   + alpha * red);
-            pixel[VGREEN] = llclampb(pixel[VGREEN] + alpha * green);
-            pixel[VBLUE]  = llclampb(pixel[VBLUE]  + alpha * blue);
+            pixel[VRED]   = (U8)llclampb(pixel[VRED]   + alpha * red);
+            pixel[VGREEN] = (U8)llclampb(pixel[VGREEN] + alpha * green);
+            pixel[VBLUE]  = (U8)llclampb(pixel[VBLUE]  + alpha * blue);
             break;
         case STENCIL_BLEND_MODE_ABACK:
             // Add back background image to the incoming color
-            pixel[VRED]   = llclampb(inv_alpha * pixel[VRED]   + red);
-            pixel[VGREEN] = llclampb(inv_alpha * pixel[VGREEN] + green);
-            pixel[VBLUE]  = llclampb(inv_alpha * pixel[VBLUE]  + blue);
+            pixel[VRED]   = (U8)llclampb(inv_alpha * pixel[VRED]   + red);
+            pixel[VGREEN] = (U8)llclampb(inv_alpha * pixel[VGREEN] + green);
+            pixel[VBLUE]  = (U8)llclampb(inv_alpha * pixel[VBLUE]  + blue);
             break;
         case STENCIL_BLEND_MODE_FADE:
             // Fade incoming color to black
-            pixel[VRED]   = alpha * red;
-            pixel[VGREEN] = alpha * green;
-            pixel[VBLUE]  = alpha * blue;
+            pixel[VRED]   = (U8)(alpha * red);
+            pixel[VGREEN] = (U8)(alpha * green);
+            pixel[VBLUE]  = (U8)(alpha * blue);
             break;
     }
 }
@@ -348,7 +348,7 @@ void LLImageFilter::colorTransform(const LLMatrix3 &transform)
             dst.clamp(0.0f,255.0f);
 
             // Blend result
-            blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]);
+            blendStencil(getStencilAlpha(i,j), dst_data, (U8)dst.mV[VRED], (U8)dst.mV[VGREEN], (U8)dst.mV[VBLUE]);
             dst_data += components;
         }
     }
@@ -463,7 +463,7 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
             dst.clamp(0.0f,255.0f);
 
             // Blend result
-            blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]);
+            blendStencil(getStencilAlpha(i,j), dst_data, (U8)dst.mV[VRED], (U8)dst.mV[VGREEN], (U8)dst.mV[VBLUE]);
 
             // Next pixel
             dst_data += components;
@@ -499,7 +499,7 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
     S32 width  = mImage->getWidth();
     S32 height = mImage->getHeight();
 
-    F32 wave_length_pixels = wave_length * (F32)(height) / 2.0;
+    F32 wave_length_pixels = wave_length * (F32)(height) / 2.0f;
     F32 sin = sinf(angle*DEG_TO_RAD);
     F32 cos = cosf(angle*DEG_TO_RAD);
 
@@ -507,7 +507,7 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
     U8 gamma[256];
     for (S32 i = 0; i < 256; i++)
     {
-        F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/4.0)));
+        F32 gamma_i = llclampf((float)(powf((float)(i)/255.0f,1.0f/4.0f)));
         gamma[i] = (U8)(255.0 * gamma_i);
     }
 
@@ -525,11 +525,11 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
                 case SCREEN_MODE_2DSINE:
                     di =  cos*i + sin*j;
                     dj = -sin*i + cos*j;
-                    value = (sinf(2*F_PI*di/wave_length_pixels)*sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0;
+                    value = (sinf(2*F_PI*di/wave_length_pixels)*sinf(2*F_PI*dj/wave_length_pixels)+1.0f)*255.0f/2.0f;
                     break;
                 case SCREEN_MODE_LINE:
                     dj = sin*i - cos*j;
-                    value = (sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0;
+                    value = (sinf(2*F_PI*dj/wave_length_pixels)+1.0f)*255.0f/2.0f;
                     break;
             }
             U8 dst_value = (dst_data[VRED] >= (U8)(value) ? gamma[dst_data[VRED] - (U8)(value)] : 0);
@@ -556,16 +556,16 @@ void LLImageFilter::setStencil(EStencilShape shape, EStencilBlendMode mode, F32
     mStencilCenterX = (S32)(mImage->getWidth()  + params[0] * (F32)(mImage->getHeight()))/2;
     mStencilCenterY = (S32)(mImage->getHeight() + params[1] * (F32)(mImage->getHeight()))/2;
     mStencilWidth = (S32)(params[2] * (F32)(mImage->getHeight()))/2;
-    mStencilGamma = (params[3] <= 0.0 ? 1.0 : params[3]);
+    mStencilGamma = (params[3] <= 0.0f ? 1.0f : params[3]);
 
-    mStencilWavelength = (params[0] <= 0.0 ? 10.0 : params[0] * (F32)(mImage->getHeight()) / 2.0);
+    mStencilWavelength = (params[0] <= 0.0f ? 10.0f : params[0] * (F32)(mImage->getHeight()) / 2.0f);
     mStencilSine   = sinf(params[1]*DEG_TO_RAD);
     mStencilCosine = cosf(params[1]*DEG_TO_RAD);
 
-    mStencilStartX = ((F32)(mImage->getWidth())  + params[0] * (F32)(mImage->getHeight()))/2.0;
-    mStencilStartY = ((F32)(mImage->getHeight()) + params[1] * (F32)(mImage->getHeight()))/2.0;
-    F32 end_x      = ((F32)(mImage->getWidth())  + params[2] * (F32)(mImage->getHeight()))/2.0;
-    F32 end_y      = ((F32)(mImage->getHeight()) + params[3] * (F32)(mImage->getHeight()))/2.0;
+    mStencilStartX = ((F32)(mImage->getWidth())  + params[0] * (F32)(mImage->getHeight()))/2.0f;
+    mStencilStartY = ((F32)(mImage->getHeight()) + params[1] * (F32)(mImage->getHeight()))/2.0f;
+    F32 end_x      = ((F32)(mImage->getWidth())  + params[2] * (F32)(mImage->getHeight()))/2.0f;
+    F32 end_y      = ((F32)(mImage->getHeight()) + params[3] * (F32)(mImage->getHeight()))/2.0f;
     mStencilGradX  = end_x - mStencilStartX;
     mStencilGradY  = end_y - mStencilStartY;
     mStencilGradN  = mStencilGradX*mStencilGradX + mStencilGradY*mStencilGradY;
@@ -578,14 +578,14 @@ F32 LLImageFilter::getStencilAlpha(S32 i, S32 j)
     {
         // alpha is a modified gaussian value, with a center and fading in a circular pattern toward the edges
         // The gamma parameter controls the intensity of the drop down from alpha 1.0 (center) to 0.0
-        F32 d_center_square = (i - mStencilCenterX)*(i - mStencilCenterX) + (j - mStencilCenterY)*(j - mStencilCenterY);
+        F32 d_center_square = (F32)((i - mStencilCenterX)*(i - mStencilCenterX) + (j - mStencilCenterY)*(j - mStencilCenterY));
         alpha = powf(F_E, -(powf((d_center_square/(mStencilWidth*mStencilWidth)),mStencilGamma)/2.0f));
     }
     else if (mStencilShape == STENCIL_SHAPE_SCAN_LINES)
     {
         // alpha varies according to a squared sine function.
         F32 d = mStencilSine*i - mStencilCosine*j;
-        alpha = (sinf(2*F_PI*d/mStencilWavelength) > 0.0 ? 1.0 : 0.0);
+        alpha = (sinf(2*F_PI*d/mStencilWavelength) > 0.0f ? 1.0f : 0.0f);
     }
     else if (mStencilShape == STENCIL_SHAPE_GRADIENT)
     {
@@ -756,11 +756,11 @@ void LLImageFilter::filterGamma(F32 gamma, const LLColor3& alpha)
 
     for (S32 i = 0; i < 256; i++)
     {
-        F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/gamma)));
+        F32 gamma_i = llclampf((float)(powf((float)(i)/255.0f,1.0f/gamma)));
         // Blend in with alpha values
-        gamma_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * 255.0 * gamma_i);
-        gamma_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * 255.0 * gamma_i);
-        gamma_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * 255.0 * gamma_i);
+        gamma_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * 255.0f * gamma_i);
+        gamma_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * 255.0f * gamma_i);
+        gamma_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * 255.0f * gamma_i);
     }
 
     colorCorrect(gamma_red_lut,gamma_green_lut,gamma_blue_lut);
@@ -808,23 +808,23 @@ void LLImageFilter::filterLinearize(F32 tail, const LLColor3& alpha)
         {
             U8 value_i = (i < min_v ? 0 : 255);
             // Blend in with alpha values
-            linear_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
-            linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
-            linear_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
+            linear_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
+            linear_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
+            linear_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
         }
     }
     else
     {
         // Linearize between min and max
-        F32 slope = 255.0 / (F32)(max_v - min_v);
+        F32 slope = 255.0f / (F32)(max_v - min_v);
         F32 translate = -min_v * slope;
         for (S32 i = 0; i < 256; i++)
         {
             U8 value_i = (U8)(llclampb((S32)(slope*i + translate)));
             // Blend in with alpha values
-            linear_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
-            linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
-            linear_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
+            linear_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
+            linear_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
+            linear_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
         }
     }
 
@@ -863,9 +863,9 @@ void LLImageFilter::filterEqualize(S32 nb_classes, const LLColor3& alpha)
     for (S32 i = 0; i < 256; i++)
     {
         // Blend in current_value with alpha values
-        equalize_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * current_value);
-        equalize_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * current_value);
-        equalize_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * current_value);
+        equalize_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * current_value);
+        equalize_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * current_value);
+        equalize_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * current_value);
         if (cumulated_histo[i] >= current_count)
         {
             current_count += delta_count;
@@ -884,15 +884,15 @@ void LLImageFilter::filterColorize(const LLColor3& color, const LLColor3& alpha)
     U8 green_lut[256];
     U8 blue_lut[256];
 
-    F32 red_composite   =  255.0 * alpha.mV[0] * color.mV[0];
-    F32 green_composite =  255.0 * alpha.mV[1] * color.mV[1];
-    F32 blue_composite  =  255.0 * alpha.mV[2] * color.mV[2];
+    F32 red_composite   =  255.0f * alpha.mV[0] * color.mV[0];
+    F32 green_composite =  255.0f * alpha.mV[1] * color.mV[1];
+    F32 blue_composite  =  255.0f * alpha.mV[2] * color.mV[2];
 
     for (S32 i = 0; i < 256; i++)
     {
-        red_lut[i]   = (U8)(llclampb((S32)((1.0 - alpha.mV[0]) * (F32)(i) + red_composite)));
-        green_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[1]) * (F32)(i) + green_composite)));
-        blue_lut[i]  = (U8)(llclampb((S32)((1.0 - alpha.mV[2]) * (F32)(i) + blue_composite)));
+        red_lut[i]   = (U8)(llclampb((S32)((1.0f - alpha.mV[0]) * (F32)(i) + red_composite)));
+        green_lut[i] = (U8)(llclampb((S32)((1.0f - alpha.mV[1]) * (F32)(i) + green_composite)));
+        blue_lut[i]  = (U8)(llclampb((S32)((1.0f - alpha.mV[2]) * (F32)(i) + blue_composite)));
     }
 
     colorCorrect(red_lut,green_lut,blue_lut);
@@ -904,15 +904,15 @@ void LLImageFilter::filterContrast(F32 slope, const LLColor3& alpha)
     U8 contrast_green_lut[256];
     U8 contrast_blue_lut[256];
 
-    F32 translate = 128.0 * (1.0 - slope);
+    F32 translate = 128.0f * (1.0f - slope);
 
     for (S32 i = 0; i < 256; i++)
     {
         U8 value_i = (U8)(llclampb((S32)(slope*i + translate)));
         // Blend in with alpha values
-        contrast_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
-        contrast_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
-        contrast_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
+        contrast_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
+        contrast_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
+        contrast_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
     }
 
     colorCorrect(contrast_red_lut,contrast_green_lut,contrast_blue_lut);
@@ -924,15 +924,15 @@ void LLImageFilter::filterBrightness(F32 add, const LLColor3& alpha)
     U8 brightness_green_lut[256];
     U8 brightness_blue_lut[256];
 
-    S32 add_value = (S32)(add * 255.0);
+    S32 add_value = (S32)(add * 255.0f);
 
     for (S32 i = 0; i < 256; i++)
     {
         U8 value_i = (U8)(llclampb(i + add_value));
         // Blend in with alpha values
-        brightness_red_lut[i]   = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
-        brightness_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
-        brightness_blue_lut[i]  = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
+        brightness_red_lut[i]   = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
+        brightness_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
+        brightness_blue_lut[i]  = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
     }
 
     colorCorrect(brightness_red_lut,brightness_green_lut,brightness_blue_lut);
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index 9a4e382183..b2bd3186a0 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -557,7 +557,7 @@ public:
         {
             // "append" (set) the data we "streamed" (memcopied) for writing to the formatted image
             // with side-effect of setting the actually encoded size  to same
-            compressedImageOut.allocateData(offset);
+            compressedImageOut.allocateData((S32)offset);
             memcpy(compressedImageOut.getData(), buffer, offset);
             compressedImageOut.updateData(); // update width, height etc from header
         }
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index ef6ddb3cab..71dc8cff34 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -1268,7 +1268,7 @@ void LLParcel::setExperienceKeyType( const LLUUID& experience_key, U32 type )
 
 U32 LLParcel::countExperienceKeyType( U32 type )
 {
-    return std::count_if(
+    return (U32)std::count_if(
         boost::begin(mExperienceKeys | boost::adaptors::map_values),
         boost::end(mExperienceKeys | boost::adaptors::map_values),
         [type](U32 key){ return (key == type); });
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index c1893eff41..7b55fbc9e8 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -278,11 +278,11 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
     {
         case LLSD::TypeInteger:
             // lerp between the two values rounding the result to the nearest integer.
-            new_value = LLSD::Integer(llroundf(lerp(value.asReal(), other_value.asReal(), mix)));
+            new_value = LLSD::Integer(llroundf(lerp((F32)value.asReal(), (F32)other_value.asReal(), (F32)mix)));
             break;
         case LLSD::TypeReal:
             // lerp between the two values.
-            new_value = LLSD::Real(lerp(value.asReal(), other_value.asReal(), mix));
+            new_value = LLSD::Real(lerp((F32)value.asReal(), (F32)other_value.asReal(), (F32)mix));
             break;
         case LLSD::TypeMap:
             // deep copy.
@@ -297,7 +297,7 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
             {
                 LLQuaternion a(value);
                 LLQuaternion b(other_value);
-                LLQuaternion q = slerp(mix, a, b);
+                LLQuaternion q = slerp((F32)mix, a, b);
                 new_array = q.getValue();
             }
             else
@@ -308,7 +308,7 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
                 for (size_t i = 0; i < len; ++i)
                 {
 
-                    new_array[i] = lerp(value[i].asReal(), other_value[i].asReal(), mix);
+                    new_array[i] = lerp((F32)value[i].asReal(), (F32)other_value[i].asReal(), (F32)mix);
                 }
             }
 
@@ -693,7 +693,7 @@ void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
 
 F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in)
 {
-    LLSettingsBase::TrackPosition blendf = blendf_in;
+    LLSettingsBase::TrackPosition blendf = (F32)blendf_in;
     llassert(!isnan(blendf));
     if (blendf >= 1.0)
     {
@@ -744,7 +744,7 @@ bool LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& t
         return false;
     }
 
-    LLSettingsBase::BlendFactor blendf = calculateBlend(mTimeSpent, mBlendSpan);
+    LLSettingsBase::BlendFactor blendf = calculateBlend((F32)mTimeSpent.value(), mBlendSpan);
 
     if (fabs(mLastBlendF - blendf) < mBlendFMinDelta)
     {
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index a5499c4eb6..9d8d746b7e 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -475,7 +475,7 @@ public:
     LLSettingsBlenderTimeDelta(const LLSettingsBase::ptr_t &target,
         const LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, const LLSettingsBase::Seconds& blend_span) :
         LLSettingsBlender(target, initsetting, endsetting),
-        mBlendSpan(blend_span),
+        mBlendSpan((F32)blend_span.value()),
         mLastUpdate(0.0f),
         mTimeSpent(0.0f),
         mBlendFMinDelta(MIN_BLEND_DELTA),
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 2ff1cc74c6..abf746ef2c 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -500,7 +500,7 @@ namespace
                     continue;
                 }
 
-                LLSettingsBase::TrackPosition frame = elem[LLSettingsDay::SETTING_KEYKFRAME].asReal();
+                LLSettingsBase::TrackPosition frame = (F32)elem[LLSettingsDay::SETTING_KEYKFRAME].asReal();
                 if ((frame < 0.0) || (frame > 1.0))
                 {
                     frame = llclamp(frame, 0.0f, 1.0f);
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index e14b2f25ed..cbec2f4906 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -480,19 +480,19 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
             // If there is no cloud texture in destination, reduce coverage to imitate disappearance
             // See LLDrawPoolWLSky::renderSkyClouds... we don't blend present texture with null
             // Note: Probably can be done by shader
-            cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), (F64)0.f, blendf);
+            cloud_shadow = lerp((F32)mSettings[SETTING_CLOUD_SHADOW].asReal(), 0.f, (F32)blendf);
             cloud_noise_id_next = cloud_noise_id;
         }
         else if (cloud_noise_id.isNull() && !cloud_noise_id_next.isNull())
         {
             // Source has no cloud texture, reduce initial coverage to imitate appearance
             // use same texture as destination
-            cloud_shadow = lerp((F64)0.f, other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
+            cloud_shadow = lerp(0.f, (F32)other->mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)blendf);
             setCloudNoiseTextureId(cloud_noise_id_next);
         }
         else
         {
-            cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
+            cloud_shadow = lerp((F32)mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)other->mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)blendf);
         }
 
         LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, other->getParameterMap(), blendf);
@@ -923,8 +923,8 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
     if (legacy.has(SETTING_LEGACY_EAST_ANGLE) && legacy.has(SETTING_LEGACY_SUN_ANGLE))
     {
         // get counter-clockwise radian angle from clockwise legacy WL east angle...
-        F32 azimuth  = -legacy[SETTING_LEGACY_EAST_ANGLE].asReal();
-        F32 altitude =  legacy[SETTING_LEGACY_SUN_ANGLE].asReal();
+        F32 azimuth  = -(F32)legacy[SETTING_LEGACY_EAST_ANGLE].asReal();
+        F32 altitude = (F32)legacy[SETTING_LEGACY_SUN_ANGLE].asReal();
 
         LLQuaternion sunquat  = convert_azimuth_and_altitude_to_quat(azimuth, altitude);
         // original WL moon dir was diametrically opposed to the sun dir
@@ -958,7 +958,7 @@ void LLSettingsSky::updateSettings()
 F32 LLSettingsSky::getSunMoonGlowFactor() const
 {
     return getIsSunUp()  ? 1.0f  :
-           getIsMoonUp() ? getMoonBrightness() * 0.25 : 0.0f;
+           getIsMoonUp() ? getMoonBrightness() * 0.25f : 0.0f;
 }
 
 bool LLSettingsSky::getIsSunUp() const
@@ -1043,11 +1043,11 @@ F32 LLSettingsSky::getFloat(const std::string& key, F32 default_value) const
     LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
     if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
     {
-        return mSettings[SETTING_LEGACY_HAZE][key].asReal();
+        return (F32)mSettings[SETTING_LEGACY_HAZE][key].asReal();
     }
     if (mSettings.has(key))
     {
-        return mSettings[key].asReal();
+        return (F32)mSettings[key].asReal();
     }
     return default_value;
 }
@@ -1307,7 +1307,7 @@ void LLSettingsSky::clampColor(LLColor3& color, F32 gamma, F32 scale) const
         color *= scale/max_color;
     }
     LLColor3 linear(color);
-    linear *= 1.0 / scale;
+    linear *= 1.0f / scale;
     linear = smear(1.0f) - linear;
     linear = componentPow(linear, gamma);
     linear *= scale;
@@ -1353,7 +1353,7 @@ void LLSettingsSky::calculateLightSettings() const
 
     F32 haze_horizon = getHazeHorizon();
 
-    sunlight *= 1.0 - cloud_shadow;
+    sunlight *= 1.0f - cloud_shadow;
     sunlight += tmpAmbient;
 
     mHazeColor = getBlueHorizon() * getBlueDensity() * sunlight;
@@ -1415,22 +1415,22 @@ LLUUID LLSettingsSky::GetDefaultHaloTextureId()
 
 F32 LLSettingsSky::getPlanetRadius() const
 {
-    return mSettings[SETTING_PLANET_RADIUS].asReal();
+    return (F32)mSettings[SETTING_PLANET_RADIUS].asReal();
 }
 
 F32 LLSettingsSky::getSkyMoistureLevel() const
 {
-    return mSettings[SETTING_SKY_MOISTURE_LEVEL].asReal();
+    return (F32)mSettings[SETTING_SKY_MOISTURE_LEVEL].asReal();
 }
 
 F32 LLSettingsSky::getSkyDropletRadius() const
 {
-    return mSettings[SETTING_SKY_DROPLET_RADIUS].asReal();
+    return (F32)mSettings[SETTING_SKY_DROPLET_RADIUS].asReal();
 }
 
 F32 LLSettingsSky::getSkyIceLevel() const
 {
-    return mSettings[SETTING_SKY_ICE_LEVEL].asReal();
+    return (F32)mSettings[SETTING_SKY_ICE_LEVEL].asReal();
 }
 
 F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const
@@ -1440,27 +1440,27 @@ F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const
         return sAutoAdjustProbeAmbiance;
     }
 
-    return mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
+    return (F32)mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
 }
 
 F32 LLSettingsSky::getSkyBottomRadius() const
 {
-    return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
+    return (F32)mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
 }
 
 F32 LLSettingsSky::getSkyTopRadius() const
 {
-    return mSettings[SETTING_SKY_TOP_RADIUS].asReal();
+    return (F32)mSettings[SETTING_SKY_TOP_RADIUS].asReal();
 }
 
 F32 LLSettingsSky::getSunArcRadians() const
 {
-    return mSettings[SETTING_SUN_ARC_RADIANS].asReal();
+    return (F32)mSettings[SETTING_SUN_ARC_RADIANS].asReal();
 }
 
 F32 LLSettingsSky::getMieAnisotropy() const
 {
-    return getMieConfig()[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
+    return (F32)getMieConfig()[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
 }
 
 LLSD LLSettingsSky::getRayleighConfig() const
@@ -1569,7 +1569,7 @@ void LLSettingsSky::setCloudPosDensity2(const LLColor3 &val)
 
 F32 LLSettingsSky::getCloudScale() const
 {
-    return mSettings[SETTING_CLOUD_SCALE].asReal();
+    return (F32)mSettings[SETTING_CLOUD_SCALE].asReal();
 }
 
 void LLSettingsSky::setCloudScale(F32 val)
@@ -1601,7 +1601,7 @@ void LLSettingsSky::setCloudScrollRateY(F32 val)
 
 F32 LLSettingsSky::getCloudShadow() const
 {
-    return mSettings[SETTING_CLOUD_SHADOW].asReal();
+    return (F32)mSettings[SETTING_CLOUD_SHADOW].asReal();
 }
 
 void LLSettingsSky::setCloudShadow(F32 val)
@@ -1611,7 +1611,7 @@ void LLSettingsSky::setCloudShadow(F32 val)
 
 F32 LLSettingsSky::getCloudVariance() const
 {
-    return mSettings[SETTING_CLOUD_VARIANCE].asReal();
+    return (F32)mSettings[SETTING_CLOUD_VARIANCE].asReal();
 }
 
 void LLSettingsSky::setCloudVariance(F32 val)
@@ -1621,7 +1621,7 @@ void LLSettingsSky::setCloudVariance(F32 val)
 
 F32 LLSettingsSky::getDomeOffset() const
 {
-    //return mSettings[SETTING_DOME_OFFSET].asReal();
+    //return (F32)mSettings[SETTING_DOME_OFFSET].asReal();
     return DOME_OFFSET;
 }
 
@@ -1633,7 +1633,7 @@ F32 LLSettingsSky::getDomeRadius() const
 
 F32 LLSettingsSky::getGamma() const
 {
-    return mSettings[SETTING_GAMMA].asReal();
+    return (F32)mSettings[SETTING_GAMMA].asReal();
 }
 
 void LLSettingsSky::setGamma(F32 val)
@@ -1654,7 +1654,7 @@ void LLSettingsSky::setGlow(const LLColor3 &val)
 
 F32 LLSettingsSky::getMaxY() const
 {
-    return mSettings[SETTING_MAX_Y].asReal();
+    return (F32)mSettings[SETTING_MAX_Y].asReal();
 }
 
 void LLSettingsSky::setMaxY(F32 val)
@@ -1674,7 +1674,7 @@ void LLSettingsSky::setMoonRotation(const LLQuaternion &val)
 
 F32 LLSettingsSky::getMoonScale() const
 {
-    return mSettings[SETTING_MOON_SCALE].asReal();
+    return (F32)mSettings[SETTING_MOON_SCALE].asReal();
 }
 
 void LLSettingsSky::setMoonScale(F32 val)
@@ -1692,9 +1692,9 @@ void LLSettingsSky::setMoonTextureId(LLUUID id)
     setValue(SETTING_MOON_TEXTUREID, id);
 }
 
-F32  LLSettingsSky::getMoonBrightness() const
+F32 LLSettingsSky::getMoonBrightness() const
 {
-    return mSettings[SETTING_MOON_BRIGHTNESS].asReal();
+    return (F32)mSettings[SETTING_MOON_BRIGHTNESS].asReal();
 }
 
 void LLSettingsSky::setMoonBrightness(F32 brightness_factor)
@@ -1704,7 +1704,7 @@ void LLSettingsSky::setMoonBrightness(F32 brightness_factor)
 
 F32 LLSettingsSky::getStarBrightness() const
 {
-    return mSettings[SETTING_STAR_BRIGHTNESS].asReal();
+    return (F32)mSettings[SETTING_STAR_BRIGHTNESS].asReal();
 }
 
 void LLSettingsSky::setStarBrightness(F32 val)
@@ -1749,7 +1749,7 @@ void LLSettingsSky::setSunRotation(const LLQuaternion &val)
 
 F32 LLSettingsSky::getSunScale() const
 {
-    return mSettings[SETTING_SUN_SCALE].asReal();
+    return (F32)mSettings[SETTING_SUN_SCALE].asReal();
 }
 
 void LLSettingsSky::setSunScale(F32 val)
diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h
index 0b29d8ca19..9e7ff61272 100644
--- a/indra/llinventory/llsettingswater.h
+++ b/indra/llinventory/llsettingswater.h
@@ -72,7 +72,7 @@ public:
     //---------------------------------------------------------------------
     F32 getBlurMultiplier() const
     {
-        return mSettings[SETTING_BLUR_MULTIPLIER].asReal();
+        return (F32)mSettings[SETTING_BLUR_MULTIPLIER].asReal();
     }
 
     void setBlurMultiplier(F32 val)
@@ -92,7 +92,7 @@ public:
 
     F32 getWaterFogDensity() const
     {
-        return mSettings[SETTING_FOG_DENSITY].asReal();
+        return (F32)mSettings[SETTING_FOG_DENSITY].asReal();
     }
 
     F32 getModifiedWaterFogDensity(bool underwater) const;
@@ -104,7 +104,7 @@ public:
 
     F32 getFogMod() const
     {
-        return mSettings[SETTING_FOG_MOD].asReal();
+        return (F32)mSettings[SETTING_FOG_MOD].asReal();
     }
 
     void setFogMod(F32 val)
@@ -114,7 +114,7 @@ public:
 
     F32 getFresnelOffset() const
     {
-        return mSettings[SETTING_FRESNEL_OFFSET].asReal();
+        return (F32)mSettings[SETTING_FRESNEL_OFFSET].asReal();
     }
 
     void setFresnelOffset(F32 val)
@@ -124,7 +124,7 @@ public:
 
     F32 getFresnelScale() const
     {
-        return mSettings[SETTING_FRESNEL_SCALE].asReal();
+        return (F32)mSettings[SETTING_FRESNEL_SCALE].asReal();
     }
 
     void setFresnelScale(F32 val)
@@ -164,7 +164,7 @@ public:
 
     F32 getScaleAbove() const
     {
-        return mSettings[SETTING_SCALE_ABOVE].asReal();
+        return (F32)mSettings[SETTING_SCALE_ABOVE].asReal();
     }
 
     void setScaleAbove(F32 val)
@@ -174,7 +174,7 @@ public:
 
     F32 getScaleBelow() const
     {
-        return mSettings[SETTING_SCALE_BELOW].asReal();
+        return (F32)mSettings[SETTING_SCALE_BELOW].asReal();
     }
 
     void setScaleBelow(F32 val)
diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp
index bcf6131bd8..9779cb8fbc 100644
--- a/indra/llinventory/tests/inventorymisc_test.cpp
+++ b/indra/llinventory/tests/inventorymisc_test.cpp
@@ -61,7 +61,7 @@ LLPointer<LLInventoryItem> create_random_inventory_item()
     S32 price = rand();
     LLSaleInfo sale_info(LLSaleInfo::FS_COPY, price);
     U32 flags = rand();
-    S32 creation = time(NULL);
+    S32 creation = (S32)time(NULL);
 
     LLPointer<LLInventoryItem> item = new LLInventoryItem(
         item_id,
@@ -195,7 +195,7 @@ namespace tut
         src->setSaleInfo(new_sale_info);
 
         U32 new_flags = rand();
-        S32 new_creation = time(NULL);
+        S32 new_creation = (S32)time(NULL);
 
         LLPermissions new_perm;
 
@@ -266,7 +266,7 @@ namespace tut
         src->setSaleInfo(new_sale_info);
 
         U32 new_flags = rand();
-        S32 new_creation = time(NULL);
+        S32 new_creation = (S32)time(NULL);
 
         LLPermissions new_perm;
 
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index e8fdcc9ae3..ea71752ebc 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -175,7 +175,7 @@ private:
     F32 _exp(const F32& a) const { return exp(a); }
     F32 _fabs(const F32& a) const { return fabs(a); }
     F32 _floor(const F32& a) const { return (F32)llfloor(a); }
-    F32 _ceil(const F32& a) const { return llceil(a); }
+    F32 _ceil(const F32& a) const { return (F32)llceil(a); }
     F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
 
     LLCalc::calc_map_t* mConstants;
diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h
index 6136c59ed1..762d13eded 100644
--- a/indra/llmath/llquaternion.h
+++ b/indra/llmath/llquaternion.h
@@ -186,10 +186,10 @@ inline LLSD LLQuaternion::getValue() const
 
 inline void LLQuaternion::setValue(const LLSD& sd)
 {
-    mQ[0] = sd[0].asReal();
-    mQ[1] = sd[1].asReal();
-    mQ[2] = sd[2].asReal();
-    mQ[3] = sd[3].asReal();
+    mQ[0] = (F32)sd[0].asReal();
+    mQ[1] = (F32)sd[1].asReal();
+    mQ[2] = (F32)sd[2].asReal();
+    mQ[3] = (F32)sd[3].asReal();
 }
 
 // checker
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index 7b92f85a0c..821c17f03d 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -517,9 +517,9 @@ inline const LLVector3 linearColor3v(const T& a) {
 template<typename T>
 const LLColor3& LLColor3::set(const std::vector<T>& v)
 {
-    for (S32 i = 0; i < llmin((S32)v.size(), 3); ++i)
+    for (size_t i = 0; i < llmin(v.size(), 3); ++i)
     {
-        mV[i] = v[i];
+        mV[i] = (F32)v[i];
     }
 
     return *this;
@@ -530,9 +530,9 @@ const LLColor3& LLColor3::set(const std::vector<T>& v)
 template<typename T>
 void LLColor3::write(std::vector<T>& v) const
 {
-    for (int i = 0; i < llmin((S32)v.size(), 3); ++i)
+    for (size_t i = 0; i < llmin(v.size(), 3); ++i)
     {
-        v[i] = mV[i];
+        v[i] = (T)mV[i];
     }
 }
 
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index e9bb6a07ba..cafdbd9d7c 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -702,9 +702,9 @@ inline const LLColor4 linearColor4(const LLColor4 &a)
 template<typename T>
 const LLColor4& LLColor4::set(const std::vector<T>& v)
 {
-    for (S32 i = 0; i < llmin((S32)v.size(), 4); ++i)
+    for (size_t i = 0; i < llmin(v.size(), 4); ++i)
     {
-        mV[i] = v[i];
+        mV[i] = (F32)v[i];
     }
 
     return *this;
@@ -713,9 +713,9 @@ const LLColor4& LLColor4::set(const std::vector<T>& v)
 template<typename T>
 void LLColor4::write(std::vector<T>& v) const
 {
-    for (int i = 0; i < llmin((S32)v.size(), 4); ++i)
+    for (size_t i = 0; i < llmin(v.size(), 4); ++i)
     {
-        v[i] = mV[i];
+        v[i] = (T)mV[i];
     }
 }
 
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 7ed22212d3..a5b6f506d7 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -67,10 +67,10 @@ class LLVector4
 
         void setValue(const LLSD& sd)
         {
-            mV[0] = sd[0].asReal();
-            mV[1] = sd[1].asReal();
-            mV[2] = sd[2].asReal();
-            mV[3] = sd[3].asReal();
+            mV[0] = (F32)sd[0].asReal();
+            mV[1] = (F32)sd[1].asReal();
+            mV[2] = (F32)sd[2].asReal();
+            mV[3] = (F32)sd[3].asReal();
         }
 
 
diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp
index dc7115b167..3a4b493b26 100644
--- a/indra/llmessage/llbuffer.cpp
+++ b/indra/llmessage/llbuffer.cpp
@@ -142,7 +142,7 @@ LLHeapBuffer::~LLHeapBuffer()
 
 S32 LLHeapBuffer::bytesLeft() const
 {
-    return (mSize - (mNextFree - mBuffer));
+    return (mSize - (S32)(mNextFree - mBuffer));
 }
 
 // virtual
@@ -371,11 +371,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
         return it;
     }
     S32 channel = (*it).getChannel();
-    LLSegment segment1(channel, base, (address - base) + 1);
+    LLSegment segment1(channel, base, (S32)((address - base) + 1));
     *it = segment1;
     segment_iterator_t rv = it;
     ++it;
-    LLSegment segment2(channel, address + 1, size - (address - base) - 1);
+    LLSegment segment2(channel, address + 1, (S32)(size - (address - base) - 1));
     mSegments.insert(it, segment2);
     return rv;
 }
@@ -424,7 +424,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
                     segment = LLSegment(
                         (*rv).getChannel(),
                         address,
-                        (*rv).size() - (address - (*rv).data()));
+                        (*rv).size() - (S32)(address - (*rv).data()));
                 }
                 else
                 {
@@ -533,7 +533,7 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const
         if(++start < ((*it).data() + (*it).size()))
         {
             // it's in the same segment
-            offset = start - (*it).data();
+            offset = (S32)(start - (*it).data());
         }
         else if(++it == end)
         {
@@ -586,7 +586,7 @@ U8* LLBufferArray::readAfter(
            && (*it).isOnChannel(channel))
         {
             // copy the data out of this segment
-            S32 bytes_in_segment = (*it).size() - (start - (*it).data());
+            S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
             bytes_to_copy = llmin(bytes_left, bytes_in_segment);
             memcpy(dest, start, bytes_to_copy); /*Flawfinder: ignore*/
             len += bytes_to_copy;
@@ -681,7 +681,7 @@ U8* LLBufferArray::seek(
         {
             if(delta > 0)
             {
-                S32 bytes_in_segment = (*it).size() - (start - (*it).data());
+                S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
                 S32 local_delta = llmin(delta, bytes_in_segment);
                 rv += local_delta;
                 delta -= local_delta;
@@ -689,7 +689,7 @@ U8* LLBufferArray::seek(
             }
             else
             {
-                S32 bytes_in_segment = start - (*it).data();
+                S32 bytes_in_segment = (S32)(start - (*it).data());
                 S32 local_delta = llmin(llabs(delta), bytes_in_segment);
                 rv -= local_delta;
                 delta += local_delta;
diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp
index e51b489813..2c745f6fe4 100644
--- a/indra/llmessage/llbufferstream.cpp
+++ b/indra/llmessage/llbufferstream.cpp
@@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff(
         }
 
         LLMutexLock lock(mBuffer->getMutex());
-        address = mBuffer->seek(mChannels.in(), base_addr, off);
+        address = mBuffer->seek(mChannels.in(), base_addr, (S32)off);
         if(address)
         {
             LLBufferArray::segment_iterator_t iter;
@@ -306,7 +306,7 @@ streampos LLBufferStreamBuf::seekoff(
         }
 
         LLMutexLock lock(mBuffer->getMutex());
-        address = mBuffer->seek(mChannels.out(), base_addr, off);
+        address = mBuffer->seek(mChannels.out(), base_addr, (S32)off);
         if(address)
         {
             LLBufferArray::segment_iterator_t iter;
diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp
index bf22f3d3f0..8f9c02bdca 100644
--- a/indra/llmessage/llcircuit.cpp
+++ b/indra/llmessage/llcircuit.cpp
@@ -525,13 +525,13 @@ void LLCircuitData::checkPeriodTime()
     F64Seconds period_length = mt_sec - mPeriodTime;
     if ( period_length > TARGET_PERIOD_LENGTH)
     {
-        F32 bps_in = F32Bits(mBytesInThisPeriod).value() / period_length.value();
+        F32 bps_in = F32Bits(mBytesInThisPeriod).value() / (F32)period_length.value();
         if (bps_in > mPeakBPSIn)
         {
             mPeakBPSIn = bps_in;
         }
 
-        F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / period_length.value();
+        F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / (F32)period_length.value();
         if (bps_out > mPeakBPSOut)
         {
             mPeakBPSOut = bps_out;
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index e562f09844..edc431e538 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -625,7 +625,7 @@ bool LLHTTPResponder::readHeaderLine(
         }
         return false;
     }
-    S32 offset = -((len - 1) - (newline - dest));
+    S32 offset = -((len - 1) - (S32)(newline - dest));
     ++newline;
     *newline = '\0';
     mLastRead = buffer->seek(channels.in(), last, offset);
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 1480322935..3e84eeffc2 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -107,7 +107,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
             {
                 if (strcmp(COMMON_PROFILE_INPUT_POSITION, v_inp[k]->getSemantic()) == 0)
                 {
-                    pos_offset = inputs[j]->getOffset();
+                    pos_offset = (S32)inputs[j]->getOffset();
 
                     const domURIFragmentType& uri = v_inp[k]->getSource();
                     daeElementRef elem = uri.getElement();
@@ -116,7 +116,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
 
                 if (strcmp(COMMON_PROFILE_INPUT_NORMAL, v_inp[k]->getSemantic()) == 0)
                 {
-                    norm_offset = inputs[j]->getOffset();
+                    norm_offset = (S32)inputs[j]->getOffset();
 
                     const domURIFragmentType& uri = v_inp[k]->getSource();
                     daeElementRef elem = uri.getElement();
@@ -128,14 +128,14 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
         if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[j]->getSemantic()) == 0)
         {
             //found normal array for this triangle list
-            norm_offset = inputs[j]->getOffset();
+            norm_offset = (S32)inputs[j]->getOffset();
             const domURIFragmentType& uri = inputs[j]->getSource();
             daeElementRef elem = uri.getElement();
             norm_source = (domSource*) elem.cast();
         }
         else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0)
         { //found texCoords
-            tc_offset = inputs[j]->getOffset();
+            tc_offset = (S32)inputs[j]->getOffset();
             const domURIFragmentType& uri = inputs[j]->getSource();
             daeElementRef elem = uri.getElement();
             tc_source = (domSource*) elem.cast();
@@ -201,8 +201,8 @@ LLModel::EModelStatus load_face_from_dom_triangles(
             return LLModel::BAD_ELEMENT;
         }
         // VFExtents change
-        face.mExtents[0].set(v[0], v[1], v[2]);
-        face.mExtents[1].set(v[0], v[1], v[2]);
+        face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
+        face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
     }
 
     LLVolumeFace::VertexMapData::PointMap point_map;
@@ -223,22 +223,22 @@ LLModel::EModelStatus load_face_from_dom_triangles(
         LLVolumeFace::VertexData cv;
         if (pos_source)
         {
-            cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0],
-                                v[idx[i+pos_offset]*3+1],
-                                v[idx[i+pos_offset]*3+2]));
+            cv.setPosition(LLVector4a((F32)v[idx[i+pos_offset]*3+0],
+                                (F32)v[idx[i+pos_offset]*3+1],
+                                (F32)v[idx[i+pos_offset]*3+2]));
         }
 
         if (tc_source)
         {
-            cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
-                                tc[idx[i+tc_offset]*2+1]);
+            cv.mTexCoord.setVec((F32)tc[idx[i+tc_offset]*2+0],
+                                (F32)tc[idx[i+tc_offset]*2+1]);
         }
 
         if (norm_source)
         {
-            cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
-                                n[idx[i+norm_offset]*3+1],
-                                n[idx[i+norm_offset]*3+2]));
+            cv.setNormal(LLVector4a((F32)n[idx[i+norm_offset]*3+0],
+                                (F32)n[idx[i+norm_offset]*3+1],
+                                (F32)n[idx[i+norm_offset]*3+2]));
         }
 
         bool found = false;
@@ -326,8 +326,8 @@ LLModel::EModelStatus load_face_from_dom_triangles(
 
             face = LLVolumeFace();
             // VFExtents change
-            face.mExtents[0].set(v[0], v[1], v[2]);
-            face.mExtents[1].set(v[0], v[1], v[2]);
+            face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
+            face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
 
             verts.clear();
             indices.clear();
@@ -416,8 +416,8 @@ LLModel::EModelStatus load_face_from_dom_polylist(
     {
         v = pos_source->getFloat_array()->getValue();
         // VFExtents change
-        face.mExtents[0].set(v[0], v[1], v[2]);
-        face.mExtents[1].set(v[0], v[1], v[2]);
+        face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
+        face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
     }
 
     if (tc_source)
@@ -445,9 +445,9 @@ LLModel::EModelStatus load_face_from_dom_polylist(
 
             if (pos_source)
             {
-                cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0],
-                                    v[idx[cur_idx+pos_offset]*3+1],
-                                    v[idx[cur_idx+pos_offset]*3+2]);
+                cv.getPosition().set((F32)v[idx[cur_idx+pos_offset]*3+0],
+                                    (F32)v[idx[cur_idx+pos_offset]*3+1],
+                                    (F32)v[idx[cur_idx+pos_offset]*3+2]);
                 if (!cv.getPosition().isFinite3())
                 {
                     LL_WARNS() << "Found NaN while loading position data from DAE-Model, invalid model." << LL_ENDL;
@@ -465,7 +465,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(
 
                 if (idx_y < tc.getCount())
                 {
-                    cv.mTexCoord.setVec(tc[idx_x], tc[idx_y]);
+                    cv.mTexCoord.setVec((F32)tc[idx_x], (F32)tc[idx_y]);
                 }
                 else if (log_tc_msg)
                 {
@@ -479,9 +479,9 @@ LLModel::EModelStatus load_face_from_dom_polylist(
 
             if (norm_source)
             {
-                cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
-                                    n[idx[cur_idx+norm_offset]*3+1],
-                                    n[idx[cur_idx+norm_offset]*3+2]);
+                cv.getNormal().set((F32)n[idx[cur_idx+norm_offset]*3+0],
+                                    (F32)n[idx[cur_idx+norm_offset]*3+1],
+                                    (F32)n[idx[cur_idx+norm_offset]*3+2]);
 
                 if (!cv.getNormal().isFinite3())
                 {
@@ -607,8 +607,8 @@ LLModel::EModelStatus load_face_from_dom_polylist(
 
                 face = LLVolumeFace();
                 // VFExtents change
-                face.mExtents[0].set(v[0], v[1], v[2]);
-                face.mExtents[1].set(v[0], v[1], v[2]);
+                face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
+                face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
                 verts.clear();
                 indices.clear();
                 point_map.clear();
@@ -669,7 +669,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
 
         if (strcmp(COMMON_PROFILE_INPUT_VERTEX, inputs[i]->getSemantic()) == 0)
         { //found vertex array
-            v_offset = inputs[i]->getOffset();
+            v_offset = (S32)inputs[i]->getOffset();
 
             const domURIFragmentType& uri = inputs[i]->getSource();
             daeElementRef elem = uri.getElement();
@@ -697,7 +697,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
         }
         else if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[i]->getSemantic()) == 0)
         {
-            n_offset = inputs[i]->getOffset();
+            n_offset = (S32)inputs[i]->getOffset();
             //found normal array for this triangle list
             const domURIFragmentType& uri = inputs[i]->getSource();
             daeElementRef elem = uri.getElement();
@@ -710,7 +710,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
         }
         else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[i]->getSemantic()) == 0 && inputs[i]->getSet() == 0)
         { //found texCoords
-            t_offset = inputs[i]->getOffset();
+            t_offset = (S32)inputs[i]->getOffset();
             const domURIFragmentType& uri = inputs[i]->getSource();
             daeElementRef elem = uri.getElement();
             domSource* src = (domSource*) elem.cast();
@@ -745,11 +745,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
 
             if (v)
             {
-                U32 v_idx = idx[j*stride+v_offset]*3;
+                U32 v_idx = (U32)idx[j*stride+v_offset]*3;
                 v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount());
-                vert.getPosition().set(v->get(v_idx),
-                                v->get(v_idx+1),
-                                v->get(v_idx+2));
+                vert.getPosition().set((F32)v->get(v_idx),
+                                (F32)v->get(v_idx+1),
+                                (F32)v->get(v_idx+2));
             }
 
             //bounds check n and t lookups because some FBX to DAE converters
@@ -757,11 +757,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
             //for a particular channel
             if (n && n->getCount() > 0)
             {
-                U32 n_idx = idx[j*stride+n_offset]*3;
+                U32 n_idx = (U32)idx[j*stride+n_offset]*3;
                 n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount());
-                vert.getNormal().set(n->get(n_idx),
-                                n->get(n_idx+1),
-                                n->get(n_idx+2));
+                vert.getNormal().set((F32)n->get(n_idx),
+                                (F32)n->get(n_idx+1),
+                                (F32)n->get(n_idx+2));
             }
             else
             {
@@ -771,10 +771,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
 
             if (t && t->getCount() > 0)
             {
-                U32 t_idx = idx[j*stride+t_offset]*2;
+                U32 t_idx = (U32)idx[j*stride+t_offset]*2;
                 t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
-                vert.mTexCoord.setVec(t->get(t_idx),
-                                t->get(t_idx+1));
+                vert.mTexCoord.setVec((F32)t->get(t_idx),
+                                (F32)t->get(t_idx+1));
             }
             else
             {
@@ -1026,7 +1026,7 @@ bool LLDAELoader::OpenFile(const std::string& filename)
 
     if (unit)
     {
-        F32 meter = unit->getMeter();
+        F32 meter = (F32)unit->getMeter();
         mTransform.mMatrix[0][0] = meter;
         mTransform.mMatrix[1][1] = meter;
         mTransform.mMatrix[2][2] = meter;
@@ -1241,7 +1241,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
             {
                 for(int j = 0; j < 4; j++)
                 {
-                    mat.mMatrix[i][j] = dom_value[i + j*4];
+                    mat.mMatrix[i][j] = (F32)dom_value[i + j*4];
                 }
             }
 
@@ -1463,7 +1463,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
                             {
                                 for(int j = 0; j < 4; j++)
                                 {
-                                    mat.mMatrix[i][j] = transform[k*16 + i + j*4];
+                                    mat.mMatrix[i][j] = (F32)transform[k*16 + i + j*4];
                                 }
                             }
                             model->mSkinInfo.mInvBindMatrix.push_back(LLMatrix4a(mat));
@@ -1581,7 +1581,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
                                     LL_ERRS() << "Invalid position array size." << LL_ENDL;
                                 }
 
-                                LLVector3 v(pos[j], pos[j+1], pos[j+2]);
+                                LLVector3 v((F32)pos[j], (F32)pos[j+1], (F32)pos[j+2]);
 
                                 //transform from COLLADA space to volume space
                                 v = v * inverse_normalized_transformation;
@@ -1621,15 +1621,15 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
                 U32 c_idx = 0;
                 for (size_t vc_idx = 0; vc_idx < vcount.getCount(); ++vc_idx)
                 { //for each vertex
-                    daeUInt count = vcount[vc_idx];
+                    daeUInt count = (daeUInt)vcount[vc_idx];
 
                     //create list of weights that influence this vertex
                     LLModel::weight_list weight_list;
 
                     for (daeUInt i = 0; i < count; ++i)
                     { //for each weight
-                        daeInt joint_idx = v[c_idx++];
-                        daeInt weight_idx = v[c_idx++];
+                        daeInt joint_idx = (daeInt)v[c_idx++];
+                        daeInt weight_idx = (daeInt)v[c_idx++];
 
                         if (joint_idx == -1)
                         {
@@ -1637,7 +1637,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
                             continue;
                         }
 
-                        F32 weight_value = w[weight_idx];
+                        F32 weight_value = (F32)w[weight_idx];
 
                         weight_list.push_back(LLModel::JointWeight(joint_idx, weight_value));
                     }
@@ -1807,7 +1807,7 @@ bool LLDAELoader::verifyController( domController* pController )
         {
             //Skin is reference directly by geometry and get the vertex count from skin
             domSkin::domVertex_weights* pVertexWeights = pSkin->getVertex_weights();
-            U32 vertexWeightsCount = pVertexWeights->getCount();
+            U32 vertexWeightsCount = (U32)pVertexWeights->getCount();
             domGeometry* pGeometry = (domGeometry*) (domElement*) uri.getElement();
             domMesh* pMesh = pGeometry->getMesh();
 
@@ -1825,7 +1825,7 @@ bool LLDAELoader::verifyController( domController* pController )
                 {
                     xsAnyURI src = pVertices->getInput_array()[0]->getSource();
                     domSource* pSource = (domSource*) (domElement*) src.getElement();
-                    U32 verticesCount = pSource->getTechnique_common()->getAccessor()->getCount();
+                    U32 verticesCount = (U32)pSource->getTechnique_common()->getAccessor()->getCount();
                     result = verifyCount( verticesCount, vertexWeightsCount );
                     if ( !result )
                     {
@@ -1845,7 +1845,7 @@ bool LLDAELoader::verifyController( domController* pController )
             U32 sum = 0;
             for (size_t i=0; i<vcountCount; i++)
             {
-                sum += pVertexWeights->getVcount()->getValue()[i];
+                sum += (U32)pVertexWeights->getVcount()->getValue()[i];
             }
             result = verifyCount( sum * static_cast<U32>(inputs.getCount()), (domInt) static_cast<int>(pVertexWeights->getV()->getValue().getCount()) );
         }
@@ -1860,7 +1860,7 @@ bool LLDAELoader::verifyController( domController* pController )
 void LLDAELoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform )
 {
     domFloat3 jointTrans = pTranslate->getValue();
-    LLVector3 singleJointTranslation( jointTrans[0], jointTrans[1], jointTrans[2] );
+    LLVector3 singleJointTranslation((F32)jointTrans[0], (F32)jointTrans[1], (F32)jointTrans[2]);
     transform.setTranslation( singleJointTranslation );
 }
 //-----------------------------------------------------------------------------
@@ -1872,7 +1872,7 @@ void LLDAELoader::extractTranslationViaElement( daeElement* pTranslateElement, L
     {
         domTranslate* pTranslateChild = static_cast<domTranslate*>( pTranslateElement );
         domFloat3 translateChild = pTranslateChild->getValue();
-        LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] );
+        LLVector3 singleJointTranslation((F32)translateChild[0], (F32)translateChild[1], (F32)translateChild[2]);
         transform.setTranslation( singleJointTranslation );
     }
 }
@@ -1894,7 +1894,7 @@ void LLDAELoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& tra
             {
                 for( int j = 0; j < 4; j++ )
                 {
-                    workingTransform.mMatrix[i][j] = domArray[i + j*4];
+                    workingTransform.mMatrix[i][j] = (F32)domArray[i + j*4];
                 }
             }
             LLVector3 trans = workingTransform.getTranslation();
@@ -1957,7 +1957,7 @@ void LLDAELoader::processJointNode( domNode* pNode, JointTransformMap& jointTran
                         {
                             for (int j = 0; j < 4; j++)
                             {
-                                workingTransform.mMatrix[i][j] = domArray[i + j * 4];
+                                workingTransform.mMatrix[i][j] = (F32)domArray[i + j * 4];
                             }
                         }
                     }
@@ -2023,7 +2023,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
         domFloat3 dom_value = translate->getValue();
 
         LLMatrix4 translation;
-        translation.setTranslation(LLVector3(dom_value[0], dom_value[1], dom_value[2]));
+        translation.setTranslation(LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]));
 
         translation *= mTransform;
         mTransform = translation;
@@ -2036,7 +2036,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
         domFloat4 dom_value = rotate->getValue();
 
         LLMatrix4 rotation;
-        rotation.initRotTrans(dom_value[3] * DEG_TO_RAD, LLVector3(dom_value[0], dom_value[1], dom_value[2]), LLVector3(0, 0, 0));
+        rotation.initRotTrans((F32)dom_value[3] * DEG_TO_RAD, LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]), LLVector3(0, 0, 0));
 
         rotation *= mTransform;
         mTransform = rotation;
@@ -2049,7 +2049,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
         domFloat3 dom_value = scale->getValue();
 
 
-        LLVector3 scale_vector = LLVector3(dom_value[0], dom_value[1], dom_value[2]);
+        LLVector3 scale_vector = LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]);
         scale_vector.abs(); // Set all values positive, since we don't currently support mirrored meshes
         LLMatrix4 scaling;
         scaling.initScale(scale_vector);
@@ -2070,7 +2070,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
         {
             for(int j = 0; j < 4; j++)
             {
-                matrix_transform.mMatrix[i][j] = dom_value[i + j*4];
+                matrix_transform.mMatrix[i][j] = (F32)dom_value[i + j*4];
             }
         }
 
@@ -2338,7 +2338,7 @@ LLImportMaterial LLDAELoader::profileToMaterial(domProfile_COMMON* material, DAE
         if (color)
         {
             domFx_color_common domfx_color = color->getValue();
-            LLColor4 value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]);
+            LLColor4 value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]);
             mat.mDiffuseColor = value;
         }
     }
@@ -2450,7 +2450,7 @@ LLColor4 LLDAELoader::getDaeColor(daeElement* element)
     if (color)
     {
         domFx_color_common domfx_color = color->getValue();
-        value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]);
+        value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]);
     }
 
     return value;
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp
index e8c9af5ea3..cc4921416f 100644
--- a/indra/llprimitive/llgltfmaterial.cpp
+++ b/indra/llprimitive/llgltfmaterial.cpp
@@ -790,7 +790,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
     const LLSD& mf = data["mf"];
     if (mf.isReal())
     {
-        mMetallicFactor = mf.asReal();
+        mMetallicFactor = (F32)mf.asReal();
         if (mMetallicFactor == getDefaultMetallicFactor())
         {
             // HACK -- nudge by epsilon if we receive a default value (indicates override to default)
@@ -801,7 +801,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
     const LLSD& rf = data["rf"];
     if (rf.isReal())
     {
-        mRoughnessFactor = rf.asReal();
+        mRoughnessFactor = (F32)rf.asReal();
         if (mRoughnessFactor == getDefaultRoughnessFactor())
         {
             // HACK -- nudge by epsilon if we receive a default value (indicates override to default)
@@ -819,7 +819,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
     const LLSD& ac = data["ac"];
     if (ac.isReal())
     {
-        mAlphaCutoff = ac.asReal();
+        mAlphaCutoff = (F32)ac.asReal();
         if (mAlphaCutoff == getDefaultAlphaCutoff())
         {
             // HACK -- nudge by epsilon if we receive a default value (indicates override to default)
@@ -854,7 +854,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
             const LLSD& r = ti[i]["r"];
             if (r.isReal())
             {
-                mTextureTransform[i].mRotation = r.asReal();
+                mTextureTransform[i].mRotation = (F32)r.asReal();
             }
         }
     }
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index e7152a2291..15087a7255 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1487,7 +1487,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
             {
                 for (U32 k = 0; k < 4; k++)
                 {
-                    mat.mMatrix[j][k] = skin["inverse_bind_matrix"][i][j*4+k].asReal();
+                    mat.mMatrix[j][k] = (F32)skin["inverse_bind_matrix"][i][j*4+k].asReal();
                 }
             }
 
@@ -1510,7 +1510,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
         {
             for (U32 k = 0; k < 4; k++)
             {
-                mat.mMatrix[j][k] = skin["bind_shape_matrix"][j*4+k].asReal();
+                mat.mMatrix[j][k] = (F32)skin["bind_shape_matrix"][j*4+k].asReal();
             }
         }
         mBindShapeMatrix.loadu(mat);
@@ -1525,7 +1525,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
             {
                 for (U32 k = 0; k < 4; k++)
                 {
-                    mat.mMatrix[j][k] = skin["alt_inverse_bind_matrix"][i][j*4+k].asReal();
+                    mat.mMatrix[j][k] = (F32)skin["alt_inverse_bind_matrix"][i][j*4+k].asReal();
                 }
             }
 
@@ -1535,7 +1535,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
 
     if (skin.has("pelvis_offset"))
     {
-        mPelvisOffset = skin["pelvis_offset"].asReal();
+        mPelvisOffset = (F32)skin["pelvis_offset"].asReal();
     }
 
     if (skin.has("lock_scale_if_joint_position"))
@@ -1618,7 +1618,7 @@ void LLMeshSkinInfo::updateHash()
 
     for (size_t i = 0, count = mInvBindMatrix.size() * 16; i < count; ++i)
     {
-        S32 t = llround(src[i] * 10000.f);
+        S32 t = ll_round(src[i] * 10000.f);
         hash.update((const void*)&t, sizeof(S32));
     }
     //hash.update((const void*)mInvBindMatrix.data(), sizeof(LLMatrix4a) * mInvBindMatrix.size());
diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp
index b85aa3acf2..b6216c022b 100644
--- a/indra/llprimitive/lltreeparams.cpp
+++ b/indra/llprimitive/lltreeparams.cpp
@@ -178,7 +178,7 @@ F32 LLTreeParams::ShapeRatio(EShapeRatio shape, F32 ratio)
         case (SR_SPHERICAL):
             return (.2f + .8f * sinf(F_PI*ratio));
         case (SR_HEMISPHERICAL):
-            return (.2f + .8f * sinf(.5*F_PI*ratio));
+            return (.2f + .8f * sinf(.5f*F_PI*ratio));
         case (SR_CYLINDRICAL):
             return (1);
         case (SR_TAPERED_CYLINDRICAL):
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 741ed993b0..6128e03fa7 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -178,7 +178,7 @@ unsigned long ft_read_cb(FT_Stream stream, unsigned long offset, unsigned char *
     llifstream *file_stream = static_cast<llifstream *>(stream->descriptor.pointer);
     file_stream->seekg(offset, std::ios::beg);
     file_stream->read((char*)buffer, count);
-    return file_stream->gcount();
+    return (unsigned long)file_stream->gcount();
 }
 
 void ft_close_cb(FT_Stream stream) {
diff --git a/indra/llrender/llfontfreetypesvg.cpp b/indra/llrender/llfontfreetypesvg.cpp
index 355e8432aa..71f751329e 100644
--- a/indra/llrender/llfontfreetypesvg.cpp
+++ b/indra/llrender/llfontfreetypesvg.cpp
@@ -136,18 +136,18 @@ FT_Error LLFontFreeTypeSvgRenderer::OnPresetGlypthSlot(FT_GlyphSlot glyph_slot,
     float svg_scale = llmin(svg_x_scale, svg_y_scale);
     datap->Scale = svg_scale;
 
-    glyph_slot->bitmap.width = floorf(svg_width) * svg_scale;
-    glyph_slot->bitmap.rows = floorf(svg_height) * svg_scale;
+    glyph_slot->bitmap.width = (unsigned int)(floorf(svg_width) * svg_scale);
+    glyph_slot->bitmap.rows = (unsigned int)(floorf(svg_height) * svg_scale);
     glyph_slot->bitmap_left = (document->metrics.x_ppem - glyph_slot->bitmap.width) / 2;
-    glyph_slot->bitmap_top = glyph_slot->face->size->metrics.ascender / 64.f;
+    glyph_slot->bitmap_top = (FT_Int)(glyph_slot->face->size->metrics.ascender / 64.f);
     glyph_slot->bitmap.pitch = glyph_slot->bitmap.width * 4;
     glyph_slot->bitmap.pixel_mode = FT_PIXEL_MODE_BGRA;
 
     /* Copied as-is from fcft (MIT license) */
 
     // Compute all the bearings and set them correctly. The outline is scaled already, we just need to use the bounding box.
-    float horiBearingX = 0.;
-    float horiBearingY = -glyph_slot->bitmap_top;
+    float horiBearingX = 0.f;
+    float horiBearingY = -(float)glyph_slot->bitmap_top;
 
     // XXX parentheses correct?
     float vertBearingX = glyph_slot->metrics.horiBearingX / 64.0f - glyph_slot->metrics.horiAdvance / 64.0f / 2;
@@ -156,13 +156,13 @@ FT_Error LLFontFreeTypeSvgRenderer::OnPresetGlypthSlot(FT_GlyphSlot glyph_slot,
     // Do conversion in two steps to avoid 'bad function cast' warning
     glyph_slot->metrics.width = glyph_slot->bitmap.width * 64;
     glyph_slot->metrics.height = glyph_slot->bitmap.rows * 64;
-    glyph_slot->metrics.horiBearingX = horiBearingX * 64;
-    glyph_slot->metrics.horiBearingY = horiBearingY * 64;
-    glyph_slot->metrics.vertBearingX = vertBearingX * 64;
-    glyph_slot->metrics.vertBearingY = vertBearingY * 64;
+    glyph_slot->metrics.horiBearingX = (FT_Pos)(horiBearingX * 64);
+    glyph_slot->metrics.horiBearingY = (FT_Pos)(horiBearingY * 64);
+    glyph_slot->metrics.vertBearingX = (FT_Pos)(vertBearingX * 64);
+    glyph_slot->metrics.vertBearingY = (FT_Pos)(vertBearingY * 64);
     if (glyph_slot->metrics.vertAdvance == 0)
     {
-        glyph_slot->metrics.vertAdvance = glyph_slot->bitmap.rows * 1.2f * 64;
+        glyph_slot->metrics.vertAdvance = (FT_Pos)(glyph_slot->bitmap.rows * 1.2f * 64);
     }
 
     return FT_Err_Ok;
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 59ee8ef84f..04aebdde90 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -112,7 +112,7 @@ S32 LLFontGL::getNumFaces(const std::string& filename)
 S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
     ShadowType shadow, S32 max_chars, F32* right_x, bool use_ellipses, bool use_color) const
 {
-    LLRectf rect_float(rect.mLeft, rect.mTop, rect.mRight, rect.mBottom);
+    LLRectf rect_float((F32)rect.mLeft, (F32)rect.mTop, (F32)rect.mRight, (F32)rect.mBottom);
     return render(wstr, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses, use_color);
 }
 
@@ -138,7 +138,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
         y = rect.mBottom;
         break;
     }
-    return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses, use_color);
+    return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, (S32)rect.getWidth(), right_x, use_ellipses, use_color);
 }
 
 
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 62f4f35e3d..c48a389f6a 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -500,7 +500,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
         // *HACK: Fallback fonts don't render, so we can use that to suppress
         // creation of OpenGL textures for test apps. JC
         bool is_fallback = !is_first_found || !mCreateGLTextures;
-        F32 extra_scale = (is_fallback)?fallback_scale:1.0;
+        F32 extra_scale = (is_fallback) ? fallback_scale : 1.0f;
         F32 point_size_scale = extra_scale * point_size;
         bool is_font_loaded = false;
         for(string_vec_t::iterator font_search_path_it = font_search_paths.begin();
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 25e4a88f28..e76a30a954 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -190,7 +190,7 @@ void LLGLSLShader::dumpStats()
         tris_sec /= seconds;
 
         F32 pct_samples = (F32)((F64)mSamplesDrawn / (F64)sTotalSamplesDrawn) * 100.f;
-        F32 samples_sec = (F32)mSamplesDrawn / 1000000000.0;
+        F32 samples_sec = (F32)(mSamplesDrawn / 1000000000.0);
         samples_sec /= seconds;
 
         F32 pct_binds = (F32)mBinds / (F32)sTotalBinds * 100.f;
@@ -1265,7 +1265,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
             if (iter == mValue.end() || iter->second.mV[0] != x)
             {
                 glUniform1i(mUniform[index], x);
-                mValue[mUniform[index]] = LLVector4(x, 0.f, 0.f, 0.f);
+                mValue[mUniform[index]] = LLVector4((F32)x, 0.f, 0.f, 0.f);
             }
         }
     }
@@ -1405,7 +1405,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
         if (mUniform[index] >= 0)
         {
             const auto& iter = mValue.find(mUniform[index]);
-            LLVector4 vec(v[0], 0.f, 0.f, 0.f);
+            LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
             if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
             {
                 glUniform1iv(mUniform[index], count, v);
@@ -1432,7 +1432,7 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v)
         if (mUniform[index] >= 0)
         {
             const auto& iter = mValue.find(mUniform[index]);
-            LLVector4 vec(v[0], v[1], v[2], v[3]);
+            LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
             if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
             {
                 glUniform1iv(mUniform[index], count, v);
@@ -1702,7 +1702,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v)
     if (location >= 0)
     {
         const auto& iter = mValue.find(location);
-        LLVector4 vec(v, 0.f, 0.f, 0.f);
+        LLVector4 vec((F32)v, 0.f, 0.f, 0.f);
         if (iter == mValue.end() || shouldChange(iter->second, vec))
         {
             glUniform1i(location, v);
@@ -1718,7 +1718,7 @@ void LLGLSLShader::uniform1iv(const LLStaticHashedString& uniform, U32 count, co
 
     if (location >= 0)
     {
-        LLVector4 vec(v[0], 0, 0, 0);
+        LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
         const auto& iter = mValue.find(location);
         if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
         {
@@ -1736,7 +1736,7 @@ void LLGLSLShader::uniform4iv(const LLStaticHashedString& uniform, U32 count, co
 
     if (location >= 0)
     {
-        LLVector4 vec(v[0], v[1], v[2], v[3]);
+        LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
         const auto& iter = mValue.find(location);
         if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
         {
@@ -1755,7 +1755,7 @@ void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint
     if (location >= 0)
     {
         const auto& iter = mValue.find(location);
-        LLVector4 vec(i, j, 0.f, 0.f);
+        LLVector4 vec((F32)i, (F32)j, 0.f, 0.f);
         if (iter == mValue.end() || shouldChange(iter->second, vec))
         {
             glUniform2i(location, i, j);
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 34200ef5cb..058afa0cf2 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -738,7 +738,7 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32
                 }
                 if (is_compressed)
                 {
-                    S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
+                    GLsizei tex_size = (GLsizei)dataFormatBytes(mFormatPrimary, w, h);
                     glCompressedTexImage2D(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
                     stop_glerror();
                 }
@@ -941,7 +941,7 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32
         S32 h = getHeight();
         if (is_compressed)
         {
-            S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
+            GLsizei tex_size = (GLsizei)dataFormatBytes(mFormatPrimary, w, h);
             glCompressedTexImage2D(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
             stop_glerror();
         }
@@ -2418,7 +2418,7 @@ bool LLImageGL::scaleDown(S32 desired_discard)
         if (size > sScratchPBOSize)
         {
             glBufferData(GL_PIXEL_PACK_BUFFER, size, NULL, GL_STREAM_COPY);
-            sScratchPBOSize = size;
+            sScratchPBOSize = (U32)size;
         }
 
         glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr);
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index 8ebd09f20d..eef7193c92 100644
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -343,7 +343,7 @@ void LLPostProcess::viewOrthogonal(unsigned int width, unsigned int height)
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho( 0.f, (GLdouble) width , (GLdouble) height , 0.f, -1.f, 1.f );
+    gGL.ortho( 0.f, (GLfloat) width , (GLfloat) height , 0.f, -1.f, 1.f );
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
     gGL.loadIdentity();
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index ef02fbd071..176c7a5d2c 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -364,7 +364,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
     {
         // add in offset of current image to current UI translation
         const LLVector3 ui_scale = gGL.getUIScale();
-        const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3(x, y, 0.f)).scaledVec(ui_scale);
+        const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3((F32)x, (F32)y, 0.f)).scaledVec(ui_scale);
 
         F32 uv_width = uv_outer_rect.getWidth();
         F32 uv_height = uv_outer_rect.getHeight();
@@ -375,8 +375,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
                                 uv_outer_rect.mLeft + (center_rect.mRight * uv_width),
                                 uv_outer_rect.mBottom + (center_rect.mBottom * uv_height));
 
-        F32 image_width = image->getWidth(0);
-        F32 image_height = image->getHeight(0);
+        F32 image_width = (F32)image->getWidth(0);
+        F32 image_height = (F32)image->getHeight(0);
 
         S32 image_natural_width = ll_round(image_width * uv_width);
         S32 image_natural_height = ll_round(image_height * uv_height);
@@ -413,10 +413,10 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
             draw_center_rect.setCenterAndSize(uv_center_rect.getCenterX() * width, uv_center_rect.getCenterY() * height, scaled_width, scaled_height);
         }
 
-        draw_center_rect.mLeft   = ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mLeft * ui_scale.mV[VX]);
-        draw_center_rect.mTop    = ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mTop * ui_scale.mV[VY]);
-        draw_center_rect.mRight  = ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mRight * ui_scale.mV[VX]);
-        draw_center_rect.mBottom = ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mBottom * ui_scale.mV[VY]);
+        draw_center_rect.mLeft   = (F32)ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mLeft * ui_scale.mV[VX]);
+        draw_center_rect.mTop    = (F32)ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mTop * ui_scale.mV[VY]);
+        draw_center_rect.mRight  = (F32)ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mRight * ui_scale.mV[VX]);
+        draw_center_rect.mBottom = (F32)ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mBottom * ui_scale.mV[VY]);
 
         LLRectf draw_outer_rect(ui_translation.mV[VX],
                                 ui_translation.mV[VY] + height * ui_scale.mV[VY],
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 410efe9a70..015819c1bd 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -124,7 +124,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, LLT
 
     if (mGenerateMipMaps != LLTexUnit::TMG_NONE) {
         // Calculate the number of mip levels based upon resolution that we should have.
-        mMipLevels = 1 + floor(log10((float)llmax(mResX, mResY))/log10(2.0));
+        mMipLevels = 1 + (U32)floor(log10((float)llmax(mResX, mResY)) / log10(2.0));
     }
 
     if (depth)
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index a8e9f20b40..8bc00c0cf6 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1003,7 +1003,7 @@ void LLShaderMgr::initShaderCache(bool enabled, const LLUUID& old_cache_version,
                     ProgramBinaryData binary_info = ProgramBinaryData();
                     binary_info.mBinaryFormat = data_pair.second["binary_format"].asInteger();
                     binary_info.mBinaryLength = data_pair.second["binary_size"].asInteger();
-                    binary_info.mLastUsedTime = data_pair.second["last_used"].asReal();
+                    binary_info.mLastUsedTime = (F32)data_pair.second["last_used"].asReal();
                     mShaderBinaryCache.insert_or_assign(LLUUID(data_pair.first), binary_info);
                 }
             }
@@ -1034,7 +1034,7 @@ void LLShaderMgr::persistShaderCacheMetadata()
     LLSD out = LLSD::emptyMap();
 
     static const F32 LRU_TIME = (60.f * 60.f) * 24.f * 7.f; // 14 days
-    const F32 current_time = LLTimer::getTotalSeconds();
+    const F32 current_time = (F32)LLTimer::getTotalSeconds();
     for (auto it = mShaderBinaryCache.begin(); it != mShaderBinaryCache.end();)
     {
         const ProgramBinaryData& shader_metadata = it->second;
@@ -1093,7 +1093,7 @@ bool LLShaderMgr::loadCachedProgramBinary(LLGLSLShader* shader)
                     glGetProgramiv(shader->mProgramObject, GL_LINK_STATUS, &success);
                     if (error == GL_NO_ERROR && success == GL_TRUE)
                     {
-                        binary_iter->second.mLastUsedTime = LLTimer::getTotalSeconds();
+                        binary_iter->second.mLastUsedTime = (F32)LLTimer::getTotalSeconds();
                         LL_INFOS() << "Loaded cached binary for shader: " << shader->mName << LL_ENDL;
                         return true;
                     }
@@ -1131,7 +1131,7 @@ bool LLShaderMgr::saveCachedProgramBinary(LLGLSLShader* shader)
                 fwrite(program_binary.data(), sizeof(U8), program_binary.size(), outfile);
                 outfile.close();
 
-                binary_info.mLastUsedTime = LLTimer::getTotalSeconds();
+                binary_info.mLastUsedTime = (F32)LLTimer::getTotalSeconds();
 
                 mShaderBinaryCache.insert_or_assign(shader->mShaderHash, binary_info);
                 return true;
diff --git a/indra/llrender/lluiimage.cpp b/indra/llrender/lluiimage.cpp
index bcf665ca18..d31a91e2af 100644
--- a/indra/llrender/lluiimage.cpp
+++ b/indra/llrender/lluiimage.cpp
@@ -83,7 +83,7 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
 
     LLRender2D::getInstance()->pushMatrix();
     {
-        LLVector3 rect_origin = origin_agent + (rect.mLeft * x_axis) + (rect.mBottom * y_axis);
+        LLVector3 rect_origin = origin_agent + ((F32)rect.mLeft * x_axis) + ((F32)rect.mBottom * y_axis);
         LLRender2D::getInstance()->translate(rect_origin.mV[VX],
                                             rect_origin.mV[VY],
                                             rect_origin.mV[VZ]);
@@ -100,8 +100,8 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
                                         (rect.getHeight() - (border_height * border_scale * 0.5f)) / (F32)rect.getHeight(),
                                         (rect.getWidth() - (border_width * border_scale * 0.5f)) / (F32)rect.getWidth(),
                                         (border_height * border_scale * 0.5f) / (F32)rect.getHeight()),
-                                rect.getWidth() * x_axis,
-                                rect.getHeight() * y_axis);
+                                (F32)rect.getWidth() * x_axis,
+                                (F32)rect.getHeight() * y_axis);
 
     } LLRender2D::getInstance()->popMatrix();
 }
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 40c5041132..3ff0617554 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -197,10 +197,10 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
     F32 x = LLFontGL::sCurOrigin.mX + centerX - width * 0.5f;
     F32 y = LLFontGL::sCurOrigin.mY + centerY - height * 0.5f;
 
-    LLRectf screen_rect(ll_round(x),
-                        ll_round(y),
-                        ll_round(x) + width,
-                        ll_round(y) + height);
+    LLRectf screen_rect((F32)ll_round(x),
+                        (F32)ll_round(y),
+                        (F32)ll_round(x) + width,
+                        (F32)ll_round(y) + height);
 
     LLVector3 vertices[4];
     vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop,    1.0f);
@@ -302,7 +302,7 @@ void LLBadge::draw()
             }
             else
             {
-                badge_center_x = location_offset_horiz;
+                badge_center_x = (F32)location_offset_horiz;
             }
 
             // Compute y position
@@ -319,7 +319,7 @@ void LLBadge::draw()
             }
             else
             {
-                badge_center_y = location_offset_vert;
+                badge_center_y = (F32)location_offset_vert;
             }
 
             //
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7912baf132..9e1e3ba120 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -188,7 +188,7 @@ LLButton::LLButton(const LLButton::Params& p)
         // Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod").
         // Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing").
         S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0;
-        F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0;
+        F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0f;
         mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate);
     }
     else
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 9fbfb3e5fa..fe4f991921 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -80,7 +80,7 @@ void LLConsole::setLinePersistTime(F32 seconds)
 void LLConsole::reshape(S32 width, S32 height, bool called_from_parent)
 {
     S32 new_width = llmax(50, llmin(getRect().getWidth(), width));
-    S32 new_height = llmax(llfloor(mFont->getLineHeight()) + 15, llmin(getRect().getHeight(), height));
+    S32 new_height = llmax(mFont->getLineHeight() + 15, llmin(getRect().getHeight(), height));
 
     if (   mConsoleWidth == new_width
         && mConsoleHeight == new_height )
@@ -186,7 +186,7 @@ void LLConsole::draw()
     LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
     color.mV[VALPHA] *= console_opacity;
 
-    F32 line_height = mFont->getLineHeight();
+    F32 line_height = (F32)mFont->getLineHeight();
 
     for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++)
     {
diff --git a/indra/llui/llf32uictrl.cpp b/indra/llui/llf32uictrl.cpp
index 52954ebbbb..9d041fffb0 100644
--- a/indra/llui/llf32uictrl.cpp
+++ b/indra/llui/llf32uictrl.cpp
@@ -37,7 +37,7 @@
 
 LLF32UICtrl::LLF32UICtrl(const Params& p)
 :   LLUICtrl(p),
-    mInitialValue(p.initial_value().asReal()),
+    mInitialValue((F32)p.initial_value().asReal()),
     mMinValue(p.min_value),
     mMaxValue(p.max_value),
     mIncrement(p.increment)
@@ -47,5 +47,5 @@ LLF32UICtrl::LLF32UICtrl(const Params& p)
 
 F32 LLF32UICtrl::getValueF32() const
 {
-    return mViewModel->getValue().asReal();
+    return (F32)mViewModel->getValue().asReal();
 }
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e6ecf3c283..d0eb9a1873 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -960,8 +960,8 @@ bool LLFloater::applyRectControl()
             && !x_control->isDefault()
             && !y_control->isDefault())
         {
-            mPosition.mX = x_control->getValue().asReal();
-            mPosition.mY = y_control->getValue().asReal();
+            mPosition.mX = (LL_COORD_FLOATER::value_t)x_control->getValue().asReal();
+            mPosition.mY = (LL_COORD_FLOATER::value_t)y_control->getValue().asReal();
             mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
             applyRelativePosition();
 
@@ -3618,7 +3618,7 @@ void LLFloater::applyRelativePosition()
 
 
 LLCoordFloater::LLCoordFloater(F32 x, F32 y, LLFloater& floater)
-:   coord_t((S32)x, (S32)y)
+:   coord_t(x, y)
 {
     mFloater = floater.getHandle();
 }
@@ -3661,28 +3661,28 @@ LLCoordCommon LL_COORD_FLOATER::convertToCommon() const
     LLCoordCommon out;
     if (self.mX < -0.5f)
     {
-        out.mX = ll_round(rescale(self.mX, -1.f, -0.5f, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft));
+        out.mX = ll_round(rescale(self.mX, -1.f, -0.5f, (F32)(snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mLeft));
     }
     else if (self.mX > 0.5f)
     {
-        out.mX = ll_round(rescale(self.mX, 0.5f, 1.f, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS));
+        out.mX = ll_round(rescale(self.mX, 0.5f, 1.f, (F32)(snap_rect.mRight - floater_width), (F32)(snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS)));
     }
     else
     {
-        out.mX = ll_round(rescale(self.mX, -0.5f, 0.5f, snap_rect.mLeft, snap_rect.mRight - floater_width));
+        out.mX = ll_round(rescale(self.mX, -0.5f, 0.5f, (F32)snap_rect.mLeft, (F32)(snap_rect.mRight - floater_width)));
     }
 
     if (self.mY < -0.5f)
     {
-        out.mY = ll_round(rescale(self.mY, -1.f, -0.5f, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom));
+        out.mY = ll_round(rescale(self.mY, -1.f, -0.5f, (F32)(snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mBottom));
     }
     else if (self.mY > 0.5f)
     {
-        out.mY = ll_round(rescale(self.mY, 0.5f, 1.f, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS));
+        out.mY = ll_round(rescale(self.mY, 0.5f, 1.f, (F32)(snap_rect.mTop - floater_height), (F32)(snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS)));
     }
     else
     {
-        out.mY = ll_round(rescale(self.mY, -0.5f, 0.5f, snap_rect.mBottom, snap_rect.mTop - floater_height));
+        out.mY = ll_round(rescale(self.mY, -0.5f, 0.5f, (F32)snap_rect.mBottom, (F32)(snap_rect.mTop - floater_height)));
     }
 
     // return center point instead of lower left
@@ -3709,27 +3709,27 @@ void LL_COORD_FLOATER::convertFromCommon(const LLCoordCommon& from)
 
     if (from_x < snap_rect.mLeft)
     {
-        self.mX = rescale(from_x, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft, -1.f, -0.5f);
+        self.mX = rescale((F32)from_x, (F32)(snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mLeft, -1.f, -0.5f);
     }
     else if (from_x + floater_width > snap_rect.mRight)
     {
-        self.mX = rescale(from_x, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS, 0.5f, 1.f);
+        self.mX = rescale((F32)from_x, (F32)(snap_rect.mRight - floater_width), (F32)(snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS), 0.5f, 1.f);
     }
     else
     {
-        self.mX = rescale(from_x, snap_rect.mLeft, snap_rect.mRight - floater_width, -0.5f, 0.5f);
+        self.mX = rescale((F32)from_x, (F32)snap_rect.mLeft, (F32)(snap_rect.mRight - floater_width), -0.5f, 0.5f);
     }
 
     if (from_y < snap_rect.mBottom)
     {
-        self.mY = rescale(from_y, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom, -1.f, -0.5f);
+        self.mY = rescale((F32)from_y, (F32)(snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mBottom, -1.f, -0.5f);
     }
     else if (from_y + floater_height > snap_rect.mTop)
     {
-        self.mY = rescale(from_y, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS, 0.5f, 1.f);
+        self.mY = rescale((F32)from_y, (F32)(snap_rect.mTop - floater_height), (F32)(snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS), 0.5f, 1.f);
     }
     else
     {
-        self.mY = rescale(from_y, snap_rect.mBottom, snap_rect.mTop - floater_height, -0.5f, 0.5f);
+        self.mY = rescale((F32)from_y, (F32)snap_rect.mBottom, (F32)(snap_rect.mTop - floater_height), -0.5f, 0.5f);
     }
 }
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 82cd2483e8..4c1733506c 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -950,7 +950,7 @@ void LLFolderViewItem::draw()
     S32 filter_offset = static_cast<S32>(mViewModelItem->getFilterStringOffset());
     if (filter_string_length > 0)
     {
-        S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD);
+        S32 bottom = getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD;
         S32 top = getRect().getHeight() - TOP_PAD;
         if(mLabelSuffix.empty() || (font == suffix_font))
         {
@@ -966,8 +966,8 @@ void LLFolderViewItem::draw()
             S32 label_filter_length = llmin((S32)mLabel.size() - filter_offset, (S32)filter_string_length);
             if(label_filter_length > 0)
             {
-                S32 left = ll_round(text_left) + font->getWidthF32(mLabel, 0, llmin(filter_offset, (S32)mLabel.size())) - 2;
-                S32 right = left + font->getWidthF32(mLabel, filter_offset, label_filter_length) + 2;
+                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, llmin(filter_offset, (S32)mLabel.size()))) - 2;
+                S32 right = left + (S32)font->getWidthF32(mLabel, filter_offset, label_filter_length) + 2;
                 LLUIImage* box_image = default_params.selection_image;
                 LLRect box_rect(left, top, right, bottom);
                 box_image->draw(box_rect, sFilterBGColor);
@@ -976,8 +976,8 @@ void LLFolderViewItem::draw()
             if(suffix_filter_length > 0)
             {
                 S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
-                S32 left = ll_round(text_left) + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset) - 2;
-                S32 right = left + suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length) + 2;
+                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset))- 2;
+                S32 right = left + (S32)suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length) + 2;
                 LLUIImage* box_image = default_params.selection_image;
                 LLRect box_rect(left, top, right, bottom);
                 box_image->draw(box_rect, sFilterBGColor);
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index ea84594ad6..cc567adb75 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -501,7 +501,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
         {
             if( *cur == '\n' )
             {
-                LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, cur-base);
+                LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, (S32)(cur - base));
                 text_segment->setToken( 0 );
                 insertSegment( *seg_list, text_segment, text_len, style, editor);
                 cur++;
@@ -532,13 +532,13 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
                     LLKeywordToken* cur_token = *iter;
                     if( cur_token->isHead( cur ) )
                     {
-                        S32 seg_start = cur - base;
+                        S32 seg_start = (S32)(cur - base);
                         while( *cur && *cur != '\n' )
                         {
                             // skip the rest of the line
                             cur++;
                         }
-                        S32 seg_end = cur - base;
+                        S32 seg_end = (S32)(cur - base);
 
                         //create segments from seg_start to seg_end
                         insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor);
@@ -582,7 +582,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
                     S32 between_delimiters = 0;
                     S32 seg_end = 0;
 
-                    seg_start = cur - base;
+                    seg_start = (S32)(cur - base);
                     cur += cur_delimiter->getLengthHead();
 
                     LLKeywordToken::ETokenType type = cur_delimiter->getType();
@@ -669,7 +669,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
                 {
                     p++;
                 }
-                S32 seg_len = p - cur;
+                S32 seg_len = (S32)(p - cur);
                 if( seg_len > 0 )
                 {
                     WStringMapIndex word( cur, seg_len );
@@ -677,7 +677,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
                     if( map_iter != mWordTokenMap.end() )
                     {
                         LLKeywordToken* cur_token = map_iter->second;
-                        S32 seg_start = cur - base;
+                        S32 seg_start = (S32)(cur - base);
                         S32 seg_end = seg_start + seg_len;
 
                         // LL_INFOS("SyntaxLSL") << "Seg: [" << word.c_str() << "]" << LL_ENDL;
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index bb09f7a26e..7ee31ebd00 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -131,7 +131,7 @@ void LLLayoutPanel::setTargetDim(S32 value)
 
 S32 LLLayoutPanel::getVisibleDim() const
 {
-    F32 min_dim = getRelevantMinDim();
+    F32 min_dim = (F32)getRelevantMinDim();
     return ll_round(mVisibleAmt
                     * (min_dim
                         + (((F32)mTargetDim - min_dim) * (1.f - mCollapseAmt))));
@@ -445,7 +445,7 @@ void LLLayoutStack::updateLayout()
 
     for (LLLayoutPanel* panelp : mPanels)
     {
-        F32 panel_dim = llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
+        F32 panel_dim = (F32)llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
 
         LLRect panel_rect;
         if (mOrientation == HORIZONTAL)
@@ -465,7 +465,7 @@ void LLLayoutStack::updateLayout()
 
         LLRect resize_bar_rect(panel_rect);
         F32 panel_spacing = (F32)mPanelSpacing * panelp->getVisibleAmount();
-        F32 panel_visible_dim = panelp->getVisibleDim();
+        F32 panel_visible_dim = (F32)panelp->getVisibleDim();
         S32 panel_spacing_round = (S32)(ll_round(panel_spacing));
 
         if (mOrientation == HORIZONTAL)
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index e4b18e8919..60b6115b34 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -2109,7 +2109,7 @@ void LLLineEditor::draw()
         if (0 == mText.length() && (mReadOnly || mShowLabelFocused))
         {
             mGLFont->render(mLabel.getWString(), 0,
-                            mTextLeftEdge, (F32)text_bottom,
+                            (F32)mTextLeftEdge, (F32)text_bottom,
                             label_color,
                             LLFontGL::LEFT,
                             LLFontGL::BOTTOM,
@@ -2134,7 +2134,7 @@ void LLLineEditor::draw()
         if (0 == mText.length())
         {
             mGLFont->render(mLabel.getWString(), 0,
-                            mTextLeftEdge, (F32)text_bottom,
+                            (F32)mTextLeftEdge, (F32)text_bottom,
                             label_color,
                             LLFontGL::LEFT,
                             LLFontGL::BOTTOM,
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 403879646d..5dccf9a8ba 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -209,7 +209,7 @@ void LLScrollListBar::setValue(const LLSD& value)
 {
     if (value.has("ratio"))
     {
-        mRatio = value["ratio"].asReal();
+        mRatio = (F32)value["ratio"].asReal();
     }
     if (value.has("bottom"))
     {
@@ -239,7 +239,7 @@ S32 LLScrollListBar::getWidth() const
 void LLScrollListBar::draw(const LLColor4& color, const LLColor4& highlight_color)   const
 {
     S32 bar_width = getWidth() - mLeftPad - mRightPad;
-    S32 left = bar_width - bar_width * mRatio;
+    S32 left = (S32)(bar_width - bar_width * mRatio);
     left = llclamp(left, mLeftPad, getWidth() - mRightPad - 1);
 
     gl_rect_2d(left, mBottom, getWidth() - mRightPad, mBottom - 1, mColor);
@@ -637,7 +637,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
     switch (mFontAlignment)
     {
     case LLFontGL::LEFT:
-        start_text_x = icon_space + 1;
+        start_text_x = icon_space + 1.f;
         start_icon_x = 1;
         break;
     case LLFontGL::RIGHT:
@@ -647,7 +647,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
     case LLFontGL::HCENTER:
         F32 center = (F32)getWidth()* 0.5f;
         start_text_x = center + ((F32)icon_space * 0.5f);
-        start_icon_x = center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f);
+        start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f));
         break;
     }
     mFont->render(mText.getWString(), 0,
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 1615db5b52..9d8eadfd3f 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -448,7 +448,7 @@ void LLSpellChecker::removeDictionary(const std::string& dict_language)
             {
                 LLFile::remove(dict_aff);
             }
-            dict_map.erase(it - dict_map.beginArray());
+            dict_map.erase((LLSD::Integer)(it - dict_map.beginArray()));
             break;
         }
     }
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index adb1d51813..4273fae71e 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -66,7 +66,7 @@ F32 calc_tick_value(F32 min, F32 max)
         S32 num_whole_digits = llceil(logf(llabs(min + possible_tick_value)) * OO_LN10);
         for (S32 digit_count = -(num_whole_digits - 1); digit_count < 6; digit_count++)
         {
-            F32 test_tick_value = min + (possible_tick_value * pow(10.0, digit_count));
+            F32 test_tick_value = min + (possible_tick_value * (F32)pow(10.0, digit_count));
 
             if (is_approx_equal((F32)(S32)test_tick_value, test_tick_value))
             {
@@ -99,7 +99,7 @@ void calc_auto_scale_range(F32& min, F32& max, F32& tick)
                             : llceil(logf(llabs(min)) * OO_LN10);
 
     const S32 num_digits = llmax(num_digits_max, num_digits_min);
-    const F32 power_of_10 = pow(10.0, num_digits - 1);
+    const F32 power_of_10 = (F32)pow(10.0, num_digits - 1);
     const F32 starting_max = power_of_10 * ((max < 0.f) ? -1 : 1);
     const F32 starting_min = power_of_10 * ((min < 0.f) ? -1 : 1);
 
@@ -313,13 +313,13 @@ void LLStatBar::draw()
             const LLTrace::StatType<LLTrace::CountAccumulator>& count_stat = *mStat.countStatp;
 
             unit_label    = std::string(count_stat.getUnitLabel()) + "/s";
-            current       = last_frame_recording.getPerSec(count_stat);
-            min           = frame_recording.getPeriodMinPerSec(count_stat, num_frames);
-            max           = frame_recording.getPeriodMaxPerSec(count_stat, num_frames);
-            mean          = frame_recording.getPeriodMeanPerSec(count_stat, num_frames);
+            current       = (F32)last_frame_recording.getPerSec(count_stat);
+            min           = (F32)frame_recording.getPeriodMinPerSec(count_stat, num_frames);
+            max           = (F32)frame_recording.getPeriodMaxPerSec(count_stat, num_frames);
+            mean          = (F32)frame_recording.getPeriodMeanPerSec(count_stat, num_frames);
             if (mShowMedian)
             {
-                display_value = frame_recording.getPeriodMedianPerSec(count_stat, num_frames);
+                display_value = (F32)frame_recording.getPeriodMedianPerSec(count_stat, num_frames);
             }
             else
             {
@@ -332,10 +332,10 @@ void LLStatBar::draw()
             const LLTrace::StatType<LLTrace::EventAccumulator>& event_stat = *mStat.eventStatp;
 
             unit_label        = mUnitLabel.empty() ? event_stat.getUnitLabel() : mUnitLabel;
-            current           = last_frame_recording.getLastValue(event_stat);
-            min               = frame_recording.getPeriodMin(event_stat, num_frames);
-            max               = frame_recording.getPeriodMax(event_stat, num_frames);
-            mean              = frame_recording.getPeriodMean(event_stat, num_frames);
+            current           = (F32)last_frame_recording.getLastValue(event_stat);
+            min               = (F32)frame_recording.getPeriodMin(event_stat, num_frames);
+            max               = (F32)frame_recording.getPeriodMax(event_stat, num_frames);
+            mean              = (F32)frame_recording.getPeriodMean(event_stat, num_frames);
             display_value     = mean;
         }
         break;
@@ -344,15 +344,15 @@ void LLStatBar::draw()
             const LLTrace::StatType<LLTrace::SampleAccumulator>& sample_stat = *mStat.sampleStatp;
 
             unit_label        = mUnitLabel.empty() ? sample_stat.getUnitLabel() : mUnitLabel;
-            current           = last_frame_recording.getLastValue(sample_stat);
-            min               = frame_recording.getPeriodMin(sample_stat, num_frames);
-            max               = frame_recording.getPeriodMax(sample_stat, num_frames);
-            mean              = frame_recording.getPeriodMean(sample_stat, num_frames);
+            current           = (F32)last_frame_recording.getLastValue(sample_stat);
+            min               = (F32)frame_recording.getPeriodMin(sample_stat, num_frames);
+            max               = (F32)frame_recording.getPeriodMax(sample_stat, num_frames);
+            mean              = (F32)frame_recording.getPeriodMean(sample_stat, num_frames);
             num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, RAPID_CHANGE_WINDOW);
 
             if (mShowMedian)
             {
-                display_value = frame_recording.getPeriodMedian(sample_stat, num_frames);
+                display_value = (F32)frame_recording.getPeriodMedian(sample_stat, num_frames);
             }
             else if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC)
             {
@@ -450,8 +450,8 @@ void LLStatBar::draw()
             }
 
             F32 span = (mOrientation == HORIZONTAL)
-                    ? (bar_rect.getWidth())
-                    : (bar_rect.getHeight());
+                    ? (F32)(bar_rect.getWidth())
+                    : (F32)(bar_rect.getHeight());
 
             if (mDisplayHistory && mStat.valid)
             {
@@ -471,18 +471,18 @@ void LLStatBar::draw()
                     switch(mStatType)
                     {
                         case STAT_COUNT:
-                            min_value       = recording.getPerSec(*mStat.countStatp);
+                            min_value       = (F32)recording.getPerSec(*mStat.countStatp);
                             max_value       = min_value;
                             num_samples     = recording.getSampleCount(*mStat.countStatp);
                             break;
                         case STAT_EVENT:
-                            min_value       = recording.getMin(*mStat.eventStatp);
-                            max_value       = recording.getMax(*mStat.eventStatp);
+                            min_value       = (F32)recording.getMin(*mStat.eventStatp);
+                            max_value       = (F32)recording.getMax(*mStat.eventStatp);
                             num_samples     = recording.getSampleCount(*mStat.eventStatp);
                             break;
                         case STAT_SAMPLE:
-                            min_value       = recording.getMin(*mStat.sampleStatp);
-                            max_value       = recording.getMax(*mStat.sampleStatp);
+                            min_value       = (F32)recording.getMin(*mStat.sampleStatp);
+                            max_value       = (F32)recording.getMax(*mStat.sampleStatp);
                             num_samples     = recording.getSampleCount(*mStat.sampleStatp);
                             break;
                         default:
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index d37f927073..95a9493323 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -70,11 +70,11 @@ void LLStatGraph::draw()
 
         if (mPerSec)
         {
-            mValue = recording.getPerSec(*mNewStatFloatp);
+            mValue = (F32)recording.getPerSec(*mNewStatFloatp);
         }
         else
         {
-            mValue = recording.getSum(*mNewStatFloatp);
+            mValue = (F32)recording.getSum(*mNewStatFloatp);
         }
     }
 
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 0a617558d2..595ab0bd2b 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -2189,7 +2189,7 @@ void LLTabContainer::setTabVisibility( LLPanel const *aPanel, bool aVisible )
         LLTabTuple const *pTT = *itr;
         if( pTT->mVisible )
         {
-            this->selectTab( itr - mTabList.begin() );
+            this->selectTab((S32)(itr - mTabList.begin()));
             foundTab = true;
             break;
         }
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 1d358a0e9d..8c3b317838 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -401,8 +401,8 @@ std::vector<LLRect> LLTextBase::getSelectionRects()
 
             // Use F32 otherwise a string of multiple segments
             // will accumulate a large error
-            F32 left_precise = line_iter->mRect.mLeft;
-            F32 right_precise = line_iter->mRect.mLeft;
+            F32 left_precise = (F32)line_iter->mRect.mLeft;
+            F32 right_precise = (F32)line_iter->mRect.mLeft;
 
             for (; segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0)
             {
@@ -448,8 +448,8 @@ std::vector<LLRect> LLTextBase::getSelectionRects()
             }
 
             LLRect selection_rect;
-            selection_rect.mLeft = left_precise;
-            selection_rect.mRight = right_precise;
+            selection_rect.mLeft = (S32)left_precise;
+            selection_rect.mRight = (S32)right_precise;
             selection_rect.mBottom = line_iter->mRect.mBottom;
             selection_rect.mTop = line_iter->mRect.mTop;
 
@@ -598,7 +598,7 @@ void LLTextBase::drawCursor()
 
             // Make sure the IME is in the right place
             LLRect screen_pos = calcScreenRect();
-            LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_rect.mLeft), screen_pos.mBottom + llfloor(cursor_rect.mTop) );
+            LLCoordGL ime_pos( screen_pos.mLeft + cursor_rect.mLeft, screen_pos.mBottom + cursor_rect.mTop );
 
             ime_pos.mX = (S32) (ime_pos.mX * LLUI::getScaleFactor().mV[VX]);
             ime_pos.mY = (S32) (ime_pos.mY * LLUI::getScaleFactor().mV[VY]);
@@ -755,9 +755,9 @@ void LLTextBase::drawText()
             line_end = next_start;
         }
 
-        LLRectf text_rect(line.mRect.mLeft, line.mRect.mTop, line.mRect.mRight, line.mRect.mBottom);
-        text_rect.mRight = mDocumentView->getRect().getWidth(); // clamp right edge to document extents
-        text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); // adjust by scroll position
+        LLRectf text_rect((F32)line.mRect.mLeft, (F32)line.mRect.mTop, (F32)line.mRect.mRight, (F32)line.mRect.mBottom);
+        text_rect.mRight = (F32)mDocumentView->getRect().getWidth(); // clamp right edge to document extents
+        text_rect.translate((F32)mDocumentView->getRect().mLeft, (F32)mDocumentView->getRect().mBottom); // adjust by scroll position
 
         // draw a single line of text
         S32 seg_start = line_start;
@@ -802,13 +802,13 @@ void LLTextBase::drawText()
                 S32 squiggle_start = 0, squiggle_end = 0, pony = 0;
                 cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_start - seg_start, squiggle_start, pony);
                 cur_segment->getDimensions(misspell_start - cur_segment->getStart(), misspell_end - misspell_start, squiggle_end, pony);
-                squiggle_start += text_rect.mLeft;
+                squiggle_start += (S32)text_rect.mLeft;
 
                 pony = (squiggle_end + 3) / 6;
                 squiggle_start += squiggle_end / 2 - pony * 3;
                 squiggle_end = squiggle_start + pony * 6;
 
-                S32 squiggle_bottom = text_rect.mBottom + (S32)cur_segment->getStyle()->getFont()->getDescenderHeight();
+                S32 squiggle_bottom = (S32)text_rect.mBottom + (S32)cur_segment->getStyle()->getFont()->getDescenderHeight();
 
                 gGL.color4ub(255, 0, 0, 200);
                 while (squiggle_start + 1 < squiggle_end)
@@ -1674,7 +1674,7 @@ void LLTextBase::reflow()
         segment_set_t::iterator seg_iter = mSegments.begin();
         S32 seg_offset = 0;
         S32 line_start_index = 0;
-        const F32 text_available_width = mVisibleTextRect.getWidth() - mHPad;  // reserve room for margin
+        const F32 text_available_width = (F32)(mVisibleTextRect.getWidth() - mHPad);  // reserve room for margin
         F32 remaining_pixels = text_available_width;
         S32 line_count = 0;
 
@@ -1881,7 +1881,7 @@ S32 LLTextBase::getLineNumFromDocIndex( S32 doc_index, bool include_wordwrap) co
         line_list_t::const_iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), doc_index, line_end_compare());
         if (include_wordwrap)
         {
-            return iter - mLineInfoList.begin();
+            return (S32)(iter - mLineInfoList.begin());
         }
         else
         {
@@ -1918,7 +1918,7 @@ S32 LLTextBase::getFirstVisibleLine() const
     // binary search for line that starts before top of visible buffer
     line_list_t::const_iterator iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom());
 
-    return iter - mLineInfoList.begin();
+    return (S32)(iter - mLineInfoList.begin());
 }
 
 std::pair<S32, S32> LLTextBase::getVisibleLines(bool require_fully_visible)
@@ -1940,7 +1940,7 @@ std::pair<S32, S32> LLTextBase::getVisibleLines(bool require_fully_visible)
         first_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom());
         last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_top());
     }
-    return std::pair<S32, S32>(first_iter - mLineInfoList.begin(), last_iter - mLineInfoList.begin());
+    return std::pair<S32, S32>((S32)(first_iter - mLineInfoList.begin()), (S32)(last_iter - mLineInfoList.begin()));
 }
 
 
@@ -2608,7 +2608,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
     }
 
     S32 pos = getLength();
-    F32 start_x = line_iter->mRect.mLeft + doc_rect.mLeft;
+    F32 start_x = (F32)(line_iter->mRect.mLeft + doc_rect.mLeft);
 
     segment_set_t::iterator line_seg_iter;
     S32 line_seg_offset;
@@ -2626,7 +2626,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
 
         if(newline)
         {
-            pos = segment_line_start + segmentp->getOffset(local_x - start_x, line_seg_offset, segment_line_length, round);
+            pos = segment_line_start + segmentp->getOffset(local_x - (S32)start_x, line_seg_offset, segment_line_length, round);
             break;
         }
 
@@ -2656,7 +2656,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
             }
             else
             {
-                offset = segmentp->getOffset(local_x - start_x, line_seg_offset, segment_line_length, round);
+                offset = segmentp->getOffset(local_x - (S32)start_x, line_seg_offset, segment_line_length, round);
             }
             pos = segment_line_start + offset;
             break;
@@ -2703,7 +2703,7 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
     getSegmentAndOffset(line_iter->mDocIndexStart, &line_seg_iter, &line_seg_offset);
     getSegmentAndOffset(pos, &cursor_seg_iter, &cursor_seg_offset);
 
-    F32 doc_left_precise = line_iter->mRect.mLeft;
+    F32 doc_left_precise = (F32)line_iter->mRect.mLeft;
 
     while(line_seg_iter != mSegments.end())
     {
@@ -2734,7 +2734,7 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
     }
 
     LLRect doc_rect;
-    doc_rect.mLeft = doc_left_precise;
+    doc_rect.mLeft = (S32)doc_left_precise;
     doc_rect.mBottom = line_iter->mRect.mBottom;
     doc_rect.mTop = line_iter->mRect.mTop;
 
@@ -3720,7 +3720,7 @@ bool LLInlineViewSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& w
     }
     else
     {
-        width = mLeftPad + mRightPad + mView->getRect().getWidth();
+        width = (F32)(mLeftPad + mRightPad + mView->getRect().getWidth());
         height = mBottomPad + mTopPad + mView->getRect().getHeight();
     }
 
@@ -3871,10 +3871,10 @@ F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 select
             S32 style_image_width = image->getWidth();
             // Text is drawn from the top of the draw_rect downward
 
-            S32 text_center = draw_rect.mTop - (draw_rect.getHeight() / 2);
+            S32 text_center = (S32)(draw_rect.mTop - (draw_rect.getHeight() / 2.f));
             // Align image to center of draw rect
             S32 image_bottom = text_center - (style_image_height / 2);
-            image->draw(draw_rect.mLeft, image_bottom,
+            image->draw((S32)draw_rect.mLeft, image_bottom,
                 style_image_width, style_image_height, color);
 
             const S32 IMAGE_HPAD = 3;
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index bba9e9d5a5..3537c764b9 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2315,17 +2315,17 @@ void LLTextEditor::drawPreeditMarker()
                 if (mPreeditStandouts[i])
                 {
                     gl_rect_2d(preedit_left + preedit_standout_gap,
-                               text_rect.mBottom + mFont->getDescenderHeight() - 1,
+                               text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1,
                                preedit_right - preedit_standout_gap - 1,
-                               text_rect.mBottom + mFont->getDescenderHeight() - 1 - preedit_standout_thickness,
+                               text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1 - preedit_standout_thickness,
                                (mCursorColor.get() * preedit_standout_brightness + mWriteableBgColor.get() * (1 - preedit_standout_brightness)).setAlpha(1.0f));
                 }
                 else
                 {
                     gl_rect_2d(preedit_left + preedit_marker_gap,
-                               text_rect.mBottom + mFont->getDescenderHeight() - 1,
+                               text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1,
                                preedit_right - preedit_marker_gap - 1,
-                               text_rect.mBottom + mFont->getDescenderHeight() - 1 - preedit_marker_thickness,
+                               text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1 - preedit_marker_thickness,
                                (mCursorColor.get() * preedit_marker_brightness + mWriteableBgColor.get() * (1 - preedit_marker_brightness)).setAlpha(1.0f));
                 }
             }
diff --git a/indra/llui/llvirtualtrackball.cpp b/indra/llui/llvirtualtrackball.cpp
index 8166afc89b..273a1d7bde 100644
--- a/indra/llui/llvirtualtrackball.cpp
+++ b/indra/llui/llvirtualtrackball.cpp
@@ -217,19 +217,19 @@ void LLVirtualTrackball::draw()
 
     S32 halfwidth = mTouchArea->getRect().getWidth() / 2;
     S32 halfheight = mTouchArea->getRect().getHeight() / 2;
-    draw_point.mV[VX] = (draw_point.mV[VX] + 1.0) * halfwidth + mTouchArea->getRect().mLeft;
-    draw_point.mV[VY] = (draw_point.mV[VY] + 1.0) * halfheight + mTouchArea->getRect().mBottom;
+    draw_point.mV[VX] = (draw_point.mV[VX] + 1.0f) * halfwidth + mTouchArea->getRect().mLeft;
+    draw_point.mV[VY] = (draw_point.mV[VY] + 1.0f) * halfheight + mTouchArea->getRect().mBottom;
     bool upper_hemisphere = (draw_point.mV[VZ] >= 0.f);
 
     mImgSphere->draw(mTouchArea->getRect(), upper_hemisphere ? UI_VERTEX_COLOR : UI_VERTEX_COLOR % 0.5f);
-    drawThumb(draw_point.mV[VX], draw_point.mV[VY], mThumbMode, upper_hemisphere);
+    drawThumb((S32)draw_point.mV[VX], (S32)draw_point.mV[VY], mThumbMode, upper_hemisphere);
 
 
     if (LLView::sDebugRects)
     {
         gGL.color4fv(LLColor4::red.mV);
-        gl_circle_2d(mTouchArea->getRect().getCenterX(), mTouchArea->getRect().getCenterY(), mImgSphere->getWidth() / 2, 60, false);
-        gl_circle_2d(draw_point.mV[VX], draw_point.mV[VY], mImgSunFront->getWidth() / 2, 12, false);
+        gl_circle_2d((F32)mTouchArea->getRect().getCenterX(), (F32)mTouchArea->getRect().getCenterY(), (F32)mImgSphere->getWidth() / 2.f, 60, false);
+        gl_circle_2d(draw_point.mV[VX], draw_point.mV[VY], (F32)mImgSunFront->getWidth() / 2.f, 12, false);
     }
 
     // hide the direction labels when disabled
@@ -392,20 +392,20 @@ bool LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
         { // trackball (move to roll) mode
             LLQuaternion delta;
 
-            F32 rotX = x - mPrevX;
-            F32 rotY = y - mPrevY;
+            F32 rotX = (F32)(x - mPrevX);
+            F32 rotY = (F32)(y - mPrevY);
 
             if (abs(rotX) > 1)
             {
-                F32 direction = (rotX < 0) ? -1 : 1;
-                delta.setAngleAxis(mIncrementMouse * abs(rotX), 0, direction, 0);  // changing X - rotate around Y axis
+                F32 direction = (rotX < 0) ? -1.f : 1.f;
+                delta.setAngleAxis(mIncrementMouse * abs(rotX), 0.f, direction, 0.f);  // changing X - rotate around Y axis
                 mValue *= delta;
             }
 
             if (abs(rotY) > 1)
             {
-                F32 direction = (rotY < 0) ? 1 : -1; // reverse for Y (value increases from bottom to top)
-                delta.setAngleAxis(mIncrementMouse * abs(rotY), direction, 0, 0);  // changing Y - rotate around X axis
+                F32 direction = (rotY < 0) ? 1.f : -1.f; // reverse for Y (value increases from bottom to top)
+                delta.setAngleAxis(mIncrementMouse * abs(rotY), direction, 0.f, 0.f);  // changing Y - rotate around X axis
                 mValue *= delta;
             }
         }
@@ -416,10 +416,10 @@ bool LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
                 return true; // don't drag outside the circle
             }
 
-            F32 radius = mTouchArea->getRect().getWidth() / 2;
-            F32 xx = x - mTouchArea->getRect().getCenterX();
-            F32 yy = y - mTouchArea->getRect().getCenterY();
-            F32 dist = sqrt(pow(xx, 2) + pow(yy, 2));
+            F32 radius = (F32)mTouchArea->getRect().getWidth() / 2.f;
+            F32 xx = (F32)(x - mTouchArea->getRect().getCenterX());
+            F32 yy = (F32)(y - mTouchArea->getRect().getCenterY());
+            F32 dist = (F32)(sqrt(pow(xx, 2) + pow(yy, 2)));
 
             F32 azimuth = llclamp(acosf(xx / dist), 0.0f, F_PI);
             F32 altitude = llclamp(acosf(dist / radius), 0.0f, F_PI_BY_TWO);
diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp
index 19bd8465b9..1521823ce2 100644
--- a/indra/llui/llxyvector.cpp
+++ b/indra/llui/llxyvector.cpp
@@ -159,15 +159,15 @@ void drawArrow(S32 tailX, S32 tailY, S32 tipX, S32 tipY, LLColor4 color)
 
     S32 arrowLength = (abs(dx) < ARROW_LENGTH_LONG && abs(dy) < ARROW_LENGTH_LONG) ? ARROW_LENGTH_SHORT : ARROW_LENGTH_LONG;
 
-    F32 theta = std::atan2(dy, dx);
+    F32 theta = (F32)std::atan2(dy, dx);
 
-    F32 rad = ARROW_ANGLE * std::atan(1) * 4 / 180;
+    F32 rad = (F32)(ARROW_ANGLE * std::atan(1) * 4 / 180);
     F32 x = tipX - arrowLength * cos(theta + rad);
     F32 y = tipY - arrowLength * sin(theta + rad);
-    F32 rad2 = -1 * ARROW_ANGLE * std::atan(1) * 4 / 180;
+    F32 rad2 = (F32)(-1 * ARROW_ANGLE * std::atan(1) * 4 / 180);
     F32 x2 = tipX - arrowLength * cos(theta + rad2);
     F32 y2 = tipY - arrowLength * sin(theta + rad2);
-    gl_triangle_2d(tipX, tipY, x, y, x2, y2, color, true);
+    gl_triangle_2d(tipX, tipY, (S32)x, (S32)y, (S32)x2, (S32)y2, color, true);
 }
 
 void LLXYVector::draw()
@@ -179,18 +179,18 @@ void LLXYVector::draw()
 
     if (mLogarithmic)
     {
-        pointX = (log(llabs(mValueX) + 1)) / mLogScaleX;
+        pointX = (S32)((log(llabs(mValueX) + 1)) / mLogScaleX);
         pointX *= (mValueX < 0) ? -1 : 1;
         pointX += centerX;
 
-        pointY = (log(llabs(mValueY) + 1)) / mLogScaleY;
+        pointY = (S32)((log(llabs(mValueY) + 1)) / mLogScaleY);
         pointY *= (mValueY < 0) ? -1 : 1;
         pointY += centerY;
     }
     else // linear
     {
-        pointX = centerX + (mValueX * mTouchArea->getRect().getWidth() / (2 * mMaxValueX));
-        pointY = centerY + (mValueY * mTouchArea->getRect().getHeight() / (2 * mMaxValueY));
+        pointX = centerX + (S32)(mValueX * mTouchArea->getRect().getWidth() / (2 * mMaxValueX));
+        pointY = centerY + (S32)(mValueY * mTouchArea->getRect().getHeight() / (2 * mMaxValueY));
     }
 
     // fill
@@ -223,7 +223,7 @@ void LLXYVector::draw()
     }
 
     // draw center circle
-    gl_circle_2d(centerX, centerY, CENTER_CIRCLE_RADIUS, 12, true);
+    gl_circle_2d((F32)centerX, (F32)centerY, CENTER_CIRCLE_RADIUS, 12, true);
 
     LLView::draw();
 }
@@ -232,7 +232,7 @@ void LLXYVector::onEditChange()
 {
     if (getEnabled())
     {
-        setValueAndCommit(mXEntry->getValue().asReal(), mYEntry->getValue().asReal());
+        setValueAndCommit((F32)mXEntry->getValue().asReal(), (F32)mYEntry->getValue().asReal());
     }
 }
 
@@ -240,7 +240,7 @@ void LLXYVector::setValue(const LLSD& value)
 {
     if (value.isArray())
     {
-        setValue(value[0].asReal(), value[1].asReal());
+        setValue((F32)value[0].asReal(), (F32)value[1].asReal());
     }
 }
 
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index d916d95713..392a67b5ce 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -343,7 +343,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
 
             //convert BSTR to std::string
             std::wstring ws(caption, SysStringLen(caption));
-            std::string caption_str(ws.begin(), ws.end());
+            std::string caption_str = ll_convert_wide_to_string(ws);
             LLStringUtil::toLower(caption_str);
 
             bool found = false;
@@ -395,7 +395,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
 
         //convert BSTR to std::string
         std::wstring ws(driverVersion, SysStringLen(driverVersion));
-        std::string str(ws.begin(), ws.end());
+        std::string str = ll_convert_wide_to_string(ws);
         LL_INFOS("AppInit") << " DriverVersion : " << str << LL_ENDL;
 
         if (mDriverVersion.empty())
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index f0f7e03691..b53025847f 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1809,7 +1809,7 @@ void* LLWindowWin32::createSharedContext()
     mMaxGLVersion = llclamp(mMaxGLVersion, 3.f, 4.6f);
 
     S32 version_major = llfloor(mMaxGLVersion);
-    S32 version_minor = llround((mMaxGLVersion-version_major)*10);
+    S32 version_minor = (S32)llround((mMaxGLVersion-version_major)*10);
 
     S32 attribs[] =
     {
@@ -2464,12 +2464,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
                 {
                     window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next
                     window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
-                    window_imp->mKeyVirtualKey = w_param;
+                    window_imp->mKeyVirtualKey = (U32)w_param;
                     window_imp->mRawMsg = u_msg;
-                    window_imp->mRawWParam = w_param;
-                    window_imp->mRawLParam = l_param;
+                    window_imp->mRawWParam = (U32)w_param;
+                    window_imp->mRawLParam = (U32)l_param;
 
-                    gKeyboard->handleKeyDown(w_param, mask);
+                    gKeyboard->handleKeyDown((U16)w_param, mask);
                 });
             if (eat_keystroke) return 0;    // skip DefWindowProc() handling if we're consuming the keypress
             break;
@@ -2484,14 +2484,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
             window_imp->post([=]()
             {
                 window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
-                window_imp->mKeyVirtualKey = w_param;
+                window_imp->mKeyVirtualKey = (U32)w_param;
                 window_imp->mRawMsg = u_msg;
-                window_imp->mRawWParam = w_param;
-                window_imp->mRawLParam = l_param;
+                window_imp->mRawWParam = (U32)w_param;
+                window_imp->mRawLParam = (U32)l_param;
 
                 {
                     LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYUP");
-                    gKeyboard->handleKeyUp(w_param, mask);
+                    gKeyboard->handleKeyUp((U16)w_param, mask);
                 }
             });
             if (eat_keystroke) return 0;    // skip DefWindowProc() handling if we're consuming the keypress
@@ -2531,7 +2531,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
             LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_COMPOSITION");
             if (LLWinImm::isAvailable() && window_imp->mPreeditor)
             {
-                WINDOW_IMP_POST(window_imp->handleCompositionMessage(l_param));
+                WINDOW_IMP_POST(window_imp->handleCompositionMessage((U32)l_param));
                 return 0;
             }
             break;
@@ -2552,10 +2552,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
             LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_CHAR");
             window_imp->post([=]()
                 {
-                    window_imp->mKeyCharCode = w_param;
+                    window_imp->mKeyCharCode = (U32)w_param;
                     window_imp->mRawMsg = u_msg;
-                    window_imp->mRawWParam = w_param;
-                    window_imp->mRawLParam = l_param;
+                    window_imp->mRawWParam = (U32)w_param;
+                    window_imp->mRawLParam = (U32)l_param;
 
                     // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need
                     // to figure out how that works. - Doug
@@ -2979,7 +2979,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
 
                 window_imp->post([=]()
                     {
-                       window_imp->mCallbacks->handleDataCopy(window_imp, myType, data);
+                       window_imp->mCallbacks->handleDataCopy(window_imp, (S32)myType, data);
                        delete[] data;
                     });
             };
@@ -3039,8 +3039,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
                             S32 width = GetSystemMetrics(v_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
                             S32 height = GetSystemMetrics(v_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
 
-                            absolute_x = (raw->data.mouse.lLastX / 65535.0f) * width;
-                            absolute_y = (raw->data.mouse.lLastY / 65535.0f) * height;
+                            absolute_x = (S32)((raw->data.mouse.lLastX / 65535.0f) * width);
+                            absolute_y = (S32)((raw->data.mouse.lLastY / 65535.0f) * height);
                         }
 
                         window_imp->mRawMouseDelta.mX += absolute_x - prev_absolute_x;
@@ -3061,8 +3061,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
                         }
                         else
                         {
-                            window_imp->mRawMouseDelta.mX += round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
-                            window_imp->mRawMouseDelta.mY -= round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
+                            window_imp->mRawMouseDelta.mX += (S32)round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
+                            window_imp->mRawMouseDelta.mY -= (S32)round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
                         }
                     }
                 }
@@ -4658,7 +4658,7 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem()
                 DXGI_ADAPTER_DESC desc;
                 p_dxgi_adapter->GetDesc(&desc);
                 std::wstring description_w((wchar_t*)desc.Description);
-                std::string description(description_w.begin(), description_w.end());
+                std::string description = ll_convert_wide_to_string(description_w);
                 LL_INFOS("Window") << "Graphics adapter index: " << graphics_adapter_index << ", "
                     << "Description: " << description << ", "
                     << "DeviceId: " << desc.DeviceId << ", "
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
index a5d8f885fd..4240613a0c 100644
--- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
+++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
@@ -585,7 +585,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)
                         mTextureWidth = texture_width;
                         mTextureHeight = texture_height;
 
-                        libvlc_time_t time = 1000.0 * mCurTime;
+                        libvlc_time_t time = (libvlc_time_t)(1000.0 * mCurTime);
 
                         playMedia();
 
@@ -655,7 +655,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)
                 {
                     if (mLibVLCMediaPlayer)
                     {
-                        libvlc_time_t time = 1000.0 * message_in.getValueReal("time");
+                        libvlc_time_t time = (libvlc_time_t)(1000.0 * message_in.getValueReal("time"));
                         libvlc_media_player_set_time(mLibVLCMediaPlayer, time);
                         time = libvlc_media_player_get_time(mLibVLCMediaPlayer);
                         if (time < 0)
diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp
index 2ef9237f2d..d1845605d4 100644
--- a/indra/newview/gltf/accessor.cpp
+++ b/indra/newview/gltf/accessor.cpp
@@ -104,7 +104,7 @@ namespace LL
 
 void Buffer::erase(Asset& asset, S32 offset, S32 length)
 {
-    S32 idx = this - &asset.mBuffers[0];
+    S32 idx = (S32)(this - &asset.mBuffers[0]);
 
     mData.erase(mData.begin() + offset, mData.begin() + offset + length);
 
@@ -197,7 +197,7 @@ bool Buffer::save(Asset& asset, const std::string& folder)
     {
         if (mName.empty())
         {
-            S32 idx = this - &asset.mBuffers[0];
+            S32 idx = (S32)(this - &asset.mBuffers[0]);
             mUri = llformat("buffer_%d.bin", idx);
         }
         else
diff --git a/indra/newview/gltf/animation.cpp b/indra/newview/gltf/animation.cpp
index 3dff67d746..31549986af 100644
--- a/indra/newview/gltf/animation.cpp
+++ b/indra/newview/gltf/animation.cpp
@@ -127,8 +127,8 @@ void Animation::apply(Asset& asset, float time)
 bool Animation::Sampler::prep(Asset& asset)
 {
     Accessor& accessor = asset.mAccessors[mInput];
-    mMinTime = accessor.mMin[0];
-    mMaxTime = accessor.mMax[0];
+    mMinTime = (F32)accessor.mMin[0];
+    mMaxTime = (F32)accessor.mMax[0];
 
     mFrameTimes.resize(accessor.mCount);
 
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index e07befef3b..5ba5951064 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -105,7 +105,7 @@ void Node::updateTransforms(Asset& asset, const mat4& parentMatrix)
 
     mAssetMatrixInv = glm::inverse(mAssetMatrix);
 
-    S32 my_index = this - &asset.mNodes[0];
+    S32 my_index = (S32)(this - &asset.mNodes[0]);
 
     for (auto& childIndex : mChildren)
     {
@@ -271,11 +271,11 @@ S32 Asset::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
                     local_end = p;
 
                     // pointer math to get the node index
-                    node_hit = &node - &mNodes[0];
+                    node_hit = (S32)(&node - &mNodes[0]);
                     llassert(&mNodes[node_hit] == &node);
 
                     //pointer math to get the primitive index
-                    primitive_hit = &primitive - &mesh.mPrimitives[0];
+                    primitive_hit = (S32)(&primitive - &mesh.mPrimitives[0]);
                     llassert(&mesh.mPrimitives[primitive_hit] == &primitive);
                 }
             }
@@ -1028,7 +1028,7 @@ bool Image::save(Asset& asset, const std::string& folder)
     const std::string& delim = gDirUtilp->getDirDelimiter();
     if (name.empty())
     {
-        S32 idx = this - asset.mImages.data();
+        S32 idx = (S32)(this - asset.mImages.data());
         name = llformat("image_%d", idx);
     }
 
diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h
index 89cedf4a47..ef9bba8128 100644
--- a/indra/newview/gltf/buffer_util.h
+++ b/indra/newview/gltf/buffer_util.h
@@ -161,7 +161,7 @@ namespace LL
         template<>
         inline void copyVec3<U16, LLColor4U>(U16* src, LLColor4U& dst)
         {
-            dst.set(src[0], src[1], src[2], 255);
+            dst.set((U8)(src[0]), (U8)(src[1]), (U8)(src[2]), 255);
         }
 
         template<>
@@ -193,13 +193,13 @@ namespace LL
         template<>
         inline void copyVec4<U16, LLColor4U>(U16* src, LLColor4U& dst)
         {
-            dst.set(src[0], src[1], src[2], src[3]);
+            dst.set((U8)(src[0]), (U8)(src[1]), (U8)(src[2]), ((U8)src[3]));
         }
 
         template<>
         inline void copyVec4<F32, LLColor4U>(F32* src, LLColor4U& dst)
         {
-            dst.set(src[0]*255, src[1]*255, src[2]*255, src[3]*255);
+            dst.set((U8)(src[0]*255.f), (U8)(src[1]*255.f), (U8)(src[2]*255.f), (U8)(src[3]*255.f));
         }
 
         template<>
@@ -902,7 +902,7 @@ namespace LL
         {
             if (src.is_int64())
             {
-                dst = src.get_int64();
+                dst = (U32)src.get_int64();
                 return true;
             }
             return false;
@@ -957,7 +957,7 @@ namespace LL
         {
             if (src.is_int64())
             {
-                dst = src.get_int64();
+                dst = (U32)src.get_int64();
                 return true;
             }
             return false;
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 58179f9dc3..9bda70e643 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -782,7 +782,7 @@ void GLTFSceneManager::bind(Asset& asset, Material& material)
         bindTexture(asset, TextureType::EMISSIVE, material.mEmissiveTexture, LLViewerFetchedTexture::sWhiteImagep);
     }
 
-    shader->uniform1i(LLShaderMgr::GLTF_MATERIAL_ID, &material - &asset.mMaterials[0]);
+    shader->uniform1i(LLShaderMgr::GLTF_MATERIAL_ID, (GLint)(&material - &asset.mMaterials[0]));
 }
 
 LLMatrix4a inverse(const LLMatrix4a& mat)
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 82124b7412..54d8ceb85a 100644
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -150,9 +150,9 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
                 F32 networkCost = 0.0f;
                 F32 simulationCost = 0.0f;
 
-                physicsCost = selected["physics"].asReal();
-                networkCost = selected["streaming"].asReal();
-                simulationCost = selected["simulation"].asReal();
+                physicsCost = (F32)selected["physics"].asReal();
+                networkCost = (F32)selected["streaming"].asReal();
+                simulationCost = (F32)selected["simulation"].asReal();
 
                 SelectionCost selectionCost( physicsCost, networkCost, simulationCost);
 
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2f5b0f04e3..c4336758ac 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2662,9 +2662,9 @@ void LLAgent::setStartPositionSuccess(const LLSD &result)
                 (!result["HomeLocation"]["LocationPos"].has("Z")))
             break;
 
-        agent_pos.mV[VX] = result["HomeLocation"]["LocationPos"]["X"].asInteger();
-        agent_pos.mV[VY] = result["HomeLocation"]["LocationPos"]["Y"].asInteger();
-        agent_pos.mV[VZ] = result["HomeLocation"]["LocationPos"]["Z"].asInteger();
+        agent_pos.mV[VX] = (F32)result["HomeLocation"]["LocationPos"]["X"].asInteger();
+        agent_pos.mV[VY] = (F32)result["HomeLocation"]["LocationPos"]["Y"].asInteger();
+        agent_pos.mV[VZ] = (F32)result["HomeLocation"]["LocationPos"]["Z"].asInteger();
 
         error = false;
 
@@ -2778,7 +2778,7 @@ bool LLAgent::canAccessMaturityInRegion( U64 region_handle ) const
 
 bool LLAgent::canAccessMaturityAtGlobal( LLVector3d pos_global ) const
 {
-    U64 region_handle = to_region_handle_global( pos_global.mdV[0], pos_global.mdV[1] );
+    U64 region_handle = to_region_handle_global((F32)pos_global.mdV[0], (F32)pos_global.mdV[1]);
     return canAccessMaturityInRegion( region_handle );
 }
 
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 25e777191f..8eda754d4c 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2114,14 +2114,14 @@ void LLAgentCamera::handleScrollWheel(S32 clicks)
             F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec();
 
             F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
-            current_zoom_fraction *= 1.f - pow(ROOT_ROOT_TWO, clicks);
+            current_zoom_fraction *= 1.f - (F32)pow(ROOT_ROOT_TWO, clicks);
 
             cameraOrbitIn(current_zoom_fraction * camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
         }
         else
         {
             F32 current_zoom_fraction = (F32)mCameraFocusOffsetTarget.magVec();
-            cameraOrbitIn(current_zoom_fraction * (1.f - pow(ROOT_ROOT_TWO, clicks)));
+            cameraOrbitIn(current_zoom_fraction * (1.f - (F32)pow(ROOT_ROOT_TWO, clicks)));
         }
     }
 }
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index 005a518910..0c120ae01d 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -156,9 +156,9 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
     else
     {
         std::string url = LLSLURL(event_data["regionname"],
-                                  LLVector3(event_data["x"].asReal(),
-                                            event_data["y"].asReal(),
-                                            event_data["z"].asReal())).getSLURLString();
+                                  LLVector3((F32)event_data["x"].asReal(),
+                                            (F32)event_data["y"].asReal(),
+                                            (F32)event_data["z"].asReal())).getSLURLString();
         LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false);
     }
 }
@@ -344,7 +344,7 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data)
     F32 rotation_threshold = 0.03f;
     if (event_data.has("rotation_threshold"))
     {
-        rotation_threshold = event_data["rotation_threshold"].asReal();
+        rotation_threshold = (F32)event_data["rotation_threshold"].asReal();
     }
 
     bool allow_flying = true;
@@ -357,7 +357,7 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data)
     F32 stop_distance = 0.f;
     if (event_data.has("stop_distance"))
     {
-        stop_distance = event_data["stop_distance"].asReal();
+        stop_distance = (F32)event_data["stop_distance"].asReal();
     }
 
     // Clear follow target, this is doing a path
@@ -446,7 +446,7 @@ void LLAgentListener::startFollowPilot(LLSD const & event_data)
     F32 stop_distance = 0.f;
     if (event_data.has("stop_distance"))
     {
-        stop_distance = event_data["stop_distance"].asReal();
+        stop_distance = (F32)event_data["stop_distance"].asReal();
     }
 
     if (target_id.notNull())
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index 40f1679663..0b5198bbd3 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -145,7 +145,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
         Action action;
         action.mTime = record["time"].asReal();
         action.mType = (EActionType)record["type"].asInteger();
-        action.mCameraView = record["camera_view"].asReal();
+        action.mCameraView = (F32)record["camera_view"].asReal();
         action.mTarget = ll_vector3d_from_sd(record["target"]);
         action.mCameraOrigin = ll_vector3_from_sd(record["camera_origin"]);
         action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]);
@@ -297,8 +297,8 @@ void LLAgentPilot::moveCamera()
         S32 start_index = llmax(mCurrentAction-1,0);
         S32 end_index = mCurrentAction;
         F32 t = 0.0;
-        F32 timedelta = mActions[end_index].mTime - mActions[start_index].mTime;
-        F32 tickelapsed = mTimer.getElapsedTimeF32()-mActions[start_index].mTime;
+        F32 timedelta = (F32)(mActions[end_index].mTime - mActions[start_index].mTime);
+        F32 tickelapsed = mTimer.getElapsedTimeF32()-(F32)mActions[start_index].mTime;
         if (timedelta > 0.0)
         {
             t = tickelapsed/timedelta;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 9dd23a5319..a808c196c7 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3934,7 +3934,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
                     LL_WARNS("Avatar") << "Bake retry count exceeded!" << LL_ENDL;
                     break;
                 }
-                F32 timeout = pow(BAKE_RETRY_TIMEOUT, static_cast<float>(retryCount)) - 1.0;
+                F32 timeout = pow(BAKE_RETRY_TIMEOUT, static_cast<float>(retryCount)) - 1.0f;
 
                 LL_WARNS("Avatar") << "Bake retry #" << retryCount << " in " << timeout << " seconds." << LL_ENDL;
 
@@ -4329,7 +4329,7 @@ LLAppearanceMgr::LLAppearanceMgr():
     outfit_observer.addCOFSavedCallback(boost::bind(
             &LLAppearanceMgr::setOutfitLocked, this, false));
 
-    mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer(gSavedSettings.getS32(
+    mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32(
             "OutfitOperationsTimeout")));
 
     gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 968e863496..4bb8197b19 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -456,7 +456,7 @@ void idle_afk_check()
 {
     // check idle timers
     F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
-    F32 afk_timeout  = gSavedSettings.getS32("AFKTimeout");
+    F32 afk_timeout  = (F32)gSavedSettings.getS32("AFKTimeout");
     if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
     {
         LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
@@ -1959,7 +1959,7 @@ bool LLAppViewer::cleanup()
     LL_INFOS() << "Saving Data" << LL_ENDL;
 
     // Store the time of our current logoff
-    gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
+    gSavedPerAccountSettings.setU32("LastLogoff", (U32)time_corrected());
 
     if (LLEnvironment::instanceExists())
     {
@@ -2332,7 +2332,7 @@ void LLAppViewer::initLoggingAndGetLastDuration()
         int log_stat_result = LLFile::stat(log_file, &log_file_stat);
         if (0 == start_stat_result && 0 == log_stat_result)
         {
-            int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
+            int elapsed_seconds = (int)(log_file_stat.st_ctime - start_marker_stat.st_ctime);
             // only report a last run time if the last viewer was the same version
             // because this stat will be counted against this version
             if (markerIsSameVersion(start_marker_file_name))
@@ -3434,7 +3434,7 @@ LLSD LLAppViewer::getViewerInfo() const
     info["LIBVLC_VERSION"] = "Undefined";
 #endif
 
-    S32 packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
+    S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
     if (packets_in > 0)
     {
         info["PACKETS_LOST"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 65e32610c3..299cc5ed64 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -695,7 +695,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
     if (it == mRequestTimestamps.end()) return false;
 
     // We found a request, check if it has timed out
-    U32 now = time(nullptr);
+    U32 now = (U32)time(nullptr);
     const U32 REQUEST_EXPIRE_SECS = 5;
     U32 expires = it->second + REQUEST_EXPIRE_SECS;
 
@@ -709,7 +709,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
 void LLAvatarPropertiesProcessor::addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
 {
     timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
-    U32 now = time(nullptr);
+    U32 now = (U32)time(nullptr);
     // Add or update existing (expired) request
     mRequestTimestamps[ key ] = now;
 }
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index b0befa62e6..3fd2b7fe5d 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -84,7 +84,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
     // Going to request each 15 seconds either way, so don't wait
     // too long and don't repeat
     httpOpts->setRetries(0);
-    httpOpts->setTimeout(SECS_BETWEEN_REGION_REQUEST);
+    httpOpts->setTimeout((unsigned int)SECS_BETWEEN_REGION_REQUEST);
 
     LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
 
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp
index 07a5c871ae..b40bcadabf 100644
--- a/indra/newview/llavatarrendernotifier.cpp
+++ b/indra/newview/llavatarrendernotifier.cpp
@@ -172,7 +172,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
     // save current values for later use
     mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self
     mLatestOverLimitAgents = overLimit;
-    mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0;
+    mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0f : 0.f;
 
     if (mAgentsCount == mLatestAgentsCount
         && mOverLimitAgents == mLatestOverLimitAgents)
@@ -191,7 +191,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
 
         // default timeout before next notification
         static LLCachedControl<U32> pop_up_delay(gSavedSettings, "ComplexityChangesPopUpDelay", 300);
-        mPopUpDelayTimer.resetWithExpiry(pop_up_delay);
+        mPopUpDelayTimer.resetWithExpiry((F32)pop_up_delay);
     }
 }
 
@@ -500,6 +500,6 @@ void LLHUDRenderNotifier::displayHUDNotification(EWarnLevel warn_type, LLUUID ob
         .name("HUDComplexityWarning")
         .expiry(expire_date)
         .substitutions(msg_args));
-    mHUDPopUpDelayTimer.resetWithExpiry(pop_up_delay);
+    mHUDPopUpDelayTimer.resetWithExpiry((F32)pop_up_delay);
 }
 
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 060430862b..454991ab83 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -148,7 +148,7 @@ void LLChannelManager::onLoginCompleted()
             mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4));
 
             mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
-            mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
+            mStartUpChannel->createStartUpToast(away_notifications, (F32)gSavedSettings.getS32("StartUpToastLifeTime"));
         }
     }
 
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index fc50691ece..2b02aabc31 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -423,7 +423,7 @@ public:
             if (mTime > 0) // have frame time
             {
                 time_t current_time = time_corrected();
-                time_t message_time = current_time - LLFrameTimer::getElapsedSeconds() + mTime;
+                time_t message_time = (time_t)(current_time - LLFrameTimer::getElapsedSeconds() + mTime);
 
                 time_string = "[" + LLTrans::getString("TimeMonth") + "]/["
                     + LLTrans::getString("TimeDay") + "]/["
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index d517f5a19d..a5c26eff9c 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -135,7 +135,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
     std::string color_name = notification["text_color"].asString();
 
     LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
-    textColor.mV[VALPHA] =notification["color_alpha"].asReal();
+    textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
 
     S32 font_size = notification["font_size"].asInteger();
 
@@ -191,7 +191,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
     std::string color_name = notification["text_color"].asString();
 
     LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
-    textColor.mV[VALPHA] =notification["color_alpha"].asReal();
+    textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
 
     S32 font_size = notification["font_size"].asInteger();
 
diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp
index 246e2099f9..a0fbebb4cb 100644
--- a/indra/newview/lldateutil.cpp
+++ b/indra/newview/lldateutil.cpp
@@ -211,5 +211,5 @@ S32 LLDateUtil::secondsSinceEpochFromString(const std::string& format, const std
     // is calculated with no time zone corrections.
     time_duration diff = time_t_date - time_t_epoch;
 
-    return diff.total_seconds();
+    return (S32)diff.total_seconds();
 }
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 71b82b77eb..0d4eaab488 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -215,7 +215,7 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
         LLViewerTexture* tex_a = mWaterNormp[0];
         LLViewerTexture* tex_b = mWaterNormp[1];
 
-        F32 blend_factor = pwater->getBlendFactor();
+        F32 blend_factor = (F32)pwater->getBlendFactor();
 
         gGL.getTexUnit(bumpTex)->unbind(LLTexUnit::TT_TEXTURE);
         gGL.getTexUnit(bumpTex2)->unbind(LLTexUnit::TT_TEXTURE);
@@ -256,7 +256,7 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
 
         if (mShaderLevel == 1)
         {
-            fog_color.mV[VALPHA] = log(fog_density) / log(2);
+            fog_color.mV[VALPHA] = (F32)(log(fog_density) / log(2));
         }
 
         F32 water_height = environment.getWaterHeight();
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 047e9a8112..305215f541 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -242,7 +242,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const
     LLViewerTexture* tex_a = gSky.mVOSkyp->getBloomTex();
     LLViewerTexture* tex_b = gSky.mVOSkyp->getBloomTexNext();
 
-    F32 blend_factor = LLEnvironment::instance().getCurrentSky()->getBlendFactor();
+    F32 blend_factor = (F32)LLEnvironment::instance().getCurrentSky()->getBlendFactor();
 
     if (tex_a && (!tex_b || (tex_a == tex_b)))
     {
@@ -309,8 +309,8 @@ void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32
         gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
         gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
 
-        F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f;
-        F32 blend_factor   = psky ? psky->getBlendFactor() : 0.0f;
+        F32 cloud_variance = psky ? (F32)psky->getCloudVariance() : 0.0f;
+        F32 blend_factor   = psky ? (F32)psky->getBlendFactor() : 0.0f;
 
         if (psky->getCloudScrollRate().isExactlyZero())
         {
@@ -364,7 +364,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
 
     LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_SUN];
 
-    F32 blend_factor = LLEnvironment::instance().getCurrentSky()->getBlendFactor();
+    F32 blend_factor = (F32)LLEnvironment::instance().getCurrentSky()->getBlendFactor();
     bool can_use_vertex_shaders = gPipeline.shadersLoaded();
     bool can_use_windlight_shaders = gPipeline.canUseWindLightShaders();
 
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 8884905cf0..c12546f7eb 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -209,7 +209,7 @@ namespace
 
             mInitial = (*initial.first).second;
             mFinal = (*initial.second).second;
-            mBlendSpan = getSpanTime(initial);
+            mBlendSpan = (LLSettingsBase::TrackPosition)getSpanTime(initial);
 
             initializeTarget(now);
             setOnFinished([this](const LLSettingsBlender::ptr_t &){ onFinishedSpan(); });
@@ -237,7 +237,7 @@ namespace
             LLSettingsBase::BlendFactor blendf = calculateBlend(targetpos, targetspan);
             pendsetting->blend((*bounds.second).second, blendf);
 
-            reset(pstartsetting, pendsetting, LLEnvironment::TRANSITION_ALTITUDE);
+            reset(pstartsetting, pendsetting, (LLSettingsBase::TrackPosition)LLEnvironment::TRANSITION_ALTITUDE);
         }
 
     protected:
@@ -304,7 +304,7 @@ namespace
             LLSettingsDay::TrackBound_t next = getBoundingEntries(adjusted_now);
             LLSettingsBase::Seconds nextspan = getSpanTime(next);
 
-            reset((*next.first).second, (*next.second).second, nextspan);
+            reset((*next.first).second, (*next.second).second, (LLSettingsBase::TrackPosition)nextspan);
 
             // Recalculate (reinitialize) position. Because:
             // - 'delta' from applyTimeDelta accumulates errors (probably should be fixed/changed to absolute time)
@@ -695,7 +695,7 @@ namespace
             // Ideally we need to check for texture in injection, but
             // in this case user is setting value explicitly, potentially
             // with different transitions, don't ignore it
-            F64 result = lerp(value, injection->mValue.asReal(), mix);
+            F64 result = lerp((F32)value, (F32)injection->mValue.asReal(), (F32)mix);
             injection->mLastValue = LLSD::Real(result);
             this->mSettings[injection->mKeyName] = injection->mLastValue;
         }
@@ -898,7 +898,7 @@ void LLEnvironment::initSingleton()
     gSavedSettings.getControl("RenderSkyAutoAdjustProbeAmbiance")->getSignal()->connect(
         [](LLControlVariable*, const LLSD& new_val, const LLSD& old_val)
         {
-            LLSettingsSky::sAutoAdjustProbeAmbiance = new_val.asReal();
+            LLSettingsSky::sAutoAdjustProbeAmbiance = (F32)new_val.asReal();
         }
     );
     LLSettingsSky::sAutoAdjustProbeAmbiance = gSavedSettings.getF32("RenderSkyAutoAdjustProbeAmbiance");
@@ -967,11 +967,11 @@ LLSettingsWater::ptr_t LLEnvironment::getCurrentWater() const
 
 void LayerConfigToDensityLayer(const LLSD& layerConfig, DensityLayer& layerOut)
 {
-    layerOut.constant_term  = layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
-    layerOut.exp_scale      = layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
-    layerOut.exp_term       = layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
-    layerOut.linear_term    = layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
-    layerOut.width          = layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+    layerOut.constant_term  = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
+    layerOut.exp_scale      = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+    layerOut.exp_term       = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+    layerOut.linear_term    = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+    layerOut.width          = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
 }
 
 void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky)
@@ -1758,7 +1758,7 @@ void LLEnvironment::updateGLVariablesForSettings(LLShaderUniforms* uniforms, con
             //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << value << LL_ENDL;
             break;
         case LLSD::TypeReal:
-            shader->uniform1f(it.second.getShaderKey(), value.asReal());
+            shader->uniform1f(it.second.getShaderKey(), (F32)value.asReal());
             //_WARNS("RIDER") << "pushing '" << (*it).first << "' as " << value << LL_ENDL;
             break;
 
@@ -1928,8 +1928,8 @@ void LLEnvironment::adjustRegionOffset(F32 adjust)
 
     if (mEnvironments[ENV_REGION])
     {
-        F32 day_length = mEnvironments[ENV_REGION]->getDayLength();
-        F32 day_offset = mEnvironments[ENV_REGION]->getDayOffset();
+        F32 day_length = (F32)mEnvironments[ENV_REGION]->getDayLength();
+        F32 day_offset = (F32)mEnvironments[ENV_REGION]->getDayOffset();
 
         F32 day_adjustment = adjust * day_length;
 
@@ -2345,7 +2345,7 @@ LLEnvironment::EnvironmentInfo::ptr_t LLEnvironment::EnvironmentInfo::extract(LL
     {
         for (int idx = 0; idx < 3; idx++)
         {
-            pinfo->mAltitudes[idx+1] = environment[KEY_TRACKALTS][idx].asReal();
+            pinfo->mAltitudes[idx+1] = (F32)environment[KEY_TRACKALTS][idx].asReal();
         }
         pinfo->mAltitudes[0] = 0;
     }
@@ -2569,7 +2569,7 @@ void LLEnvironment::handleEnvironmentPush(LLSD &message)
     std::string action = message[KEY_ACTION].asString();
     LLUUID experience_id = message[KEY_EXPERIENCEID].asUUID();
     LLSD action_data = message[KEY_ACTIONDATA];
-    F32 transition_time = action_data[KEY_TRANSITIONTIME].asReal();
+    F32 transition_time = (F32)action_data[KEY_TRANSITIONTIME].asReal();
 
     //TODO: Check here that the viewer thinks the experience is still valid.
 
@@ -2601,7 +2601,7 @@ void LLEnvironment::handleEnvironmentPushFull(LLUUID experience_id, LLSD &messag
 {
     LLUUID asset_id(message[KEY_ASSETID].asUUID());
 
-    setExperienceEnvironment(experience_id, asset_id, LLSettingsBase::Seconds(transition));
+    setExperienceEnvironment(experience_id, asset_id, (F32)LLSettingsBase::Seconds(transition));
 }
 
 void LLEnvironment::handleEnvironmentPushPartial(LLUUID experience_id, LLSD &message, F32 transition)
@@ -2611,7 +2611,7 @@ void LLEnvironment::handleEnvironmentPushPartial(LLUUID experience_id, LLSD &mes
     if (settings.isUndefined())
         return;
 
-    setExperienceEnvironment(experience_id, settings, LLSettingsBase::Seconds(transition));
+    setExperienceEnvironment(experience_id, settings, (F32)LLSettingsBase::Seconds(transition));
 }
 
 void LLEnvironment::clearExperienceEnvironment(LLUUID experience_id, LLSettingsBase::Seconds transition_time)
@@ -2968,7 +2968,7 @@ void LLEnvironment::DayTransition::animate()
 
 
     // pause probe updates and reset reflection maps on sky change
-    gPipeline.mReflectionMapManager.pause(mTransitionTime);
+    gPipeline.mReflectionMapManager.pause((F32)mTransitionTime);
     gPipeline.mReflectionMapManager.reset();
 
     mSky = mStartSky->buildClone();
@@ -3286,7 +3286,7 @@ void LLTrackBlenderLoopingManual::switchTrack(S32 trackno, const LLSettingsBase:
 {
     mTrackNo = trackno;
 
-    LLSettingsBase::TrackPosition useposition = (position < 0.0) ? mPosition : position;
+    LLSettingsBase::TrackPosition useposition = (position < 0.0) ? (LLSettingsBase::TrackPosition)mPosition : position;
 
     setPosition(useposition);
 }
@@ -3297,7 +3297,7 @@ LLSettingsDay::TrackBound_t LLTrackBlenderLoopingManual::getBoundingEntries(F64
 
     mEndMarker = wtrack.end();
 
-    LLSettingsDay::TrackBound_t bounds = get_bounding_entries(wtrack, position);
+    LLSettingsDay::TrackBound_t bounds = get_bounding_entries(wtrack, (LLSettingsBase::TrackPosition)position);
     return bounds;
 }
 
@@ -3571,7 +3571,7 @@ namespace
             mInjectedSky->setSource(target_sky);
 
             // clear reflection probes and pause updates during sky change
-            gPipeline.mReflectionMapManager.pause(transition);
+            gPipeline.mReflectionMapManager.pause((F32)transition);
             gPipeline.mReflectionMapManager.reset();
 
             mBlenderSky = std::make_shared<LLSettingsBlenderTimeDelta>(target_sky, start_sky, psky, transition);
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 4c105176b6..42fe8fc6e6 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -54,7 +54,7 @@ public:
         }
         else
         {
-            width = mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad();
+            width = (F32)(mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad());
             height = mStyle->getFont()->getLineHeight();
         }
         return true;
@@ -86,7 +86,7 @@ public:
                                     LLFontGL::RIGHT, LLFontGL::TOP,
                                     0,
                                     mStyle->getShadowType(),
-                                    end - start, draw_rect.getWidth(),
+                                    end - start, (S32)draw_rect.getWidth(),
                                     &right_x,
                                     mEditor.getUseEllipses(), mEditor.getUseColor());
         return right_x;
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 777ea611b0..4bf9412dcb 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2275,7 +2275,7 @@ F32 LLFace::adjustPixelArea(F32 importance, F32 pixel_area)
         {
             if(importance < LEAST_IMPORTANCE_FOR_LARGE_IMAGE)//if the face is not important, do not load hi-res.
             {
-                pixel_area = LLViewerTexture::sMinLargeImageSize ;
+                pixel_area = (F32)LLViewerTexture::sMinLargeImageSize ;
             }
         }
     }
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 67d55c53e4..8056983c7c 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -279,9 +279,9 @@ bool LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
                 // so we can create a new tooltip
                 LLToolTipMgr::instance().unblockToolTips();
                 mHoverTimer = mHoverID;
-                mToolTipRect.set(mBarRect.mLeft + (hover_bar->mSelfStart / mTotalTimeDisplay) * mBarRect.getWidth(),
+                mToolTipRect.set((S32)(mBarRect.mLeft + (hover_bar->mSelfStart / mTotalTimeDisplay) * mBarRect.getWidth()),
                                 row.mTop,
-                                mBarRect.mLeft + (hover_bar->mSelfEnd / mTotalTimeDisplay) * mBarRect.getWidth(),
+                                (S32)(mBarRect.mLeft + (hover_bar->mSelfEnd / mTotalTimeDisplay) * mBarRect.getWidth()),
                                 row.mBottom);
             }
         }
@@ -626,7 +626,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
             gGL.begin(LLRender::TRIANGLE_STRIP);
             gGL.vertex3fv(last_p.mV);
             gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
-            last_p.set((F32)i/(F32) base_times.size(), base_times[i]/max_time, 0.f);
+            last_p.set((F32)i/(F32) base_times.size(), (F32)(base_times[i]/max_time), 0.f);
             gGL.vertex3fv(last_p.mV);
             gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
             gGL.end();
@@ -645,7 +645,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
                 gGL.begin(LLRender::TRIANGLE_STRIP);
                 gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
                 gGL.vertex3fv(last_p.mV);
-                last_p.set((F32) i / (F32) cur_times.size(), cur_times[i]/max_time, 0.f);
+                last_p.set((F32) i / (F32) cur_times.size(), (F32)(cur_times[i]/max_time), 0.f);
                 gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
                 gGL.vertex3fv(last_p.mV);
                 gGL.end();
@@ -715,7 +715,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
             gGL.begin(LLRender::TRIANGLE_STRIP);
             gGL.vertex3fv(last_p.mV);
             gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
-            last_p.set((F32)count/(F32)total_count, *iter/max_execution, 0.f);
+            last_p.set((F32)count/(F32)total_count, (F32)(*iter/max_execution), 0.f);
             gGL.vertex3fv(last_p.mV);
             gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
             gGL.end();
@@ -735,7 +735,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
                 gGL.begin(LLRender::TRIANGLE_STRIP);
                 gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
                 gGL.vertex3fv(last_p.mV);
-                last_p.set((F32)count/(F32)total_count, *iter/max_execution, 0.f);
+                last_p.set((F32)count/(F32)total_count, (F32)(*iter/max_execution), 0.f);
                 gGL.vertex3f(last_p.mV[0], 0.f, 0.f);
                 gGL.vertex3fv(last_p.mV);
                 gGL.end();
@@ -787,8 +787,8 @@ LLSD LLFastTimerView::analyzePerformanceLogDefault(std::istream& is)
             {
                 LLSD::Integer samples = iter->second["Calls"].asInteger();
 
-                time_stats[label].push(time);
-                sample_stats[label].push(samples);
+                time_stats[label].push((F32)time);
+                sample_stats[label].push((F32)samples);
             }
         }
         total_frames++;
@@ -1112,7 +1112,7 @@ void LLFastTimerView::drawLineGraph()
                 break;
             }
             gGL.vertex2f(x,y);
-            gGL.vertex2f(x,mGraphRect.mBottom);
+            gGL.vertex2f(x,(GLfloat)mGraphRect.mBottom);
         }
         gGL.end();
 
@@ -1432,7 +1432,7 @@ void LLFastTimerView::updateTotalTime()
         break;
     }
 
-    mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(llceil(mTotalTimeDisplay.valueInUnits<LLUnits::Milliseconds>() / 20.f) * 20.f);
+    mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(llceil((F32)mTotalTimeDisplay.valueInUnits<LLUnits::Milliseconds>() / 20.f) * 20.f);
 }
 
 void LLFastTimerView::drawBars()
@@ -1491,7 +1491,7 @@ void LLFastTimerView::drawBars()
         LLRect frame_bar_rect;
         frame_bar_rect.setLeftTopAndSize(mBarRect.mLeft,
                                         bars_top,
-                                        ll_round((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()),
+                                        (S32)ll_round((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()),
                                         bar_height);
         mAverageTimerRow.mTop = frame_bar_rect.mTop;
         mAverageTimerRow.mBottom = frame_bar_rect.mBottom;
@@ -1505,7 +1505,7 @@ void LLFastTimerView::drawBars()
             row.mTop = frame_bar_rect.mTop;
             row.mBottom = frame_bar_rect.mBottom;
             frame_bar_rect.mRight = frame_bar_rect.mLeft
-                                    + ll_round((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth());
+                                    + (S32)ll_round((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth());
             drawBar(frame_bar_rect, row, image_width, image_height);
 
             frame_bar_rect.translate(0, -(bar_height + vpad));
@@ -1633,8 +1633,8 @@ S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width,
     }
 
     LLRect children_rect;
-    children_rect.mLeft  = ll_round(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
-    children_rect.mRight = ll_round(timer_bar.mChildrenEnd   / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+    children_rect.mLeft  = (S32)ll_round(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+    children_rect.mRight = (S32)ll_round(timer_bar.mChildrenEnd   / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
 
     if (bar_rect.getHeight() > MIN_BAR_HEIGHT)
     {
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 367803b78a..b6f1eea802 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -94,7 +94,7 @@ void LLVolumeImplFlexible::updateClass()
 {
     LL_PROFILE_ZONE_SCOPED;
 
-    U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
+    U64 virtual_frame_num = (U64)(LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME);
     for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
             iter != sInstanceList.end();
             ++iter)
@@ -362,7 +362,7 @@ void LLVolumeImplFlexible::doIdleUpdate()
                 update_period = llclamp(update_period, 1U, 32U);
 
                 // We control how fast flexies update, buy splitting updates among frames
-                U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
+                U64 virtual_frame_num = (U64)(LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME);
 
                 if  (visible)
                 {
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 66796276a9..01a0525d56 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -488,7 +488,7 @@ void LLFloater360Capture::capture360Images()
     // 'GPano:InitialViewHeadingDegrees' field.
     // We need to convert from the angle getYaw() gives us into something
     // the XMP data field wants (N=0, E=90, S=180, W= 270 etc.)
-    mInitialHeadingDeg  = (360 + 90 - (int)(camera->getYaw() * RAD_TO_DEG)) % 360;
+    mInitialHeadingDeg  = (float)((360 + 90 - (int)(camera->getYaw() * RAD_TO_DEG)) % 360);
     LL_INFOS("360Capture") << "Recording a heading of " << (int)(mInitialHeadingDeg)
         << " Image size: " << (S32)mSourceImageSize << LL_ENDL;
 
diff --git a/indra/newview/llfloaterbanduration.cpp b/indra/newview/llfloaterbanduration.cpp
index c9141322e3..eb32e50901 100644
--- a/indra/newview/llfloaterbanduration.cpp
+++ b/indra/newview/llfloaterbanduration.cpp
@@ -82,7 +82,7 @@ void LLFloaterBanDuration::onClickBan()
             LLSpinCtrl* hours_spin = getChild<LLSpinCtrl>("ban_hours");
             if (hours_spin)
             {
-                time = LLDate::now().secondsSinceEpoch() + (hours_spin->getValue().asInteger() * 3600);
+                time = (S32)(LLDate::now().secondsSinceEpoch() + (hours_spin->getValue().asInteger() * 3600));
             }
         }
         mSelectionCallback(mAvatar_ids, time);
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 5330518ba5..2cb930922a 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -1086,7 +1086,7 @@ bool    LLPreviewAnimation::render()
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+    gGL.ortho(0.0f, (F32)mFullWidth, 0.0f, (F32)mFullHeight, -1.0f, 1.0f);
 
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 837aa858f5..6f5d81eda3 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -111,8 +111,8 @@ void LLFloaterConversationPreview::setPages(std::list<LLSD>* messages, const std
         mCurrentPage = (mMessages->size() ? (static_cast<int>(mMessages->size()) - 1) / mPageSize : 0);
 
         mPageSpinner->setEnabled(true);
-        mPageSpinner->setMaxValue(mCurrentPage+1);
-        mPageSpinner->set(mCurrentPage+1);
+        mPageSpinner->setMaxValue((F32)(mCurrentPage+1));
+        mPageSpinner->set((F32)(mCurrentPage+1));
 
         std::string total_page_num = llformat("/ %d", mCurrentPage+1);
         getChild<LLTextBox>("page_num_label")->setValue(total_page_num);
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index ebccb2214c..60343a4e2a 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -313,7 +313,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
     mDayLength.value(0);
     if (key.has(KEY_DAY_LENGTH))
     {
-        mDayLength.value(key[KEY_DAY_LENGTH].asReal());
+        mDayLength.value(key[KEY_DAY_LENGTH].asInteger());
     }
 
     // Time&Percentage labels
@@ -352,7 +352,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
 
     // Adjust Time&Percentage labels' location according to length
     LLRect label_rect = getChild<LLTextBox>("p0", true)->getRect();
-    F32 slider_width = mFramesSlider->getRect().getWidth();
+    F32 slider_width = (F32)mFramesSlider->getRect().getWidth();
     for (int i = 1; i < max_elm; i++)
     {
         LLTextBox *pcnt_label = getChild<LLTextBox>("p" + llformat("%d", i), true);
@@ -705,7 +705,7 @@ void LLFloaterEditExtDayCycle::onAddFrame()
         LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame while waiting for day(asset) to load." << LL_ENDL;
         return;
     }
-    if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
+    if ((mEditDay->getSettingsNearKeyframe((LLSettingsBase::TrackPosition)frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
     {
         LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame too close to existing frame." << LL_ENDL;
         return;
@@ -722,17 +722,17 @@ void LLFloaterEditExtDayCycle::onAddFrame()
         // scratch water should always have the current water settings.
         LLSettingsWater::ptr_t water(mScratchWater->buildClone());
         setting = water;
-        mEditDay->setWaterAtKeyframe( std::static_pointer_cast<LLSettingsWater>(setting), frame);
+        mEditDay->setWaterAtKeyframe( std::static_pointer_cast<LLSettingsWater>(setting), (LLSettingsBase::TrackPosition)frame);
     }
     else
     {
         // scratch sky should always have the current sky settings.
         LLSettingsSky::ptr_t sky(mScratchSky->buildClone());
         setting = sky;
-        mEditDay->setSkyAtKeyframe(sky, frame, mCurrentTrack);
+        mEditDay->setSkyAtKeyframe(sky, (LLSettingsBase::TrackPosition)frame, mCurrentTrack);
     }
     setDirtyFlag();
-    addSliderFrame(frame, setting);
+    addSliderFrame((F32)frame, setting);
     updateTabs();
 }
 
@@ -1316,7 +1316,7 @@ void LLFloaterEditExtDayCycle::removeCurrentSliderFrame()
     {
         LL_DEBUGS("ENVDAYEDIT") << "Removing frame from " << iter->second.mFrame << LL_ENDL;
         LLSettingsBase::Seconds seconds(iter->second.mFrame);
-        mEditDay->removeTrackKeyframe(mCurrentTrack, seconds);
+        mEditDay->removeTrackKeyframe(mCurrentTrack, (LLSettingsBase::TrackPosition)seconds);
         mSliderKeyMap.erase(iter);
     }
 
@@ -1474,17 +1474,17 @@ void LLFloaterEditExtDayCycle::reblendSettings()
     {
         if ((mSkyBlender->getTrack() != mCurrentTrack) && (mCurrentTrack != LLSettingsDay::TRACK_WATER))
         {
-            mSkyBlender->switchTrack(mCurrentTrack, position);
+            mSkyBlender->switchTrack(mCurrentTrack, (LLSettingsBase::TrackPosition)position);
         }
         else
         {
-            mSkyBlender->setPosition(position);
+            mSkyBlender->setPosition((LLSettingsBase::TrackPosition)position);
         }
     }
 
     if (mWaterBlender)
     {
-        mWaterBlender->setPosition(position);
+        mWaterBlender->setPosition((LLSettingsBase::TrackPosition)position);
     }
 }
 
@@ -1517,7 +1517,7 @@ bool LLFloaterEditExtDayCycle::isAddingFrameAllowed()
     if (!mFramesSlider->getCurSlider().empty() || !mEditDay) return false;
 
     LLSettingsBase::Seconds frame(mTimeSlider->getCurSliderValue());
-    if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
+    if ((mEditDay->getSettingsNearKeyframe((LLSettingsBase::TrackPosition)frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
     {
         return false;
     }
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 0370182b01..30f58aaeec 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -101,7 +101,7 @@ public:
         LLScrollingPanel::draw();
 
         F32 x = 4; // padding-left
-        F32 y = getRect().getHeight() / 2;
+        F32 y = (F32)(getRect().getHeight() / 2);
         LLFontGL::getFontSansSerif()->render(
             mText,                           // wstr
             0,                               // begin_offset
@@ -137,8 +137,8 @@ public:
     {
         LLScrollingPanel::draw();
 
-        F32 x = getRect().getWidth() / 2;
-        F32 y = getRect().getHeight() / 2;
+        F32 x = (F32)(getRect().getWidth() / 2);
+        F32 y = (F32)(getRect().getHeight() / 2);
         LLFontGL::getFontEmojiLarge()->render(
             mChar,                      // wstr
             0,                          // begin_offset
@@ -206,7 +206,7 @@ public:
         static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
         LLColor4 textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
         S32 max_pixels = clientWidth - iconWidth;
-        drawName(iconWidth, centerY, max_pixels, textColor);
+        drawName((F32)iconWidth, centerY, max_pixels, textColor);
     }
 
 protected:
@@ -229,7 +229,7 @@ protected:
     void drawName(F32 x, F32 y, S32 max_pixels, LLColor4& color)
     {
         F32 x0 = x;
-        F32 x1 = max_pixels;
+        F32 x1 = (F32)max_pixels;
         LLFontGL* font = LLFontGL::getFontEmojiLarge();
         if (mBegin)
         {
@@ -245,7 +245,7 @@ protected:
                 LLFontGL::NORMAL,              // style
                 LLFontGL::DROP_SHADOW_SOFT,    // shadow
                 static_cast<S32>(text.size()), // max_chars
-                x1);                           // max_pixels
+                (S32)x1);                      // max_pixels
             F32 dx = font->getWidthF32(text);
             x0 += dx;
             x1 -= dx;
@@ -264,7 +264,7 @@ protected:
                 LLFontGL::NORMAL,              // style
                 LLFontGL::DROP_SHADOW_SOFT,    // shadow
                 static_cast<S32>(text.size()), // max_chars
-                x1);                           // max_pixels
+                (S32)x1);                      // max_pixels
             F32 dx = font->getWidthF32(text);
             x0 += dx;
             x1 -= dx;
@@ -283,7 +283,7 @@ protected:
                 LLFontGL::NORMAL,              // style
                 LLFontGL::DROP_SHADOW_SOFT,    // shadow
                 static_cast<S32>(text.size()), // max_chars
-                x1);                           // max_pixels
+                (S32)x1);                      // max_pixels
         }
     }
 
@@ -864,7 +864,7 @@ void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl)
         if (it == mGroupButtons.end())
             return;
 
-        selectEmojiGroup(it - mGroupButtons.begin());
+        selectEmojiGroup((U32)(it - mGroupButtons.begin()));
     }
 }
 
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index 32c4f6205d..3b8a25b3a6 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -292,7 +292,7 @@ void LLFloaterEnvironmentAdjust::onHazeHorizonChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setHazeHorizon(getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
+    mLiveSky->setHazeHorizon((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -300,7 +300,7 @@ void LLFloaterEnvironmentAdjust::onHazeDensityChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setHazeDensity(getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
+    mLiveSky->setHazeDensity((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -308,7 +308,7 @@ void LLFloaterEnvironmentAdjust::onSceneGammaChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setGamma(getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
+    mLiveSky->setGamma((F32)getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -324,7 +324,7 @@ void LLFloaterEnvironmentAdjust::onCloudCoverageChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setCloudShadow(getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
+    mLiveSky->setCloudShadow((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -332,7 +332,7 @@ void LLFloaterEnvironmentAdjust::onCloudScaleChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setCloudScale(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
+    mLiveSky->setCloudScale((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -340,7 +340,7 @@ void LLFloaterEnvironmentAdjust::onGlowChanged()
 {
     if (!mLiveSky)
         return;
-    LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
+    LLColor3 glow((F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, (F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
 
     // takes 0 - 1.99 UI range -> 40 -> 0.2 range
     glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R;
@@ -354,7 +354,7 @@ void LLFloaterEnvironmentAdjust::onStarBrightnessChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setStarBrightness(getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
+    mLiveSky->setStarBrightness((F32)getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
     mLiveSky->update();
 }
 
@@ -375,8 +375,8 @@ void LLFloaterEnvironmentAdjust::onSunRotationChanged()
 
 void LLFloaterEnvironmentAdjust::onSunAzimElevChanged()
 {
-    F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
-    F32 elevation = getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
+    F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
+    F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
     LLQuaternion quat;
 
     azimuth *= DEG_TO_RAD;
@@ -405,7 +405,7 @@ void LLFloaterEnvironmentAdjust::onSunScaleChanged()
 {
     if (!mLiveSky)
         return;
-    mLiveSky->setSunScale((getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
+    mLiveSky->setSunScale((F32)(getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
     mLiveSky->update();
 }
 
@@ -426,8 +426,8 @@ void LLFloaterEnvironmentAdjust::onMoonRotationChanged()
 
 void LLFloaterEnvironmentAdjust::onMoonAzimElevChanged()
 {
-    F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
-    F32 elevation = getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
+    F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
+    F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
     LLQuaternion quat;
 
     azimuth *= DEG_TO_RAD;
@@ -483,7 +483,7 @@ void LLFloaterEnvironmentAdjust::onSunColorChanged()
 void LLFloaterEnvironmentAdjust::onReflectionProbeAmbianceChanged()
 {
     if (!mLiveSky) return;
-    F32 ambiance = getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
+    F32 ambiance = (F32)getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
     mLiveSky->setReflectionProbeAmbiance(ambiance);
 
     updateGammaLabel();
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index ea49c88755..a900e04707 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -671,7 +671,7 @@ bool LLImagePreviewAvatar::render()
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+    gGL.ortho(0.0f, (F32)mFullWidth, 0.0f, (F32)mFullHeight, -1.0f, 1.0f);
 
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
@@ -875,7 +875,7 @@ bool LLImagePreviewSculpted::render()
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+    gGL.ortho(0.0f, (F32)mFullWidth, 0.0f, (F32)mFullHeight, -1.0f, 1.0f);
 
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index ef7ec9e950..ed4056070f 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -263,8 +263,8 @@ bool    LLFloaterIMNearbyChatScreenChannel::createPoolToast()
 
     LLToast::Params p;
     p.panel = panel;
-    p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime");
-    p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime");
+    p.lifetime_secs = (F32)gSavedSettings.getS32("NearbyToastLifeTime");
+    p.fading_time_secs = (F32)gSavedSettings.getS32("NearbyToastFadingTime");
 
     LLToast* toast = new LLFloaterIMNearbyChatToast(p, this);
 
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 9a794d1775..41b6025e0f 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1706,7 +1706,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
 
         object_count_str = llformat("%d", object_count);
         item_params.columns.add().value(object_count_str).font(FONT).column("count");
-        item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date");
+        item_params.columns.add().value(LLDate((double)most_recent_time)).font(FONT).column("mostrecent").type("date");
 
         self->mOwnerList->addNameItemRow(item_params);
         LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
@@ -2527,7 +2527,7 @@ void LLPanelLandAccess::refresh()
                 if (entry.mTime != 0)
                 {
                     LLStringUtil::format_map_t args;
-                    S32 now = time(NULL);
+                    S32 now = (S32)time(NULL);
                     S32 seconds = entry.mTime - now;
                     if (seconds < 0) seconds = 0;
                     prefix.assign(" (");
@@ -2576,7 +2576,7 @@ void LLPanelLandAccess::refresh()
                 if (entry.mTime != 0)
                 {
                     LLStringUtil::format_map_t args;
-                    S32 now = time(NULL);
+                    S32 now = (S32)time(NULL);
                     seconds = entry.mTime - now;
                     if (seconds < 0) seconds = 0;
 
diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp
index cd5bea1be4..b4bb45c864 100644
--- a/indra/newview/llfloatermemleak.cpp
+++ b/indra/newview/llfloatermemleak.cpp
@@ -60,7 +60,7 @@ LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key)
 bool LLFloaterMemLeak::postBuild(void)
 {
     F32 a, b ;
-    a = getChild<LLUICtrl>("leak_speed")->getValue().asReal();
+    a = (F32)getChild<LLUICtrl>("leak_speed")->getValue().asReal();
     if(a > (F32)(0xFFFFFFFF))
     {
         sMemLeakingSpeed = 0xFFFFFFFF ;
@@ -69,7 +69,7 @@ bool LLFloaterMemLeak::postBuild(void)
     {
         sMemLeakingSpeed = (U32)a ;
     }
-    b = getChild<LLUICtrl>("max_leak")->getValue().asReal();
+    b = (F32)getChild<LLUICtrl>("max_leak")->getValue().asReal();
     if(b > (F32)0xFFF)
     {
         sMaxLeakedMem = 0xFFFFFFFF ;
@@ -150,8 +150,7 @@ void LLFloaterMemLeak::idle()
 //----------------------
 void LLFloaterMemLeak::onChangeLeakingSpeed()
 {
-    F32 tmp ;
-    tmp =getChild<LLUICtrl>("leak_speed")->getValue().asReal();
+    F32 tmp = (F32)getChild<LLUICtrl>("leak_speed")->getValue().asReal();
 
     if(tmp > (F32)0xFFFFFFFF)
     {
@@ -161,14 +160,11 @@ void LLFloaterMemLeak::onChangeLeakingSpeed()
     {
         sMemLeakingSpeed = (U32)tmp ;
     }
-
 }
 
 void LLFloaterMemLeak::onChangeMaxMemLeaking()
 {
-
-    F32 tmp ;
-    tmp =getChild<LLUICtrl>("max_leak")->getValue().asReal();
+    F32 tmp = (F32)getChild<LLUICtrl>("max_leak")->getValue().asReal();
     if(tmp > (F32)0xFFF)
     {
         sMaxLeakedMem = 0xFFFFFFFF ;
@@ -177,7 +173,6 @@ void LLFloaterMemLeak::onChangeMaxMemLeaking()
     {
         sMaxLeakedMem = ((U32)tmp) << 20 ;
     }
-
 }
 
 void LLFloaterMemLeak::onClickStart()
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index a91cdba5c0..5ca727cf66 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1198,7 +1198,7 @@ void LLFloaterModelPreview::initDecompControls()
                 else if (LLSpinCtrl* spinner = dynamic_cast<LLSpinCtrl*>(ctrl))
                 {
                     bool is_retain_ctrl = "Retain%" == name;
-                    double coefficient = is_retain_ctrl ? RETAIN_COEFFICIENT : 1.f;
+                    float coefficient = is_retain_ctrl ? (F32)RETAIN_COEFFICIENT : 1.f;
 
                     spinner->setMinValue(param[i].mDetails.mRange.mLow.mFloat * coefficient);
                     spinner->setMaxValue(param[i].mDetails.mRange.mHigh.mFloat * coefficient);
@@ -1238,10 +1238,10 @@ void LLFloaterModelPreview::initDecompControls()
                 LLUICtrl* ctrl = getChild<LLUICtrl>(name);
                 if (LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl))
                 {
-                    slider->setMinValue(param[i].mDetails.mRange.mLow.mIntOrEnumValue);
-                    slider->setMaxValue(param[i].mDetails.mRange.mHigh.mIntOrEnumValue);
-                    slider->setIncrement(param[i].mDetails.mRange.mDelta.mIntOrEnumValue);
-                    slider->setValue(param[i].mDefault.mIntOrEnumValue);
+                    slider->setMinValue((F32)param[i].mDetails.mRange.mLow.mIntOrEnumValue);
+                    slider->setMaxValue((F32)param[i].mDetails.mRange.mHigh.mIntOrEnumValue);
+                    slider->setIncrement((F32)param[i].mDetails.mRange.mDelta.mIntOrEnumValue);
+                    slider->setValue((F32)param[i].mDefault.mIntOrEnumValue);
                     slider->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
                 }
                 else if (LLComboBox* combo_box = dynamic_cast<LLComboBox*>(ctrl))
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 0ec2024994..5e5cfcecbf 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1101,7 +1101,7 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue)
     if (color_swatch)
     {
         LLColor4 new_color = color_swatch->get();
-        color_swatch->set( new_color.setAlpha(newvalue.asReal()) );
+        color_swatch->set(new_color.setAlpha((F32)newvalue.asReal()));
     }
 }
 
diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp
index 47b3aa015b..8cb941cb12 100644
--- a/indra/newview/llfloaterprofiletexture.cpp
+++ b/indra/newview/llfloaterprofiletexture.cpp
@@ -244,8 +244,8 @@ void LLFloaterProfileTexture::updateDimensions()
     if (biggest_dim > MAX_DIMENTIONS)
     {
         F32 scale_down = MAX_DIMENTIONS / (F32)biggest_dim;
-        width *= scale_down;
-        height *= scale_down;
+        width = (S32)(width * scale_down);
+        height = (S32)(height * scale_down);
     }
 
     //reshape floater
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index d6ffab5825..41d1fcff82 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -519,7 +519,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
     panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor));
     panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access));
 
-    panel->getChild<LLSpinCtrl>("agent_limit_spin")->setMaxValue(hard_agent_limit);
+    panel->getChild<LLSpinCtrl>("agent_limit_spin")->setMaxValue((F32)hard_agent_limit);
 
     LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral();
     if (panel)
@@ -1931,11 +1931,11 @@ bool LLPanelRegionTerrainInfo::sendUpdate()
                 for (U32 tt = 0; tt < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++tt)
                 {
                     LLGLTFMaterial::TextureTransform& transform = mat_override->mTextureTransform[tt];
-                    transform.mScale.mV[VX] = mMaterialScaleUCtrl[i]->getValue().asReal();
-                    transform.mScale.mV[VY] = mMaterialScaleVCtrl[i]->getValue().asReal();
-                    transform.mRotation = mMaterialRotationCtrl[i]->getValue().asReal() * DEG_TO_RAD;
-                    transform.mOffset.mV[VX] = mMaterialOffsetUCtrl[i]->getValue().asReal();
-                    transform.mOffset.mV[VY] = mMaterialOffsetVCtrl[i]->getValue().asReal();
+                    transform.mScale.mV[VX] = (F32)mMaterialScaleUCtrl[i]->getValue().asReal();
+                    transform.mScale.mV[VY] = (F32)mMaterialScaleVCtrl[i]->getValue().asReal();
+                    transform.mRotation = (F32)mMaterialRotationCtrl[i]->getValue().asReal() * DEG_TO_RAD;
+                    transform.mOffset.mV[VX] = (F32)mMaterialOffsetUCtrl[i]->getValue().asReal();
+                    transform.mOffset.mV[VY] = (F32)mMaterialOffsetVCtrl[i]->getValue().asReal();
                 }
             }
 
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 17707e808e..525317304d 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -131,10 +131,10 @@ void LLFloaterSettingsDebug::onCommitSettings()
         controlp->set(vectord.getValue());
         break;
       case TYPE_QUAT:
-        quat.mQ[VX] = getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
-        quat.mQ[VY] = getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
-        quat.mQ[VZ] = getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
-        quat.mQ[VS] = getChild<LLUICtrl>("val_spinner_4")->getValue().asReal();;
+        quat.mQ[VX] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
+        quat.mQ[VY] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
+        quat.mQ[VZ] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
+        quat.mQ[VS] = (F32)getChild<LLUICtrl>("val_spinner_4")->getValue().asReal();;
         controlp->set(quat.getValue());
         break;
       case TYPE_RECT:
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 2bac7d6360..75b24a6bbc 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -168,10 +168,10 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
         panel_width = 700.f;
     }
 
-    S32 floater_width = 224.f;
+    S32 floater_width{ 224 };
     if(mAdvanced)
     {
-        floater_width = floater_width + panel_width;
+        floater_width = floater_width + (S32)panel_width;
     }
 
     LLUICtrl* thumbnail_placeholder = floaterp->getChild<LLUICtrl>("thumbnail_placeholder");
@@ -185,7 +185,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
     }
     if (!mSkipReshaping)
     {
-        thumbnail_placeholder->reshape(panel_width, thumbnail_placeholder->getRect().getHeight());
+        thumbnail_placeholder->reshape((S32)panel_width, thumbnail_placeholder->getRect().getHeight());
         if (!floaterp->isMinimized())
         {
             floaterp->reshape(floater_width, floaterp->getRect().getHeight());
@@ -283,7 +283,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
             width_ctrl->setValue(w);
             if (getActiveSnapshotType(floater) == LLSnapshotModel::SNAPSHOT_TEXTURE)
             {
-                width_ctrl->setIncrement(w >> 1);
+                width_ctrl->setIncrement((F32)(w >> 1));
             }
         }
         if (height_ctrl->getValue().asInteger() == 0)
@@ -293,7 +293,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
             height_ctrl->setValue(h);
             if (getActiveSnapshotType(floater) == LLSnapshotModel::SNAPSHOT_TEXTURE)
             {
-                height_ctrl->setIncrement(h >> 1);
+                height_ctrl->setIncrement((F32)(h >> 1));
             }
         }
 
@@ -303,9 +303,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
             S32 width = gViewerWindow->getWindowWidthRaw();
             S32 height = gViewerWindow->getWindowHeightRaw();
 
-            width_ctrl->setMaxValue(width);
+            width_ctrl->setMaxValue((F32)width);
 
-            height_ctrl->setMaxValue(height);
+            height_ctrl->setMaxValue((F32)height);
 
             if (width_ctrl->getValue().asInteger() > width)
             {
@@ -761,8 +761,8 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool
             getHeightSpinner(view)->setValue(height);
             if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE)
             {
-                getWidthSpinner(view)->setIncrement(width >> 1);
-                getHeightSpinner(view)->setIncrement(height >> 1);
+                getWidthSpinner(view)->setIncrement((F32)(width >> 1));
+                getHeightSpinner(view)->setIncrement((F32)(height >> 1));
             }
         }
 
@@ -882,8 +882,8 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshotBase*
     getHeightSpinner(view)->forceSetValue(height);
     if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE)
     {
-        getWidthSpinner(view)->setIncrement(width >> 1);
-        getHeightSpinner(view)->setIncrement(height >> 1);
+        getWidthSpinner(view)->setIncrement((F32)(width >> 1));
+        getHeightSpinner(view)->setIncrement((F32)(height >> 1));
     }
 }
 
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 64b22c4bb1..9bc8c63fa0 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -195,7 +195,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
             {
                 parcel_buf = parcel_name;
                 script_memory = script_size;
-                total_memory += script_size;
+                total_memory += (U64)script_size;
             }
         }
 
@@ -233,7 +233,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
 
         columns[column_num]["column"] = "time";
         columns[column_num]["type"] = "date";
-        columns[column_num]["value"] = LLDate((time_t)time_stamp);
+        columns[column_num]["value"] = LLDate((double)time_stamp);
         columns[column_num++]["font"] = "SANSSERIF";
 
         if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 6f526e1905..7c49db9c54 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -1598,7 +1598,7 @@ void LLOverlapPanel::draw()
 
     if(!LLView::sPreviewClickedElement)
     {
-        LLUI::translate(5,getRect().getHeight()-20);    // translate to top-5,left-5
+        LLUI::translate(5.f, (F32)getRect().getHeight() - 20.f);    // translate to top-5,left-5
         LLView::sDrawPreviewHighlights = false;
         LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text, 0, 0, 0, text_color,
                 LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW);
@@ -1614,7 +1614,7 @@ void LLOverlapPanel::draw()
         std::list<LLView*> overlappers = mOverlapMap[LLView::sPreviewClickedElement];
         if(overlappers.size() == 0)
         {
-            LLUI::translate(5,getRect().getHeight()-20);    // translate to top-5,left-5
+            LLUI::translate(5.f, (F32)getRect().getHeight() - 20.f);    // translate to top-5,left-5
             LLView::sDrawPreviewHighlights = false;
             std::string current_selection = std::string(current_selection_text + LLView::sPreviewClickedElement->getName() + " (no elements overlap)");
             S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(current_selection) + 10;
@@ -1679,14 +1679,14 @@ void LLOverlapPanel::draw()
             setRect(LLRect(rect.mLeft,rect.mTop,rect.mRight,rect.mTop-height_sum));
         }
 
-        LLUI::translate(5,getRect().getHeight()-10);    // translate to top left
+        LLUI::translate(5.f, (F32)getRect().getHeight() - 10.f);    // translate to top left
         LLView::sDrawPreviewHighlights = false;
 
         // draw currently-selected element at top of overlappers
-        LLUI::translate(0,-mSpacing);
+        LLUI::translate(0.f, -(F32)mSpacing);
         LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text + LLView::sPreviewClickedElement->getName(), 0, 0, 0, text_color,
                 LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW);
-        LLUI::translate(0,-mSpacing-LLView::sPreviewClickedElement->getRect().getHeight()); // skip spacing distance + height
+        LLUI::translate(0.f, -(F32)mSpacing - (F32)LLView::sPreviewClickedElement->getRect().getHeight()); // skip spacing distance + height
         LLView::sPreviewClickedElement->draw();
 
         for(std::list<LLView*>::iterator overlap_it = overlappers.begin(); overlap_it != overlappers.end(); ++overlap_it)
@@ -1694,16 +1694,16 @@ void LLOverlapPanel::draw()
             LLView* viewp = *overlap_it;
 
             // draw separating line
-            LLUI::translate(0,-mSpacing);
+            LLUI::translate(0.f, -(F32)mSpacing);
             gl_line_2d(0,0,getRect().getWidth()-10,0,LLColor4(192.0f/255.0f,192.0f/255.0f,192.0f/255.0f));
 
             // draw name
-            LLUI::translate(0,-mSpacing);
+            LLUI::translate(0.f, -(F32)mSpacing);
             LLFontGL::getFontSansSerifSmall()->renderUTF8(overlapper_text + viewp->getName(), 0, 0, 0, text_color,
                     LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW);
 
             // draw element
-            LLUI::translate(0,-mSpacing-viewp->getRect().getHeight());  // skip spacing distance + height
+            LLUI::translate(0.f, -(F32)mSpacing - (F32)viewp->getRect().getHeight());  // skip spacing distance + height
             viewp->draw();
         }
         mLastClickedElement = LLView::sPreviewClickedElement;
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 08f8918e5d..19cb4d04e2 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -893,7 +893,7 @@ void LLSky::renderSunMoonBeacons(const LLVector3& pos_agent, const LLVector3& di
     {
         pos_end.mV[i] = pos_agent.mV[i] + (50 * direction.mV[i]);
     }
-    glLineWidth(LLPipeline::DebugBeaconLineWidth);
+    glLineWidth((GLfloat)LLPipeline::DebugBeaconLineWidth);
     gGL.begin(LLRender::LINES);
     color.mV[3] *= 0.5f;
     gGL.color4fv(color.mV);
@@ -1190,8 +1190,8 @@ F32 gpu_benchmark()
     F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
     F32 seconds = ms/1000.f;
 
-    F64 samples_drawn = gBenchmarkProgram.mSamplesDrawn;
-    F32 samples_sec = (samples_drawn/1000000000.0)/seconds;
+    F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn;
+    F32 samples_sec = (F32)((samples_drawn/1000000000.0)/seconds);
     gbps = samples_sec*4;  // 4 bytes per sample
 
     LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index a198d1bdf4..06920734fe 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -462,7 +462,7 @@ bool LLGLTFPreviewTexture::render()
     // Set up camera and viewport
     const LLVector3 origin(0.0, 0.0, 0.0);
     camera.lookAt(origin, object_position);
-    camera.setAspect(mFullHeight / mFullWidth);
+    camera.setAspect((F32)(mFullHeight / mFullWidth));
     const LLRect texture_rect(0, mFullHeight, mFullWidth, 0);
     camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), false, camera.getNear(), MAX_FAR_CLIP*2.f);
 
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 100aacb8ac..1057bc25e0 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -190,7 +190,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members,
     in_role_end = std::set_intersection(mMemberIDs.begin(), mMemberIDs.end(),
                                     members.begin(), members.end(),
                                     in_role.begin());
-    return in_role_end - in_role.begin();
+    return (S32)(in_role_end - in_role.begin());
 }
 
 void LLGroupRoleData::addMember(const LLUUID& member)
@@ -1569,7 +1569,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
     {
         // LRU: Remove the oldest un-observed group from cache until group size is small enough
 
-        F32 oldest_access = LLFrameTimer::getTotalSeconds();
+        F32 oldest_access = (F32)LLFrameTimer::getTotalSeconds();
         group_map_t::iterator oldest_gi = mGroups.end();
 
         for (group_map_t::iterator gi = mGroups.begin(); gi != mGroups.end(); ++gi )
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index cbe1105024..91051f8235 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -98,7 +98,7 @@ void LLHeroProbeManager::update()
     if (mMipChain.empty())
     {
         U32 res = mProbeResolution;
-        U32 count = log2((F32)res) + 0.5f;
+        U32 count = (U32)(log2((F32)res) + 0.5f);
 
         mMipChain.resize(count);
         for (U32 i = 0; i < count; ++i)
@@ -341,7 +341,7 @@ void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, bool
             gGaussianProgram.unbind();
         }
 
-        S32 mips = log2((F32)mProbeResolution) + 0.5f;
+        S32 mips = (S32)(log2((F32)mProbeResolution) + 0.5f);
 
         gReflectionMipProgram.bind();
         S32 diffuseChannel = gReflectionMipProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_TEXTURE);
@@ -431,7 +431,7 @@ void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe)
                 static LLStaticHashedString sStrength("probe_strength");
 
                 gHeroRadianceGenProgram.uniform1f(sRoughness, (F32) i / (F32) (mMipChain.size() - 1));
-                gHeroRadianceGenProgram.uniform1f(sMipLevel, i);
+                gHeroRadianceGenProgram.uniform1f(sMipLevel, (GLfloat)i);
                 gHeroRadianceGenProgram.uniform1i(sWidth, mProbeResolution);
                 gHeroRadianceGenProgram.uniform1f(sStrength, 1);
 
@@ -533,7 +533,7 @@ void LLHeroProbeManager::initReflectionMaps()
         mReset = false;
         mReflectionProbeCount = count;
         mProbeResolution      = gSavedSettings.getS32("RenderHeroProbeResolution");
-        mMaxProbeLOD = log2f(mProbeResolution) - 1.f; // number of mips - 1
+        mMaxProbeLOD = log2f((F32)mProbeResolution) - 1.f; // number of mips - 1
 
         mTexture = new LLCubeMapArray();
 
diff --git a/indra/newview/llhttpretrypolicy.cpp b/indra/newview/llhttpretrypolicy.cpp
index 44d33eec93..3e55030610 100644
--- a/indra/newview/llhttpretrypolicy.cpp
+++ b/indra/newview/llhttpretrypolicy.cpp
@@ -180,7 +180,7 @@ bool LLAdaptiveRetryPolicy::getSecondsUntilRetryAfter(const std::string& retry_a
     time_t date = curl_getdate(retry_after.c_str(), NULL);
     if (-1 == date) return false;
 
-    seconds_to_wait = (F64)date - LLTimer::getTotalSeconds();
+    seconds_to_wait = (F32)((F64)date - LLTimer::getTotalSeconds());
 
     return true;
 }
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index e1bf6c2077..4011a857e5 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -449,7 +449,7 @@ void LLHUDNameTag::addLine(const std::string &text_utf8,
                         // token does does not fit into signle line, need to draw "...".
                         // Use four dots for ellipsis width to generate padding
                         const LLWString dots_pad(utf8str_to_wstring(std::string("....")));
-                        S32 elipses_width = font->getWidthF32(dots_pad.c_str());
+                        S32 elipses_width = (S32)font->getWidthF32(dots_pad.c_str());
                         // truncated string length
                         segment_length = font->maxDrawableChars(iter->substr(line_length).c_str(), max_pixels - elipses_width, static_cast<S32>(wline.length()), LLFontGL::ANYWHERE);
                         const LLWString dots(utf8str_to_wstring(std::string("...")));
@@ -780,7 +780,7 @@ void LLHUDNameTag::updateAll()
     }
 
     LLTrace::CountStatHandle<>* camera_vel_stat = LLViewerCamera::getVelocityStat();
-    F32 camera_vel = LLTrace::get_frame_recording().getLastRecording().getPerSec(*camera_vel_stat);
+    F32 camera_vel = (F32)LLTrace::get_frame_recording().getLastRecording().getPerSec(*camera_vel_stat);
     if (camera_vel > MAX_STABLE_CAMERA_VELOCITY)
     {
         return;
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index e2e83ef42b..e24274650d 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -1607,7 +1607,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
         }
         else
         {
-            position.set(message_data["local_x"].asReal(), message_data["local_y"].asReal(), message_data["local_z"].asReal());
+            position.set((F32)message_data["local_x"].asReal(), (F32)message_data["local_y"].asReal(), (F32)message_data["local_z"].asReal());
         }
 
         std::vector<U8> bin_bucket;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 05b1fec8e5..e39e0a332f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -4242,7 +4242,7 @@ public:
                 message_params["region_id"].asUUID(),
                 ll_vector3_from_sd(message_params["position"]),
                 false,      // is_region_message
-                timestamp);
+                (U32)timestamp);
 
             if (LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat))
             {
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index 75366c4831..24dbe61bad 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -152,7 +152,7 @@ void LLTexturePreviewView::draw()
 
         bool isLoading = (!m_Image->isFullyLoaded()) && (m_Image->getDiscardLevel() > 0);
         if (isLoading)
-            LLFontGL::getFontSansSerif()->renderUTF8(mLoadingText, 0, llfloor(rctClient.mLeft + 3),  llfloor(rctClient.mTop - 25), LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
+            LLFontGL::getFontSansSerif()->renderUTF8(mLoadingText, 0, rctClient.mLeft + 3, rctClient.mTop - 25, LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
         m_Image->addTextureStats((isLoading) ? MAX_IMAGE_AREA : (F32)(rctClient.getWidth() * rctClient.getHeight()));
     }
 }
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 114ccfdd3f..e3d4645701 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -1519,7 +1519,7 @@ LLInventoryFilter& LLInventoryFilter::operator=( const  LLInventoryFilter&  othe
 
 void LLInventoryFilter::toParams(Params& params) const
 {
-    params.filter_ops.types = getFilterObjectTypes();
+    params.filter_ops.types = (U32)getFilterObjectTypes();
     params.filter_ops.category_types = getFilterCategoryTypes();
     if (getFilterObjectTypes() & FILTERTYPE_WEARABLE)
     {
@@ -1532,7 +1532,7 @@ void LLInventoryFilter::toParams(Params& params) const
     params.filter_ops.show_folder_state = getShowFolderState();
     params.filter_ops.creator_type = getFilterCreatorType();
     params.filter_ops.permissions = getFilterPermissions();
-    params.filter_ops.search_visibility = getSearchVisibilityTypes();
+    params.filter_ops.search_visibility = (U32)getSearchVisibilityTypes();
     params.substring = getFilterSubString();
     params.since_logoff = isSinceLogoff();
 }
@@ -1646,7 +1646,7 @@ bool LLInventoryFilter::isTimedOut()
 void LLInventoryFilter::resetTime(S32 timeout)
 {
     mFilterTime.reset();
-    F32 time_in_sec = (F32)(timeout)/1000.0;
+    F32 time_in_sec = (F32)(timeout)/1000.0f;
     mFilterTime.setTimerExpirySec(time_in_sec);
 }
 
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index c69f797868..98b3707457 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2641,7 +2641,7 @@ bool LLInventoryGallery::checkAgainstFilterType(const LLUUID& object_id)
     {
         object_type = inv_item->getInventoryType();
     }
-    const U32 filterTypes = mFilter->getFilterTypes();
+    const U32 filterTypes = (U32)mFilter->getFilterTypes();
 
     if ((filterTypes & LLInventoryFilter::FILTERTYPE_OBJECT) && inv_item)
     {
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 9dc13bcf09..6c58eb2ca4 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -425,7 +425,7 @@ void LLInventoryPanel::setFilterWorn()
 
 U32 LLInventoryPanel::getFilterObjectTypes() const
 {
-    return getFilter().getFilterObjectTypes();
+    return (U32)getFilter().getFilterObjectTypes();
 }
 
 U32 LLInventoryPanel::getFilterPermMask() const
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 00dbf9a9f8..4eaf69c39d 100644
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -732,8 +732,8 @@ LLJoystickQuaternion::LLJoystickQuaternion(const LLJoystickQuaternion::Params &p
 {
     for (int i = 0; i < 3; ++i)
     {
-        mLfRtAxis.mV[i] = (mXAxisIndex == i) ? 1.0 : 0.0;
-        mUpDnAxis.mV[i] = (mYAxisIndex == i) ? 1.0 : 0.0;
+        mLfRtAxis.mV[i] = (mXAxisIndex == i) ? 1.0f : 0.0f;
+        mUpDnAxis.mV[i] = (mYAxisIndex == i) ? 1.0f : 0.0f;
     }
 }
 
@@ -864,8 +864,8 @@ void LLJoystickQuaternion::draw()
     LLVector3 draw_point = mVectorZero * mRotation;
     S32 halfwidth = getRect().getWidth() / 2;
     S32 halfheight = getRect().getHeight() / 2;
-    draw_point.mV[mXAxisIndex] = (draw_point.mV[mXAxisIndex] + 1.0) * halfwidth;
-    draw_point.mV[mYAxisIndex] = (draw_point.mV[mYAxisIndex] + 1.0) * halfheight;
+    draw_point.mV[mXAxisIndex] = (draw_point.mV[mXAxisIndex] + 1.0f) * halfwidth;
+    draw_point.mV[mYAxisIndex] = (draw_point.mV[mYAxisIndex] + 1.0f) * halfheight;
 
     gl_circle_2d(draw_point.mV[mXAxisIndex], draw_point.mV[mYAxisIndex], 4, 8,
         draw_point.mV[mZAxisIndex] >= 0.f);
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index d572605635..aa03001389 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -293,7 +293,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var
         if (validate_as_uuid)
         {
             std::wstring ws(serialNumber, serial_size);
-            std::string str(ws.begin(), ws.end());
+            std::string str = ll_convert_wide_to_string(ws);
 
             if (!LLUUID::validate(str))
             {
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 2adb506c0f..0c82db1011 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -450,10 +450,10 @@ void LLManip::renderXYZ(const LLVector3 &vec)
         gGL.color4f(0.f, 0.f, 0.f, 0.7f);
 
         imagep->draw(
-            (window_center_x - 115) * display_scale.mV[VX],
-            (window_center_y + vertical_offset - PAD) * display_scale.mV[VY],
-            235 * display_scale.mV[VX],
-            (PAD * 2 + 10) * display_scale.mV[VY],
+            (S32)((window_center_x - 115) * display_scale.mV[VX]),
+            (S32)((window_center_y + vertical_offset - PAD) * display_scale.mV[VY]),
+            (S32)(235 * display_scale.mV[VX]),
+            (S32)((PAD * 2 + 10) * display_scale.mV[VY]),
             LLColor4(0.f, 0.f, 0.f, 0.7f) );
 
         LLFontGL* font = LLFontGL::getFontSansSerif();
@@ -463,33 +463,33 @@ void LLManip::renderXYZ(const LLVector3 &vec)
         // render drop shadowed text (manually because of bigger 'distance')
         F32 right_x;
         feedback_string = llformat("X: %.3f", vec.mV[VX]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f + 1.f, (F32)(window_center_y + vertical_offset) - 2.f, LLColor4::black,
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
 
         feedback_string = llformat("Y: %.3f", vec.mV[VY]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f + 1.f, (F32)(window_center_y + vertical_offset) - 2.f, LLColor4::black,
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
 
         feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f + 1.f, (F32)(window_center_y + vertical_offset) - 2.f, LLColor4::black,
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
 
         // render text on top
         feedback_string = llformat("X: %.3f", vec.mV[VX]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f, window_center_y + vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f),
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f, (F32)(window_center_y + vertical_offset), LLColor4(1.f, 0.5f, 0.5f, 1.f),
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
 
         feedback_string = llformat("Y: %.3f", vec.mV[VY]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f, window_center_y + vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f),
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f, (F32)(window_center_y + vertical_offset), LLColor4(0.5f, 1.f, 0.5f, 1.f),
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
 
         feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
-        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f, window_center_y + vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f),
+        font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f, (F32)(window_center_y + vertical_offset), LLColor4(0.5f, 0.5f, 1.f, 1.f),
             LLFontGL::LEFT, LLFontGL::BASELINE,
             LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
     }
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index c4f3f01ea1..ffb66dc6cc 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -884,7 +884,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
     {
         F32 drag_dist = mScaleDir * projected_drag_pos1; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug.
 
-        F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+        F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, (S32)mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
         F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions);
         F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions);
 
@@ -902,7 +902,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
     {
         F32 drag_dist = mScaleDir * projected_drag_pos2; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug.
 
-        F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+        F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, (S32)mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
         F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions);
         F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit2 / cur_subdivisions);
 
@@ -1113,7 +1113,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
         else
         {
             F32 drag_dist = scale_center_to_mouse * mScaleDir;
-            F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
+            F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, (S32)mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel);
             F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions);
             F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions);
             relative_snap_dist -= snap_dist;
@@ -1542,8 +1542,8 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
     mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir);
     mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir);
 
-    mTickPixelSpacing1 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
-    mTickPixelSpacing2 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
+    mTickPixelSpacing1 = (F32)ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
+    mTickPixelSpacing2 = (F32)ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
 
     if (uniform)
     {
@@ -1608,8 +1608,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
         F32 dist_scale_units_2 = dist_grid_axis / smallest_subdivision2;
 
         // find distance to nearest smallest grid unit
-        F32 grid_multiple1 = llfloor(dist_scale_units_1);
-        F32 grid_multiple2 = llfloor(dist_scale_units_2);
+        F32 grid_multiple1 = (F32)llfloor(dist_scale_units_1);
+        F32 grid_multiple2 = (F32)llfloor(dist_scale_units_2);
         F32 grid_offset1 = fmodf(dist_grid_axis, smallest_subdivision1);
         F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2);
 
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 3987c6d9a3..dde238eddb 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -648,7 +648,7 @@ void LLMaterialEditor::setBaseColor(const LLColor4& color)
 
 F32 LLMaterialEditor::getTransparency()
 {
-    return childGetValue("transparency").asReal();
+    return (F32)childGetValue("transparency").asReal();
 }
 
 void LLMaterialEditor::setTransparency(F32 transparency)
@@ -668,7 +668,7 @@ void LLMaterialEditor::setAlphaMode(const std::string& alpha_mode)
 
 F32 LLMaterialEditor::getAlphaCutoff()
 {
-    return childGetValue("alpha cutoff").asReal();
+    return (F32)childGetValue("alpha cutoff").asReal();
 }
 
 void LLMaterialEditor::setAlphaCutoff(F32 alpha_cutoff)
@@ -708,7 +708,7 @@ void LLMaterialEditor::setMetallicRoughnessUploadId(const LLUUID& id)
 
 F32 LLMaterialEditor::getMetalnessFactor()
 {
-    return childGetValue("metalness factor").asReal();
+    return (F32)childGetValue("metalness factor").asReal();
 }
 
 void LLMaterialEditor::setMetalnessFactor(F32 factor)
@@ -718,7 +718,7 @@ void LLMaterialEditor::setMetalnessFactor(F32 factor)
 
 F32 LLMaterialEditor::getRoughnessFactor()
 {
-    return childGetValue("roughness factor").asReal();
+    return (F32)childGetValue("roughness factor").asReal();
 }
 
 void LLMaterialEditor::setRoughnessFactor(F32 factor)
@@ -2618,13 +2618,13 @@ bool LLMaterialEditor::setFromGltfModel(const tinygltf::Model& model, S32 index,
         }
 
         setAlphaMode(material_in.alphaMode);
-        setAlphaCutoff(material_in.alphaCutoff);
+        setAlphaCutoff((F32)material_in.alphaCutoff);
 
         setBaseColor(LLTinyGLTFHelper::getColor(material_in.pbrMetallicRoughness.baseColorFactor));
         setEmissiveColor(LLTinyGLTFHelper::getColor(material_in.emissiveFactor));
 
-        setMetalnessFactor(material_in.pbrMetallicRoughness.metallicFactor);
-        setRoughnessFactor(material_in.pbrMetallicRoughness.roughnessFactor);
+        setMetalnessFactor((F32)material_in.pbrMetallicRoughness.metallicFactor);
+        setRoughnessFactor((F32)material_in.pbrMetallicRoughness.roughnessFactor);
 
         setDoubleSided(material_in.doubleSided);
     }
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 01c922df16..cd75e1c313 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1869,7 +1869,7 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes
         llssize dsize = data_size;
         char* result_ptr = strip_deprecated_header((char*)data, dsize, &header_size);
 
-        data_size = dsize;
+        data_size = (S32)dsize;
 
         boost::iostreams::stream<boost::iostreams::array_source> stream(result_ptr, data_size);
 
@@ -1910,8 +1910,8 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes
 
         {
             LLMutexLock lock(mHeaderMutex);
-            mMeshHeader[mesh_id] = { header_size, header };
-            LLMeshRepository::sCacheBytesHeaders += header_size;
+            mMeshHeader[mesh_id] = { (U32)header_size, header };
+            LLMeshRepository::sCacheBytesHeaders += (U32)header_size;
         }
 
         LLMutexLock lock(mMutex); // make sure only one thread access mPendingLOD at the same time.
@@ -4763,7 +4763,7 @@ F32 LLMeshCostData::getRadiusBasedStreamingCost(F32 radius)
 
 F32 LLMeshCostData::getTriangleBasedStreamingCost()
 {
-    F32 result = ANIMATED_OBJECT_COST_PER_KTRI * 0.001 * getEstTrisForStreamingCost();
+    F32 result = ANIMATED_OBJECT_COST_PER_KTRI * 0.001f * getEstTrisForStreamingCost();
     return result;
 }
 
@@ -5473,7 +5473,7 @@ void on_new_single_inventory_upload_complete(
                 LL_INFOS() << "inventory_item_flags " << inventory_item_flags << LL_ENDL;
             }
         }
-        S32 creation_date_now = time_corrected();
+        S32 creation_date_now = (S32)time_corrected();
         LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem(
             server_response["new_inventory_item"].asUUID(),
             item_folder_id,
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 2483308c82..df573bd785 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -242,7 +242,7 @@ void LLModelPreview::updateDimentionsAndOffsets()
 
     std::set<LLModel*> accounted;
 
-    mPelvisZOffset = mFMP ? mFMP->childGetValue("pelvis_offset").asReal() : 3.0f;
+    mPelvisZOffset = mFMP ? (F32)mFMP->childGetValue("pelvis_offset").asReal() : 3.0f;
 
     if (mFMP && mFMP->childGetValue("upload_joints").asBoolean())
     {
@@ -272,7 +272,7 @@ void LLModelPreview::updateDimentionsAndOffsets()
         }
     }
 
-    F32 scale = mFMP ? mFMP->childGetValue("import_scale").asReal()*2.f : 2.f;
+    F32 scale = mFMP ? (F32)mFMP->childGetValue("import_scale").asReal()*2.f : 2.f;
 
     mDetailsSignal((F32)(mPreviewScale[0] * scale), (F32)(mPreviewScale[1] * scale), (F32)(mPreviewScale[2] * scale));
 
@@ -293,7 +293,7 @@ void LLModelPreview::rebuildUploadData()
 
     LLSpinCtrl* scale_spinner = mFMP->getChild<LLSpinCtrl>("import_scale");
 
-    F32 scale = scale_spinner->getValue().asReal();
+    F32 scale = (F32)scale_spinner->getValue().asReal();
 
     LLMatrix4 scale_mat;
     scale_mat.initScale(LLVector3(scale, scale, scale));
@@ -1290,7 +1290,7 @@ void LLModelPreview::generateNormals()
         return;
     }
 
-    F32 angle_cutoff = mFMP->childGetValue("crease_angle").asReal();
+    F32 angle_cutoff = (F32)mFMP->childGetValue("crease_angle").asReal();
 
     mRequestedCreaseAngle[which_lod] = angle_cutoff;
 
@@ -1489,7 +1489,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
         target_indices = 3;
     }
 
-    size_new_indices = LLMeshOptimizer::simplifyU32(
+    size_new_indices = (S32)LLMeshOptimizer::simplifyU32(
         output_indices,
         source_indices,
         size_indices,
@@ -1730,7 +1730,7 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
         target_indices = 3;
     }
 
-    size_new_indices = LLMeshOptimizer::simplify(
+    size_new_indices = (S32)LLMeshOptimizer::simplify(
         output_indices,
         source_indices,
         size_indices,
@@ -1851,7 +1851,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
         {
             if (!enforce_tri_limit)
             {
-                triangle_limit = base_triangle_count;
+                triangle_limit = (F32)base_triangle_count;
                 // reset to default value for this lod
                 F32 pw = pow((F32)decimation, (F32)(LLModel::LOD_HIGH - which_lod));
 
@@ -1861,7 +1861,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
             {
 
                 // UI spacifies limit for all models of single lod
-                triangle_limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
+                triangle_limit = (F32)mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asReal();
 
             }
             // meshoptimizer doesn't use triangle limit, it uses indices limit, so convert it to aproximate ratio
@@ -1871,14 +1871,14 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
         else
         {
             // UI shows 0 to 100%, but meshoptimizer works with 0 to 1
-            lod_error_threshold = mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal() / 100.f;
+            lod_error_threshold = (F32)mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal() / 100.f;
         }
     }
     else
     {
         // we are genrating all lods and each lod will get own indices_decimator
         indices_decimator = 1;
-        triangle_limit = base_triangle_count;
+        triangle_limit = (F32)base_triangle_count;
     }
 
     mMaxTriangleLimit = base_triangle_count;
@@ -1906,7 +1906,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
             }
         }
 
-        mRequestedTriangleCount[lod] = triangle_limit;
+        mRequestedTriangleCount[lod] = (S32)triangle_limit;
         mRequestedErrorThreshold[lod] = lod_error_threshold * 100;
         mRequestedLoDMode[lod] = lod_mode;
 
@@ -2748,7 +2748,7 @@ void LLModelPreview::updateLodControls(S32 lod)
         LLSpinCtrl* threshold = mFMP->getChild<LLSpinCtrl>("lod_error_threshold_" + lod_name[lod]);
         LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit_" + lod_name[lod]);
 
-        limit->setMaxValue(mMaxTriangleLimit);
+        limit->setMaxValue((F32)mMaxTriangleLimit);
         limit->forceSetValue(mRequestedTriangleCount[lod]);
 
         threshold->forceSetValue(mRequestedErrorThreshold[lod]);
@@ -2760,8 +2760,8 @@ void LLModelPreview::updateLodControls(S32 lod)
             limit->setVisible(true);
             threshold->setVisible(false);
 
-            limit->setMaxValue(mMaxTriangleLimit);
-            limit->setIncrement(llmax((U32)1, mMaxTriangleLimit / 32));
+            limit->setMaxValue((F32)mMaxTriangleLimit);
+            limit->setIncrement((F32)llmax((U32)1, mMaxTriangleLimit / 32));
         }
         else
         {
@@ -3222,7 +3222,7 @@ bool LLModelPreview::render()
         gGL.matrixMode(LLRender::MM_PROJECTION);
         gGL.pushMatrix();
         gGL.loadIdentity();
-        gGL.ortho(0.0f, width, 0.0f, height, -1.0f, 1.0f);
+        gGL.ortho(0.0f, (F32)width, 0.0f, (F32)height, -1.0f, 1.0f);
 
         gGL.matrixMode(LLRender::MM_MODELVIEW);
         gGL.pushMatrix();
@@ -3360,7 +3360,7 @@ bool LLModelPreview::render()
         mFMP->childSetEnabled("upload_joints", upload_skin);
     }
 
-    F32 explode = mFMP->childGetValue("physics_explode").asReal();
+    F32 explode = (F32)mFMP->childGetValue("physics_explode").asReal();
 
     LLGLDepthTest gls_depth(GL_TRUE); // SL-12781 re-enable z-buffer for 3D model preview
 
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index da5bc4b05d..dfead5ee8a 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -705,7 +705,7 @@ void LLNavigationBar::resizeLayoutPanel()
 {
     LLRect nav_bar_rect = mNavigationPanel->getRect();
 
-    S32 nav_panel_width = (nav_bar_rect.getWidth() + mFavoritePanel->getRect().getWidth()) * gSavedPerAccountSettings.getF32("NavigationBarRatio");
+    S32 nav_panel_width = (S32)((nav_bar_rect.getWidth() + mFavoritePanel->getRect().getWidth()) * gSavedPerAccountSettings.getF32("NavigationBarRatio"));
 
     nav_bar_rect.setLeftTopAndSize(nav_bar_rect.mLeft, nav_bar_rect.mTop, nav_panel_width, nav_bar_rect.getHeight());
     mNavigationPanel->handleReshape(nav_bar_rect,true);
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index fd968d9027..3f370b1ab5 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -435,7 +435,7 @@ void LLNetMap::draw()
             }
 
             F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
-                                          LLVector2(local_mouse_x,local_mouse_y));
+                                          LLVector2((F32)local_mouse_x, (F32)local_mouse_y));
             if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
             {
                 closest_dist_squared = dist_to_cursor_squared;
@@ -475,7 +475,7 @@ void LLNetMap::draw()
                       dot_width);
 
             F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
-                                          LLVector2(local_mouse_x,local_mouse_y));
+                                          LLVector2((F32)local_mouse_x, (F32)local_mouse_y));
             if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
             {
                 mClosestAgentToCursor = gAgent.getID();
@@ -671,7 +671,7 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
 bool LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
 {
     // note that clicks are reversed from what you'd think: i.e. > 0  means zoom out, < 0 means zoom in
-    F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
+    F32 new_scale = mScale * (F32)pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
     F32 old_scale = mScale;
 
     setScale(new_scale);
@@ -681,8 +681,8 @@ bool LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
     {
         // Adjust pan to center the zoom on the mouse pointer
         LLVector2 zoom_offset;
-        zoom_offset.mV[VX] = x - getRect().getWidth() / 2;
-        zoom_offset.mV[VY] = y - getRect().getHeight() / 2;
+        zoom_offset.mV[VX] = (F32)(x - getRect().getWidth() / 2);
+        zoom_offset.mV[VY] = (F32)(y - getRect().getHeight() / 2);
         mCurPan -= zoom_offset * mScale / old_scale - zoom_offset;
     }
 
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index c7fa96edca..0c4ef6f943 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -121,12 +121,12 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification, bo
     if (exp_time > cur_time)
     {
         // we have non-default expiration time - keep visible until expires
-        p.lifetime_secs = exp_time.secondsSinceEpoch() - cur_time.secondsSinceEpoch();
+        p.lifetime_secs = (F32)(exp_time.secondsSinceEpoch() - cur_time.secondsSinceEpoch());
     }
     else
     {
         // use default time
-        p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
+        p.lifetime_secs = (F32)gSavedSettings.getS32("NotificationTipToastLifeTime");
     }
 
     LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 9fe8f39bd6..1faf241aaa 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -479,8 +479,8 @@ void LLPanelClassifiedInfo::stretchSnapshot()
     // Lets increase texture height to force texture look as expected.
     rc.mBottom -= BTN_HEIGHT_SMALL;
 
-    F32 t_width = texture->getFullWidth();
-    F32 t_height = texture->getFullHeight();
+    F32 t_width = (F32)texture->getFullWidth();
+    F32 t_height = (F32)texture->getFullHeight();
 
     F32 ratio = llmin<F32>( (rc.getWidth() / t_width), (rc.getHeight() / t_height) );
 
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 5255b3763c..ea2b2ba944 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -248,7 +248,7 @@ void LLPanelSettingsSkyAtmosTab::onBlueDensityChanged()
 void LLPanelSettingsSkyAtmosTab::onHazeHorizonChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setHazeHorizon(getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
+    mSkySettings->setHazeHorizon((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -256,7 +256,7 @@ void LLPanelSettingsSkyAtmosTab::onHazeHorizonChanged()
 void LLPanelSettingsSkyAtmosTab::onHazeDensityChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setHazeDensity(getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
+    mSkySettings->setHazeDensity((F32)getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -264,7 +264,7 @@ void LLPanelSettingsSkyAtmosTab::onHazeDensityChanged()
 void LLPanelSettingsSkyAtmosTab::onSceneGammaChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setGamma(getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
+    mSkySettings->setGamma((F32)getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -272,7 +272,7 @@ void LLPanelSettingsSkyAtmosTab::onSceneGammaChanged()
 void LLPanelSettingsSkyAtmosTab::onDensityMultipChanged()
 {
     if (!mSkySettings) return;
-    F32 density_mult = getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->getValue().asReal();
+    F32 density_mult = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->getValue().asReal();
     density_mult *= SLIDER_SCALE_DENSITY_MULTIPLIER;
     mSkySettings->setDensityMultiplier(density_mult);
     mSkySettings->update();
@@ -282,7 +282,7 @@ void LLPanelSettingsSkyAtmosTab::onDensityMultipChanged()
 void LLPanelSettingsSkyAtmosTab::onDistanceMultipChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setDistanceMultiplier(getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->getValue().asReal());
+    mSkySettings->setDistanceMultiplier((F32)getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -290,7 +290,7 @@ void LLPanelSettingsSkyAtmosTab::onDistanceMultipChanged()
 void LLPanelSettingsSkyAtmosTab::onMaxAltChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setMaxY(getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->getValue().asReal());
+    mSkySettings->setMaxY((F32)getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -298,7 +298,7 @@ void LLPanelSettingsSkyAtmosTab::onMaxAltChanged()
 void LLPanelSettingsSkyAtmosTab::onMoistureLevelChanged()
 {
     if (!mSkySettings) return;
-    F32 moisture_level  = getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->getValue().asReal();
+    F32 moisture_level = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->getValue().asReal();
     mSkySettings->setSkyMoistureLevel(moisture_level);
     mSkySettings->update();
     setIsDirty();
@@ -307,7 +307,7 @@ void LLPanelSettingsSkyAtmosTab::onMoistureLevelChanged()
 void LLPanelSettingsSkyAtmosTab::onDropletRadiusChanged()
 {
     if (!mSkySettings) return;
-    F32 droplet_radius = getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->getValue().asReal();
+    F32 droplet_radius = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->getValue().asReal();
     mSkySettings->setSkyDropletRadius(droplet_radius);
     mSkySettings->update();
     setIsDirty();
@@ -316,7 +316,7 @@ void LLPanelSettingsSkyAtmosTab::onDropletRadiusChanged()
 void LLPanelSettingsSkyAtmosTab::onIceLevelChanged()
 {
     if (!mSkySettings) return;
-    F32 ice_level = getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->getValue().asReal();
+    F32 ice_level = (F32)getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->getValue().asReal();
     mSkySettings->setSkyIceLevel(ice_level);
     mSkySettings->update();
     setIsDirty();
@@ -325,7 +325,7 @@ void LLPanelSettingsSkyAtmosTab::onIceLevelChanged()
 void LLPanelSettingsSkyAtmosTab::onReflectionProbeAmbianceChanged()
 {
     if (!mSkySettings) return;
-    F32 ambiance = getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
+    F32 ambiance = (F32)getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->getValue().asReal();
 
     mSkySettings->setReflectionProbeAmbiance(ambiance);
     mSkySettings->update();
@@ -446,7 +446,7 @@ void LLPanelSettingsSkyCloudTab::onCloudColorChanged()
 void LLPanelSettingsSkyCloudTab::onCloudCoverageChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setCloudShadow(getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
+    mSkySettings->setCloudShadow((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -454,14 +454,14 @@ void LLPanelSettingsSkyCloudTab::onCloudCoverageChanged()
 void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setCloudScale(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
+    mSkySettings->setCloudScale((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsSkyCloudTab::onCloudVarianceChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setCloudVariance(getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->getValue().asReal());
+    mSkySettings->setCloudVariance((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->getValue().asReal());
     setIsDirty();
 }
 
@@ -484,9 +484,9 @@ void LLPanelSettingsSkyCloudTab::onCloudMapChanged()
 void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
 {
     if (!mSkySettings) return;
-    LLColor3 density(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
-        getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
-        getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
+    LLColor3 density((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
+        (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
+        (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
 
     mSkySettings->setCloudPosDensity1(density);
     setIsDirty();
@@ -495,9 +495,9 @@ void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
 void LLPanelSettingsSkyCloudTab::onCloudDetailChanged()
 {
     if (!mSkySettings) return;
-    LLColor3 detail(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->getValue().asReal(),
-        getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->getValue().asReal(),
-        getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->getValue().asReal());
+    LLColor3 detail((F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->getValue().asReal(),
+        (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->getValue().asReal(),
+        (F32)getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->getValue().asReal());
 
     mSkySettings->setCloudPosDensity2(detail);
     setIsDirty();
@@ -626,7 +626,7 @@ void LLPanelSettingsSkySunMoonTab::onSunMoonColorChanged()
 void LLPanelSettingsSkySunMoonTab::onGlowChanged()
 {
     if (!mSkySettings) return;
-    LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
+    LLColor3 glow((F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, (F32)getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal());
 
     // takes 0 - 1.99 UI range -> 40 -> 0.2 range
     glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R;
@@ -640,7 +640,7 @@ void LLPanelSettingsSkySunMoonTab::onGlowChanged()
 void LLPanelSettingsSkySunMoonTab::onStarBrightnessChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setStarBrightness(getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
+    mSkySettings->setStarBrightness((F32)getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal());
     mSkySettings->update();
     setIsDirty();
 }
@@ -663,8 +663,8 @@ void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()
 
 void LLPanelSettingsSkySunMoonTab::onSunAzimElevChanged()
 {
-    F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
-    F32 elevation = getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
+    F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_AZIMUTH)->getValue().asReal();
+    F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_SUN_ELEVATION)->getValue().asReal();
     LLQuaternion quat;
 
     azimuth *= DEG_TO_RAD;
@@ -693,7 +693,7 @@ void LLPanelSettingsSkySunMoonTab::onSunAzimElevChanged()
 void LLPanelSettingsSkySunMoonTab::onSunScaleChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setSunScale((getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
+    mSkySettings->setSunScale((F32)(getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
     mSkySettings->update();
     setIsDirty();
 }
@@ -725,8 +725,8 @@ void LLPanelSettingsSkySunMoonTab::onMoonRotationChanged()
 
 void LLPanelSettingsSkySunMoonTab::onMoonAzimElevChanged()
 {
-    F32 azimuth = getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
-    F32 elevation = getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
+    F32 azimuth = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_AZIMUTH)->getValue().asReal();
+    F32 elevation = (F32)getChild<LLUICtrl>(FIELD_SKY_MOON_ELEVATION)->getValue().asReal();
     LLQuaternion quat;
 
     azimuth *= DEG_TO_RAD;
@@ -763,7 +763,7 @@ void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()
 void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setMoonScale((getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal()));
+    mSkySettings->setMoonScale((F32)(getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal()));
     mSkySettings->update();
     setIsDirty();
 }
@@ -771,7 +771,7 @@ void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged()
 void LLPanelSettingsSkySunMoonTab::onMoonBrightnessChanged()
 {
     if (!mSkySettings) return;
-    mSkySettings->setMoonBrightness((getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->getValue().asReal()));
+    mSkySettings->setMoonBrightness((F32)(getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->getValue().asReal()));
     mSkySettings->update();
     setIsDirty();
 }
@@ -851,24 +851,24 @@ void LLPanelSettingsSkyDensityTab::refresh()
     LLSD mie_config         = mSkySettings->getMieConfig();
     LLSD absorption_config  = mSkySettings->getAbsorptionConfig();
 
-    F32 rayleigh_exponential_term    = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
-    F32 rayleigh_exponential_scale   = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
-    F32 rayleigh_linear_term         = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
-    F32 rayleigh_constant_term       = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
-    F32 rayleigh_max_alt             = rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-
-    F32 mie_exponential_term         = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
-    F32 mie_exponential_scale        = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
-    F32 mie_linear_term              = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
-    F32 mie_constant_term            = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
-    F32 mie_aniso_factor             = mie_config[LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR].asReal();
-    F32 mie_max_alt                  = mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-
-    F32 absorption_exponential_term  = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
-    F32 absorption_exponential_scale = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
-    F32 absorption_linear_term       = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
-    F32 absorption_constant_term     = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
-    F32 absorption_max_alt           = absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+    F32 rayleigh_exponential_term    = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+    F32 rayleigh_exponential_scale   = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+    F32 rayleigh_linear_term         = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+    F32 rayleigh_constant_term       = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
+    F32 rayleigh_max_alt             = (F32)rayleigh_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+
+    F32 mie_exponential_term         = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+    F32 mie_exponential_scale        = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+    F32 mie_linear_term              = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+    F32 mie_constant_term            = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
+    F32 mie_aniso_factor             = (F32)mie_config[LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR].asReal();
+    F32 mie_max_alt                  = (F32)mie_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
+
+    F32 absorption_exponential_term  = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+    F32 absorption_exponential_scale = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
+    F32 absorption_linear_term       = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
+    F32 absorption_constant_term     = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
+    F32 absorption_max_alt           = (F32)absorption_config[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
 
     getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setValue(rayleigh_exponential_term);
     getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setValue(rayleigh_exponential_scale);
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index 236cb6b97c..174a416fb4 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -170,14 +170,14 @@ void LLPanelSettingsWaterMainTab::onFogColorChanged()
 void LLPanelSettingsWaterMainTab::onFogDensityChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setWaterFogDensity(getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->getValue().asReal());
+    mWaterSettings->setWaterFogDensity((F32)getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsWaterMainTab::onFogUnderWaterChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setFogMod(getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->getValue().asReal());
+    mWaterSettings->setFogMod((F32)getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->getValue().asReal());
     setIsDirty();
 }
 
@@ -210,7 +210,7 @@ void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
 void LLPanelSettingsWaterMainTab::onNormalScaleChanged()
 {
     if (!mWaterSettings) return;
-    LLVector3 vect(getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->getValue().asReal());
+    LLVector3 vect((F32)getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->getValue().asReal(), (F32)getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->getValue().asReal(), (F32)getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->getValue().asReal());
     mWaterSettings->setNormalScale(vect);
     setIsDirty();
 }
@@ -218,34 +218,34 @@ void LLPanelSettingsWaterMainTab::onNormalScaleChanged()
 void LLPanelSettingsWaterMainTab::onFresnelScaleChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setFresnelScale(getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->getValue().asReal());
+    mWaterSettings->setFresnelScale((F32)getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsWaterMainTab::onFresnelOffsetChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setFresnelOffset(getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->getValue().asReal());
+    mWaterSettings->setFresnelOffset((F32)getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsWaterMainTab::onScaleAboveChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setScaleAbove(getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->getValue().asReal());
+    mWaterSettings->setScaleAbove((F32)getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsWaterMainTab::onScaleBelowChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setScaleBelow(getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->getValue().asReal());
+    mWaterSettings->setScaleBelow((F32)getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->getValue().asReal());
     setIsDirty();
 }
 
 void LLPanelSettingsWaterMainTab::onBlurMultipChanged()
 {
     if (!mWaterSettings) return;
-    mWaterSettings->setBlurMultiplier(getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->getValue().asReal());
+    mWaterSettings->setBlurMultiplier((F32)getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->getValue().asReal());
     setIsDirty();
 }
diff --git a/indra/newview/llpanelemojicomplete.cpp b/indra/newview/llpanelemojicomplete.cpp
index 3faa01ae0c..cb89a5910e 100644
--- a/indra/newview/llpanelemojicomplete.cpp
+++ b/indra/newview/llpanelemojicomplete.cpp
@@ -110,8 +110,8 @@ void LLPanelEmojiComplete::draw()
 
     F32 iconCenterX = mRenderRect.mLeft + (F32)mEmojiWidth / 2;
     F32 iconCenterY = mRenderRect.mTop - (F32)mEmojiHeight / 2;
-    F32 textLeft = mVertical ? mRenderRect.mLeft + mEmojiWidth + mPadding : 0;
-    F32 textWidth = mVertical ? getRect().getWidth() - textLeft - mPadding : 0;
+    F32 textLeft = mVertical ? (F32)(mRenderRect.mLeft + mEmojiWidth + mPadding) : 0.f;
+    F32 textWidth = mVertical ? (F32)(getRect().getWidth() - textLeft - mPadding) : 0.f;
 
     for (size_t curIdx = firstVisibleIdx; curIdx < lastVisibleIdx; curIdx++)
     {
@@ -129,7 +129,7 @@ void LLPanelEmojiComplete::draw()
                 std::string text = shortCode.substr(0, mEmojis[curIdx].Begin);
                 mTextFont->renderUTF8(text, 0, x0, iconCenterY, LLColor4::white,
                     LLFontGL::LEFT, LLFontGL::VCENTER, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
-                    static_cast<S32>(text.size()), x1);
+                    static_cast<S32>(text.size()), (S32)x1);
                 x0 += mTextFont->getWidthF32(text);
                 x1 = textLeft + textWidth - x0;
             }
@@ -138,7 +138,7 @@ void LLPanelEmojiComplete::draw()
                 std::string text = shortCode.substr(mEmojis[curIdx].Begin, mEmojis[curIdx].End - mEmojis[curIdx].Begin);
                 mTextFont->renderUTF8(text, 0, x0, iconCenterY, LLColor4::yellow6,
                     LLFontGL::LEFT, LLFontGL::VCENTER, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
-                    static_cast<S32>(text.size()), x1);
+                    static_cast<S32>(text.size()), (S32)x1);
                 x0 += mTextFont->getWidthF32(text);
                 x1 = textLeft + textWidth - x0;
             }
@@ -147,7 +147,7 @@ void LLPanelEmojiComplete::draw()
                 std::string text = shortCode.substr(mEmojis[curIdx].End);
                 mTextFont->renderUTF8(text, 0, x0, iconCenterY, LLColor4::white,
                     LLFontGL::LEFT, LLFontGL::VCENTER, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
-                    static_cast<S32>(text.size()), x1);
+                    static_cast<S32>(text.size()), (S32)x1);
             }
             iconCenterY -= mEmojiHeight;
         }
@@ -163,7 +163,7 @@ bool LLPanelEmojiComplete::handleHover(S32 x, S32 y, MASK mask)
     if (mScrollbar && mScrollbar->getVisible() && childrenHandleHover(x, y, mask))
         return true;
 
-    LLVector2 curHover(x, y);
+    LLVector2 curHover((F32)x, (F32)y);
     if ((mLastHover - curHover).lengthSquared() > MIN_MOUSE_MOVE_DELTA)
     {
         size_t index = posToIndex(x, y);
@@ -235,7 +235,7 @@ bool LLPanelEmojiComplete::handleMouseDown(S32 x, S32 y, MASK mask)
         return true;
 
     mCurSelected = posToIndex(x, y);
-    mLastHover = LLVector2(x, y);
+    mLastHover = LLVector2((F32)x, (F32)y);
 
     return true;
 }
@@ -438,7 +438,7 @@ void LLPanelEmojiComplete::updateConstraints()
 {
     mRenderRect = getLocalRect();
 
-    mEmojiWidth = mIconFont->getWidthF32(u8"\U0001F431") + mPadding * 2;
+    mEmojiWidth = (U16)(mIconFont->getWidthF32(u8"\U0001F431") + mPadding * 2);
     if (mVertical)
     {
         mEmojiHeight = mIconFont->getLineHeight() + mPadding * 2;
@@ -481,7 +481,7 @@ void LLPanelEmojiComplete::updateScrollPos()
     }
     else
     {
-        mScrollPos = mCurSelected - ((float)mCurSelected / (mTotalEmojis - 2) * (mVisibleEmojis - 2));
+        mScrollPos = (size_t)(mCurSelected - ((float)mCurSelected / (mTotalEmojis - 2) * (mVisibleEmojis - 2)));
     }
 
     if (mScrollbar && mScrollbar->getVisible())
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 43612865fc..a706e339ea 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -173,10 +173,10 @@ bool LLPanelEnvironmentInfo::postBuild()
     getChild<LLUICtrl>(BTN_EDIT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnEdit(); });
     getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnRstAltitudes(); });
 
-    getChild<LLUICtrl>(SLD_DAYLENGTH)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged(value.asReal()); });
+    getChild<LLUICtrl>(SLD_DAYLENGTH)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged((F32)value.asReal()); });
     getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
     getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
-    getChild<LLUICtrl>(SLD_DAYOFFSET)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged(value.asReal()); });
+    getChild<LLUICtrl>(SLD_DAYOFFSET)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged((F32)value.asReal()); });
     getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
     getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
 
@@ -193,7 +193,7 @@ bool LLPanelEnvironmentInfo::postBuild()
             drop_target->setPanel(this, alt_sliders[idx]);
         }
         // set initial values to prevent [ALTITUDE] from displaying
-        updateAltLabel(alt_prefixes[idx], idx + 2, idx * 1000);
+        updateAltLabel(alt_prefixes[idx], idx + 2, (F32)(idx * 1000));
     }
     getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]);
     getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]);
@@ -554,7 +554,7 @@ void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_prefix, U32 s
     S32 sld_range = sld_rect.getHeight();
     S32 sld_bottom = sld_rect.mBottom;
     S32 sld_offset = sld_rect.getWidth(); // Roughly identical to thumb's width in slider.
-    S32 pos = (sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100));
+    S32 pos = (S32)((sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100)));
 
     // get related views
     LLTextBox* text = findChild<LLTextBox>("txt_" + alt_prefix);
@@ -647,15 +647,15 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
     // Account for edges
     LLRect midle_rect = view_midle->getRect();
     F32 factor = 0.5f;
-    S32 edge_zone_height = midle_rect.getHeight() * 1.5f;
+    S32 edge_zone_height = (S32)(midle_rect.getHeight() * 1.5f);
 
     if (midle_rect.mBottom - sld_rect.mBottom < edge_zone_height)
     {
-        factor = 1 - ((midle_rect.mBottom - sld_rect.mBottom) / (edge_zone_height * 2));
+        factor = 1.f - (F32)((midle_rect.mBottom - sld_rect.mBottom) / (edge_zone_height * 2));
     }
     else if (sld_rect.mTop - midle_rect.mTop < edge_zone_height )
     {
-        factor = ((sld_rect.mTop - midle_rect.mTop) / (edge_zone_height * 2));
+        factor = (F32)((sld_rect.mTop - midle_rect.mTop) / (edge_zone_height * 2));
     }
 
     S32 shift_middle = (S32)(((F32)shift_down * factor) + ((F32)shift_up * (1.f - factor)));
@@ -739,8 +739,8 @@ void LLPanelEnvironmentInfo::commitDayLenOffsetChanges(bool need_callback)
         {
             LLEnvironment::instance().updateParcel(getParcelId(),
                                                    LLSettingsDay::ptr_t(),
-                                                   mCurrentEnvironment->mDayLength.value(),
-                                                   mCurrentEnvironment->mDayOffset.value(),
+                                                   (S32)mCurrentEnvironment->mDayLength.value(),
+                                                   (S32)mCurrentEnvironment->mDayOffset.value(),
                                                    LLEnvironment::altitudes_vect_t(),
                                                    [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
         }
@@ -748,8 +748,8 @@ void LLPanelEnvironmentInfo::commitDayLenOffsetChanges(bool need_callback)
         {
             LLEnvironment::instance().updateParcel(getParcelId(),
                                                    LLSettingsDay::ptr_t(),
-                                                   mCurrentEnvironment->mDayLength.value(),
-                                                   mCurrentEnvironment->mDayOffset.value(),
+                                                   (S32)mCurrentEnvironment->mDayLength.value(),
+                                                   (S32)mCurrentEnvironment->mDayOffset.value(),
                                                    LLEnvironment::altitudes_vect_t());
         }
 
@@ -813,8 +813,8 @@ void LLPanelEnvironmentInfo::onAltSliderMouseUp()
         setControlsEnabled(false);
         LLEnvironment::instance().updateParcel(getParcelId(),
                                                LLSettingsDay::ptr_t(),
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayLength.value() : -1,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayOffset.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                alts);
     }
 }
@@ -894,8 +894,8 @@ void LLPanelEnvironmentInfo::onBtnRstAltitudes()
 
         LLEnvironment::instance().updateParcel(getParcelId(),
                                                LLSettingsDay::ptr_t(),
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayLength.value() : -1,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayOffset.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                alts,
             [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
     }
@@ -912,7 +912,7 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
     }
     getChild<LLUICtrl>(LBL_TIMEOFDAY)->setVisible(true);
 
-    S32Seconds  now(LLDate::now().secondsSinceEpoch());
+    S32Seconds now((S32)LLDate::now().secondsSinceEpoch());
 
     now += mCurrentEnvironment->mDayOffset;
 
@@ -984,8 +984,8 @@ void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, S32 track_num)
                                                itemp->getAssetUUID(),
                                                itemp->getName(),
                                                track_num,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayLength.value() : -1,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayOffset.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                flags,
                                                LLEnvironment::altitudes_vect_t(),
             [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
@@ -1018,8 +1018,8 @@ void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday)
 
         LLEnvironment::instance().updateParcel(getParcelId(),
                                                newday,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayLength.value() : -1,
-                                               mCurrentEnvironment ? mCurrentEnvironment->mDayOffset.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
+                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                LLEnvironment::altitudes_vect_t(),
             [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
     }
diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp
index 24c9d7dced..5380565ace 100644
--- a/indra/newview/llpanelexperiencelog.cpp
+++ b/indra/newview/llpanelexperiencelog.cpp
@@ -76,7 +76,7 @@ bool LLPanelExperienceLog::postBuild()
 
 
     LLSpinCtrl* spin = getChild<LLSpinCtrl>("logsizespinner");
-    spin->set(log->getMaxDays());
+    spin->set((F32)log->getMaxDays());
     spin->setCommitCallback(boost::bind(&LLPanelExperienceLog::logSizeChanged, this));
 
     mPageSize = log->getPageSize();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 89af765bb7..00338d3125 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -245,19 +245,19 @@ LLUUID  LLPanelFace::getCurrentSpecularMap()        { return getChild<LLTextureC
 U32     LLPanelFace::getCurrentShininess()          { return getChild<LLComboBox>("combobox shininess")->getCurrentIndex();         }
 U32     LLPanelFace::getCurrentBumpiness()          { return getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex();         }
 U8          LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
-U8          LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger();          }
-U8          LLPanelFace::getCurrentEnvIntensity()       { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger();         }
-U8          LLPanelFace::getCurrentGlossiness()         { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger();          }
-F32     LLPanelFace::getCurrentBumpyRot()           { return getChild<LLUICtrl>("bumpyRot")->getValue().asReal();                       }
-F32     LLPanelFace::getCurrentBumpyScaleU()        { return getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal();                    }
-F32     LLPanelFace::getCurrentBumpyScaleV()        { return getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal();                    }
-F32     LLPanelFace::getCurrentBumpyOffsetU()       { return getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal();                   }
-F32     LLPanelFace::getCurrentBumpyOffsetV()       { return getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal();                   }
-F32     LLPanelFace::getCurrentShinyRot()           { return getChild<LLUICtrl>("shinyRot")->getValue().asReal();                       }
-F32     LLPanelFace::getCurrentShinyScaleU()        { return getChild<LLUICtrl>("shinyScaleU")->getValue().asReal();                    }
-F32     LLPanelFace::getCurrentShinyScaleV()        { return getChild<LLUICtrl>("shinyScaleV")->getValue().asReal();                    }
-F32     LLPanelFace::getCurrentShinyOffsetU()       { return getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal();                   }
-F32     LLPanelFace::getCurrentShinyOffsetV()       { return getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal();                   }
+U8          LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger();      }
+U8          LLPanelFace::getCurrentEnvIntensity()       { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger();     }
+U8          LLPanelFace::getCurrentGlossiness()         { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger();      }
+F32     LLPanelFace::getCurrentBumpyRot()           { return (F32)getChild<LLUICtrl>("bumpyRot")->getValue().asReal();              }
+F32     LLPanelFace::getCurrentBumpyScaleU()        { return (F32)getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal();           }
+F32     LLPanelFace::getCurrentBumpyScaleV()        { return (F32)getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal();           }
+F32     LLPanelFace::getCurrentBumpyOffsetU()       { return (F32)getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal();          }
+F32     LLPanelFace::getCurrentBumpyOffsetV()       { return (F32)getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal();          }
+F32     LLPanelFace::getCurrentShinyRot()           { return (F32)getChild<LLUICtrl>("shinyRot")->getValue().asReal();              }
+F32     LLPanelFace::getCurrentShinyScaleU()        { return (F32)getChild<LLUICtrl>("shinyScaleU")->getValue().asReal();           }
+F32     LLPanelFace::getCurrentShinyScaleV()        { return (F32)getChild<LLUICtrl>("shinyScaleV")->getValue().asReal();           }
+F32     LLPanelFace::getCurrentShinyOffsetU()       { return (F32)getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal();          }
+F32     LLPanelFace::getCurrentShinyOffsetV()       { return (F32)getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal();          }
 
 //
 // Methods
@@ -1854,13 +1854,13 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
         // Set variable values for numeric expressions
         LLCalc* calcp = LLCalc::getInstance();
-        calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal());
-        calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal());
-        calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal());
-        calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal());
-        calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal());
-        calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal());
-        calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal());
+        calcp->setVar(LLCalc::TEX_U_SCALE, (F32)childGetValue("TexScaleU").asReal());
+        calcp->setVar(LLCalc::TEX_V_SCALE, (F32)childGetValue("TexScaleV").asReal());
+        calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)childGetValue("TexOffsetU").asReal());
+        calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)childGetValue("TexOffsetV").asReal());
+        calcp->setVar(LLCalc::TEX_ROTATION, (F32)childGetValue("TexRot").asReal());
+        calcp->setVar(LLCalc::TEX_TRANSPARENCY, (F32)childGetValue("ColorTrans").asReal());
+        calcp->setVar(LLCalc::TEX_GLOW, (F32)childGetValue("glow").asReal());
     }
     else
     {
@@ -3777,7 +3777,7 @@ void LLPanelFace::onCommitTextureScaleX( LLUICtrl* ctrl, void* userdata )
     LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_u = self->getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
+        F32 bumpy_scale_u = (F32)self->getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
         if (self->isIdenticalPlanarTexgen())
         {
             bumpy_scale_u *= 0.5f;
@@ -3797,7 +3797,7 @@ void LLPanelFace::onCommitTextureScaleY( LLUICtrl* ctrl, void* userdata )
     LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_v = self->getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
+        F32 bumpy_scale_v = (F32)self->getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
         if (self->isIdenticalPlanarTexgen())
         {
             bumpy_scale_v *= 0.5f;
@@ -3818,7 +3818,7 @@ void LLPanelFace::onCommitTextureRot( LLUICtrl* ctrl, void* userdata )
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncMaterialRot(self, self->getChild<LLUICtrl>("TexRot")->getValue().asReal());
+        syncMaterialRot(self, (F32)self->getChild<LLUICtrl>("TexRot")->getValue().asReal());
     }
     else
     {
@@ -3833,7 +3833,7 @@ void LLPanelFace::onCommitTextureOffsetX( LLUICtrl* ctrl, void* userdata )
     LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetX(self, self->getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
+        syncOffsetX(self, (F32)self->getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
     }
     else
     {
@@ -3848,7 +3848,7 @@ void LLPanelFace::onCommitTextureOffsetY( LLUICtrl* ctrl, void* userdata )
     LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetY(self, self->getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
+        syncOffsetY(self, (F32)self->getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
     }
     else
     {
@@ -3861,27 +3861,27 @@ void LLPanelFace::onCommitTextureOffsetY( LLUICtrl* ctrl, void* userdata )
 // static
 void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
+    LLPanelFace *self = (LLPanelFace *) userdata;
 
-    LLUICtrl*   repeats_ctrl    = self->getChild<LLUICtrl>("rptctrl");
+    LLUICtrl *repeats_ctrl = self->getChild<LLUICtrl>("rptctrl");
 
     U32 materials_media = self->mComboMatMedia->getCurrentIndex();
-    U32 material_type = 0;
+    U32 material_type   = 0;
     if (materials_media == MATMEDIA_PBR)
     {
-        LLRadioGroup* radio_mat_type = self->getChild<LLRadioGroup>("radio_pbr_type");
-        material_type = radio_mat_type->getSelectedIndex();
+        LLRadioGroup *radio_mat_type = self->getChild<LLRadioGroup>("radio_pbr_type");
+        material_type                = radio_mat_type->getSelectedIndex();
     }
     if (materials_media == MATMEDIA_MATERIAL)
     {
-        LLRadioGroup* radio_mat_type = self->getChild<LLRadioGroup>("radio_material_type");
-        material_type = radio_mat_type->getSelectedIndex();
+        LLRadioGroup *radio_mat_type = self->getChild<LLRadioGroup>("radio_material_type");
+        material_type                = radio_mat_type->getSelectedIndex();
     }
 
-    F32 repeats_per_meter   = repeats_ctrl->getValue().asReal();
+    F32 repeats_per_meter = (F32) repeats_ctrl->getValue().asReal();
 
-   F32 obj_scale_s = 1.0f;
-   F32 obj_scale_t = 1.0f;
+    F32 obj_scale_s = 1.0f;
+    F32 obj_scale_t = 1.0f;
 
     bool identical_scale_s = false;
     bool identical_scale_t = false;
@@ -3889,10 +3889,10 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
     LLSelectedTE::getObjectScaleS(obj_scale_s, identical_scale_s);
     LLSelectedTE::getObjectScaleS(obj_scale_t, identical_scale_t);
 
-    LLUICtrl* bumpy_scale_u = self->getChild<LLUICtrl>("bumpyScaleU");
-    LLUICtrl* bumpy_scale_v = self->getChild<LLUICtrl>("bumpyScaleV");
-    LLUICtrl* shiny_scale_u = self->getChild<LLUICtrl>("shinyScaleU");
-    LLUICtrl* shiny_scale_v = self->getChild<LLUICtrl>("shinyScaleV");
+    LLUICtrl *bumpy_scale_u = self->getChild<LLUICtrl>("bumpyScaleU");
+    LLUICtrl *bumpy_scale_v = self->getChild<LLUICtrl>("bumpyScaleV");
+    LLUICtrl *shiny_scale_u = self->getChild<LLUICtrl>("shinyScaleU");
+    LLUICtrl *shiny_scale_v = self->getChild<LLUICtrl>("shinyScaleV");
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
@@ -5085,7 +5085,7 @@ bool LLPanelFace::Selection::compareSelection()
 
 void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
 {
-    const float value = ctrl->getValue().asReal();
+    const float value = (F32)ctrl->getValue().asReal();
     const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
@@ -5095,7 +5095,7 @@ void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
 
 void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
 {
-    const float value = ctrl->getValue().asReal();
+    const float value = (F32)ctrl->getValue().asReal();
     const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
@@ -5105,7 +5105,7 @@ void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
 
 void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
 {
-    const float value = ctrl->getValue().asReal() * DEG_TO_RAD;
+    const float value = (F32)ctrl->getValue().asReal() * DEG_TO_RAD;
     const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
@@ -5115,7 +5115,7 @@ void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
 
 void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
 {
-    const float value = ctrl->getValue().asReal();
+    const float value = (F32)ctrl->getValue().asReal();
     const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
@@ -5125,7 +5125,7 @@ void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
 
 void LLPanelFace::onCommitGLTFTextureOffsetV(LLUICtrl* ctrl)
 {
-    const float value = ctrl->getValue().asReal();
+    const float value = (F32)ctrl->getValue().asReal();
     const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index ba52da0760..bbf533b694 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1177,7 +1177,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
         return;
 
     // Get data needed for filter display
-    U32 filter_types = mFilter->getFilterObjectTypes();
+    U32 filter_types = (U32)mFilter->getFilterObjectTypes();
     LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
     U32 hours = mFilter->getHoursAgo();
     U32 date_search_direction = mFilter->getDateSearchDirection();
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 0925351350..35961da579 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -119,7 +119,7 @@ void LLPanelMarketplaceInbox::onFocusReceived()
         sidepanel_inventory->clearSelections(true, false);
         }
 
-    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", (U32)time_corrected());
 }
 
 bool LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index 526462b940..557c7bbd7b 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -225,7 +225,7 @@ void LLInboxFolderViewFolder::deFreshify()
 {
     mFresh = false;
 
-    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", (U32)time_corrected());
     LLInboxNewItemsStorage::getInstance()->removeItem(static_cast<LLFolderViewModelItemInventory*>(getViewModelItem())->getUUID());
 }
 
@@ -304,7 +304,7 @@ void LLInboxFolderViewItem::deFreshify()
 {
     mFresh = false;
 
-    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+    gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", (U32)time_corrected());
 }
 
 LLInboxNewItemsStorage::LLInboxNewItemsStorage()
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 2a27a6e143..aa35335ad9 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -986,7 +986,7 @@ void shorten_name(std::string &name, const LLStyle::Params& style_params, S32 ma
 
     LLWString wline = utf8str_to_wstring(name);
     // panel supports two lines long names
-    S32 segment_length = font->maxDrawableChars(wline.c_str(), max_pixels, static_cast<S32>(wline.length()), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
+    S32 segment_length = font->maxDrawableChars(wline.c_str(), (F32)max_pixels, static_cast<S32>(wline.length()), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
     if (segment_length == wline.length())
     {
         // no work needed
@@ -994,7 +994,7 @@ void shorten_name(std::string &name, const LLStyle::Params& style_params, S32 ma
     }
 
     S32 first_line_length = segment_length;
-    segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), max_pixels, static_cast<S32>(wline.length()), LLFontGL::ANYWHERE);
+    segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), (F32)max_pixels, static_cast<S32>(wline.length()), LLFontGL::ANYWHERE);
     if (segment_length + first_line_length == wline.length())
     {
         // no work needed
@@ -1003,8 +1003,8 @@ void shorten_name(std::string &name, const LLStyle::Params& style_params, S32 ma
 
     // name does not fit, cut it, add ...
     const LLWString dots_pad(utf8str_to_wstring(std::string("....")));
-    S32 elipses_width = font->getWidthF32(dots_pad.c_str());
-    segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), max_pixels - elipses_width, static_cast<S32>(wline.length()), LLFontGL::ANYWHERE);
+    F32 elipses_width = font->getWidthF32(dots_pad.c_str());
+    segment_length = font->maxDrawableChars(wline.substr(first_line_length).c_str(), (F32)max_pixels - elipses_width, static_cast<S32>(wline.length()), LLFontGL::ANYWHERE);
 
     name = name.substr(0, segment_length + first_line_length) + std::string("...");
 }
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 4ceeaa5d51..18588514f8 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -395,9 +395,9 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
     mPosRegion.setVec((F32)fmod(pos_global.mdV[VX], (F64)REGION_WIDTH_METERS),
                       (F32)fmod(pos_global.mdV[VY], (F64)REGION_WIDTH_METERS),
                       (F32)pos_global.mdV[VZ]);
-    parcel_data.global_x = pos_global.mdV[VX];
-    parcel_data.global_y = pos_global.mdV[VY];
-    parcel_data.global_z = pos_global.mdV[VZ];
+    parcel_data.global_x = (F32)pos_global.mdV[VX];
+    parcel_data.global_y = (F32)pos_global.mdV[VY];
+    parcel_data.global_z = (F32)pos_global.mdV[VZ];
     parcel_data.owner_id = parcel->getOwnerID();
 
     std::string on = getString("on");
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 1299c8c656..4e905ae0fd 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -421,7 +421,7 @@ void LLPanelPrimMediaControls::updateShape()
             if(mUpdateSlider && mMovieDuration!= 0)
             {
                 F64 current_time =  media_plugin->getCurrentTime();
-                F32 percent = current_time / mMovieDuration;
+                F32 percent = (F32)(current_time / mMovieDuration);
                 mMediaPlaySliderCtrl->setValue(percent);
                 mMediaPlaySliderCtrl->setEnabled(true);
             }
@@ -1309,7 +1309,7 @@ void LLPanelPrimMediaControls::onMediaPlaySliderCtrlMouseUp()
             }
             else
             {
-                media_impl->seek(cur_value * mMovieDuration);
+                media_impl->seek((F32)(cur_value * mMovieDuration));
             }
         }
 
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 2536dce606..69047a30cd 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -211,12 +211,12 @@ void LLPanelSnapshot::onCustomResolutionCommit()
         S32 width = widthSpinner->getValue().asInteger();
         width = power_of_two(width, MAX_TEXTURE_SIZE);
         info["w"] = width;
-        widthSpinner->setIncrement(width >> 1);
+        widthSpinner->setIncrement((F32)(width >> 1));
         widthSpinner->forceSetValue(width);
         S32 height =  heightSpinner->getValue().asInteger();
         height = power_of_two(height, MAX_TEXTURE_SIZE);
-        heightSpinner->setIncrement(height >> 1);
-        heightSpinner->forceSetValue(height);
+        heightSpinner->setIncrement((F32)(height >> 1));
+        heightSpinner->forceSetValue((F32)height);
         info["h"] = height;
     }
     else
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 4e096ecc95..951dc45a78 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -899,25 +899,25 @@ void LLPanelVolume::sendPhysicsShapeType(LLUICtrl* ctrl, void* userdata)
 
 void LLPanelVolume::sendPhysicsGravity(LLUICtrl* ctrl, void* userdata)
 {
-    F32 val = ctrl->getValue().asReal();
+    F32 val = (F32)ctrl->getValue().asReal();
     LLSelectMgr::getInstance()->selectionSetGravity(val);
 }
 
 void LLPanelVolume::sendPhysicsFriction(LLUICtrl* ctrl, void* userdata)
 {
-    F32 val = ctrl->getValue().asReal();
+    F32 val = (F32)ctrl->getValue().asReal();
     LLSelectMgr::getInstance()->selectionSetFriction(val);
 }
 
 void LLPanelVolume::sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata)
 {
-    F32 val = ctrl->getValue().asReal();
+    F32 val = (F32)ctrl->getValue().asReal();
     LLSelectMgr::getInstance()->selectionSetRestitution(val);
 }
 
 void LLPanelVolume::sendPhysicsDensity(LLUICtrl* ctrl, void* userdata)
 {
-    F32 val = ctrl->getValue().asReal();
+    F32 val = (F32)ctrl->getValue().asReal();
     LLSelectMgr::getInstance()->selectionSetDensity(val);
 }
 
@@ -1099,10 +1099,10 @@ void LLPanelVolume::onPasteFeatures()
 
         objectp->setMaterial(material);
         objectp->sendMaterialUpdate();
-        objectp->setPhysicsGravity(clipboard["physics"]["gravity"].asReal());
-        objectp->setPhysicsFriction(clipboard["physics"]["friction"].asReal());
-        objectp->setPhysicsDensity(clipboard["physics"]["density"].asReal());
-        objectp->setPhysicsRestitution(clipboard["physics"]["restitution"].asReal());
+        objectp->setPhysicsGravity((F32)clipboard["physics"]["gravity"].asReal());
+        objectp->setPhysicsFriction((F32)clipboard["physics"]["friction"].asReal());
+        objectp->setPhysicsDensity((F32)clipboard["physics"]["density"].asReal());
+        objectp->setPhysicsRestitution((F32)clipboard["physics"]["restitution"].asReal());
         objectp->updateFlags(true);
     }
 
@@ -1127,10 +1127,10 @@ void LLPanelVolume::onPasteFeatures()
             LLFlexibleObjectData new_attributes;
             new_attributes = *attributes;
             new_attributes.setSimulateLOD(clipboard["flex"]["lod"].asInteger());
-            new_attributes.setGravity(clipboard["flex"]["gav"].asReal());
-            new_attributes.setTension(clipboard["flex"]["ten"].asReal());
-            new_attributes.setAirFriction(clipboard["flex"]["fri"].asReal());
-            new_attributes.setWindSensitivity(clipboard["flex"]["sen"].asReal());
+            new_attributes.setGravity((F32)clipboard["flex"]["gav"].asReal());
+            new_attributes.setTension((F32)clipboard["flex"]["ten"].asReal());
+            new_attributes.setAirFriction((F32)clipboard["flex"]["fri"].asReal());
+            new_attributes.setWindSensitivity((F32)clipboard["flex"]["sen"].asReal());
             F32 fx = (F32)clipboard["flex"]["forx"].asReal();
             F32 fy = (F32)clipboard["flex"]["fory"].asReal();
             F32 fz = (F32)clipboard["flex"]["forz"].asReal();
diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp
index 66cc26469e..a6d26727f4 100644
--- a/indra/newview/llpathfindingcharacter.cpp
+++ b/indra/newview/llpathfindingcharacter.cpp
@@ -83,7 +83,7 @@ void LLPathfindingCharacter::parseCharacterData(const LLSD &pCharacterData)
 {
     llassert(pCharacterData.has(CHARACTER_CPU_TIME_FIELD));
     llassert(pCharacterData.get(CHARACTER_CPU_TIME_FIELD).isReal());
-    mCPUTime = pCharacterData.get(CHARACTER_CPU_TIME_FIELD).asReal();
+    mCPUTime = (F32)pCharacterData.get(CHARACTER_CPU_TIME_FIELD).asReal();
 
     llassert(pCharacterData.has(CHARACTER_HORIZONTAL_FIELD));
     llassert(pCharacterData.get(CHARACTER_HORIZONTAL_FIELD).isBoolean());
@@ -91,9 +91,9 @@ void LLPathfindingCharacter::parseCharacterData(const LLSD &pCharacterData)
 
     llassert(pCharacterData.has(CHARACTER_LENGTH_FIELD));
     llassert(pCharacterData.get(CHARACTER_LENGTH_FIELD).isReal());
-    mLength = pCharacterData.get(CHARACTER_LENGTH_FIELD).asReal();
+    mLength = (F32)pCharacterData.get(CHARACTER_LENGTH_FIELD).asReal();
 
     llassert(pCharacterData.has(CHARACTER_RADIUS_FIELD));
     llassert(pCharacterData.get(CHARACTER_RADIUS_FIELD).isReal());
-    mRadius = pCharacterData.get(CHARACTER_RADIUS_FIELD).asReal();
+    mRadius = (F32)pCharacterData.get(CHARACTER_RADIUS_FIELD).asReal();
 }
diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp
index 64f438976a..37bb59a65c 100644
--- a/indra/newview/llperfstats.cpp
+++ b/indra/newview/llperfstats.cpp
@@ -91,7 +91,7 @@ namespace LLPerfStats
         const auto newval = gSavedSettings.getF32("RenderAvatarMaxART");
         if(newval < log10(LLPerfStats::ART_UNLIMITED_NANOS/1000))
         {
-            LLPerfStats::renderAvatarMaxART_ns = pow(10,newval)*1000;
+            LLPerfStats::renderAvatarMaxART_ns = (U64)pow(10,newval)*1000;
         }
         else
         {
@@ -301,7 +301,7 @@ namespace LLPerfStats
 
         std::vector<LLVector3d> positions;
         uuid_vec_t avatar_ids;
-        LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, our_pos, distance);
+        LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, our_pos, (F32)distance);
         return static_cast<int>(positions.size());
     }
 
@@ -375,7 +375,7 @@ namespace LLPerfStats
         {
             // if we have less than the user's "max Non-Impostors" avatars within the desired range then adjust the limit.
             // also adjusts back up again for nearby crowds.
-            auto count = countNearbyAvatars(std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance));
+            auto count = countNearbyAvatars((S32)std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance));
             if( count != tunables.nonImpostors )
             {
                 tunables.updateNonImposters(((U32)count < LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER) ? count : 0);
@@ -476,7 +476,7 @@ namespace LLPerfStats
                 // max render this frame may be higher than the last (cos new entrants and jitter) so make sure we are heading in the right direction
                 if( new_render_limit_ns > renderAvatarMaxART_ns )
                 {
-                    new_render_limit_ns = renderAvatarMaxART_ns;
+                    new_render_limit_ns = (double)renderAvatarMaxART_ns;
                 }
 
                 if (new_render_limit_ns > LLPerfStats::ART_MIN_ADJUST_DOWN_NANOS)
@@ -485,12 +485,12 @@ namespace LLPerfStats
                 }
 
                 // bounce at the bottom to prevent "no limit"
-                new_render_limit_ns = std::max((U64)new_render_limit_ns, (U64)LLPerfStats::ART_MINIMUM_NANOS);
+                new_render_limit_ns = (double)std::max((U64)new_render_limit_ns, (U64)LLPerfStats::ART_MINIMUM_NANOS);
 
                 // assign the new value
                 if (renderAvatarMaxART_ns != new_render_limit_ns)
                 {
-                    renderAvatarMaxART_ns = new_render_limit_ns;
+                    renderAvatarMaxART_ns = (U64)new_render_limit_ns;
                     tunables.updateSettingsFromRenderCostLimit();
                 }
                 // LL_DEBUGS() << "AUTO_TUNE: avatar_budget adjusted to:" << new_render_limit_ns << LL_ENDL;
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index b6bcd6dd7d..6782aa2123 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -445,8 +445,8 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
         const F32 acceleration_local = (velocity_local - mVelocityJoint_local) / time_delta;
 
         const F32 smoothed_acceleration_local =
-                acceleration_local * 1.0/smoothing +
-                mAccelerationJoint_local * (smoothing-1.0)/smoothing;
+                acceleration_local * 1.0f/smoothing +
+                mAccelerationJoint_local * (smoothing-1.0f)/smoothing;
 
         return smoothed_acceleration_local;
 }
@@ -603,7 +603,7 @@ bool LLPhysicsMotion::onUpdate(F32 time)
 
         // Drag is a force imparted by velocity (intuitively it is similar to wind resistance)
         // F = .5kv^2
-        const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local);
+        const F32 force_drag = (F32)(.5 * behavior_drag * velocity_joint_local * velocity_joint_local * llsgn(velocity_joint_local));
 
         const F32 force_net = (force_accel +
                        force_gravity +
@@ -631,7 +631,7 @@ bool LLPhysicsMotion::onUpdate(F32 time)
         // Temporary debugging setting to cause all avatars to move, for profiling purposes.
         if (physics_test)
         {
-            velocity_new_local = sin(time*4.0);
+            velocity_new_local = sin(time*4.0f);
         }
         // Calculate the new parameters, or remain unchanged if max speed is 0.
         F32 position_new_local = position_current_local + velocity_new_local*time_iteration_step;
@@ -697,7 +697,7 @@ bool LLPhysicsMotion::onUpdate(F32 time)
         // For non-self, if the avatar is small enough visually, then don't update.
         const F32 area_for_max_settings = 0.0;
         const F32 area_for_min_settings = 1400.0;
-        const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor);
+        const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0f-lod_factor);
             const F32 pixel_area = sqrtf(mCharacter->getPixelArea());
 
         const bool is_self = (dynamic_cast<LLVOAvatarSelf *>(mCharacter) != NULL);
@@ -763,8 +763,8 @@ void LLPhysicsMotion::setParamValue(const LLViewerVisualParam *param,
 {
         const F32 value_min_local = param->getMinWeight();
         const F32 value_max_local = param->getMaxWeight();
-        const F32 min_val = 0.5f-behavior_maxeffect/2.0;
-        const F32 max_val = 0.5f+behavior_maxeffect/2.0;
+        const F32 min_val = 0.5f-behavior_maxeffect/2.0f;
+        const F32 max_val = 0.5f+behavior_maxeffect/2.0f;
 
     // Scale from [0,1] to [min_val,max_val]
     const F32 new_value_rescaled = min_val + (max_val-min_val) * new_value_normalized;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 259332a3ff..2a5d7f2450 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -657,7 +657,7 @@ void LLPreviewTexture::adjustAspectRatio()
     S32 num = mImage->getFullWidth() / divisor;
     S32 denom = mImage->getFullHeight() / divisor;
 
-    if (setAspectRatio(num, denom))
+    if (setAspectRatio((F32)num, (F32)denom))
     {
         // Select corresponding ratio entry in the combo list
         LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
@@ -677,7 +677,7 @@ void LLPreviewTexture::adjustAspectRatio()
             }
             else
             {
-                combo->setCurrentByIndex(found - mRatiosList.begin());
+                combo->setCurrentByIndex((S32)(found - mRatiosList.begin()));
             }
         }
     }
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index e03984a44c..7bef0339c5 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -388,7 +388,7 @@ void LLProgressView::initLogos()
 
     // We don't know final screen rect yet, so we can't precalculate position fully
     LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
-    S32 texture_start_x = logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;
+    S32 texture_start_x = (S32)logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;
     S32 texture_start_y = -7;
 
     // Normally we would just preload these textures from textures.xml,
@@ -590,7 +590,7 @@ bool LLProgressView::handleUpdate(const LLSD& event_data)
 
     if(percent.isDefined())
     {
-        setPercent(percent.asReal());
+        setPercent((F32)percent.asReal());
     }
     return false;
 }
diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp
index d64dfdfcbc..c698139c6d 100644
--- a/indra/newview/llrecentpeople.cpp
+++ b/indra/newview/llrecentpeople.cpp
@@ -114,8 +114,8 @@ F32 LLRecentPeople::getArrivalTimeByID(const LLUUID& id)
 
     if (it != mAvatarsArrivalTime.end())
     {
-        return it->second;
+        return (F32)(it->second);
     }
-    return LLDate::now().secondsSinceEpoch();
+    return (F32)LLDate::now().secondsSinceEpoch();
 }
 
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index cb1ab0dac2..1efe51c1aa 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -230,7 +230,7 @@ void LLReflectionMapManager::update()
     if (mMipChain.empty())
     {
         U32 res = mProbeResolution;
-        U32 count = log2((F32)res) + 0.5f;
+        U32 count = (U32)(log2((F32)res) + 0.5f);
 
         mMipChain.resize(count);
         for (U32 i = 0; i < count; ++i)
@@ -251,7 +251,7 @@ void LLReflectionMapManager::update()
         auto const & iter = std::find(mProbes.begin(), mProbes.end(), probe);
         if (iter != mProbes.end())
         {
-            deleteProbe(iter - mProbes.begin());
+            deleteProbe((U32)(iter - mProbes.begin()));
         }
     }
 
@@ -761,7 +761,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
         }
 
 
-        S32 mips = log2((F32)mProbeResolution) + 0.5f;
+        S32 mips = (S32)(log2((F32)mProbeResolution) + 0.5f);
 
         gReflectionMipProgram.bind();
         S32 diffuseChannel = gReflectionMipProgram.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, LLTexUnit::TT_TEXTURE);
@@ -839,7 +839,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face)
                 static LLStaticHashedString sWidth("u_width");
 
                 gRadianceGenProgram.uniform1f(sRoughness, (F32)i / (F32)(mMipChain.size() - 1));
-                gRadianceGenProgram.uniform1f(sMipLevel, i);
+                gRadianceGenProgram.uniform1f(sMipLevel, (GLfloat)i);
                 gRadianceGenProgram.uniform1i(sWidth, mProbeResolution);
 
                 for (int cf = 0; cf < 6; ++cf)
@@ -1378,7 +1378,7 @@ void LLReflectionMapManager::initReflectionMaps()
         mReset = false;
         mReflectionProbeCount = count;
         mProbeResolution = nhpo2(llclamp(gSavedSettings.getU32("RenderReflectionProbeResolution"), (U32)64, (U32)512));
-        mMaxProbeLOD = log2f(mProbeResolution) - 1.f; // number of mips - 1
+        mMaxProbeLOD = log2f((F32)mProbeResolution) - 1.f; // number of mips - 1
 
         if (mTexture.isNull() ||
             mTexture->getWidth() != mProbeResolution ||
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 6eb8cf0b37..6f23477415 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -127,7 +127,7 @@ void LLScriptEditor::drawLineNumbers()
                                  ltext, // string to draw
                                  0, // begin offset
                                  UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x
-                                 line_bottom, // y
+                                 (F32)line_bottom, // y
                                  fg_color,
                                  LLFontGL::RIGHT, // horizontal alignment
                                  LLFontGL::BOTTOM, // vertical alignment
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 2d8a5eaf13..1e50135e89 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -901,7 +901,7 @@ void _validateCert(int validation_policy,
 
     if (validation_policy & VALIDATION_POLICY_TIME)
     {
-        LLDate validation_date(time(NULL));
+        LLDate validation_date((double)time(NULL));
         if(validation_params.has(CERT_VALIDATION_DATE))
         {
             validation_date = validation_params[CERT_VALIDATION_DATE];
@@ -1111,7 +1111,7 @@ void LLBasicCertificateStore::validate(int validation_policy,
             }
             else
             {
-                validation_date = LLDate(time(NULL)); // current time
+                validation_date = LLDate((double)time(NULL)); // current time
             }
 
             if((validation_date < cache_entry->second.first) ||
@@ -1358,8 +1358,8 @@ void LLSecAPIBasicHandler::_readProtectedData(unsigned char *unique_id, U32 id_l
             protected_data_stream.read((char *)buffer, BUFFER_READ_SIZE);
 
             EVP_DecryptUpdate(ctx, decrypted_buffer, &decrypted_length,
-                              buffer, protected_data_stream.gcount());
-            decrypted_data.append((const char *)decrypted_buffer, protected_data_stream.gcount());
+                              buffer, (int)protected_data_stream.gcount());
+            decrypted_data.append((const char *)decrypted_buffer, (int)protected_data_stream.gcount());
         }
 
         // RC4 is a stream cipher, so we don't bother to EVP_DecryptFinal, as there is
@@ -1447,7 +1447,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
             }
             int encrypted_length;
             EVP_EncryptUpdate(ctx, encrypted_buffer, &encrypted_length,
-                          buffer, formatted_data_istream.gcount());
+                          buffer, (int)formatted_data_istream.gcount());
             protected_data_stream.write((const char *)encrypted_buffer, encrypted_length);
         }
 
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 42927769de..fdb73efa14 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -609,8 +609,8 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky, bool isA
     legacy[SETTING_CLOUD_POS_DENSITY2] = ensure_array_4(settings[SETTING_CLOUD_POS_DENSITY2], 1.0);
     legacy[SETTING_CLOUD_SCALE] = llsd::array(settings[SETTING_CLOUD_SCALE], LLSD::Real(0.0), LLSD::Real(0.0), LLSD::Real(1.0));
     legacy[SETTING_CLOUD_SCROLL_RATE] = settings[SETTING_CLOUD_SCROLL_RATE];
-    legacy[SETTING_LEGACY_ENABLE_CLOUD_SCROLL] = llsd::array(LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][0].asReal())),
-        LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][1].asReal())));
+    legacy[SETTING_LEGACY_ENABLE_CLOUD_SCROLL] = llsd::array(LLSD::Boolean(!is_approx_zero((F32)settings[SETTING_CLOUD_SCROLL_RATE][0].asReal())),
+        LLSD::Boolean(!is_approx_zero((F32)settings[SETTING_CLOUD_SCROLL_RATE][1].asReal())));
     legacy[SETTING_CLOUD_SHADOW] = llsd::array(settings[SETTING_CLOUD_SHADOW].asReal(), 0.0f, 0.0f, 1.0f);
     legacy[SETTING_GAMMA] = llsd::array(settings[SETTING_GAMMA], 0.0f, 0.0f, 1.0f);
     legacy[SETTING_GLOW] = ensure_array_4(settings[SETTING_GLOW], 1.0);
@@ -756,7 +756,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
         if (psky->getReflectionProbeAmbiance() != 0.f)
         {
             shader->uniform3fv(LLShaderMgr::AMBIENT, LLVector3(ambient.mV));
-            shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, sqrtf(g)*2.0); // use a modifier here so 1.0 maps to the "most desirable" default and the maximum value doesn't go off the rails
+            shader->uniform1f(LLShaderMgr::SKY_HDR_SCALE, sqrtf(g)*2.0f); // use a modifier here so 1.0 maps to the "most desirable" default and the maximum value doesn't go off the rails
         }
         else if (psky->canAutoAdjust() && should_auto_adjust)
         { // auto-adjust legacy sky to take advantage of probe ambiance
@@ -1055,7 +1055,7 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
 
         shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR_LINEAR, linearColor3(fog_color).mV);
 
-        F32 blend_factor = env.getCurrentWater()->getBlendFactor();
+        F32 blend_factor = (F32)env.getCurrentWater()->getBlendFactor();
         shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
 
         // update to normal lightnorm, water shader itself will use rotated lightnorm as necessary
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 0d81f2c099..9b7289df67 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -372,7 +372,7 @@ void LLSidepanelInventory::onToggleInboxBtn()
         mInboxLayoutPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
         if (mInboxLayoutPanel->isInVisibleChain())
     {
-        gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+        gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", (U32)time_corrected());
     }
 }
     else
@@ -397,7 +397,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key)
 #else
     if (mInboxEnabled && getChild<LLButton>(INBOX_BUTTON_NAME)->getToggleState())
     {
-        gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+        gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", (U32)time_corrected());
     }
 #endif
 
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index d80cf2e80e..9e567e3262 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -342,7 +342,7 @@ LLSLURL::LLSLURL(const std::string& grid,
     S32 y = ll_round((F32)fmod(position[VY], (F32)REGION_WIDTH_METERS));
     S32 z = ll_round((F32)position[VZ]);
     mType = LOCATION;
-    mPosition = LLVector3(x, y, z);
+    mPosition = LLVector3((F32)x, (F32)y, (F32)z);
 }
 
 // create a simstring
@@ -358,7 +358,7 @@ LLSLURL::LLSLURL(const std::string& grid,
          const LLVector3d& global_position)
 {
     *this = LLSLURL(LLGridManager::getInstance()->getGridId(grid), region,
-        LLVector3(global_position.mdV[VX], global_position.mdV[VY], global_position.mdV[VZ]));
+        LLVector3((F32)global_position.mdV[VX], (F32)global_position.mdV[VY], (F32)global_position.mdV[VZ]));
 }
 
 // create a slurl from a global position
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 787dd3b667..451f5bd607 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -906,7 +906,7 @@ void LLSnapshotLivePreview::estimateDataSize()
                 break;
             case LLSnapshotModel::SNAPSHOT_FORMAT_JPEG:
                 // Observed from JPG compression tests
-                ratio = (110 - mSnapshotQuality) / 2;
+                ratio = (F32)(110 - mSnapshotQuality) / 2.f;
                 break;
             case LLSnapshotModel::SNAPSHOT_FORMAT_BMP:
                 ratio = 1.0;    // No compression with BMP
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 782d57aed8..dd5916818c 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2035,7 +2035,7 @@ void renderNormals(LLDrawable *drawablep)
             obj_scale.normalize3();
 
             // Create inverse-scale vector for normals
-            inv_scale.set(1.0 / scale_v3.mV[VX], 1.0 / scale_v3.mV[VY], 1.0 / scale_v3.mV[VZ], 0.0);
+            inv_scale.set(1.0f / scale_v3.mV[VX], 1.0f / scale_v3.mV[VY], 1.0f/ scale_v3.mV[VZ], 0.0f);
             inv_scale.mul(inv_scale);  // Squared, to apply inverse scale twice
 
             inv_scale.normalize3fast();
@@ -2763,7 +2763,7 @@ void renderTexelDensity(LLDrawable* drawable)
             break;
         }
 
-        checkerboard_matrix.initScale(LLVector3(texturep->getWidth(discard_level) / 8, texturep->getHeight(discard_level) / 8, 1.f));
+        checkerboard_matrix.initScale(LLVector3((F32)texturep->getWidth(discard_level) / 8.f, (F32)texturep->getHeight(discard_level) / 8.f, 1.f));
 
         gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, true);
         gGL.matrixMode(LLRender::MM_TEXTURE);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index dd005874a5..33509d2f0b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -957,7 +957,7 @@ bool idle_startup()
         // and startup time is close enough if we don't have a real value.
         if (gSavedPerAccountSettings.getU32("LastLogoff") == 0)
         {
-            gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
+            gSavedPerAccountSettings.setU32("LastLogoff", (U32)time_corrected());
         }
 
         //Default the path if one isn't set.
@@ -3665,7 +3665,7 @@ bool process_login_success_response()
         if(server_utc_time)
         {
             time_t now = time(NULL);
-            gUTCOffset = (server_utc_time - now);
+            gUTCOffset = (S32)(server_utc_time - now);
 
             // Print server timestamp
             LLSD substitution;
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index fa4e92e209..dd7c6aa9e3 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -127,7 +127,7 @@ void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d
     S32 removed_index = -1;
     if (item_iter != mItems.end())
     {
-        removed_index = item_iter - mItems.begin();
+        removed_index = (S32)(item_iter - mItems.begin());
         mItems.erase(item_iter);
     }
 
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 843da97089..be7653c011 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1260,7 +1260,7 @@ void LLTextureCache::updateEntryTimeStamp(S32 idx, Entry& entry)
     {
         if (!mReadOnly)
         {
-            entry.mTime = time(NULL);
+            entry.mTime = (U32)time(NULL);
             mUpdatedEntryMap[idx] = entry ;
         }
     }
@@ -1299,7 +1299,7 @@ bool LLTextureCache::updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32
             mTexturesSizeTotal -= entry.mBodySize ;
             mTexturesSizeTotal += new_body_size ;
         }
-        entry.mTime = time(NULL);
+        entry.mTime = (U32)time(NULL);
         entry.mImageSize = new_image_size ;
         entry.mBodySize = new_body_size ;
 
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 81a70a81cf..e154777aef 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -2308,8 +2308,8 @@ void LLTextureCtrl::draw()
             font->renderUTF8(
                 mLoadingPlaceholderString,
                 0,
-                llfloor(interior.mLeft+3),
-                llfloor(interior.mTop-v_offset),
+                (interior.mLeft+3),
+                (interior.mTop-v_offset),
                 LLColor4::white,
                 LLFontGL::LEFT,
                 LLFontGL::BASELINE,
@@ -2325,17 +2325,17 @@ void LLTextureCtrl::draw()
 
             v_offset += 12;
             tdesc = llformat("  PK  : %d%%", U32(mTexturep->getDownloadProgress()*100.0));
-            font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset),
+            font->renderUTF8(tdesc, 0, interior.mLeft+3, interior.mTop-v_offset,
                              LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
 
             v_offset += 12;
             tdesc = llformat("  LVL: %d", mTexturep->getDiscardLevel());
-            font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset),
+            font->renderUTF8(tdesc, 0, interior.mLeft+3, interior.mTop-v_offset,
                              LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
 
             v_offset += 12;
             tdesc = llformat("  ID  : %s...", (mImageAssetID.asString().substr(0,7)).c_str());
-            font->renderUTF8(tdesc, 0, llfloor(interior.mLeft+3), llfloor(interior.mTop-v_offset),
+            font->renderUTF8(tdesc, 0, interior.mLeft+3, interior.mTop-v_offset,
                              LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
         }
     }
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index ee13baaa18..689c555998 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -3210,7 +3210,7 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r
         {
             requested_priority = worker->mImagePriority;
         }
-        fetch_priority = worker->getImagePriority();
+        fetch_priority = (U32)worker->getImagePriority();
         can_use_http = worker->getCanUseHTTP() ;
         worker->unlockWorkMutex();                                      // -Mw
     }
diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp
index 84ef45c97a..514064cf49 100644
--- a/indra/newview/lltextureinfo.cpp
+++ b/indra/newview/lltextureinfo.cpp
@@ -214,7 +214,7 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
                 F64 region_vocache_hit_rate = 0;
                 if (region_hit_count > 0 || region_miss_count > 0)
                 {
-                    region_vocache_hit_rate = region_hit_count / (region_hit_count + region_miss_count);
+                    region_vocache_hit_rate = (F64)region_hit_count / (region_hit_count + region_miss_count);
                 }
                 object_cache["vo_region_hitcount"] = ll_sd_from_U64(region_hit_count);
                 object_cache["vo_region_misscount"] = ll_sd_from_U64(region_miss_count);
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 9e86548c2d..92527fc3a9 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -481,8 +481,8 @@ private:
 void LLGLTexMemBar::draw()
 {
     F32 discard_bias = LLViewerTexture::sDesiredDiscardBias;
-    F32 cache_usage = LLAppViewer::getTextureCache()->getUsage().valueInUnits<LLUnits::Megabytes>();
-    F32 cache_max_usage = LLAppViewer::getTextureCache()->getMaxUsage().valueInUnits<LLUnits::Megabytes>();
+    F32 cache_usage = (F32)LLAppViewer::getTextureCache()->getUsage().valueInUnits<LLUnits::Megabytes>();
+    F32 cache_max_usage = (F32)LLAppViewer::getTextureCache()->getMaxUsage().valueInUnits<LLUnits::Megabytes>();
     S32 line_height = LLFontGL::getFontMonospace()->getLineHeight();
     S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f);
     F32Bytes total_texture_downloaded = gTotalTextureData;
@@ -631,8 +631,8 @@ void LLGLTexMemBar::draw()
                     LLAppViewer::getImageDecodeThread()->getPending(),
                     gTextureList.mCreateTextureList.size());
 
-    x_right = 550.0;
-    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3,
+    x_right = 550.0f;
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0.f, (F32)(v_offset + line_height*3),
                                              text_color, LLFontGL::LEFT, LLFontGL::TOP,
                                              LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &x_right);
 
@@ -641,7 +641,7 @@ void LLGLTexMemBar::draw()
     color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;
     color[VALPHA] = text_color[VALPHA];
     text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value());
-    LLFontGL::getFontMonospace()->renderUTF8(text, 0, x_right, v_offset + line_height*3,
+    LLFontGL::getFontMonospace()->renderUTF8(text, 0, (S32)x_right, v_offset + line_height*3,
                                              color, LLFontGL::LEFT, LLFontGL::TOP);
 
     // Mesh status line
diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp
index d26ad2f060..ae21d3e733 100644
--- a/indra/newview/llthumbnailctrl.cpp
+++ b/indra/newview/llthumbnailctrl.cpp
@@ -164,8 +164,8 @@ void LLThumbnailCtrl::draw()
             font->renderUTF8(
                 mLoadingPlaceholderString,
                 0,
-                llfloor(draw_rect.mLeft+3),
-                llfloor(draw_rect.mTop-v_offset),
+                (draw_rect.mLeft+3),
+                (draw_rect.mTop-v_offset),
                 LLColor4::white,
                 LLFontGL::LEFT,
                 LLFontGL::BASELINE,
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp
index 168708ca37..b8cb3d712d 100644
--- a/indra/newview/lltinygltfhelper.cpp
+++ b/indra/newview/lltinygltfhelper.cpp
@@ -140,7 +140,7 @@ LLColor4 LLTinyGLTFHelper::getColor(const std::vector<double>& in)
     LLColor4 out;
     for (S32 i = 0; i < llmin((S32)in.size(), 4); ++i)
     {
-        out.mV[i] = in[i];
+        out.mV[i] = (F32)in[i];
     }
 
     return out;
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 638a01a080..84503e66a5 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -94,8 +94,8 @@ LLToast::Params::Params()
     enable_hide_btn("enable_hide_btn", true),
     force_show("force_show", false),
     force_store("force_store", false),
-    fading_time_secs("fading_time_secs", gSavedSettings.getS32("ToastFadingTime")),
-    lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime"))
+    fading_time_secs("fading_time_secs", (F32)gSavedSettings.getS32("ToastFadingTime")),
+    lifetime_secs("lifetime_secs", (F32)gSavedSettings.getS32("NotificationToastLifeTime"))
 {};
 
 LLToast::LLToast(const LLToast::Params& p)
@@ -256,12 +256,12 @@ void LLToast::onFocusReceived()
 
 void LLToast::setLifetime(S32 seconds)
 {
-    mToastLifetime = seconds;
+    mToastLifetime = (F32)seconds;
 }
 
 void LLToast::setFadingTime(S32 seconds)
 {
-    mToastFadingTime = seconds;
+    mToastFadingTime = (F32)seconds;
 }
 
 void LLToast::closeToast()
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index e2b6924aeb..2fe81df4fb 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -547,7 +547,7 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region
                 wz = land.getZ((i+di)+(j+dj)*land.mGridsPerEdge),
                 norm_dist = sqrt((float)di*di + dj*dj) / half_edge,
                 force_scale = sqrt(2.f) - norm_dist, // 1 at center, 0 at corner
-                wz2 = wz + .2 + (.2 + force/100) * force_scale, // top vertex
+                wz2 = wz + .2f + (.2f + force/100.f) * force_scale, // top vertex
                 tic = .075f; // arrowhead size
             // vertical line
             gGL.vertex3f(wx, wy, wz);
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 0ba7ae5e84..b8878b1e6f 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -440,7 +440,7 @@ bool LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
                     }
                     else
                     {
-                        gAgentCamera.cameraZoomIn( pow( IN_FACTOR, dy ) );
+                        gAgentCamera.cameraZoomIn((F32)pow( IN_FACTOR, dy ) );
                     }
                 }
 
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index b3871a6d6c..24cfca5eee 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -189,7 +189,7 @@ bool LLVisualParamHint::render()
     gGL.matrixMode(LLRender::MM_PROJECTION);
     gGL.pushMatrix();
     gGL.loadIdentity();
-    gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+    gGL.ortho(0.0f, (F32)mFullWidth, 0.0f, (F32)mFullHeight, -1.0f, 1.0f);
 
     gGL.matrixMode(LLRender::MM_MODELVIEW);
     gGL.pushMatrix();
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index a28bbb3bf1..d4d3e71b46 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -516,7 +516,7 @@ void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4
         height = pos_agent.mV[2];
     }
 
-    nRows = ceil((BEACON_ROWS * height) / MAX_HEIGHT);
+    nRows = (U32)ceil((BEACON_ROWS * height) / MAX_HEIGHT);
     if(nRows<2) nRows=2;
     rowHeight = height / nRows;
 
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index fbcaaef1b8..39a9f0f8bc 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -306,9 +306,9 @@ public:
         LLVector3 coords(128, 128, 0);
         if (tokens.size() <= 4)
         {
-            coords = LLVector3(tokens[1].asReal(),
-                               tokens[2].asReal(),
-                               tokens[3].asReal());
+            coords = LLVector3((F32)tokens[1].asReal(),
+                               (F32)tokens[2].asReal(),
+                               (F32)tokens[3].asReal());
         }
 
         // Region names may be %20 escaped.
@@ -332,9 +332,9 @@ public:
         {
             // region specified, coordinates (if any) are region-local
             LLVector3 local_pos(
-                params.has("x")? params["x"].asReal() : 128,
-                params.has("y")? params["y"].asReal() : 128,
-                params.has("z")? params["z"].asReal() : 0);
+                params.has("x")? (F32)params["x"].asReal() : 128.f,
+                params.has("y")? (F32)params["y"].asReal() : 128.f,
+                params.has("z")? (F32)params["z"].asReal() : 0.f);
             std::string regionname(params["regionname"]);
             std::string destination(LLSLURL(regionname, local_pos).getSLURLString());
             // have to resolve region's global coordinates first
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 3c70d46d36..50128d826a 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -226,7 +226,7 @@ LLUUID LLResourceUploadInfo::finishUpload(LLSD &result)
             LL_INFOS() << "inventory_item_flags " << flagsInventoryItem << LL_ENDL;
         }
     }
-    S32 creationDate = time_corrected();
+    S32 creationDate = (S32)time_corrected();
 
     LLUUID serverInventoryItem = result["new_inventory_item"].asUUID();
     LLUUID serverAssetId = result["new_asset"].asUUID();
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index ab7953846f..766280e145 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -153,12 +153,12 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center, const LLVecto
     add(sVelocityStat, dpos);
     add(sAngularVelocityStat, drot);
 
-    mAverageSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sVelocityStat, 50);
-    mAverageAngularSpeed = LLTrace::get_frame_recording().getPeriodMeanPerSec(sAngularVelocityStat);
+    mAverageSpeed = (F32)LLTrace::get_frame_recording().getPeriodMeanPerSec(sVelocityStat, 50);
+    mAverageAngularSpeed = (F32)LLTrace::get_frame_recording().getPeriodMeanPerSec(sAngularVelocityStat);
     mCosHalfCameraFOV = cosf(0.5f * getView() * llmax(1.0f, getAspect()));
 
     // update pixel meter ratio using default fov, not modified one
-    mPixelMeterRatio = getViewHeightInPixels()/ (2.f*tanf(mCameraFOVDefault*0.5));
+    mPixelMeterRatio = (F32)(getViewHeightInPixels()/ (2.f*tanf(mCameraFOVDefault*0.5f)));
     // update screen pixel area
     mScreenPixelArea =(S32)((F32)getViewHeightInPixels() * ((F32)getViewHeightInPixels() * getAspect()));
 }
@@ -903,6 +903,6 @@ bool LLViewerCamera::isDefaultFOVChanged()
 
 void LLViewerCamera::updateCameraAngle(const LLSD& value)
 {
-    setDefaultFOV(value.asReal());
+    setDefaultFOV((F32)value.asReal());
 }
 
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index cd6e780aa8..820d413535 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -634,7 +634,7 @@ void handleAutoTuneFPSChanged(const LLSD& newValue)
     LLPerfStats::tunables.userAutoTuneEnabled = newval;
     if(newval && LLPerfStats::renderAvatarMaxART_ns == 0) // If we've enabled autotune we override "unlimited" to max
     {
-        gSavedSettings.setF32("RenderAvatarMaxART",log10(LLPerfStats::ART_UNLIMITED_NANOS-1000));//triggers callback to update static var
+        gSavedSettings.setF32("RenderAvatarMaxART", (F32)log10(LLPerfStats::ART_UNLIMITED_NANOS-1000));//triggers callback to update static var
     }
 }
 
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 09f77c0c29..e2389c9ba0 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1642,11 +1642,11 @@ void render_ui_2d()
         S32 height = gViewerWindow->getWindowHeightScaled();
         gGL.getTexUnit(0)->bind(&gPipeline.mRT->uiScreen);
         gGL.begin(LLRender::TRIANGLE_STRIP);
-        gGL.color4f(1,1,1,1);
-        gGL.texCoord2f(0, 0);           gGL.vertex2i(0, 0);
-        gGL.texCoord2f(width, 0);       gGL.vertex2i(width, 0);
-        gGL.texCoord2f(0, height);      gGL.vertex2i(0, height);
-        gGL.texCoord2f(width, height);  gGL.vertex2i(width, height);
+        gGL.color4f(1.f,1.f,1.f,1.f);
+        gGL.texCoord2f(0.f, 0.f);                 gGL.vertex2i(0, 0);
+        gGL.texCoord2f((F32)width, 0.f);          gGL.vertex2i(width, 0);
+        gGL.texCoord2f(0.f, (F32)height);         gGL.vertex2i(0, height);
+        gGL.texCoord2f((F32)width, (F32)height);  gGL.vertex2i(width, height);
         gGL.end();
     }
     else
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 96541b030c..e2022cae37 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -334,7 +334,7 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLUUID& uuid,
                                              U32 flags,
                                              time_t creation_date_utc) :
     LLInventoryItem(uuid, parent_uuid, perm, asset_uuid, type, inv_type,
-                    name, desc, sale_info, flags, creation_date_utc),
+                    name, desc, sale_info, flags, (S32)creation_date_utc),
     mIsComplete(true)
 {
 }
@@ -534,7 +534,7 @@ void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const
     mSaleInfo.packMessage(msg);
     msg->addStringFast(_PREHASH_Name, mName);
     msg->addStringFast(_PREHASH_Description, mDescription);
-    msg->addS32Fast(_PREHASH_CreationDate, mCreationDate);
+    msg->addS32Fast(_PREHASH_CreationDate, (S32)mCreationDate);
     U32 crc = getCRC32();
     msg->addU32Fast(_PREHASH_CRC, crc);
 }
@@ -675,7 +675,7 @@ bool LLViewerInventoryCategory::fetch(S32 expiry_seconds)
     {
         LL_DEBUGS(LOG_INV) << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
         mDescendentsRequested.reset();
-        mDescendentsRequested.setTimerExpirySec(expiry_seconds);
+        mDescendentsRequested.setTimerExpirySec((F32)expiry_seconds);
 
         std::string url;
         if (gAgent.getRegion())
@@ -721,7 +721,7 @@ void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchTyp
             mDescendentsRequested.reset();
             if (AISAPI::isAvailable())
             {
-                mDescendentsRequested.setTimerExpirySec(AISAPI::HTTP_TIMEOUT);
+                mDescendentsRequested.setTimerExpirySec((F32)AISAPI::HTTP_TIMEOUT);
             }
             else
             {
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index ce6dfa4ad1..787ea02e4c 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -329,7 +329,7 @@ LLViewerJoystick::LLViewerJoystick()
     memset(mBtn, 0, sizeof(mBtn));
 
     // factor in bandwidth? bandwidth = gViewerStats->mKBitStat
-    mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm.  why?
+    mPerfScale = 4000.f / (F32)gSysCPU.getMHz(); // hmm.  why?
 
     mLastDeviceUUID = LLSD::Integer(1);
 }
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index f62d929e9a..6fc9f2a6f0 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1906,7 +1906,7 @@ void LLViewerMediaImpl::loadURI()
         // or a seek happened before the media loaded.  In either case, seek to the saved time.
         if(mPreviousMediaTime != 0.0f)
         {
-            seek(mPreviousMediaTime);
+            seek((F32)mPreviousMediaTime);
         }
 
         if(mPreviousMediaState == MEDIA_PLAYING)
@@ -2041,7 +2041,7 @@ void LLViewerMediaImpl::skipBack(F32 step_scale)
             {
                 back_step = 0.0;
             }
-            mMediaSource->seek(back_step);
+            mMediaSource->seek((F32)back_step);
         }
     }
 }
@@ -2058,7 +2058,7 @@ void LLViewerMediaImpl::skipForward(F32 step_scale)
             {
                 forward_step = mMediaSource->getDuration();
             }
-            mMediaSource->seek(forward_step);
+            mMediaSource->seek((F32)forward_step);
         }
     }
 }
@@ -2107,7 +2107,7 @@ void LLViewerMediaImpl::updateVolume()
                 F64 attenuation = 1.0 + (gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance);
                 attenuation = 1.0 / (attenuation * attenuation);
                 // the attenuation multiplier should never be more than one since that would increase volume
-                volume = volume * llmin(1.0, attenuation);
+                volume = volume * (F32)llmin(1.0, attenuation);
             }
         }
 
@@ -2237,11 +2237,11 @@ void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32
     // Deal with repeating textures by wrapping the coordinates into the range [0, 1.0)
     texture_x = fmodf(texture_x, 1.0f);
     if(texture_x < 0.0f)
-        texture_x = 1.0 + texture_x;
+        texture_x = 1.0f + texture_x;
 
     texture_y = fmodf(texture_y, 1.0f);
     if(texture_y < 0.0f)
-        texture_y = 1.0 + texture_y;
+        texture_y = 1.0f + texture_y;
 
     // scale x and y to texel units.
     *x = ll_round(texture_x * mMediaSource->getTextureWidth());
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index c8d25180b9..dbec66f81d 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -241,19 +241,19 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
         if(camera_aspect < 1.0f || invert)
         {
             angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect());
-            distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+            distance = width * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
 
             LL_DEBUGS() << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
         }
         else
         {
             angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView());
-            distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+            distance = height * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
 
             LL_DEBUGS() << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
         }
 
-        distance += depth * 0.5;
+        distance += depth * 0.5f;
 
         // Finally animate the camera to this new position and focal point
         LLVector3d target_pos;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 5a32f9654d..9a9d7a1baa 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3672,7 +3672,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
 
     LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
 
-    LL_DEBUGS("WindlightSync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
+    LL_DEBUGS("WindlightSync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25f, 1.f) * 24.f << " h" << LL_ENDL;
 
     /* LAPRAS
         We decode these parts of the message but ignore them
@@ -3691,7 +3691,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
     }
 
     U64     region_handle = 0;
-    F32     gain = 0;
+    F32     gain = 0.f;
     LLUUID  sound_id;
     LLUUID  owner_id;
     LLUUID  object_id;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 85017c61ed..8738151930 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2451,7 +2451,7 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &frame_time)
         {
             // calculate dt from last update
             F32 time_dilation = mRegionp ? mRegionp->getTimeDilation() : 1.0f;
-            F32 dt_raw = ((F64Seconds)frame_time - mLastInterpUpdateSecs).value();
+            F32 dt_raw = (F32)((F64Seconds)frame_time - mLastInterpUpdateSecs).value();
             F32 dt = time_dilation * dt_raw;
 
             applyAngularVelocity(dt);
@@ -2950,7 +2950,7 @@ void LLViewerObject::fetchInventoryDelayed(const F64 &time_seconds)
 //static
 void LLViewerObject::fetchInventoryDelayedCoro(const LLUUID task_inv, const F64 time_seconds)
 {
-    llcoro::suspendUntilTimeout(time_seconds);
+    llcoro::suspendUntilTimeout((float)time_seconds);
     LLViewerObject *obj = gObjectList.findObject(task_inv);
     if (obj)
     {
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 08a1ba0f9b..9e274e0566 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1129,10 +1129,10 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
         {
             LLSD objectData = result[it->asString()];
 
-            F32 linkCost = objectData["linked_set_resource_cost"].asReal();
-            F32 objectCost = objectData["resource_cost"].asReal();
-            F32 physicsCost = objectData["physics_cost"].asReal();
-            F32 linkPhysicsCost = objectData["linked_set_physics_cost"].asReal();
+            F32 linkCost = (F32)objectData["linked_set_resource_cost"].asReal();
+            F32 objectCost = (F32)objectData["resource_cost"].asReal();
+            F32 physicsCost = (F32)objectData["physics_cost"].asReal();
+            F32 linkPhysicsCost = (F32)objectData["linked_set_physics_cost"].asReal();
 
             gObjectList.updateObjectCost(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost);
         }
@@ -1257,10 +1257,10 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
 
             if (data.has("Density"))
             {
-                F32 density = data["Density"].asReal();
-                F32 friction = data["Friction"].asReal();
-                F32 restitution = data["Restitution"].asReal();
-                F32 gravityMult = data["GravityMultiplier"].asReal();
+                F32 density = (F32)data["Density"].asReal();
+                F32 friction = (F32)data["Friction"].asReal();
+                F32 restitution = (F32)data["Restitution"].asReal();
+                F32 gravityMult = (F32)data["GravityMultiplier"].asReal();
 
                 gObjectList.updatePhysicsProperties(objectId, density,
                     friction, restitution, gravityMult);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 39244c8246..25c07a5ff9 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1282,7 +1282,7 @@ void LLViewerRegion::updateReflectionProbes(bool full_update)
 
     F32 start = probe_spacing * 0.5f;
 
-    U32 grid_width = REGION_WIDTH_METERS / probe_spacing;
+    U32 grid_width = (U32)(REGION_WIDTH_METERS / probe_spacing);
 
     mReflectionMaps.resize(grid_width * grid_width);
 
@@ -3739,7 +3739,7 @@ void LLViewerRegion::resetMaterialsCapThrottle()
     if (   mSimulatorFeatures.has("RenderMaterialsCapability")
         && mSimulatorFeatures["RenderMaterialsCapability"].isReal() )
     {
-        requests_per_sec = mSimulatorFeatures["RenderMaterialsCapability"].asReal();
+        requests_per_sec = (F32)mSimulatorFeatures["RenderMaterialsCapability"].asReal();
         if ( requests_per_sec == 0.0f )
         {
             requests_per_sec = 1.0f;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 3499c7eb7d..d1ee9ea17c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -284,13 +284,13 @@ void LLViewerStats::updateFrameStats(const F64Seconds time_diff)
         add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
     }
 
-    F32 sim_fps = getRecording().getLastValue(LLStatViewer::SIM_FPS);
+    F32 sim_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_FPS);
     if (0.f < sim_fps && sim_fps < 20.f)
     {
         add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
     }
 
-    F32 sim_physics_fps = getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
+    F32 sim_physics_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
 
     if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
     {
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 0ab0265586..15902e8a87 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -220,7 +220,7 @@ public:
         LLRectf image_rect = draw_rect;
         image_rect.mRight = image_rect.mLeft + mImage->getWidth();
         image_rect.mTop = image_rect.mBottom + mImage->getHeight();
-        mImage->draw(LLRect(image_rect.mLeft, image_rect.mTop, image_rect.mRight, image_rect.mBottom));
+        mImage->draw(LLRect((S32)image_rect.mLeft, (S32)image_rect.mTop, (S32)image_rect.mRight, (S32)image_rect.mBottom));
 
         LLColor4 color;
         if (mEditor.getReadOnly())
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 99c917ca6f..c754580fc0 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -507,7 +507,7 @@ void LLViewerTexture::updateClass()
     // NOTE: our metrics miss about half the vram we use, so this biases high but turns out to typically be within 5% of the real number
     F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc + render_bytes_alloc);
 
-    F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget;
+    F32 budget = max_vram_budget == 0 ? (F32)gGLManager.mVRAM : (F32)max_vram_budget;
 
     // try to leave half a GB for everyone else, but keep at least 768MB for ourselves
     F32 target = llmax(budget - 512.f, MIN_VRAM_BUDGET);
@@ -534,7 +534,7 @@ void LLViewerTexture::updateClass()
 
         if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
         {
-            sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01;
+            sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01f;
         }
     }
 
@@ -2862,7 +2862,7 @@ LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, co
 
 void LLViewerLODTexture::init(bool firstinit)
 {
-    mTexelsPerImage = 64.f*64.f;
+    mTexelsPerImage = 64*64;
     mDiscardVirtualSize = 0.f;
     mCalculatedDiscardLevel = -1.f;
 }
@@ -3857,8 +3857,8 @@ LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::lo
         }
 
         //time
-        F32 start_time = (*log)[label]["StartFetchingTime"].asReal();
-        F32 cur_time   = (*log)[label]["Time"].asReal();
+        F32 start_time = (F32)(*log)[label]["StartFetchingTime"].asReal();
+        F32 cur_time   = (F32)(*log)[label]["Time"].asReal();
         if(start_time - start_fetching_time > F_ALMOST_ZERO) //fetching has paused for a while
         {
             sessionp->mTotalGrayTime += total_gray_time;
@@ -3874,13 +3874,13 @@ LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::lo
         }
         else
         {
-            total_gray_time = (*log)[label]["TotalGrayTime"].asReal();
-            total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal();
+            total_gray_time = (F32)(*log)[label]["TotalGrayTime"].asReal();
+            total_stablizing_time = (F32)(*log)[label]["TotalStablizingTime"].asReal();
 
-            total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal();
+            total_loading_sculpties_time = (F32)(*log)[label]["EndTimeLoadingSculpties"].asReal() - (F32)(*log)[label]["StartTimeLoadingSculpties"].asReal();
             if(start_fetching_sculpties_time < 0.f && total_loading_sculpties_time > 0.f)
             {
-                start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal();
+                start_fetching_sculpties_time = (F32)(*log)[label]["StartTimeLoadingSculpties"].asReal();
             }
         }
 
@@ -3896,7 +3896,7 @@ LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::lo
         sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond +=
             (*log)[label]["TotalBytesBoundForLargeImage"].asInteger();
         sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond +=
-            (*log)[label]["PercentageBytesBound"].asReal();
+            (F32)(*log)[label]["PercentageBytesBound"].asReal();
         frame_count++;
         if(cur_time - last_time >= 1.0f)
         {
diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp
index 238e6830ea..d64026d8a3 100644
--- a/indra/newview/llviewertextureanim.cpp
+++ b/indra/newview/llviewertextureanim.cpp
@@ -217,7 +217,7 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t,
                 result |= SCALE;
                 mScaleS = scale_s = 1.f/mSizeX;
                 mScaleT = scale_t = 1.f/mSizeY;
-                x_frame = fmod(frame_counter, mSizeX);
+                x_frame = fmodf(frame_counter, mSizeX);
                 y_frame = (S32)(frame_counter / mSizeX);
                 x_pos = x_frame * scale_s;
                 y_pos = y_frame * scale_t;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index c436566297..b03a9a8f15 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -833,7 +833,7 @@ void LLViewerTextureList::updateImages(F32 max_time)
     }
     cleared = false;
 
-    LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value());
+    LLAppViewer::getTextureFetch()->setTextureBandwidth((F32)LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value());
 
     {
         using namespace LLStatViewer;
@@ -963,7 +963,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                 if (apply_bias)
                 {
                     F32 bias = powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f);
-                    bias = llround(bias);
+                    bias = (F32)llround(bias);
                     vsize /= bias;
                 }
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ef85d57416..4028de0a66 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -805,8 +805,8 @@ public:
             LLCoordGL coord = gViewerWindow->getCurrentMouse();
 
             // Convert x,y to raw pixel coords
-            S32 x_raw = llround(coord.mX * gViewerWindow->getWindowWidthRaw() / (F32) gViewerWindow->getWindowWidthScaled());
-            S32 y_raw = llround(coord.mY * gViewerWindow->getWindowHeightRaw() / (F32) gViewerWindow->getWindowHeightScaled());
+            S32 x_raw = (S32)llround(coord.mX * gViewerWindow->getWindowWidthRaw() / (F32) gViewerWindow->getWindowWidthScaled());
+            S32 y_raw = (S32)llround(coord.mY * gViewerWindow->getWindowHeightRaw() / (F32) gViewerWindow->getWindowHeightScaled());
 
             glReadPixels(x_raw, y_raw, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, color);
             addText(xpos, ypos, llformat("Pixel <%1d, %1d> R:%1d G:%1d B:%1d A:%1d", x_raw, y_raw, color[0], color[1], color[2], color[3]));
@@ -4479,8 +4479,8 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
     F32         fov = LLViewerCamera::getInstance()->getView();
 
     // find world view center in scaled ui coordinates
-    F32         center_x = getWorldViewRectScaled().getCenterX();
-    F32         center_y = getWorldViewRectScaled().getCenterY();
+    F32         center_x = (F32)getWorldViewRectScaled().getCenterX();
+    F32         center_y = (F32)getWorldViewRectScaled().getCenterY();
 
     // calculate pixel distance to screen
     F32         distance = ((F32)getWorldViewHeightScaled() * 0.5f) / (tan(fov / 2.f));
@@ -4505,8 +4505,8 @@ LLVector3 LLViewerWindow::mousePointHUD(const S32 x, const S32 y) const
     S32         height = getWorldViewHeightScaled();
 
     // find world view center
-    F32         center_x = getWorldViewRectScaled().getCenterX();
-    F32         center_y = getWorldViewRectScaled().getCenterY();
+    F32         center_x = (F32)getWorldViewRectScaled().getCenterX();
+    F32         center_y = (F32)getWorldViewRectScaled().getCenterY();
 
     // remap with uniform scale (1/height) so that top is -0.5, bottom is +0.5
     F32 hud_x = -((F32)x - center_x)  / height;
@@ -4528,8 +4528,8 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const
     S32         width = getWorldViewWidthScaled();
 
     // find world view center
-    F32         center_x = getWorldViewRectScaled().getCenterX();
-    F32         center_y = getWorldViewRectScaled().getCenterY();
+    F32         center_x = (F32)getWorldViewRectScaled().getCenterX();
+    F32         center_y = (F32)getWorldViewRectScaled().getCenterY();
 
     // calculate click point relative to middle of screen
     F32         click_x = (((F32)x - center_x) / (F32)width) * fov_width * -1.f;
@@ -4777,7 +4777,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
         args["NEED_MEMORY"] = needM_bytes_string;
 
         std::string freeM_bytes_string;
-        LLResMgr::getInstance()->getIntegerString(freeM_bytes_string, (b_space.free) >> 10);
+        LLResMgr::getInstance()->getIntegerString(freeM_bytes_string, (S32)(b_space.free >> 10));
         args["FREE_MEMORY"] = freeM_bytes_string;
 
         LLNotificationsUtil::add("SnapshotToComputerFailed", args);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4f851eabce..d4559e5491 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4531,7 +4531,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w
             root_pos += LLVector3d(getHoverOffset());
             if (getOverallAppearance() == AOA_JELLYDOLL)
             {
-                F32 offz = -0.5 * (getScale()[VZ] - mBodySize.mV[VZ]);
+                F32 offz = -0.5f * (getScale()[VZ] - mBodySize.mV[VZ]);
                 root_pos[2] += offz;
                 // if (!isSelf() && !isControlAvatar())
                 // {
@@ -4778,8 +4778,8 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
     if (!getParent() && (isSitting() || was_sit_ground_constrained))
     {
 
-        F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ];
-        if (off_z != 0.0)
+        F32 off_z = (F32)LLVector3d(getHoverOffset()).mdV[VZ];
+        if (off_z != 0.0f)
         {
             LLVector3 pos = mRoot->getWorldPosition();
             pos.mV[VZ] += off_z;
@@ -8529,7 +8529,7 @@ void LLVOAvatar::updateTooSlow()
         auto it = std::find(sAVsIgnoringARTLimit.begin(), sAVsIgnoringARTLimit.end(), mID);
         if (it != sAVsIgnoringARTLimit.end())
         {
-            S32 index = it - sAVsIgnoringARTLimit.begin();
+            S32 index = (S32)(it - sAVsIgnoringARTLimit.begin());
             ignore_tune = (index < (MIN_NONTUNED_AVS - sAvatarsNearby + 1 + LLPerfStats::tunedAvatars));
         }
     }
@@ -9505,7 +9505,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
         std::vector<LLVisualParam*>::iterator it = std::find(contents.mParams.begin(), contents.mParams.end(),appearance_version_param);
         if (it != contents.mParams.end())
         {
-            S32 index = it - contents.mParams.begin();
+            S32 index = (S32)(it - contents.mParams.begin());
             contents.mParamAppearanceVersion = ll_round(contents.mParamWeights[index]);
             //LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL;
         }
@@ -11101,7 +11101,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
                     LLObjectComplexity object_complexity;
                     object_complexity.objectName = attached_object->getAttachmentItemName();
                     object_complexity.objectId = attached_object->getAttachmentItemID();
-                    object_complexity.objectCost = attachment_total_cost;
+                    object_complexity.objectCost = (U32)attachment_total_cost;
                     object_complexity_list.push_back(object_complexity);
                 }
             }
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index e4a7b53d9f..9c1c304133 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2346,7 +2346,7 @@ LLSD summarize_by_buckets(std::vector<LLSD> in_records,
             key[field] = record[field];
         }
         LLViewerStats::StatsAccumulator& stats = accum[key];
-        F32 value = record[val_field].asReal();
+        F32 value = (F32)record[val_field].asReal();
         stats.push(value);
     }
     for (std::map<LLSD,LLViewerStats::StatsAccumulator>::iterator accum_it = accum.begin();
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 0fe2a3e714..27c105c8d6 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -479,8 +479,8 @@ void LLVOCacheEntry::updateDebugSettings()
     LLMemory::updateMemoryInfo() ;
     U32 allocated_mem = LLMemory::getAllocatedMemKB().value();
     static const F32 KB_to_MB = 1.f / 1024.f;
-    U32 clamped_memory = llclamp(allocated_mem * KB_to_MB, (F32) low_mem_bound_MB, (F32) high_mem_bound_MB);
-    const F32 adjust_range = high_mem_bound_MB - low_mem_bound_MB;
+    U32 clamped_memory = (U32)llclamp(allocated_mem * KB_to_MB, (F32) low_mem_bound_MB, (F32) high_mem_bound_MB);
+    const F32 adjust_range = (F32)(high_mem_bound_MB - low_mem_bound_MB);
     const F32 adjust_factor = (high_mem_bound_MB - clamped_memory) / adjust_range; // [0, 1]
 
     //min radius: all objects within this radius remain loaded in memory
@@ -502,7 +502,7 @@ void LLVOCacheEntry::updateDebugSettings()
     static const U32 MIN_FRAMES = 10;
     static const U32 MAX_FRAMES = 64;
     const U32 clamped_frames = inv_obj_time ? llclamp((U32) inv_obj_time, MIN_FRAMES, MAX_FRAMES) : MAX_FRAMES; // [10, 64], with zero => 64
-    sMinFrameRange = MIN_FRAMES + ((clamped_frames - MIN_FRAMES) * adjust_factor);
+    sMinFrameRange = MIN_FRAMES + (U32)((clamped_frames - MIN_FRAMES) * adjust_factor);
 }
 #endif // LL_TEST
 
@@ -1762,7 +1762,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
 
         entry = new HeaderEntryInfo();
         entry->mHandle = handle ;
-        entry->mTime = time(NULL) ;
+        entry->mTime = (U32)time(NULL) ;
         entry->mIndex = mNumEntries++;
         mHeaderEntryQueue.insert(entry) ;
         mHandleEntryMap[handle] = entry ;
@@ -1775,7 +1775,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
         //resort
         mHeaderEntryQueue.erase(entry) ;
 
-        entry->mTime = time(NULL) ;
+        entry->mTime = (U32)time(NULL) ;
         mHeaderEntryQueue.insert(entry) ;
     }
 
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 371b0df860..fcb8a0a4f2 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1284,7 +1284,7 @@ bool LLVivoxVoiceClient::establishVoiceConnection()
             {
                 if (result.has("retry") && ++retries <= CONNECT_RETRY_MAX && !sShuttingDown)
                 {
-                    F32 timeout = LLSD::Real(result["retry"]);
+                    F32 timeout = (F32)LLSD::Real(result["retry"]);
                     timeout *= retries;
                     LL_INFOS("Voice") << "Retry connection to voice service in " << timeout << " seconds" << LL_ENDL;
                     llcoro::suspendUntilTimeout(timeout);
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 8049bb7a73..9b553928cf 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -710,7 +710,7 @@ void LLWebRTCVoiceClient::tuningSetSpeakerVolume(float volume)
 
     if (volume != mTuningSpeakerVolume)
     {
-        mTuningSpeakerVolume = volume;
+        mTuningSpeakerVolume = (int)volume;
     }
 }
 
@@ -718,11 +718,11 @@ float LLWebRTCVoiceClient::getAudioLevel()
 {
     if (mIsInTuningMode)
     {
-        return (1.0 - mWebRTCDeviceInterface->getTuningAudioLevel() * LEVEL_SCALE_WEBRTC) * mTuningMicGain / 2.1;
+        return (1.0f - mWebRTCDeviceInterface->getTuningAudioLevel() * LEVEL_SCALE_WEBRTC) * mTuningMicGain / 2.1f;
     }
     else
     {
-        return (1.0 - mWebRTCDeviceInterface->getPeerConnectionAudioLevel() * LEVEL_SCALE_WEBRTC) * mMicGain / 2.1;
+        return (1.0f - mWebRTCDeviceInterface->getPeerConnectionAudioLevel() * LEVEL_SCALE_WEBRTC) * mMicGain / 2.1f;
     }
 }
 
@@ -2096,7 +2096,7 @@ LLVoiceWebRTCConnection::LLVoiceWebRTCConnection(const LLUUID &regionID, const s
 {
     // retries wait a short period...randomize it so
     // all clients don't try to reconnect at once.
-    mRetryWaitSecs = ((F32) rand() / (RAND_MAX)) + 0.5;
+    mRetryWaitSecs = (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
 
     mWebRTCPeerConnectionInterface = llwebrtc::newPeerConnection();
     mWebRTCPeerConnectionInterface->setSignalingObserver(this);
@@ -2678,7 +2678,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
         case VOICE_STATE_SESSION_UP:
         {
             mRetryWaitPeriod = 0;
-            mRetryWaitSecs   = ((F32) rand() / (RAND_MAX)) + 0.5;
+            mRetryWaitSecs   = (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
 
             // we'll stay here as long as the session remains up.
             if (mShutDown)
@@ -2700,7 +2700,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
                 {
                     // back off the retry period, and do it by a small random
                     // bit so all clients don't reconnect at once.
-                    mRetryWaitSecs += ((F32) rand() / (RAND_MAX)) + 0.5;
+                    mRetryWaitSecs += (F32)((F32) rand() / (RAND_MAX)) + 0.5f;
                     mRetryWaitPeriod = 0;
                 }
             }
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 2b8ed74b0f..ab8d0d2564 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -107,7 +107,7 @@ void LLSkyTex::init(bool isShiny)
     {
         mTexture[i] = LLViewerTextureManager::getLocalTexture(false);
         mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
-        mImageRaw[i] = new LLImageRaw(SKYTEX_RESOLUTION, SKYTEX_RESOLUTION, SKYTEX_COMPONENTS);
+        mImageRaw[i] = new LLImageRaw((U16)SKYTEX_RESOLUTION, (U16)SKYTEX_RESOLUTION, (S8)SKYTEX_COMPONENTS);
 
         initEmpty(i);
     }
@@ -139,7 +139,7 @@ LLSkyTex::~LLSkyTex()
 
 S32 LLSkyTex::getResolution()
 {
-    return SKYTEX_RESOLUTION;
+    return (S32)SKYTEX_RESOLUTION;
 }
 
 S32 LLSkyTex::getCurrent()
@@ -172,8 +172,8 @@ void LLSkyTex::initEmpty(const S32 tex)
     {
         for (S32 j = 0; j < SKYTEX_RESOLUTION; ++j)
         {
-            const S32 basic_offset = (i * SKYTEX_RESOLUTION + j);
-            S32 offset = basic_offset * SKYTEX_COMPONENTS;
+            const S32 basic_offset = (i * (S32)SKYTEX_RESOLUTION + j);
+            S32 offset = basic_offset * (S32)SKYTEX_COMPONENTS;
             data[offset] = 0;
             data[offset+1] = 0;
             data[offset+2] = 0;
@@ -194,8 +194,8 @@ void LLSkyTex::create()
     {
         for (S32 j = 0; j < SKYTEX_RESOLUTION; ++j)
         {
-            const S32 basic_offset = (i * SKYTEX_RESOLUTION + j);
-            S32 offset = basic_offset * SKYTEX_COMPONENTS;
+            const S32 basic_offset = (i * (S32)SKYTEX_RESOLUTION + j);
+            S32 offset = basic_offset * (S32)SKYTEX_COMPONENTS;
             U32* pix = (U32*)(data + offset);
             LLColor4U temp = LLColor4U(mSkyData[basic_offset]);
             *pix = temp.asRGBA();
@@ -392,8 +392,8 @@ const LLVector3* LLHeavenBody::corners() const
         Sky
 ***************************************/
 
-const S32 SKYTEX_TILE_RES_X = SKYTEX_RESOLUTION / NUM_TILES_X;
-const S32 SKYTEX_TILE_RES_Y = SKYTEX_RESOLUTION / NUM_TILES_Y;
+const S32 SKYTEX_TILE_RES_X = (S32)SKYTEX_RESOLUTION / NUM_TILES_X;
+const S32 SKYTEX_TILE_RES_Y = (S32)SKYTEX_RESOLUTION / NUM_TILES_Y;
 
 LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
 :   LLStaticViewerObject(id, pcode, regionp, true),
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index ad7570105e..17cffcadb4 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -83,26 +83,26 @@ protected:
 
     void setDir(const LLVector3 &dir, const S32 i, const S32 j)
     {
-        S32 offset = i * SKYTEX_RESOLUTION + j;
+        S32 offset = (S32)(i * SKYTEX_RESOLUTION + j);
         mSkyDirs[offset] = dir;
     }
 
     const LLVector3 &getDir(const S32 i, const S32 j) const
     {
-        S32 offset = i * SKYTEX_RESOLUTION + j;
+        S32 offset = (S32)(i * SKYTEX_RESOLUTION + j);
         return mSkyDirs[offset];
     }
 
     void setPixel(const LLColor4 &col, const S32 i, const S32 j)
     {
-        S32 offset = i * SKYTEX_RESOLUTION + j;
+        S32 offset = (S32)(i * SKYTEX_RESOLUTION + j);
         mSkyData[offset] = col;
     }
 
     void setPixel(const LLColor4U &col, const S32 i, const S32 j)
     {
         LLImageDataSharedLock lock(mImageRaw[sCurrent]);
-        S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS;
+        S32 offset = (S32)((i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS);
         U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
         *pix = col.asRGBA();
     }
@@ -111,7 +111,7 @@ protected:
     {
         LLColor4U col;
         LLImageDataSharedLock lock(mImageRaw[sCurrent]);
-        S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS;
+        S32 offset = (S32)((i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS);
         U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]);
         col.fromRGBA( *pix );
         return col;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 45713071bb..2630aaf43e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1275,8 +1275,8 @@ void LLVOVolume::sculpt()
         if(current_discard < -2)
         {
             static S32 low_sculpty_discard_warning_count = 1;
-            S32 exponent = llmax(1, llfloor( log10((F64) low_sculpty_discard_warning_count) ));
-            S32 interval = pow(10.0, exponent);
+            S32 exponent = llmax(1, llfloor((F32)log10((F64) low_sculpty_discard_warning_count)));
+            S32 interval = (S32)pow(10.0, exponent);
             if ( low_sculpty_discard_warning_count < 10 ||
                 (low_sculpty_discard_warning_count % interval) == 0)
             {   // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
@@ -1294,8 +1294,8 @@ void LLVOVolume::sculpt()
         else if (current_discard > MAX_DISCARD_LEVEL)
         {
             static S32 high_sculpty_discard_warning_count = 1;
-            S32 exponent = llmax(1, llfloor( log10((F64) high_sculpty_discard_warning_count) ));
-            S32 interval = pow(10.0, exponent);
+            S32 exponent = llmax(1, llfloor((F32)log10((F64) high_sculpty_discard_warning_count)));
+            S32 interval = (S32)pow(10.0, exponent);
             if ( high_sculpty_discard_warning_count < 10 ||
                 (high_sculpty_discard_warning_count % interval) == 0)
             {   // Log first 10 time, then decreasing intervals afterwards otherwise this can flood the logs
@@ -1541,7 +1541,7 @@ bool LLVOVolume::calcLOD()
         if (isRootEdit())
         {
             S32 total_tris = recursiveGetTriangleCount();
-            S32 est_max_tris = recursiveGetEstTrianglesMax();
+            S32 est_max_tris = (S32)recursiveGetEstTrianglesMax();
             setDebugText(llformat("TRIS SHOWN %d EST %d", total_tris, est_max_tris));
         }
     }
@@ -4053,12 +4053,12 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
             // Scaling here is to make animated object vs
             // non-animated object ARC proportional to the
             // corresponding calculations for streaming cost.
-            num_triangles = (ANIMATED_OBJECT_COST_PER_KTRI * 0.001 * costs.getEstTrisForStreamingCost())/0.06;
+            num_triangles = (U32)((ANIMATED_OBJECT_COST_PER_KTRI * 0.001f * costs.getEstTrisForStreamingCost())/0.06f);
         }
         else
         {
             F32 radius = getScale().length()*0.5f;
-            num_triangles = costs.getRadiusWeightedTris(radius);
+            num_triangles = (U32)costs.getRadiusWeightedTris(radius);
         }
     }
 
@@ -4534,7 +4534,7 @@ F32 LLVOVolume::getBinRadius()
     }
     else
     {
-        F32 szf = size_factor;
+        F32 szf = (F32)size_factor;
         radius = llmax(mDrawable->getRadius(), szf);
         //radius = llmax(radius, mDrawable->mDistanceWRTCamera * distance_factor[0]);
     }
@@ -5879,7 +5879,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                             F32 alpha;
                             if (is_pbr)
                             {
-                                alpha = gltf_mat ? gltf_mat->mBaseColor.mV[3] : 1.0;
+                                alpha = gltf_mat ? gltf_mat->mBaseColor.mV[3] : 1.0f;
                             }
                             else
                             {
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 2bc849a74f..4a7e231f30 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -138,8 +138,8 @@ bool LLVOWater::updateGeometry(LLDrawable *drawable)
     S32 size_y = LLPipeline::sRenderTransparentWater ? 8 : 1;
 
     const LLVector3& scale = getScale();
-    size_x *= llmin(llround(scale.mV[0] / 256.f), 8);
-    size_y *= llmin(llround(scale.mV[1] / 256.f), 8);
+    size_x *= (S32)llmin(llround(scale.mV[0] / 256.f), 8);
+    size_y *= (S32)llmin(llround(scale.mV[1] / 256.f), 8);
 
     const S32 num_quads = size_x * size_y;
     face->setSize(vertices_per_quad * num_quads,
@@ -191,8 +191,8 @@ bool LLVOWater::updateGeometry(LLDrawable *drawable)
             position_agent.mV[VX] += (x + 0.5f) * step_x;
             position_agent.mV[VY] += (y + 0.5f) * step_y;
 
-            position_agent.mV[VX] = llround(position_agent.mV[VX]);
-            position_agent.mV[VY] = llround(position_agent.mV[VY]);
+            position_agent.mV[VX] = (F32)llround(position_agent.mV[VX]);
+            position_agent.mV[VY] = (F32)llround(position_agent.mV[VY]);
 
             *verticesp++  = position_agent - right + up;
             *verticesp++  = position_agent - right - up;
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 6470c81aaa..014d4134f5 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -805,10 +805,10 @@ void LLWorld::updateNetStats()
     add(LLStatViewer::PACKETS_OUT, packets_out);
     add(LLStatViewer::PACKETS_LOST, packets_lost);
 
-    F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
-    if (total_packets_in > 0)
+    F32 total_packets_in = (F32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
+    if (total_packets_in > 0.f)
     {
-        F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
+        F32 total_packets_lost = (F32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
         sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in));
     }
 
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 09a18a9825..a0eec1e941 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -255,7 +255,7 @@ void LLWorldMapView::zoom(F32 zoom)
 void LLWorldMapView::zoomWithPivot(F32 zoom, S32 x, S32 y)
 {
     mTargetMapScale = scaleFromZoom(zoom);
-    sZoomPivot      = LLVector2(x, y);
+    sZoomPivot      = LLVector2((F32)x, (F32)y);
     if (!sZoomTimer.getStarted() && mMapScale != mTargetMapScale)
     {
         sZoomTimer.start();
@@ -297,8 +297,8 @@ void LLWorldMapView::setScale(F32 scale, bool snap)
         if (!sZoomPivot.isExactlyZero())
         {
             LLVector2 relative_pivot;
-            relative_pivot.mV[VX]     = sZoomPivot.mV[VX] - (getRect().getWidth() / 2.0);
-            relative_pivot.mV[VY]     = sZoomPivot.mV[VY] - (getRect().getHeight() / 2.0);
+            relative_pivot.mV[VX]     = sZoomPivot.mV[VX] - (getRect().getWidth() / 2.0f);
+            relative_pivot.mV[VY]     = sZoomPivot.mV[VY] - (getRect().getHeight() / 2.0f);
             LLVector2 zoom_pan_offset = relative_pivot - (relative_pivot * scale / old_scale);
             mPanX += zoom_pan_offset.mV[VX];
             mPanY += zoom_pan_offset.mV[VY];
@@ -422,8 +422,8 @@ void LLWorldMapView::draw()
 
         // Find x and y position relative to camera's center.
         LLVector3d rel_region_pos = origin_global - camera_global;
-        F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * mMapScale;
-        F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * mMapScale;
+        F32 relative_x = (F32)(rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * mMapScale;
+        F32 relative_y = (F32)(rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * mMapScale;
 
         // Coordinates of the sim in pixels in the UI panel
         // When the view isn't panned, 0,0 = center of rectangle
@@ -514,11 +514,11 @@ void LLWorldMapView::draw()
             {
                 font->renderUTF8(
                     mesg, 0,
-                    llfloor(left + 3), llfloor(bottom + 2),
+                    (F32)llfloor(left + 3), (F32)llfloor(bottom + 2),
                     LLColor4::white,
                     LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW,
                     S32_MAX, //max_chars
-                    mMapScale, //max_pixels
+                    (S32)mMapScale, //max_pixels
                     NULL,
                     /*use_ellipses*/true);
             }
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 55622fb6b7..a415e8983d 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -278,8 +278,8 @@ LLXMLRPCTransaction::Impl::Impl
     httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
 
     // Delay between repeats will start from 5 sec and grow to 20 sec with each repeat
-    httpOpts->setMinBackoff(5E6L);
-    httpOpts->setMaxBackoff(20E6L);
+    httpOpts->setMinBackoff((LLCore::HttpTime)5E6L);
+    httpOpts->setMaxBackoff((LLCore::HttpTime)20E6L);
 
     httpOpts->setTimeout(http_params.has("timeout") ? http_params["timeout"].asInteger() : 40L);
     if (http_params.has("retries"))
diff --git a/indra/newview/noise.h b/indra/newview/noise.h
index ae819cf542..fe3292ab9e 100644
--- a/indra/newview/noise.h
+++ b/indra/newview/noise.h
@@ -344,7 +344,7 @@ static void init(void)
     }
 
     // reintroduce entropy
-    srand(time(NULL));      // Flawfinder: ignore
+    srand((unsigned int)time(NULL));      // Flawfinder: ignore
 }
 
 #undef B
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f83774c39e..5598660368 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1241,7 +1241,7 @@ void LLPipeline::createGLBuffers()
         F32 noise[noiseRes*noiseRes*3];
         for (U32 i = 0; i < noiseRes*noiseRes*3; i++)
         {
-            noise[i] = ll_frand()*2.0-1.0;
+            noise[i] = ll_frand()*2.0f-1.0f;
         }
 
         LLImageGL::generateTextures(1, &mTrueNoiseMap);
@@ -6914,7 +6914,7 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool
             }
         }
         shader->uniform1f(dt, gFrameIntervalSeconds);
-        shader->uniform2f(noiseVec, ll_frand() * 2.0 - 1.0, ll_frand() * 2.0 - 1.0);
+        shader->uniform2f(noiseVec, ll_frand() * 2.0f - 1.0f, ll_frand() * 2.0f - 1.0f);
         shader->uniform3f(dynamic_exposure_params, dynamic_exposure_coefficient, exp_min, exp_max);
 
         mScreenTriangleVB->setBuffer();
@@ -6960,7 +6960,7 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
 
         shader.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap);
 
-        shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, src->getWidth(), src->getHeight());
+        shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight());
 
         static LLCachedControl<F32> exposure(gSavedSettings, "RenderExposure", 1.f);
 
@@ -7039,8 +7039,8 @@ void LLPipeline::generateGlow(LLRenderTarget* src)
                 gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
             }
             gGlowExtractProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
-                                          mGlow[2].getWidth(),
-                                          mGlow[2].getHeight());
+                                          (GLfloat)mGlow[2].getWidth(),
+                                          (GLfloat)mGlow[2].getHeight());
         }
 
         {
@@ -7365,7 +7365,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
 
                 gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
                 gDeferredCoFProgram.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
-                gDeferredCoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, dst->getWidth(), dst->getHeight());
+                gDeferredCoFProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
                 gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance / 1000.f);
                 gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
                 gDeferredCoFProgram.uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f / LLDrawable::sCurPixelAngle));
@@ -7391,7 +7391,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
                 gDeferredPostProgram.bind();
                 gDeferredPostProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, &mRT->deferredLight, LLTexUnit::TFO_POINT);
 
-                gDeferredPostProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, dst->getWidth(), dst->getHeight());
+                gDeferredPostProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
                 gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
                 gDeferredPostProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
 
@@ -7424,7 +7424,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
                 gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
                 gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_LIGHT, &mRT->deferredLight, LLTexUnit::TFO_POINT);
 
-                gDeferredDoFCombineProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, dst->getWidth(), dst->getHeight());
+                gDeferredDoFCombineProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)dst->getWidth(), (GLfloat)dst->getHeight());
                 gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
                 gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
                 gDeferredDoFCombineProgram.uniform1f(LLShaderMgr::DOF_WIDTH, (dof_width - 1) / (F32)src->getWidth());
@@ -7787,15 +7787,15 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
     shader.uniform1f(LLShaderMgr::DEFERRED_BLUR_SIZE, RenderShadowBlurSize);
 
     shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
-    shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale);
+    shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, (GLfloat)RenderSSAOMaxScale);
 
     F32 ssao_factor = RenderSSAOFactor;
     shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
-    shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0/ssao_factor);
+    shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0f/ssao_factor);
 
     LLVector3 ssao_effect = RenderSSAOEffect;
-    F32 matrix_diag = (ssao_effect[0] + 2.0*ssao_effect[1])/3.0;
-    F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0;
+    F32 matrix_diag = (ssao_effect[0] + 2.0f*ssao_effect[1])/3.0f;
+    F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0f;
     // This matrix scales (proj of color onto <1/rt(3),1/rt(3),1/rt(3)>) by
     // value factor, and scales remainder by saturation factor
     F32 ssao_effect_mat[] = {   matrix_diag, matrix_nondiag, matrix_nondiag,
@@ -7807,7 +7807,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
     F32 shadow_bias_error = RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2])/3000.f;
     F32 shadow_bias       = RenderShadowBias + shadow_bias_error;
 
-    shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, deferred_target->getWidth(), deferred_target->getHeight());
+    shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)deferred_target->getWidth(), (GLfloat)deferred_target->getHeight());
     shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
     shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset); //*shadow_offset_error);
     shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, shadow_bias);
@@ -7816,8 +7816,8 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
 
     shader.uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, mTransformedSunDir.mV);
     shader.uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, mTransformedMoonDir.mV);
-    shader.uniform2f(LLShaderMgr::DEFERRED_SHADOW_RES, mRT->shadow[0].getWidth(), mRT->shadow[0].getHeight());
-    shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, mSpotShadow[0].getWidth(), mSpotShadow[0].getHeight());
+    shader.uniform2f(LLShaderMgr::DEFERRED_SHADOW_RES, (GLfloat)mRT->shadow[0].getWidth(), (GLfloat)mRT->shadow[0].getHeight());
+    shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, (GLfloat)mSpotShadow[0].getWidth(), (GLfloat)mSpotShadow[0].getHeight());
     shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
     shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
 
@@ -7948,8 +7948,8 @@ void LLPipeline::renderDeferredLighting()
 
                 gDeferredSunProgram.uniform3fv(sOffset, slice, offset);
                 gDeferredSunProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
-                                              deferred_light_target->getWidth(),
-                                              deferred_light_target->getHeight());
+                                              (GLfloat)deferred_light_target->getWidth(),
+                                              (GLfloat)deferred_light_target->getHeight());
 
                 {
                     LLGLDisable   blend(GL_BLEND);
@@ -8648,7 +8648,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
         {
             gGL.getTexUnit(channel)->bind(img);
 
-            F32 lod_range = logf(img->getWidth())/logf(2.f);
+            F32 lod_range = logf((F32)img->getWidth())/logf(2.f);
 
             shader.uniform1f(LLShaderMgr::PROJECTOR_FOCUS, focus);
             shader.uniform1f(LLShaderMgr::PROJECTOR_LOD, lod_range);
@@ -8773,17 +8773,17 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
     }
 
 
-    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ITR_COUNT, RenderScreenSpaceReflectionIterations);
+    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ITR_COUNT, (GLfloat)RenderScreenSpaceReflectionIterations);
     shader.uniform1f(LLShaderMgr::DEFERRED_SSR_DIST_BIAS, RenderScreenSpaceReflectionDistanceBias);
     shader.uniform1f(LLShaderMgr::DEFERRED_SSR_RAY_STEP, RenderScreenSpaceReflectionRayStep);
-    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_GLOSSY_SAMPLES, RenderScreenSpaceReflectionGlossySamples);
+    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_GLOSSY_SAMPLES, (GLfloat)RenderScreenSpaceReflectionGlossySamples);
     shader.uniform1f(LLShaderMgr::DEFERRED_SSR_REJECT_BIAS, RenderScreenSpaceReflectionDepthRejectBias);
     mPoissonOffset++;
 
     if (mPoissonOffset > 128 - RenderScreenSpaceReflectionGlossySamples)
         mPoissonOffset = 0;
 
-    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_NOISE_SINE, mPoissonOffset);
+    shader.uniform1f(LLShaderMgr::DEFERRED_SSR_NOISE_SINE, (GLfloat)mPoissonOffset);
     shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ADAPTIVE_STEP_MULT, RenderScreenSpaceReflectionAdaptiveStepMultiplier);
 
     channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH);
@@ -9949,7 +9949,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
         {
             LLTrace::CountStatHandle<>* velocity_stat = LLViewerCamera::getVelocityStat();
             F32 fade_amt = gFrameIntervalSeconds.value()
-                * llmax(LLTrace::get_frame_recording().getLastRecording().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecording().getDuration().value(), 1.0);
+                * (F32)llmax(LLTrace::get_frame_recording().getLastRecording().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecording().getDuration().value(), 1.0);
 
             // should never happen
             llassert(mTargetShadowSpotLight[0] != mTargetShadowSpotLight[1] || mTargetShadowSpotLight[0].isNull());
@@ -10116,8 +10116,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
 
     for (U32 i = 0; i < 16; i++)
     {
-        gGLLastModelView[i] = last_modelview[i];
-        gGLLastProjection[i] = last_projection[i];
+        gGLLastModelView[i] = (F32)last_modelview[i];
+        gGLLastProjection[i] = (F32)last_projection[i];
     }
 
     popRenderTypeMask();
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index 3bb549a98a..f77402065a 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -293,7 +293,7 @@ namespace tut
             len = BUFFER_LEN;
             last = mBuffer.readAfter(ch.in(), last, (U8*)buf, len);
             char* newline = strchr((char*)buf, '\n');
-            S32 offset = -((len - 1) - (newline - buf));
+            S32 offset = -((len - 1) - (S32)(newline - buf));
             ++newline;
             *newline = '\0';
             last_line.assign(buf);
-- 
cgit v1.2.3


From 499a717f62458ecddac270f069d283cf2ed62712 Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Mon, 8 Jul 2024 20:46:45 +0200
Subject: Remove ancient MSVC7 code

---
 indra/llcommon/llpreprocessor.h    |  3 ---
 indra/newview/llappviewerwin32.cpp | 13 -------------
 2 files changed, 16 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 0248e8f8b9..34816acc23 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -74,9 +74,6 @@
     #ifndef LL_MSVC
         #define LL_MSVC 1
     #endif
-    #if _MSC_VER < 1400
-        #define LL_MSVC7 //Visual C++ 2003 or earlier
-    #endif
 #endif
 
 // Deal with minor differences on Unixy OSes.
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 83fa4a3ca9..c4c6dd3327 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -197,19 +197,6 @@ LONG WINAPI catchallCrashHandler(EXCEPTION_POINTERS * /*ExceptionInfo*/)
     return 0;
 }
 
-// *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib
-// The lib was compiled under VS2005 - in VS2003 we need to remap assert
-#ifdef LL_DEBUG
-#ifdef LL_MSVC7
-extern "C" {
-    void _wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line)
-    {
-        LL_ERRS() << _Message << LL_ENDL;
-    }
-}
-#endif
-#endif
-
 const std::string LLAppViewerWin32::sWindowClass = "Second Life";
 
 /*
-- 
cgit v1.2.3


From 989cfe2f70441fe02222d369e84118a94dc96890 Mon Sep 17 00:00:00 2001
From: Henri Beauchamp <sldev@free.fr>
Date: Mon, 8 Jul 2024 23:18:02 +0200
Subject: Fix for crash in XMLRPC reply decoding on login with large
 inventories

Commit 2ea5ac0c43e3e28d2b1774f5367d099271a1da32 introduced a crash bug
due to the recursive construction of the XMLTreeNode wrapper class.
The constructor of the said class typically recurses twice as many times
as there are entries in the user's inventory list.

This commit:
- Moves the fromXMLRPCValue() method and its helper functions from the LLSD
  class/module to the LLXMLNode class, where it belongs, thus making
  LLSD::TreeNode (which was a wrapper class to avoid making llcommon
  dependant on llxml, which is still the case after this commit) totally
  moot; the fromXMLRPCValue() call is now done directly on the LLXMLNode.
- Moves the XML and XMLRPC decoding code out of the HTTP coroutine
  LLXMLRPCTransaction::Handler (coroutines got an even smaller and fixed
  stack), and into LLXMLRPCTransaction::Impl::process().
- Removes XMLTreeNode entirely, fixing the crash as a result.
---
 indra/llcommon/llsd.cpp               | 147 ---------------------------
 indra/llcommon/llsd.h                 |  10 --
 indra/llxml/llxmlnode.cpp             | 172 ++++++++++++++++++++++++++++++++
 indra/llxml/llxmlnode.h               |   9 +-
 indra/newview/llxmlrpctransaction.cpp | 183 +++++++++++++++++-----------------
 5 files changed, 269 insertions(+), 252 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 2bbe06e72f..77fe545c3f 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -1018,153 +1018,6 @@ const LLSD::String& LLSD::asStringRef() const { return safe(impl).asStringRef();
 
 LLSD::String LLSD::asXMLRPCValue() const { return "<value>" + safe(impl).asXMLRPCValue() + "</value>"; }
 
-static bool inline check(bool condition, const char* warning_message)
-{
-    if (!condition)
-    {
-        LL_WARNS() << warning_message << LL_ENDL;
-    }
-
-    return condition;
-}
-
-static bool parseXMLRPCArrayValue(LLSD& target, LLSD::TreeNode* node)
-{
-    LLSD::TreeNode* data = node->getFirstChild();
-    if (!check(data, "No array inner XML element (<data> expected)") ||
-        !check(data->hasName("data"), "Invalid array inner XML element (<data> expected)") ||
-        !check(!data->getNextSibling(), "Multiple array inner XML elements (single <data> expected)"))
-        return false;
-
-    for (LLSD::TreeNode* item = data->getFirstChild(); item; item = item->getNextSibling())
-    {
-        LLSD value;
-        if (!value.fromXMLRPCValue(item))
-            return false;
-
-        target.append(value);
-    }
-
-    return true;
-}
-
-static bool parseXMLRPCStructValue(LLSD& target, LLSD::TreeNode* node)
-{
-    for (LLSD::TreeNode* item = node->getFirstChild(); item; item = item->getNextSibling())
-    {
-        if (!check(item->hasName("member"), "Invalid struct inner XML element (<member> expected)"))
-            return false;
-
-        std::string name;
-        LLSD value;
-        for (LLSD::TreeNode* subitem = item->getFirstChild(); subitem; subitem = subitem->getNextSibling())
-        {
-            if (subitem->hasName("name"))
-            {
-                name = LLStringFn::xml_decode(subitem->getTextContents());
-            }
-            else if (!value.fromXMLRPCValue(subitem))
-            {
-                return false;
-            }
-        }
-        if (!check(!name.empty(), "Empty struct member name"))
-            return false;
-
-        target.insert(name, value);
-    }
-
-    return true;
-}
-
-bool LLSD::fromXMLRPCValue(TreeNode* node)
-{
-    clear();
-
-    llassert(node);
-    if (!node)
-        return false;
-
-    if (!check(node->hasName("value"), "Invalid XML element (<value> expected)"))
-        return false;
-
-    TreeNode* inner = node->getFirstChild();
-    if (!inner)
-    {
-        check(false, "No inner XML element (value type expected)");
-        // Value with no type qualifier is treated as string
-        assign(LLStringFn::xml_decode(node->getTextContents()));
-        return true;
-    }
-
-    if (!check(!inner->getNextSibling(), "Multiple inner XML elements (single expected)"))
-        return false;
-
-    if (inner->hasName("string"))
-    {
-        assign(LLStringFn::xml_decode(inner->getTextContents()));
-        return true;
-    }
-
-    if (inner->hasName("int") || inner->hasName("i4"))
-    {
-        assign(std::stoi(inner->getTextContents()));
-        return true;
-    }
-
-    if (inner->hasName("double"))
-    {
-        assign(std::stod(inner->getTextContents()));
-        return true;
-    }
-
-    if (inner->hasName("boolean"))
-    {
-        assign(!!std::stoi(inner->getTextContents()));
-        return true;
-    }
-
-    if (inner->hasName("dateTime.iso8601"))
-    {
-        assign(Date(inner->getTextContents()));
-        return true;
-    }
-
-    if (inner->hasName("base64"))
-    {
-        std::string decoded = LLBase64::decodeAsString(inner->getTextContents());
-        Binary binary(decoded.size());
-        memcpy(binary.data(), decoded.data(), decoded.size());
-        assign(binary);
-        return true;
-    }
-
-    if (inner->hasName("array"))
-    {
-        if (!parseXMLRPCArrayValue(*this, inner))
-        {
-            clear();
-            return false;
-        }
-        return true;
-    }
-
-    if (inner->hasName("struct"))
-    {
-        if (!parseXMLRPCStructValue(*this, inner))
-        {
-            clear();
-            return false;
-        }
-        return true;
-    }
-
-    check(false, "Unknown inner XML element (known value type expected)");
-    // Value with unknown type qualifier is treated as string
-    assign(LLStringFn::xml_decode(inner->getTextContents()));
-    return true;
-}
-
 // const char * helpers
 LLSD::LLSD(const char* v) : impl(0)     { ALLOC_LLSD_OBJECT;    assign(v); }
 void LLSD::assign(const char* v)
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 781e8d58e9..d2b3548831 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -290,16 +290,6 @@ public:
         // See http://xmlrpc.com/spec.md
         String asXMLRPCValue() const;
 
-        struct TreeNode
-        {
-            virtual bool hasName(const String& name) const = 0;
-            virtual String getTextContents() const = 0;
-            virtual TreeNode* getFirstChild() const = 0;
-            virtual TreeNode* getNextSibling() const = 0;
-        };
-
-        bool fromXMLRPCValue(TreeNode* node);
-
         operator Boolean() const    { return asBoolean(); }
         operator Integer() const    { return asInteger(); }
         operator Real() const       { return asReal(); }
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 7f6b8093fc..8eb4556828 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -38,7 +38,9 @@
 #include "v3math.h"
 #include "v3dmath.h"
 #include "v4math.h"
+#include "llbase64.h"
 #include "llquaternion.h"
+#include "llsd.h"
 #include "llstring.h"
 #include "lluuid.h"
 #include "lldir.h"
@@ -3263,3 +3265,173 @@ S32 LLXMLNode::getLineNumber()
 {
     return mLineNumber;
 }
+
+bool LLXMLNode::parseXmlRpcArrayValue(LLSD& target)
+{
+    LLXMLNode* datap = getFirstChild().get();
+    if (!datap)
+    {
+        LL_WARNS() << "No inner XML element." << LL_ENDL;
+        return false;
+    }
+    if (!datap->hasName("data"))
+    {
+        LL_WARNS() << "No inner XML element (<data> expected, got: "
+                   << datap->mName->mString << ")" << LL_ENDL;
+        return false;
+    }
+    if (datap->getNextSibling().get())
+    {
+        LL_WARNS() << "Multiple inner XML elements (single <data> expected)"
+                   << LL_ENDL;
+        return false;
+    }
+    U32 i = 0;
+    for (LLXMLNode* itemp = datap->getFirstChild().get(); itemp;
+         itemp = itemp->getNextSibling().get())
+    {
+        LLSD value;
+        if (!itemp->fromXMLRPCValue(value))
+        {
+            return false;
+        }
+        target.append(value);
+        ++i;
+    }
+    return true;
+}
+
+bool LLXMLNode::parseXmlRpcStructValue(LLSD& target)
+{
+    std::string name;
+    LLSD value;
+    for (LLXMLNode* itemp = getFirstChild().get(); itemp;
+         itemp = itemp->getNextSibling().get())
+    {
+        if (!itemp->hasName("member"))
+        {
+            LL_WARNS() << "Invalid inner XML element (<member> expected, got: <"
+                       << itemp->mName->mString << ">" << LL_ENDL;
+            return false;
+        }
+        name.clear();
+        value.clear();
+        for (LLXMLNode* chilp = itemp->getFirstChild().get(); chilp;
+             chilp = chilp->getNextSibling().get())
+        {
+            if (chilp->hasName("name"))
+            {
+                name = LLStringFn::xml_decode(chilp->getTextContents());
+            }
+            else if (!chilp->fromXMLRPCValue(value))
+            {
+                return false;
+            }
+        }
+        if (name.empty())
+        {
+            LL_WARNS() << "Empty struct member name" << LL_ENDL;
+            return false;
+        }
+        target.insert(name, value);
+    }
+    return true;
+}
+
+bool LLXMLNode::fromXMLRPCValue(LLSD& target)
+{
+    target.clear();
+
+    if (!hasName("value"))
+    {
+        LL_WARNS() << "Invalid XML element (<value> expected), got: <"
+                   << mName->mString << ">" << LL_ENDL;
+        return false;
+    }
+
+    LLXMLNode* childp = getFirstChild().get();
+    if (!childp)
+    {
+        LL_WARNS() << "No inner XML element (value type expected)" << LL_ENDL;
+        // Value with no type qualifier is treated as string
+        target.assign(LLStringFn::xml_decode(getTextContents()));
+        return true;
+    }
+
+    if (childp->getNextSibling())
+    {
+        LL_WARNS() << "Multiple inner XML elements (single expected)"
+                   << LL_ENDL;
+        return false;
+    }
+
+    if (childp->hasName("string"))
+    {
+        target.assign(LLStringFn::xml_decode(childp->getTextContents()));
+        return true;
+    }
+
+    if (childp->hasName("int") || childp->hasName("i4"))
+    {
+        target.assign(std::stoi(childp->getTextContents()));
+        return true;
+    }
+
+    if (childp->hasName("double"))
+    {
+        target.assign(std::stod(childp->getTextContents()));
+        return true;
+    }
+
+    if (childp->hasName("boolean"))
+    {
+        target.assign(std::stoi(childp->getTextContents()) != 0);
+        return true;
+    }
+
+    if (childp->hasName("dateTime.iso8601"))
+    {
+        target.assign(LLSD::Date(childp->getTextContents()));
+        return true;
+    }
+
+    if (childp->hasName("base64"))
+    {
+        std::string decoded =
+            LLBase64::decodeAsString(inner->getTextContents());
+        size_t size = decoded.size();
+        LLSD::Binary binary(size);
+        if (size)
+        {
+            memcpy((void*)binary.data(), (void*)decoded.data(), size);
+        }
+        target.assign(binary);
+        return true;
+    }
+
+    if (childp->hasName("array"))
+    {
+        if (!childp->parseXmlRpcArrayValue(target))
+        {
+            target.clear();
+            return false;
+        }
+        return true;
+    }
+
+    if (childp->hasName("struct"))
+    {
+        if (!childp->parseXmlRpcStructValue(target))
+        {
+            target.clear();
+            return false;
+        }
+        return true;
+    }
+
+    LL_WARNS() << "Unknown inner XML element (known value type expected)"
+               << LL_ENDL;
+    // Value with unknown type qualifier is treated as string
+    target.assign(LLStringFn::xml_decode(childp->getTextContents()));
+    return true;
+}
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index b8f9e1ff69..3769ec8293 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -50,6 +50,7 @@ class LLVector3d;
 class LLQuaternion;
 class LLColor4;
 class LLColor4U;
+class LLSD;
 
 
 struct CompareAttributes
@@ -284,12 +285,18 @@ public:
     void setAttributes(ValueType type, U32 precision, Encoding encoding, U32 length);
 //  void appendValue(const std::string& value); // Unused
 
+    bool fromXMLRPCValue(LLSD& target);
+
     // Unit Testing
     void createUnitTest(S32 max_num_children);
     bool performUnitTest(std::string &error_buffer);
 
 protected:
     bool removeChild(LLXMLNode* child);
+    bool isFullyDefault();
+
+    bool parseXmlRpcArrayValue(LLSD& target);
+    bool parseXmlRpcStructValue(LLSD& target);
 
 public:
     std::string mID;                // The ID attribute of this node
@@ -328,8 +335,6 @@ protected:
     static const char *skipNonWhitespace(const char *str);
     static const char *parseInteger(const char *str, U64 *dest, bool *is_negative, U32 precision, Encoding encoding);
     static const char *parseFloat(const char *str, F64 *dest, U32 precision, Encoding encoding);
-
-    bool isFullyDefault();
 };
 
 #endif // LL_LLXMLNODE
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 55622fb6b7..9dedb685db 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -68,17 +68,13 @@ class LLXMLRPCTransaction::Handler : public LLCore::HttpHandler
 {
 public:
     Handler(LLCore::HttpRequest::ptr_t &request, LLXMLRPCTransaction::Impl *impl);
-    virtual ~Handler();
 
-    virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
+    void onCompleted(LLCore::HttpHandle handle,
+                     LLCore::HttpResponse* response) override;
 
     typedef std::shared_ptr<LLXMLRPCTransaction::Handler> ptr_t;
 
 private:
-
-    bool parseResponse(LLXMLNodePtr root);
-    bool parseValue(LLSD& target, LLXMLNodePtr source);
-
     LLXMLRPCTransaction::Impl *mImpl;
     LLCore::HttpRequest::ptr_t mRequest;
 };
@@ -104,6 +100,8 @@ public:
 
     std::string         mResponseText;
     LLSD                mResponseData;
+	bool                mHasResponse;
+	bool                mResponseParsed;
 
     std::string         mCertStore;
     LLSD                mErrorCertData;
@@ -120,6 +118,10 @@ public:
 
     void setStatus(EStatus code, const std::string& message = "", const std::string& uri = "");
     void setHttpStatus(const LLCore::HttpStatus &status);
+
+private:
+    bool parseResponse(LLXMLNodePtr root);
+    bool parseValue(LLSD& target, LLXMLNodePtr source);
 };
 
 LLXMLRPCTransaction::Handler::Handler(LLCore::HttpRequest::ptr_t &request,
@@ -129,10 +131,6 @@ LLXMLRPCTransaction::Handler::Handler(LLCore::HttpRequest::ptr_t &request,
 {
 }
 
-LLXMLRPCTransaction::Handler::~Handler()
-{
-}
-
 void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
     LLCore::HttpResponse * response)
 {
@@ -159,7 +157,6 @@ void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
         return;
     }
 
-    mImpl->setStatus(LLXMLRPCTransaction::StatusComplete);
     mImpl->mTransferStats = response->getTransferStats();
 
     // The contents of a buffer array are potentially noncontiguous, so we
@@ -169,88 +166,12 @@ void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
 
     body->read(0, mImpl->mResponseText.data(), body->size());
 
-    LLXMLNodePtr root;
-    if (!LLXMLNode::parseBuffer(mImpl->mResponseText.data(), body->size(), root, nullptr))
-    {
-        LL_WARNS() << "Failed parsing XML response; request URI: " << mImpl->mURI << LL_ENDL;
-        return;
-    }
-
-    if (!parseResponse(root))
-        return;
-
-    LL_INFOS() << "XML response parsed successfully; request URI: " << mImpl->mURI << LL_ENDL;
-}
-
-struct XMLTreeNode final : public LLSD::TreeNode
-{
-    XMLTreeNode(const LLXMLNodePtr impl)
-        : mImpl(impl)
-        , mFirstChild(impl ? create(impl->getFirstChild()) : nullptr)
-        , mNextSibling(impl ? create(impl->getNextSibling()) : nullptr)
-    {
-    }
-
-    static XMLTreeNode* create(LLXMLNodePtr node) { return node ? new XMLTreeNode(node) : nullptr; }
-
-    virtual bool hasName(const LLSD::String& name) const override { return mImpl && mImpl->hasName(name); }
-    virtual LLSD::String getTextContents() const override { return mImpl ? mImpl->getTextContents() : LLStringUtil::null; }
-    virtual TreeNode* getFirstChild() const override { return mFirstChild.get(); }
-    virtual TreeNode* getNextSibling() const override { return mNextSibling.get(); }
-
-private:
-    const LLXMLNodePtr mImpl;
-    const std::shared_ptr<XMLTreeNode> mFirstChild;
-    const std::shared_ptr<XMLTreeNode> mNextSibling;
-};
-
-bool LLXMLRPCTransaction::Handler::parseResponse(LLXMLNodePtr root)
-{
-    // We have alreasy checked in LLXMLNode::parseBuffer()
-    // that root contains exactly one child
-    if (!root->hasName("methodResponse"))
-    {
-        LL_WARNS() << "Invalid root element in XML response; request URI: " << mImpl->mURI << LL_ENDL;
-        return false;
-    }
-
-    LLXMLNodePtr first = root->getFirstChild();
-    LLXMLNodePtr second = first->getFirstChild();
-    if (!first->getNextSibling() && second && !second->getNextSibling())
-    {
-        if (first->hasName("fault"))
-        {
-            LLSD fault;
-            if (parseValue(fault, second) &&
-                fault.isMap() && fault.has("faultCode") && fault.has("faultString"))
-            {
-                LL_WARNS() << "Request failed;"
-                    << " faultCode: '" << fault.get("faultCode").asString() << "',"
-                    << " faultString: '" << fault.get("faultString").asString() << "',"
-                    << " request URI: " << mImpl->mURI << LL_ENDL;
-                return false;
-            }
-        }
-        else if (first->hasName("params") &&
-            second->hasName("param") && !second->getNextSibling())
-        {
-            LLXMLNodePtr third = second->getFirstChild();
-            if (third && !third->getNextSibling() && parseValue(mImpl->mResponseData, third))
-            {
-                return true;
-            }
-        }
-    }
-
-    LL_WARNS() << "Invalid response format; request URI: " << mImpl->mURI << LL_ENDL;
-
-    return false;
-}
-
-bool LLXMLRPCTransaction::Handler::parseValue(LLSD& target, LLXMLNodePtr source)
-{
-    XMLTreeNode tn(source);
-    return target.fromXMLRPCValue(&tn);
+    // We do not do the parsing in the HTTP coroutine, since it could exhaust
+    // the coroutine stack in extreme cases. Instead, we flag the data buffer
+    // as ready, and let mImpl decode it in its process() method, on the main
+    // coroutine. HB
+    mImpl->mHasResponse = true;
+    mImpl->setStatus(LLXMLRPCTransaction::StatusComplete);
 }
 
 //=========================================================================
@@ -265,6 +186,8 @@ LLXMLRPCTransaction::Impl::Impl
     : mHttpRequest()
     , mStatus(LLXMLRPCTransaction::StatusNotStarted)
     , mURI(uri)
+    , mHasResponse(false)
+    , mResponseParsed(false)
 {
     LLCore::HttpOptions::ptr_t httpOpts;
     LLCore::HttpHeaders::ptr_t httpHeaders;
@@ -327,6 +250,57 @@ LLXMLRPCTransaction::Impl::Impl
         mURI, body.get(), httpOpts, httpHeaders, mHandler);
 }
 
+bool LLXMLRPCTransaction::Impl::parseResponse(LLXMLNodePtr root)
+{
+    // We have already checked in LLXMLNode::parseBuffer() that root contains
+    // exactly one child.
+    if (!root->hasName("methodResponse"))
+    {
+        LL_WARNS() << "Invalid root element in XML response; request URI: "
+                   << mURI << LL_ENDL;
+        return false;
+    }
+
+    LLXMLNodePtr first = root->getFirstChild();
+    LLXMLNodePtr second = first->getFirstChild();
+    if (first && !first->getNextSibling() && second &&
+        !second->getNextSibling())
+    {
+        if (first->hasName("fault"))
+        {
+            LLSD fault;
+            if (parseValue(fault, second) && fault.isMap() &&
+                fault.has("faultCode") && fault.has("faultString"))
+            {
+                LL_WARNS() << "Request failed. faultCode: '"
+                        << fault.get("faultCode").asString()
+                        << "', faultString: '"
+                        << fault.get("faultString").asString()
+                        << "', request URI: " << mURI << LL_ENDL;
+                return false;
+            }
+        }
+        else if (first->hasName("params") &&
+                 second->hasName("param") && !second->getNextSibling())
+        {
+            LLXMLNodePtr third = second->getFirstChild();
+            if (third && !third->getNextSibling() &&
+                parseValue(mResponseData, third))
+            {
+                return true;
+            }
+        }
+    }
+
+    LL_WARNS() << "Invalid response format; request URI: " << mURI << LL_ENDL;
+    return false;
+}
+
+bool LLXMLRPCTransaction::Impl::parseValue(LLSD& target, LLXMLNodePtr src)
+{
+    return src->fromXMLRPCValue(target);
+}
+
 bool LLXMLRPCTransaction::Impl::process()
 {
     if (!mPostH || !mHttpRequest)
@@ -335,6 +309,29 @@ bool LLXMLRPCTransaction::Impl::process()
         return true; //failed, quit.
     }
 
+    // Parse the response when we have one and it has not yet been parsed. HB
+    if (mHasResponse && !mResponseParsed)
+    {
+        LLXMLNodePtr root;
+        if (!LLXMLNode::parseBuffer(mResponseText.data(), mResponseText.size(),
+                                    root, nullptr))
+        {
+ 	        LL_WARNS() << "Failed parsing XML in response; request URI: "
+                       << mURI << LL_ENDL;
+        }
+        else if (parseResponse(root))
+        {
+            LL_INFOS() << "XMLRPC response parsed successfully; request URI: "
+                       << mURI << LL_ENDL;
+        }
+        else
+        {
+            LL_WARNS() << "XMLRPC response parsing failed; request URI: "
+                       << mURI << LL_ENDL;
+        }
+        mResponseParsed = true;
+    }
+
     switch (mStatus)
     {
         case LLXMLRPCTransaction::StatusComplete:
-- 
cgit v1.2.3


From 0df35799a39b8a76d13ccb4c1ab4d57a0ab6d129 Mon Sep 17 00:00:00 2001
From: Henri Beauchamp <sldev@free.fr>
Date: Mon, 8 Jul 2024 23:31:43 +0200
Subject: Remove a remnant of debug code.

---
 indra/llxml/llxmlnode.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 8eb4556828..d6f9a56c9d 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -3286,7 +3286,6 @@ bool LLXMLNode::parseXmlRpcArrayValue(LLSD& target)
                    << LL_ENDL;
         return false;
     }
-    U32 i = 0;
     for (LLXMLNode* itemp = datap->getFirstChild().get(); itemp;
          itemp = itemp->getNextSibling().get())
     {
@@ -3296,7 +3295,6 @@ bool LLXMLNode::parseXmlRpcArrayValue(LLSD& target)
             return false;
         }
         target.append(value);
-        ++i;
     }
     return true;
 }
-- 
cgit v1.2.3


From db6fdcf2df62d1b2bef2bd0a9019b74663b8568c Mon Sep 17 00:00:00 2001
From: Henri Beauchamp <sldev@free.fr>
Date: Tue, 9 Jul 2024 00:00:29 +0200
Subject: Spacing-anality :-D

---
 indra/newview/llxmlrpctransaction.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 9dedb685db..12ba491411 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -100,8 +100,8 @@ public:
 
     std::string         mResponseText;
     LLSD                mResponseData;
-	bool                mHasResponse;
-	bool                mResponseParsed;
+    bool                mHasResponse;
+    bool                mResponseParsed;
 
     std::string         mCertStore;
     LLSD                mErrorCertData;
-- 
cgit v1.2.3


From 89c1767bd38ae97c9ca3ba120d8d5c0f94373c1b Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Tue, 9 Jul 2024 02:59:49 +0200
Subject: Fix build error in llxmlnode.cpp

---
 indra/llxml/llxmlnode.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index d6f9a56c9d..e695035461 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -3396,7 +3396,7 @@ bool LLXMLNode::fromXMLRPCValue(LLSD& target)
     if (childp->hasName("base64"))
     {
         std::string decoded =
-            LLBase64::decodeAsString(inner->getTextContents());
+            LLBase64::decodeAsString(childp->getTextContents());
         size_t size = decoded.size();
         LLSD::Binary binary(size);
         if (size)
-- 
cgit v1.2.3


From 21f40280eca12bca53e9894f01cac2e205bb2827 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 9 Jul 2024 10:42:49 +0300
Subject: viewer#1299 PBR texture stretches when "stretch textures" is
 unchecked

---
 indra/newview/llselectmgr.cpp | 80 +++++++++++++++++++++++++++++++++++++++++--
 indra/newview/llselectmgr.h   |  1 +
 2 files changed, 78 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 70356e8e96..fcd1c84ba4 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3058,7 +3058,7 @@ void LLSelectMgr::adjustTexturesByScale(bool send_to_sim, bool stretch)
 
         for (U8 te_num = 0; te_num < object->getNumTEs(); te_num++)
         {
-            const LLTextureEntry* tep = object->getTE(te_num);
+            LLTextureEntry* tep = object->getTE(te_num);
 
             bool planar = tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR;
             if (planar == stretch)
@@ -3092,8 +3092,6 @@ void LLSelectMgr::adjustTexturesByScale(bool send_to_sim, bool stretch)
 
                     object->setTEScale(te_num, diffuse_scale_s, diffuse_scale_t);
 
-                    LLTextureEntry* tep = object->getTE(te_num);
-
                     if (tep && !tep->getMaterialParams().isNull())
                     {
                         LLMaterialPtr orig = tep->getMaterialParams();
@@ -3131,6 +3129,47 @@ void LLSelectMgr::adjustTexturesByScale(bool send_to_sim, bool stretch)
                         LLMaterialMgr::getInstance()->put(object->getID(), te_num, *p);
                     }
                 }
+
+                if (tep->getGLTFMaterial())
+                {
+                    LLPointer<LLGLTFMaterial> material = tep->getGLTFMaterialOverride();
+                    if (!material)
+                    {
+                        material = new LLGLTFMaterial();
+                        tep->setGLTFMaterialOverride(material);
+                    }
+
+                    F32 scale_x = 1;
+                    F32 scale_y = 1;
+
+                    for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+                    {
+                        LLVector3 scale_ratio = selectNode->mGLTFScaleRatios[te_num][i];
+
+                        if (planar)
+                        {
+                            scale_x = scale_ratio.mV[s_axis] / object_scale.mV[s_axis];
+                            scale_y = scale_ratio.mV[t_axis] / object_scale.mV[t_axis];
+                        }
+                        else
+                        {
+                            scale_x = scale_ratio.mV[s_axis] * object_scale.mV[s_axis];
+                            scale_y = scale_ratio.mV[t_axis] * object_scale.mV[t_axis];
+                        }
+                        material->mTextureTransform[i].mScale.set(scale_x, scale_y);
+                    }
+
+                    LLFetchedGLTFMaterial* render_mat = (LLFetchedGLTFMaterial*)tep->getGLTFRenderMaterial();
+                    if (render_mat)
+                    {
+                        render_mat->applyOverride(*material);
+                    }
+
+                    if (send_to_sim)
+                    {
+                        LLGLTFMaterialList::queueModify(object, te_num, material);
+                    }
+                }
                 send = send_to_sim;
             }
         }
@@ -6854,6 +6893,7 @@ void LLSelectNode::saveGLTFMaterials(const uuid_vec_t& materials, const gltf_mat
 void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
 {
     mTextureScaleRatios.clear();
+    mGLTFScaleRatios.clear();
 
     if (mObject.notNull())
     {
@@ -6888,6 +6928,40 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query)
                 v.mV[t_axis] = diffuse_t/scale.mV[t_axis];
                 mTextureScaleRatios.push_back(v);
             }
+
+            LLGLTFMaterial* material = tep->getGLTFMaterialOverride();
+            LLVector3 material_v;
+            F32 scale_x = 1;
+            F32 scale_y = 1;
+            std::vector<LLVector3> material_v_vec;
+            for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+            {
+                if (material)
+                {
+                    LLGLTFMaterial::TextureTransform& transform = material->mTextureTransform[i];
+                    scale_x = transform.mScale[VX];
+                    scale_y = transform.mScale[VY];
+                }
+                else
+                {
+                    // Not having an override doesn't mean that there is no material
+                    scale_x = 1;
+                    scale_y = 1;
+                }
+
+                if (tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR)
+                {
+                    material_v.mV[s_axis] = scale_x * scale.mV[s_axis];
+                    material_v.mV[t_axis] = scale_y * scale.mV[t_axis];
+                }
+                else
+                {
+                    material_v.mV[s_axis] = scale_x / scale.mV[s_axis];
+                    material_v.mV[t_axis] = scale_y / scale.mV[t_axis];
+                }
+                material_v_vec.push_back(material_v);
+            }
+            mGLTFScaleRatios.push_back(material_v_vec);
         }
     }
 }
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 0456b109d7..355e28595b 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -239,6 +239,7 @@ public:
     uuid_vec_t      mSavedGLTFMaterialIds;
     gltf_materials_vec_t mSavedGLTFOverrideMaterials;
     std::vector<LLVector3>  mTextureScaleRatios;
+    std::vector< std::vector<LLVector3> >  mGLTFScaleRatios;
     std::vector<LLVector3>  mSilhouetteVertices;    // array of vertices to render silhouette of object
     std::vector<LLVector3>  mSilhouetteNormals; // array of normals to render silhouette of object
     bool                    mSilhouetteExists;  // need to generate silhouette?
-- 
cgit v1.2.3


From e6e41e71b7bc860faee8cd13c56f7180e8eb4745 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 9 Jul 2024 15:54:18 -0500
Subject: #1943 make sys free in texture console llmemorysavailphysicalmeminkb
 tell the truth (#1966)

* Also fix for crash when applying MoaP to PBR material
---
 indra/llcommon/llmemory.cpp       | 74 +++++++++++++++++----------------------
 indra/llcommon/llsys.cpp          | 49 +++++++++++++-------------
 indra/llcommon/llsys.h            |  5 +--
 indra/newview/llappviewer.cpp     |  1 -
 indra/newview/llviewertexture.cpp | 14 +++++++-
 5 files changed, 73 insertions(+), 70 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 104c40f0d7..81e8073dbf 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -51,13 +51,28 @@
 //----------------------------------------------------------------------------
 
 //static
+
+// most important memory metric for texture streaming
+//  On Windows, this should agree with resource monitor -> performance -> memory -> available
+//  On OS X, this should be activity monitor -> memory -> (physical memory - memory used)
+// NOTE: this number MAY be less than the actual available memory on systems with more than MaxHeapSize64 GB of physical memory (default 16GB)
+//  In that case, should report min(available, sMaxHeapSizeInKB-sAllocateMemInKB)
 U32Kilobytes LLMemory::sAvailPhysicalMemInKB(U32_MAX);
+
+// Installed physical memory
 U32Kilobytes LLMemory::sMaxPhysicalMemInKB(0);
-static LLTrace::SampleStatHandle<F64Megabytes> sAllocatedMem("allocated_mem", "active memory in use by application");
-static LLTrace::SampleStatHandle<F64Megabytes> sVirtualMem("virtual_mem", "virtual memory assigned to application");
+
+// Maximimum heap size according to the user's settings (default 16GB)
+U32Kilobytes LLMemory::sMaxHeapSizeInKB(U32_MAX);
+
+// Current memory usage
 U32Kilobytes LLMemory::sAllocatedMemInKB(0);
+
 U32Kilobytes LLMemory::sAllocatedPageSizeInKB(0);
-U32Kilobytes LLMemory::sMaxHeapSizeInKB(U32_MAX);
+
+
+static LLTrace::SampleStatHandle<F64Megabytes> sAllocatedMem("allocated_mem", "active memory in use by application");
+static LLTrace::SampleStatHandle<F64Megabytes> sVirtualMem("virtual_mem", "virtual memory assigned to application");
 
 void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
 {
@@ -86,7 +101,14 @@ void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size)
 void LLMemory::updateMemoryInfo()
 {
     LL_PROFILE_ZONE_SCOPED
-    U32Kilobytes avail_phys;
+
+
+    sMaxPhysicalMemInKB = gSysMemory.getPhysicalMemoryKB();
+
+    U32Kilobytes avail_mem;
+    LLMemoryInfo::getAvailableMemoryKB(avail_mem);
+    sAvailPhysicalMemInKB = avail_mem;
+
 #if LL_WINDOWS
     PROCESS_MEMORY_COUNTERS counters;
 
@@ -99,8 +121,6 @@ void LLMemory::updateMemoryInfo()
     sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(counters.WorkingSetSize));
     sAllocatedPageSizeInKB = U32Kilobytes::convert(U64Bytes(counters.PagefileUsage));
     sample(sVirtualMem, sAllocatedPageSizeInKB);
-    U32Kilobytes avail_virtual;
-    LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;
 
 #elif defined(LL_DARWIN)
     task_vm_info info;
@@ -126,50 +146,20 @@ void LLMemory::updateMemoryInfo()
     {
         LL_WARNS() << "task_info failed" << LL_ENDL;
     }
-
-    // Total installed and available physical memory are properties of the host, not just our process.
-    vm_statistics64_data_t vmstat;
-    mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
-    mach_port_t host = mach_host_self();
-    vm_size_t page_size;
-    host_page_size(host, &page_size);
-    kern_return_t result = host_statistics64(host, HOST_VM_INFO64, reinterpret_cast<host_info_t>(&vmstat), &count);
-    if (result == KERN_SUCCESS) {
-        // This is what Chrome reports as 'the "Physical Memory Free" value reported by the Memory Monitor in Instruments.'
-        // Note though that inactive pages are not included here and not yet free, but could become so under memory pressure.
-        avail_phys = U32Bytes(vmstat.free_count * page_size);
-        sMaxHeapSizeInKB = LLMemoryInfo::getHardwareMemSize();
-    }
-    else
-    {
-        LL_WARNS() << "task_info failed" << LL_ENDL;
-    }
 #elif defined(LL_LINUX)
     // Use sysinfo() to get the total physical memory.
     struct sysinfo info;
     sysinfo(&info);
-    sMaxHeapSizeInKB = U32Kilobytes::convert((U64Bytes)info.totalram); // Total RAM in system
-    avail_phys = U32Kilobytes::convert((U64Bytes)info.freeram); // Total Free RAM in system
     sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(LLMemory::getCurrentRSS())); // represents the RAM allocated by this process only (in line with the windows implementation)
 #else
     //not valid for other systems for now.
     LL_WARNS() << "LLMemory::updateMemoryInfo() not implemented for this platform." << LL_ENDL;
     sAllocatedMemInKB = U64Bytes(LLMemory::getCurrentRSS());
-    sMaxPhysicalMemInKB = U64Bytes(U32_MAX);
-    sAvailPhysicalMemInKB = U64Bytes(U32_MAX);
 #endif
     sample(sAllocatedMem, sAllocatedMemInKB);
-    // sMaxPhysicalMem - max this process can use = the lesser of (what we already have + what's available) or MaxHeap
-    sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB);
 
-    if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
-    {
-        sAvailPhysicalMemInKB = sMaxPhysicalMemInKB - sAllocatedMemInKB ;
-    }
-    else
-    {
-        sAvailPhysicalMemInKB = U32Kilobytes(0);
-    }
+    sAvailPhysicalMemInKB = llmin(sAvailPhysicalMemInKB, sMaxHeapSizeInKB - sAllocatedMemInKB);
+
     return ;
 }
 
@@ -206,10 +196,10 @@ void LLMemory::logMemoryInfo(bool update)
         updateMemoryInfo() ;
     }
 
-    LL_INFOS() << "Current allocated physical memory(KB): " << sAllocatedMemInKB << LL_ENDL ;
-    LL_INFOS() << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << LL_ENDL ;
-    LL_INFOS() << "Current available physical memory(KB): " << sAvailPhysicalMemInKB << LL_ENDL ;
-    LL_INFOS() << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << LL_ENDL ;
+    LL_INFOS() << llformat("Current allocated physical memory: %.2f MB", sAllocatedMemInKB / 1024.0) << LL_ENDL;
+    LL_INFOS() << llformat("Current allocated page size: %.2f MB", sAllocatedPageSizeInKB / 1024.0) << LL_ENDL;
+    LL_INFOS() << llformat("Current available physical memory: %.2f MB", sAvailPhysicalMemInKB / 1024.0) << LL_ENDL;
+    LL_INFOS() << llformat("Current max usable memory: %.2f MB", sMaxPhysicalMemInKB / 1024.0) << LL_ENDL;
 }
 
 //static
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index cfb05873df..8bee33be0a 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -74,6 +74,8 @@ using namespace llsd;
 #   include <mach/mach_host.h>
 #   include <mach/task.h>
 #   include <mach/task_info.h>
+#   include <sys/types.h>
+#   include <mach/mach_init.h>
 #elif LL_LINUX
 #   include <errno.h>
 #   include <sys/utsname.h>
@@ -85,6 +87,7 @@ const char MEMINFO_FILE[] = "/proc/meminfo";
 #endif
 
 LLCPUInfo gSysCPU;
+LLMemoryInfo gSysMemory;
 
 // Don't log memory info any more often than this. It also serves as our
 // framerate sample size.
@@ -797,33 +800,32 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
 }
 
 //static
-void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb)
+void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_mem_kb)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_MEMORY;
 #if LL_WINDOWS
     // Sigh, this shouldn't be a static method, then we wouldn't have to
     // reload this data separately from refresh()
     LLSD statsMap(loadStatsMap());
 
-    avail_physical_mem_kb = (U32Kilobytes)statsMap["Avail Physical KB"].asInteger();
-    avail_virtual_mem_kb  = (U32Kilobytes)statsMap["Avail Virtual KB"].asInteger();
+    avail_mem_kb = (U32Kilobytes)statsMap["Avail Physical KB"].asInteger();
 
 #elif LL_DARWIN
-    // mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
-    // $ vm_stat
-    // Mach Virtual Memory Statistics: (page size of 4096 bytes)
-    // Pages free:                   462078.
-    // Pages active:                 142010.
-    // Pages inactive:               220007.
-    // Pages wired down:             159552.
-    // "Translation faults":      220825184.
-    // Pages copy-on-write:         2104153.
-    // Pages zero filled:         167034876.
-    // Pages reactivated:             65153.
-    // Pageins:                     2097212.
-    // Pageouts:                      41759.
-    // Object cache: 841598 hits of 7629869 lookups (11% hit rate)
-    avail_physical_mem_kb = (U32Kilobytes)-1 ;
-    avail_virtual_mem_kb = (U32Kilobytes)-1 ;
+    // use host_statistics64 to get memory info
+    vm_statistics64_data_t vmstat;
+    mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
+    mach_port_t host = mach_host_self();
+    vm_size_t page_size;
+    host_page_size(host, &page_size);
+    kern_return_t result = host_statistics64(host, HOST_VM_INFO64, reinterpret_cast<host_info_t>(&vmstat), &count);
+    if (result == KERN_SUCCESS)
+    {
+        avail_mem_kb = U64Bytes((vmstat.free_count + vmstat.inactive_count) * page_size);
+    }
+    else
+    {
+        avail_mem_kb = (U32Kilobytes)-1;
+    }
 
 #elif LL_LINUX
     // mStatsMap is derived from MEMINFO_FILE:
@@ -874,15 +876,14 @@ void LLMemoryInfo::getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32
     // DirectMap4k:      434168 kB
     // DirectMap2M:      477184 kB
     // (could also run 'free', but easier to read a file than run a program)
-    avail_physical_mem_kb = (U32Kilobytes)-1 ;
-    avail_virtual_mem_kb = (U32Kilobytes)-1 ;
+    LLSD statsMap(loadStatsMap());
 
+    avail_mem_kb = (U32Kilobytes)statsMap["MemFree"].asInteger();
 #else
     //do not know how to collect available memory info for other systems.
     //leave it blank here for now.
 
-    avail_physical_mem_kb = (U32Kilobytes)-1 ;
-    avail_virtual_mem_kb = (U32Kilobytes)-1 ;
+    avail_mem_kb = (U32Kilobytes)-1 ;
 #endif
 }
 
@@ -977,7 +978,7 @@ LLSD LLMemoryInfo::loadStatsMap()
     // specifically accepts PROCESS_MEMORY_COUNTERS*, and since this is a
     // classic-C API, PROCESS_MEMORY_COUNTERS_EX isn't a subclass. Cast the
     // pointer.
-    GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem));
+    GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*) &pmem, sizeof(pmem));
 
     stats.add("Page Fault Count",              pmem.PageFaultCount);
     stats.add("PeakWorkingSetSize KB",         pmem.PeakWorkingSetSize/div);
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index f97d49eeb1..827b0dc048 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -134,8 +134,8 @@ public:
     static U32Kilobytes getHardwareMemSize(); // Because some Mac linkers won't let us reference extern gSysMemory from a different lib.
 #endif
 
-    //get the available memory infomation in KiloBytes.
-    static void getAvailableMemoryKB(U32Kilobytes& avail_physical_mem_kb, U32Kilobytes& avail_virtual_mem_kb);
+    //get the available memory in KiloBytes.
+    static void getAvailableMemoryKB(U32Kilobytes& avail_mem_kb);
 
     // Retrieve a map of memory statistics. The keys of the map are platform-
     // dependent. The values are in kilobytes to try to avoid integer overflow.
@@ -169,6 +169,7 @@ bool LL_COMMON_API gunzip_file(const std::string& srcfile, const std::string& ds
 // gzip srcfile into dstfile.  Returns false on error.
 bool LL_COMMON_API gzip_file(const std::string& srcfile, const std::string& dstfile);
 
+extern LL_COMMON_API LLMemoryInfo gSysMemory;
 extern LL_COMMON_API LLCPUInfo gSysCPU;
 
 #endif // LL_LLSYS_H
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5b5e42767f..aec721e6c3 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -347,7 +347,6 @@ LLFrameTimer gRestoreGLTimer;
 bool gRestoreGL = false;
 bool gUseWireframe = false;
 
-LLMemoryInfo gSysMemory;
 U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp
 
 std::string gLastVersionChannel;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index c754580fc0..9fa71fdff7 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3489,7 +3489,19 @@ void LLViewerMediaTexture::setPlaying(bool playing)
 
         for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter)
         {
-            switchTexture(LLRender::DIFFUSE_MAP, *iter);
+            LLFace* facep = *iter;
+            const LLTextureEntry* te = facep->getTextureEntry();
+            if (te->getGLTFMaterial())
+            {
+                // PBR material, switch emissive and basecolor
+                switchTexture(LLRender::EMISSIVE_MAP, *iter);
+                switchTexture(LLRender::BASECOLOR_MAP, *iter);
+            }
+            else
+            {
+                // blinn-phong material, switch diffuse map only
+                switchTexture(LLRender::DIFFUSE_MAP, *iter);
+            }
         }
     }
     else //stop playing this media
-- 
cgit v1.2.3


From e1b7ac6065512a8973f1a61ae5a657796fed94c0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 9 Jul 2024 17:46:15 -0400
Subject: Fix broken hero probe feature table entries (#1951)

* Clean up other feature table warnings
---
 indra/newview/featuretable.txt                     | 16 ++----
 indra/newview/featuretable_mac.txt                 | 17 ++-----
 .../llfloaterpreferencesgraphicsadvanced.cpp       | 58 ----------------------
 3 files changed, 10 insertions(+), 81 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index af1587bd07..358fc2dfc8 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 61
+version 62
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -28,7 +28,6 @@ version 61
 //
 list all
 RenderAnisotropic			1	1
-RenderAvatarCloth			0	0
 RenderAvatarLODFactor		1	1.0
 RenderAvatarPhysicsLODFactor 1	1.0
 RenderAvatarMaxNonImpostors 1   16
@@ -65,7 +64,6 @@ RenderShaderLightingMaxLevel	1	3
 RenderReflectionProbeLevel  1   3
 RenderDeferred				1	1
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	2
 RenderUseStreamVBO			1	1
 RenderFSAASamples			1	16
@@ -76,6 +74,10 @@ RenderGLMultiThreadedMedia         1   1
 RenderReflectionProbeResolution 1 128
 RenderScreenSpaceReflections 1  1
 RenderMirrors				1	1
+RenderHeroProbeResolution	1	2048
+RenderHeroProbeDistance		1	16
+RenderHeroProbeUpdateRate	1	4
+RenderHeroProbeConservativeUpdateMultiplier 1 16
 RenderDownScaleMethod       1   1
 
 
@@ -103,7 +105,6 @@ RenderTerrainPBRPlanarSampleCount 1   1
 RenderTreeLODFactor			1	0
 RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	0
@@ -139,7 +140,6 @@ RenderTerrainPBRPlanarSampleCount 1   1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	0
@@ -173,7 +173,6 @@ RenderTerrainPBRPlanarSampleCount 1   1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.25
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -209,7 +208,6 @@ RenderTerrainPBRPlanarSampleCount 1   1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.375
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -245,7 +243,6 @@ RenderTerrainPBRPlanarSampleCount 1   3
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.5
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	1
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -281,7 +278,6 @@ RenderTransparentWater		1	1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.75
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	2
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -318,7 +314,6 @@ RenderVolumeLODFactor		1	2.0
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	2
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
@@ -337,7 +332,6 @@ RenderHeroProbeConservativeUpdateMultiplier 1 4
 list Unknown
 RenderShadowDetail			1	0
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderMirrors				1	0
 
 //
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 7aa8504eaa..581350d73c 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 57
+version 58
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -28,7 +28,6 @@ version 57
 //
 list all
 RenderAnisotropic				1	0
-RenderAvatarCloth				0	0
 RenderAvatarLODFactor			1	1.0
 RenderAvatarPhysicsLODFactor 1	1.0
 RenderAvatarMaxNonImpostors     1   16
@@ -62,7 +61,6 @@ RenderCompressTextures		1	1
 RenderShaderLightingMaxLevel	1	3
 RenderDeferred				1	1
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	2
 RenderUseStreamVBO			1	1
 RenderFSAASamples			1	16
@@ -75,6 +73,10 @@ RenderReflectionProbeDetail	1	2
 RenderScreenSpaceReflections 1  1
 RenderReflectionProbeLevel  1   3
 RenderMirrors				1	1
+RenderHeroProbeResolution	1	2048
+RenderHeroProbeDistance		1	16
+RenderHeroProbeUpdateRate	1	4
+RenderHeroProbeConservativeUpdateMultiplier 1 16
 
 //
 // Low Graphics Settings
@@ -98,7 +100,6 @@ RenderTransparentWater		1	0
 RenderTreeLODFactor			1	0
 RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	0
@@ -134,7 +135,6 @@ RenderTransparentWater		1	1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	0
@@ -170,7 +170,6 @@ RenderTransparentWater		1	1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.25
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -206,7 +205,6 @@ RenderTransparentWater		1	1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.375
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -242,7 +240,6 @@ RenderTransparentWater		1	1
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.5
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	1
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
@@ -279,7 +276,6 @@ RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.75
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
-RenderUseAdvancedAtmospherics 1 0
 WLSkyDetail					1	96
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
@@ -315,7 +311,6 @@ RenderVolumeLODFactor		1	2.0
 WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
 RenderDeferredSSAO			1	1
-RenderUseAdvancedAtmospherics 1 0
 RenderShadowDetail			1	2
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
@@ -334,7 +329,6 @@ RenderHeroProbeConservativeUpdateMultiplier 1 4
 list Unknown
 RenderShadowDetail			1	0
 RenderDeferredSSAO			1	0
-RenderUseAdvancedAtmospherics 1 0
 RenderMirrors				1	0
 
 
@@ -355,7 +349,6 @@ RenderLocalLightCount		1	0
 RenderMaxPartCount			1	1024
 RenderTerrainDetail 		1	0
 RenderDeferredSSAO			0	0
-RenderUseAdvancedAtmospherics 0 0
 RenderShadowDetail			0	0
 RenderMirrors				0	0
 
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 082a77d741..d66c303c65 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -270,8 +270,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
 {
     LLComboBox* ctrl_reflections   = getChild<LLComboBox>("Reflections");
     LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
-    LLCheckBoxCtrl* ctrl_avatar_vp     = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
-    LLCheckBoxCtrl* ctrl_avatar_cloth  = getChild<LLCheckBoxCtrl>("AvatarCloth");
     LLCheckBoxCtrl* ctrl_wind_light    = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
     LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
     LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
@@ -336,45 +334,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
         ctrl_shadows->setValue(0);
         shadows_text->setEnabled(false);
     }
-
-    // disabled reflections
-    if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
-    {
-        ctrl_reflections->setEnabled(false);
-        ctrl_reflections->setValue(false);
-        reflections_text->setEnabled(false);
-    }
-
-    // disabled av
-    if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
-    {
-        ctrl_avatar_vp->setEnabled(false);
-        ctrl_avatar_vp->setValue(false);
-
-        ctrl_avatar_cloth->setEnabled(false);
-        ctrl_avatar_cloth->setValue(false);
-
-        //deferred needs AvatarVP, disable deferred
-        ctrl_shadows->setEnabled(false);
-        ctrl_shadows->setValue(0);
-        shadows_text->setEnabled(false);
-
-        ctrl_ssao->setEnabled(false);
-        ctrl_ssao->setValue(false);
-
-        ctrl_dof->setEnabled(false);
-        ctrl_dof->setValue(false);
-
-        ctrl_deferred->setEnabled(false);
-        ctrl_deferred->setValue(false);
-    }
-
-    // disabled cloth
-    if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
-    {
-        ctrl_avatar_cloth->setEnabled(false);
-        ctrl_avatar_cloth->setValue(false);
-    }
 }
 
 void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
@@ -392,23 +351,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
     bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
     bumpshiny_ctrl->setEnabled(bumpshiny);
 
-    // Avatar Mode
-    // Enable Avatar Shaders
-    LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
-    // Avatar Render Mode
-    LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
-
-    bool avatar_vp_enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP");
-    if (LLViewerShaderMgr::sInitialized)
-    {
-        S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
-        avatar_vp_enabled = max_avatar_shader > 0;
-    }
-
-    ctrl_avatar_vp->setEnabled(avatar_vp_enabled);
-
-    ctrl_avatar_cloth->setEnabled(gSavedSettings.getBOOL("RenderAvatarVP"));
-
     // Vertex Shaders, Global Shader Enable
     // SL-12594 Basic shaders are always enabled. DJH TODO clean up now-orphaned state handling code
     LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail");   // can be linked with control var
-- 
cgit v1.2.3


From 2a7030992faa12c362d3eb9365080efd8265e15f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 9 Jul 2024 17:53:43 -0400
Subject: Update tracy profiler to 0.10 (#1946)

---
 indra/llcommon/llerror.cpp                    | 16 ++++-----
 indra/llcommon/llerrorcontrol.h               |  2 +-
 indra/llcommon/lleventfilter.h                |  2 +-
 indra/llcommon/llmemory.cpp                   |  5 ++-
 indra/llcommon/llmutex.cpp                    | 36 +++++++++----------
 indra/llcommon/llprofiler.h                   |  2 +-
 indra/llcommon/llsdserialize.cpp              | 10 +++---
 indra/llcommon/llsdserialize_xml.cpp          |  2 +-
 indra/llcommon/llsdutil.cpp                   | 22 ++++++------
 indra/llcommon/llsys.cpp                      |  2 +-
 indra/llcommon/llthread.cpp                   | 14 ++++----
 indra/llcommon/lltimer.cpp                    |  4 +--
 indra/llmath/llvolume.cpp                     | 22 ++++++------
 indra/llmath/llvolumeoctree.h                 |  2 +-
 indra/llrender/llfontgl.cpp                   |  8 ++---
 indra/llrender/llrender.cpp                   |  2 +-
 indra/llwindow/llwindowwin32.cpp              |  4 +--
 indra/newview/llappviewer.cpp                 | 26 +++++++-------
 indra/newview/llcallingcard.cpp               |  4 +--
 indra/newview/lldrawable.cpp                  | 40 ++++++++++-----------
 indra/newview/lldrawpoolavatar.cpp            | 42 +++++++++++-----------
 indra/newview/llface.cpp                      | 10 +++---
 indra/newview/llnotificationscripthandler.cpp |  2 +-
 indra/newview/llscreenchannel.cpp             |  2 +-
 indra/newview/llspatialpartition.cpp          |  8 ++---
 indra/newview/llsurfacepatch.cpp              |  2 +-
 indra/newview/lltoastpanel.cpp                |  2 +-
 indra/newview/llviewerdisplay.cpp             |  2 +-
 indra/newview/llviewerparceloverlay.cpp       |  2 +-
 indra/newview/llviewertexturelist.cpp         |  2 +-
 indra/newview/llviewerwindow.cpp              |  2 +-
 indra/newview/llvoavatar.cpp                  |  4 +--
 indra/newview/llvoicewebrtc.cpp               | 50 +++++++++++++--------------
 indra/newview/llvosurfacepatch.cpp            |  4 +--
 indra/newview/llworld.cpp                     |  2 +-
 indra/test/test.cpp                           |  2 +-
 36 files changed, 181 insertions(+), 182 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index a45bc32028..800586b6a6 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -167,7 +167,7 @@ namespace {
         virtual void recordMessage(LLError::ELevel level,
                                     const std::string& message) override
         {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
             if (LLError::getAlwaysFlush())
             {
                 mFile << message << std::endl;
@@ -234,7 +234,7 @@ namespace {
         virtual void recordMessage(LLError::ELevel level,
                        const std::string& message) override
         {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
             // The default colors for error, warn and debug are now a bit more pastel
             // and easier to read on the default (black) terminal background but you
             // now have the option to set the color of each via an environment variables:
@@ -274,7 +274,7 @@ namespace {
 
         LL_FORCE_INLINE void writeANSI(const std::string& ansi_code, const std::string& message)
         {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
             static std::string s_ansi_bold = createBoldANSI();  // bold text
             static std::string s_ansi_reset = createResetANSI();  // reset
             // ANSI color code escape sequence, message, and reset in one fprintf call
@@ -311,7 +311,7 @@ namespace {
         virtual void recordMessage(LLError::ELevel level,
                                    const std::string& message) override
         {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
             mBuffer->addLine(message);
         }
 
@@ -338,7 +338,7 @@ namespace {
         virtual void recordMessage(LLError::ELevel level,
                                    const std::string& message) override
         {
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
             debugger_print(message);
         }
     };
@@ -1215,7 +1215,7 @@ namespace
 
     void writeToRecorders(const LLError::CallSite& site, const std::string& message)
     {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
         LLError::ELevel level = site.mLevel;
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
 
@@ -1346,7 +1346,7 @@ namespace LLError
 
     bool Log::shouldLog(CallSite& site)
     {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
         LLMutexTrylock lock(getMutex<LOG_MUTEX>(), 5);
         if (!lock.isLocked())
         {
@@ -1391,7 +1391,7 @@ namespace LLError
 
     void Log::flush(const std::ostringstream& out, const CallSite& site)
     {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
         LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
         if (!lock.isLocked())
         {
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index bf5a6df556..2be443ca37 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -190,7 +190,7 @@ namespace LLError
         {}
         void recordMessage(LLError::ELevel level, const std::string& message) override
         {
-            LL_PROFILE_ZONE_SCOPED
+            LL_PROFILE_ZONE_SCOPED;
             mCallable(level, message);
         }
     private:
diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h
index 5c45144fad..d8c7e15a27 100644
--- a/indra/llcommon/lleventfilter.h
+++ b/indra/llcommon/lleventfilter.h
@@ -429,7 +429,7 @@ public:
     // path, then stores it to mTarget.
     virtual bool post(const LLSD& event)
     {
-        LL_PROFILE_ZONE_SCOPED
+        LL_PROFILE_ZONE_SCOPED;
 
         // Extract the element specified by 'mPath' from 'event'. To perform a
         // generic type-appropriate store through mTarget, construct an
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 81e8073dbf..99c803e46f 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -100,8 +100,7 @@ void LLMemory::initMaxHeapSizeGB(F32Gigabytes max_heap_size)
 //static
 void LLMemory::updateMemoryInfo()
 {
-    LL_PROFILE_ZONE_SCOPED
-
+    LL_PROFILE_ZONE_SCOPED;
 
     sMaxPhysicalMemInKB = gSysMemory.getPhysicalMemoryKB();
 
@@ -190,7 +189,7 @@ void* LLMemory::tryToAlloc(void* address, U32 size)
 //static
 void LLMemory::logMemoryInfo(bool update)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     if(update)
     {
         updateMemoryInfo() ;
diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp
index 40c651d9c1..be1ae89a25 100644
--- a/indra/llcommon/llmutex.cpp
+++ b/indra/llcommon/llmutex.cpp
@@ -100,7 +100,7 @@ void LLMutex::unlock()
 
 bool LLMutex::isLocked()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if (!mMutex.try_lock())
     {
         return true;
@@ -124,7 +124,7 @@ LLThread::id_t LLMutex::lockingThread() const
 
 bool LLMutex::trylock()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if (isSelfLocked())
     { //redundant lock
         mCount++;
@@ -161,7 +161,7 @@ LLSharedMutex::LLSharedMutex()
 
 bool LLSharedMutex::isLocked() const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     std::lock_guard<std::mutex> lock(mLockMutex);
 
     return !mLockingThreads.empty();
@@ -169,7 +169,7 @@ bool LLSharedMutex::isLocked() const
 
 bool LLSharedMutex::isThreadLocked() const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
     std::lock_guard<std::mutex> lock(mLockMutex);
 
@@ -179,7 +179,7 @@ bool LLSharedMutex::isThreadLocked() const
 
 void LLSharedMutex::lockShared()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
 
     mLockMutex.lock();
@@ -204,7 +204,7 @@ void LLSharedMutex::lockShared()
 
 void LLSharedMutex::lockExclusive()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
 
     mLockMutex.lock();
@@ -237,7 +237,7 @@ void LLSharedMutex::lockExclusive()
 
 bool LLSharedMutex::trylockShared()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
     std::lock_guard<std::mutex> lock(mLockMutex);
 
@@ -260,7 +260,7 @@ bool LLSharedMutex::trylockShared()
 
 bool LLSharedMutex::trylockExclusive()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
     std::lock_guard<std::mutex> lock(mLockMutex);
 
@@ -282,7 +282,7 @@ bool LLSharedMutex::trylockExclusive()
 
 void LLSharedMutex::unlockShared()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
     std::lock_guard<std::mutex> lock(mLockMutex);
 
@@ -303,7 +303,7 @@ void LLSharedMutex::unlockShared()
 
 void LLSharedMutex::unlockExclusive()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     LLThread::id_t current_thread = LLThread::currentID();
     std::lock_guard<std::mutex> lock(mLockMutex);
 
@@ -338,20 +338,20 @@ LLCondition::~LLCondition()
 
 void LLCondition::wait()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     std::unique_lock< std::mutex > lock(mMutex);
     mCond.wait(lock);
 }
 
 void LLCondition::signal()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mCond.notify_one();
 }
 
 void LLCondition::broadcast()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mCond.notify_all();
 }
 
@@ -364,7 +364,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex)
     : mMutex(mutex),
     mLocked(false)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if (mMutex)
         mLocked = mMutex->trylock();
 }
@@ -373,7 +373,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms)
     : mMutex(mutex),
     mLocked(false)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if (!mMutex)
         return;
 
@@ -388,7 +388,7 @@ LLMutexTrylock::LLMutexTrylock(LLMutex* mutex, U32 aTries, U32 delay_ms)
 
 LLMutexTrylock::~LLMutexTrylock()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if (mMutex && mLocked)
         mMutex->unlock();
 }
@@ -400,7 +400,7 @@ LLMutexTrylock::~LLMutexTrylock()
 //
 LLScopedLock::LLScopedLock(std::mutex* mutex) : mMutex(mutex)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if(mutex)
     {
         mutex->lock();
@@ -419,7 +419,7 @@ LLScopedLock::~LLScopedLock()
 
 void LLScopedLock::unlock()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if(mLocked)
     {
         mMutex->unlock();
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index 722d9afca2..732436cc4f 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -84,7 +84,7 @@ extern thread_local bool gProfilerEnabled;
 //      #define TRACY_NO_BROADCAST   1
 //      #define TRACY_ONLY_LOCALHOST 1
         #define TRACY_ONLY_IPV4      1
-        #include "Tracy.hpp"
+        #include "tracy/Tracy.hpp"
 
         // Enable OpenGL profiling
         #define LL_PROFILER_ENABLE_TRACY_OPENGL 0
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 5e267c6805..2a935f7c04 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -475,7 +475,7 @@ LLSDNotationParser::~LLSDNotationParser()
 // virtual
 S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     // map: { string:object, string:object }
     // array: [ object, object, object ]
     // undef: !
@@ -735,7 +735,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) c
 
 S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     // map: { string:object, string:object }
     map = LLSD::emptyMap();
     S32 parse_count = 0;
@@ -796,7 +796,7 @@ S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) c
 
 S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array, S32 max_depth) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     // array: [ object, object, object ]
     array = LLSD::emptyArray();
     S32 parse_count = 0;
@@ -836,7 +836,7 @@ S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array, S32 max_dept
 
 bool LLSDNotationParser::parseString(std::istream& istr, LLSD& data) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     std::string value;
     auto count = deserialize_string(istr, value, mMaxBytesLeft);
     if(PARSE_FAILURE == count) return false;
@@ -847,7 +847,7 @@ bool LLSDNotationParser::parseString(std::istream& istr, LLSD& data) const
 
 bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
     // binary: b##"ff3120ab1"
     // or: b(len)"..."
 
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index dd00c39180..6396caf8d5 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -930,7 +930,7 @@ void LLSDXMLParser::parsePart(const char *buf, llssize len)
 // virtual
 S32 LLSDXMLParser::doParse(std::istream& input, LLSD& data, S32 max_depth) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
 
     #ifdef XML_PARSER_PERFORMANCE_TESTS
     XML_Timer timer( &parseTime );
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 34aa0bc070..12f67208c1 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -214,7 +214,7 @@ bool compare_llsd_with_template(
     const LLSD& template_llsd,
     LLSD& resultant_llsd)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     if (
         llsd_to_test.isUndefined() &&
@@ -337,7 +337,7 @@ bool filter_llsd_with_template(
     const LLSD & template_llsd,
     LLSD & resultant_llsd)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     if (llsd_to_test.isUndefined() && template_llsd.isDefined())
     {
@@ -533,7 +533,7 @@ class TypeLookup
 public:
     TypeLookup()
     {
-        LL_PROFILE_ZONE_SCOPED
+        LL_PROFILE_ZONE_SCOPED;
 
         for (const Data *di(boost::begin(typedata)), *dend(boost::end(typedata)); di != dend; ++di)
         {
@@ -543,7 +543,7 @@ public:
 
     std::string lookup(LLSD::Type type) const
     {
-        LL_PROFILE_ZONE_SCOPED
+        LL_PROFILE_ZONE_SCOPED;
 
         MapType::const_iterator found = mMap.find(type);
         if (found != mMap.end())
@@ -595,7 +595,7 @@ static std::string match_types(LLSD::Type expect, // prototype.type()
                                LLSD::Type actual,        // type we're checking
                                const std::string& pfx)   // as for llsd_matches
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     // Trivial case: if the actual type is exactly what we expect, we're good.
     if (actual == expect)
@@ -634,7 +634,7 @@ static std::string match_types(LLSD::Type expect, // prototype.type()
 // see docstring in .h file
 std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::string& pfx)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     // An undefined prototype means that any data is valid.
     // An undefined slot in an array or map prototype means that any data
@@ -768,7 +768,7 @@ std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::str
 
 bool llsd_equals(const LLSD& lhs, const LLSD& rhs, int bits)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     // We're comparing strict equality of LLSD representation rather than
     // performing any conversions. So if the types aren't equal, the LLSD
@@ -878,7 +878,7 @@ namespace llsd
 
 LLSD& drill_ref(LLSD& blob, const LLSD& rawPath)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     // Treat rawPath uniformly as an array. If it's not already an array,
     // store it as the only entry in one. (But let's say Undefined means an
@@ -905,7 +905,7 @@ LLSD& drill_ref(LLSD& blob, const LLSD& rawPath)
     // path entry that's bad.
     for (LLSD::Integer i = 0; i < path.size(); ++i)
     {
-        LL_PROFILE_ZONE_NUM( i )
+        LL_PROFILE_ZONE_NUM(i);
 
         const LLSD& key{path[i]};
         if (key.isString())
@@ -935,7 +935,7 @@ LLSD& drill_ref(LLSD& blob, const LLSD& rawPath)
 
 LLSD drill(const LLSD& blob, const LLSD& path)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     // drill_ref() does exactly what we want. Temporarily cast away
     // const-ness and use that.
@@ -949,7 +949,7 @@ LLSD drill(const LLSD& blob, const LLSD& path)
 // filter may be include to exclude/include keys in a map.
 LLSD llsd_clone(LLSD value, LLSD filter)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     LLSD clone;
     bool has_filter(filter.isMap());
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 8bee33be0a..79625ad9f8 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -929,7 +929,7 @@ LLSD LLMemoryInfo::getStatsMap() const
 
 LLMemoryInfo& LLMemoryInfo::refresh()
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     mStatsMap = loadStatsMap();
 
     LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n";
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index faaaefd561..9eb92ca6a1 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -344,7 +344,7 @@ bool LLThread::runCondition(void)
 // Stop thread execution if requested until unpaused.
 void LLThread::checkPause()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mDataLock->lock();
 
     // This is in a while loop because the pthread API allows for spurious wakeups.
@@ -376,20 +376,20 @@ void LLThread::setQuitting()
 // static
 LLThread::id_t LLThread::currentID()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     return std::this_thread::get_id();
 }
 
 // static
 void LLThread::yield()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     std::this_thread::yield();
 }
 
 void LLThread::wake()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mDataLock->lock();
     if(!shouldSleep())
     {
@@ -400,7 +400,7 @@ void LLThread::wake()
 
 void LLThread::wakeLocked()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     if(!shouldSleep())
     {
         mRunCondition->signal();
@@ -409,13 +409,13 @@ void LLThread::wakeLocked()
 
 void LLThread::lockData()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mDataLock->lock();
 }
 
 void LLThread::unlockData()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
     mDataLock->unlock();
 }
 
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index e5c0970d35..28d6e4e4cc 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -91,7 +91,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
 
 U32 micro_sleep(U64 us, U32 max_yields)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 #if 0
     LARGE_INTEGER ft;
     ft.QuadPart = -static_cast<S64>(us * 10);  // '-' using relative time
@@ -109,7 +109,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
 
 void ms_sleep(U32 ms)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     micro_sleep(ms * 1000, 0);
 }
 
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index b56ecc9075..1c0befb3da 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -734,7 +734,7 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, bool path_open,F32 de
 bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detail, S32 split,
                          bool is_sculpted, S32 sculpt_size)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     if ((!mDirty) && (!is_sculpted))
     {
@@ -1216,7 +1216,7 @@ S32 LLPath::getNumNGonPoints(const LLPathParams& params, S32 sides, F32 startOff
 
 void LLPath::genNGon(const LLPathParams& params, S32 sides, F32 startOff, F32 end_scale, F32 twist_scale)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     // Generates a circular path, starting at (1, 0, 0), counterclockwise along the xz plane.
     constexpr F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
@@ -1452,7 +1452,7 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
 bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
                       bool is_sculpted, S32 sculpt_size)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     if ((!mDirty) && (!is_sculpted))
     {
@@ -2029,7 +2029,7 @@ LLVolume::~LLVolume()
 
 bool LLVolume::generate()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     LL_CHECK_MEMORY
     llassert_always(mProfilep);
@@ -2289,7 +2289,7 @@ bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs
 
 bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     //input stream is now pointing at a zlib compressed block of LLSD
     //decompress block
@@ -2776,7 +2776,7 @@ S32 LLVolume::getNumFaces() const
 
 void LLVolume::createVolumeFaces()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     if (mGenerateSingleFace)
     {
@@ -3741,7 +3741,7 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
                                           const LLMatrix3& norm_mat_in,
                                           S32 face_mask)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     LLMatrix4a mat;
     mat.loadu(mat_in);
@@ -4870,7 +4870,7 @@ void LLVolumeFace::freeData()
 
 bool LLVolumeFace::create(LLVolume* volume, bool partial_build)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     //tree for this face is no longer valid
     destroyOctree();
@@ -5545,7 +5545,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
 
 void LLVolumeFace::createOctree(F32 scaler, const LLVector4a& center, const LLVector4a& size)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     if (getOctree())
     {
@@ -6556,7 +6556,7 @@ void LLVolumeFace::fillFromLegacyData(std::vector<LLVolumeFace::VertexData>& v,
 
 bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     LL_CHECK_MEMORY
     bool flat = mTypeMask & FLAT_MASK;
@@ -7090,7 +7090,7 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
 void LLCalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal,
         const LLVector2 *texcoord, U32 triangleCount, const U16* index_array, LLVector4a *tangent)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     //LLVector4a *tan1 = new LLVector4a[vertexCount * 2];
     LLVector4a* tan1 = (LLVector4a*) ll_aligned_malloc_16(vertexCount*2*sizeof(LLVector4a));
diff --git a/indra/llmath/llvolumeoctree.h b/indra/llmath/llvolumeoctree.h
index 05d45f7b5f..1d74644715 100644
--- a/indra/llmath/llvolumeoctree.h
+++ b/indra/llmath/llvolumeoctree.h
@@ -143,7 +143,7 @@ public:
     virtual void visit(const LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* branch)
     { //this is a depth first traversal, so it's safe to assum all children have complete
         //bounding data
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
             LLVolumeOctreeListener* node = (LLVolumeOctreeListener*)branch->getListener(0);
 
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 04aebdde90..b9a4235a4e 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -560,7 +560,7 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
 
 void LLFontGL::generateASCIIglyphs()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     for (U32 i = 32; (i < 127); i++)
     {
         mFontFreetype->getGlyphInfo(i, EFontGlyphType::Grayscale);
@@ -570,7 +570,7 @@ void LLFontGL::generateASCIIglyphs()
 // Returns the max number of complete characters from text (up to max_chars) that can be drawn in max_pixels
 S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_chars, EWordWrapStyle end_on_word_boundary) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     if (!wchars || !wchars[0] || max_chars == 0)
     {
         return 0;
@@ -881,7 +881,7 @@ void LLFontGL::dumpFontTextures()
 // static
 bool LLFontGL::loadDefaultFonts()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     bool succ = true;
     succ &= (NULL != getFontSansSerifSmall());
     succ &= (NULL != getFontSansSerif());
@@ -894,7 +894,7 @@ bool LLFontGL::loadDefaultFonts()
 
 void LLFontGL::loadCommonFonts()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     getFont(LLFontDescriptor("SansSerif", "Small", BOLD));
     getFont(LLFontDescriptor("SansSerif", "Large", BOLD));
     getFont(LLFontDescriptor("SansSerif", "Huge", BOLD));
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index a0209fab43..1301d325a0 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1514,7 +1514,7 @@ LLLightState* LLRender::getLight(U32 index)
 
 void LLRender::setAmbientLightColor(const LLColor4& color)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
     if (color != mAmbientLightColor)
     {
         ++mLightHash;
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index b53025847f..2f6c966fd8 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2111,7 +2111,7 @@ void LLWindowWin32::initCursors()
 void LLWindowWin32::updateCursor()
 {
     ASSERT_MAIN_THREAD();
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
     if (mNextCursor == UI_CURSOR_ARROW
         && mBusyCount > 0)
     {
@@ -2155,7 +2155,7 @@ void LLWindowWin32::delayInputProcessing()
 void LLWindowWin32::gatherInput()
 {
     ASSERT_MAIN_THREAD();
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
     MSG msg;
 
     {
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index aec721e6c3..a10ef451e1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1428,13 +1428,13 @@ bool LLAppViewer::doFrame()
             }
 
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df mainloop")
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df mainloop");
                 // canonical per-frame event
                 mainloop.post(newFrame);
             }
 
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df suspend")
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df suspend");
                 // give listeners a chance to run
                 llcoro::suspend();
                 // if one of our coroutines threw an uncaught exception, rethrow it now
@@ -1444,7 +1444,7 @@ bool LLAppViewer::doFrame()
 
         if (!LLApp::isExiting())
         {
-            LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df JoystickKeyboard" )
+            LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df JoystickKeyboard");
             pingMainloopTimeout("Main:JoystickKeyboard");
 
             // Scan keyboard for movement keys.  Command keys and typing
@@ -1467,7 +1467,7 @@ bool LLAppViewer::doFrame()
             // Update state based on messages, user input, object idle.
             {
                 {
-                    LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout" )
+                    LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df pauseMainloopTimeout");
                     pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
                 }
 
@@ -1478,7 +1478,7 @@ bool LLAppViewer::doFrame()
                 }
 
                 {
-                    LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df resumeMainloopTimeout" )
+                    LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df resumeMainloopTimeout");
                     resumeMainloopTimeout();
                 }
             }
@@ -1525,7 +1525,7 @@ bool LLAppViewer::doFrame()
         }
 
         {
-            LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout" )
+            LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df pauseMainloopTimeout");
         pingMainloopTimeout("Main:Sleep");
 
         pauseMainloopTimeout();
@@ -1534,14 +1534,14 @@ bool LLAppViewer::doFrame()
         // Sleep and run background threads
         {
             //LL_RECORD_BLOCK_TIME(SLEEP2);
-            LL_PROFILE_ZONE_WARN( "Sleep2" )
+            LL_PROFILE_ZONE_WARN("Sleep2");
 
             // yield some time to the os based on command line option
             static LLCachedControl<S32> yield_time(gSavedSettings, "YieldTime", -1);
             if(yield_time >= 0)
             {
                 LL_PROFILE_ZONE_NAMED_CATEGORY_APP("Yield");
-                LL_PROFILE_ZONE_NUM( yield_time )
+                LL_PROFILE_ZONE_NUM(yield_time);
                 ms_sleep(yield_time);
             }
 
@@ -1609,24 +1609,24 @@ bool LLAppViewer::doFrame()
             }
 
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df gMeshRepo" )
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df gMeshRepo");
             gMeshRepo.update() ;
             }
 
             if(!total_work_pending) //pause texture fetching threads if nothing to process.
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df getTextureCache" )
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df getTextureCache");
                 LLAppViewer::getTextureCache()->pause();
                 LLAppViewer::getTextureFetch()->pause();
             }
             if(!total_io_pending) //pause file threads if nothing to process.
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df LLVFSThread" )
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df LLVFSThread");
                 LLLFSThread::sLocal->pause();
             }
 
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df resumeMainloopTimeout" )
+                LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df resumeMainloopTimeout");
                 resumeMainloopTimeout();
             }
             pingMainloopTimeout("Main:End");
@@ -1654,7 +1654,7 @@ bool LLAppViewer::doFrame()
         LL_INFOS() << "Exiting main_loop" << LL_ENDL;
     }
     }LLPerfStats::StatsRecorder::endFrame();
-    LL_PROFILER_FRAME_END
+    LL_PROFILER_FRAME_END;
 
     return ! LLApp::isRunning();
 }
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 039164cd6e..214b5f5cde 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -491,7 +491,7 @@ void LLAvatarTracker::notifyObservers()
         // new masks and ids will be processed later from idle.
         return;
     }
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     mIsNotifyObservers = true;
 
     observer_list_t observers(mObservers);
@@ -678,7 +678,7 @@ void LLAvatarTracker::processChangeUserRights(LLMessageSystem* msg, void**)
 
 void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock);
     bool chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification");
 
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 26fdf51485..d6ecd124c8 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -98,7 +98,7 @@ LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
 
 void LLDrawable::init(bool new_entry)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     // mXform
     mParent = NULL;
@@ -305,7 +305,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
 
 LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLFace *face;
     {
@@ -333,7 +333,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
 
 LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLFace *face;
 
@@ -356,7 +356,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
 
 LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLFace *face;
     face = new LLFace(this, mVObjp);
@@ -379,7 +379,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
 
 LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp, LLViewerTexture *specularp)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLFace *face;
     face = new LLFace(this, mVObjp);
@@ -403,7 +403,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
 
 void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (newFaces == (S32)mFaces.size())
     {
@@ -428,7 +428,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerText
 
 void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
     {
@@ -453,7 +453,7 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer
 
 void LLDrawable::mergeFaces(LLDrawable* src)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     auto face_count = mFaces.size() + src->mFaces.size();
 
@@ -488,7 +488,7 @@ void LLDrawable::updateMaterial()
 
 void LLDrawable::makeActive()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
 #if !LL_RELEASE_FOR_DOWNLOAD
     if (mVObjp.notNull())
@@ -552,7 +552,7 @@ void LLDrawable::makeActive()
 
 void LLDrawable::makeStatic(bool warning_enabled)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (isState(ACTIVE) &&
         !isState(ACTIVE_CHILD) &&
@@ -600,7 +600,7 @@ void LLDrawable::makeStatic(bool warning_enabled)
 // Returns "distance" between target destination and resulting xfrom
 F32 LLDrawable::updateXform(bool undamped)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     bool damped = !undamped;
 
@@ -754,7 +754,7 @@ void LLDrawable::moveUpdatePipeline(bool moved)
 
 void LLDrawable::movePartition()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLSpatialPartition* part = getSpatialPartition();
     if (part)
@@ -800,7 +800,7 @@ bool LLDrawable::updateMoveUndamped()
 
 void LLDrawable::updatePartition()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (!getVOVolume())
     {
@@ -819,7 +819,7 @@ void LLDrawable::updatePartition()
 
 bool LLDrawable::updateMoveDamped()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     F32 dist_squared = updateXform(false);
 
@@ -844,7 +844,7 @@ bool LLDrawable::updateMoveDamped()
 
 void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
     {
@@ -1022,7 +1022,7 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const
 
 void LLDrawable::updateSpatialExtents()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (mVObjp)
     {
@@ -1158,7 +1158,7 @@ void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
 */
 LLSpatialPartition* LLDrawable::getSpatialPartition()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLSpatialPartition* retval = NULL;
 
@@ -1295,7 +1295,7 @@ void LLSpatialBridge::destroyTree()
 
 void LLSpatialBridge::updateSpatialExtents()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
 
@@ -1468,7 +1468,7 @@ public:
 
 void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, bool for_select)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (!gPipeline.hasRenderType(mDrawableType))
     {
@@ -1567,7 +1567,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
 
 void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     if (mDrawable == NULL)
     {
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 9afc705d3e..ec70c7ebc0 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -117,7 +117,7 @@ LLDrawPoolAvatar::~LLDrawPoolAvatar()
 // virtual
 bool LLDrawPoolAvatar::isDead()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     if (!LLFacePool::isDead())
     {
@@ -129,14 +129,14 @@ bool LLDrawPoolAvatar::isDead()
 
 S32 LLDrawPoolAvatar::getShaderLevel() const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     return (S32) LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR);
 }
 
 void LLDrawPoolAvatar::prerender()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR);
 
@@ -145,7 +145,7 @@ void LLDrawPoolAvatar::prerender()
 
 LLMatrix4& LLDrawPoolAvatar::getModelView()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     static LLMatrix4 ret;
 
@@ -217,7 +217,7 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass)
 
 void LLDrawPoolAvatar::renderDeferred(S32 pass)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     render(pass);
 }
@@ -229,7 +229,7 @@ S32 LLDrawPoolAvatar::getNumPostDeferredPasses()
 
 void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sSkipOpaque = true;
     sShaderLevel = mShaderLevel;
@@ -245,7 +245,7 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
 
 void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
     // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
     sRenderingSkinned = false;
     sSkipOpaque = false;
@@ -257,7 +257,7 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)
 
 void LLDrawPoolAvatar::renderPostDeferred(S32 pass)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     is_post_deferred_render = true;
     if (LLPipeline::sImpostorRender)
@@ -489,7 +489,7 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)
 
 void LLDrawPoolAvatar::beginImpostor()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     if (!LLPipeline::sReflectionRender)
     {
@@ -506,7 +506,7 @@ void LLDrawPoolAvatar::beginImpostor()
 
 void LLDrawPoolAvatar::endImpostor()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
         gImpostorProgram.unbind();
     gPipeline.enableLightsDynamic();
@@ -514,7 +514,7 @@ void LLDrawPoolAvatar::endImpostor()
 
 void LLDrawPoolAvatar::beginRigid()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     if (gPipeline.shadersLoaded())
     {
@@ -534,7 +534,7 @@ void LLDrawPoolAvatar::beginRigid()
 
 void LLDrawPoolAvatar::endRigid()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sShaderLevel = mShaderLevel;
     if (sVertexProgram != NULL)
@@ -545,7 +545,7 @@ void LLDrawPoolAvatar::endRigid()
 
 void LLDrawPoolAvatar::beginDeferredImpostor()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     if (!LLPipeline::sReflectionRender)
     {
@@ -563,7 +563,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
 
 void LLDrawPoolAvatar::endDeferredImpostor()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sShaderLevel = mShaderLevel;
     sVertexProgram->disableTexture(LLViewerShaderMgr::NORMAL_MAP);
@@ -576,7 +576,7 @@ void LLDrawPoolAvatar::endDeferredImpostor()
 
 void LLDrawPoolAvatar::beginDeferredRigid()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
     sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -586,7 +586,7 @@ void LLDrawPoolAvatar::beginDeferredRigid()
 
 void LLDrawPoolAvatar::endDeferredRigid()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sShaderLevel = mShaderLevel;
     sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -597,7 +597,7 @@ void LLDrawPoolAvatar::endDeferredRigid()
 
 void LLDrawPoolAvatar::beginSkinned()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     // used for preview only
 
@@ -611,7 +611,7 @@ void LLDrawPoolAvatar::beginSkinned()
 
 void LLDrawPoolAvatar::endSkinned()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
     if (sShaderLevel > 0)
@@ -637,7 +637,7 @@ void LLDrawPoolAvatar::endSkinned()
 
 void LLDrawPoolAvatar::beginDeferredSkinned()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     sShaderLevel = mShaderLevel;
     sVertexProgram = &gDeferredAvatarProgram;
@@ -651,7 +651,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
 
 void LLDrawPoolAvatar::endDeferredSkinned()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
     sRenderingSkinned = false;
@@ -836,7 +836,7 @@ static LLTrace::BlockTimerStatHandle FTM_RIGGED_VBO("Rigged VBO");
 //-----------------------------------------------------------------------------
 LLViewerTexture *LLDrawPoolAvatar::getDebugTexture()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
     if (mReferences.empty())
     {
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4bf9412dcb..f73c530ff9 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -236,7 +236,7 @@ void LLFace::setPool(LLFacePool* pool)
 
 void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
     if (!new_pool)
     {
@@ -317,7 +317,7 @@ void LLFace::setSpecularMap(LLViewerTexture* tex)
 
 void LLFace::dirtyTexture()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
     LLDrawable* drawablep = getDrawable();
 
@@ -504,7 +504,7 @@ void LLFace::updateCenterAgent()
 
 void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
     if (mDrawablep == NULL || mDrawablep->getSpatialGroup() == NULL)
     {
@@ -578,7 +578,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
 
 void renderFace(LLDrawable* drawable, LLFace *face)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
     LLVOVolume* vobj = drawable->getVOVolume();
     if (vobj)
@@ -805,7 +805,7 @@ bool less_than_max_mag(const LLVector4a& vec)
 bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
                              const LLMatrix4& mat_vert_in, bool global_volume)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
     //get bounding box
     if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index 842c24db8a..f0bbaddfb2 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -68,7 +68,7 @@ void LLScriptHandler::initChannel()
 //--------------------------------------------------------------------------
 void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notification)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);
 
     LLToast::Params p;
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 89ec2bf72e..f75e48c728 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -259,7 +259,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect new_world_rect)
 //--------------------------------------------------------------------------
 void LLScreenChannel::addToast(const LLToast::Params& p)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     bool store_toast = false, show_toast = false;
 
     if (mDisplayToastsAlways)
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index dd5916818c..05c5bb14c6 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -409,7 +409,7 @@ LLSpatialGroup* LLSpatialGroup::getParent()
 
 bool LLSpatialGroup::removeObject(LLDrawable *drawablep, bool from_octree)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     if(!drawablep)
     {
@@ -634,7 +634,7 @@ void LLSpatialGroup::updateDistance(LLCamera &camera)
 
 F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     LLVector4a eye;
     LLVector4a origin;
@@ -729,7 +729,7 @@ F32 LLSpatialGroup::getUpdateUrgency() const
 
 bool LLSpatialGroup::changeLOD()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     if (hasState(ALPHA_DIRTY | OBJECT_DIRTY))
     {
@@ -818,7 +818,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
 
 void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     if (child->getListenerCount() == 0)
     {
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 2a21170b07..0550889a9b 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -895,7 +895,7 @@ bool LLSurfacePatch::updateTexture()
 
 void LLSurfacePatch::updateGL()
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     F32 meters_per_grid = getSurface()->getMetersPerGrid();
     F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge();
 
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index 0ac2653021..6f8691bb26 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -114,7 +114,7 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount)
 LLToastPanel* LLToastPanel::buidPanelFromNotification(
         const LLNotificationPtr& notification)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     LLToastPanel* res = NULL;
 
     //process tip toast panels
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e2389c9ba0..c774e17e0c 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -213,7 +213,7 @@ void display_update_camera()
 // Write some stats to LL_INFOS()
 void display_stats()
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     const F32 FPS_LOG_FREQUENCY = 10.f;
     if (gRecentFPSTime.getElapsedTimeF32() >= FPS_LOG_FREQUENCY)
     {
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 1f14aa4afc..58b8a5b677 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -611,7 +611,7 @@ void LLViewerParcelOverlay::setDirty()
 
 void LLViewerParcelOverlay::updateGL()
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
     updateOverlayTexture();
 }
 
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b03a9a8f15..e486449b4d 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -925,7 +925,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
         imagep->mMaxVirtualSize = 0.f;
     }
 
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
     {
         for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4028de0a66..957048566e 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5623,7 +5623,7 @@ void LLViewerWindow::setup3DRender()
 
 void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset;
     gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset;
     gGLViewport[2] = mWorldViewRectRaw.getWidth();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d4559e5491..ac95a2f8f7 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7239,7 +7239,7 @@ void LLVOAvatar::updateGL()
 {
     if (mMeshTexturesDirty)
     {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
         updateMeshTextures();
         mMeshTexturesDirty = false;
     }
@@ -8723,7 +8723,7 @@ void LLVOAvatar::updateMeshVisibility()
 // virtual
 void LLVOAvatar::updateMeshTextures()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
     static S32 update_counter = 0;
     mBakedTextureDebugText.clear();
 
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 9b553928cf..d18a32cb05 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -290,7 +290,7 @@ const LLVoiceVersionInfo& LLWebRTCVoiceClient::getVersion()
 
 void LLWebRTCVoiceClient::updateSettings()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     setVoiceEnabled(LLVoiceClient::getInstance()->voiceEnabled());
     static LLCachedControl<S32> sVoiceEarLocation(gSavedSettings, "VoiceEarLocation");
@@ -335,7 +335,7 @@ void LLWebRTCVoiceClient::removeObserver(LLVoiceClientParticipantObserver *obser
 
 void LLWebRTCVoiceClient::notifyParticipantObservers()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
     for (observer_set_t::iterator it = mParticipantObservers.begin(); it != mParticipantObservers.end();)
     {
         LLVoiceClientParticipantObserver *observer = *it;
@@ -357,7 +357,7 @@ void LLWebRTCVoiceClient::removeObserver(LLVoiceClientStatusObserver *observer)
 
 void LLWebRTCVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusType status)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LL_DEBUGS("Voice") << "( " << LLVoiceClientStatusObserver::status2string(status) << " )"
                        << " mSession=" << mSession << LL_ENDL;
@@ -541,7 +541,7 @@ void LLWebRTCVoiceClient::voiceConnectionCoro()
 // for cross-region voice.
 void LLWebRTCVoiceClient::updateNeighboringRegions()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     static const std::vector<LLVector3d> neighbors {LLVector3d(0.0f, 1.0f, 0.0f),  LLVector3d(0.707f, 0.707f, 0.0f),
                                                     LLVector3d(1.0f, 0.0f, 0.0f),  LLVector3d(0.707f, -0.707f, 0.0f),
@@ -574,7 +574,7 @@ void LLWebRTCVoiceClient::updateNeighboringRegions()
 // shut down the current audio session to make room for the next one.
 void LLWebRTCVoiceClient::leaveAudioSession()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if(mSession)
     {
@@ -630,7 +630,7 @@ void LLWebRTCVoiceClient::OnDevicesChanged(const llwebrtc::LLWebRTCVoiceDeviceLi
 void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDeviceList &render_devices,
                                                const llwebrtc::LLWebRTCVoiceDeviceList &capture_devices)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
     std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
     std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
 
@@ -797,7 +797,7 @@ void LLWebRTCVoiceClient::setHidden(bool hidden)
 // notify the observers.
 void LLWebRTCVoiceClient::OnConnectionEstablished(const std::string &channelID, const LLUUID &regionID)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (gAgent.getRegion()->getRegionID() == regionID)
     {
@@ -881,7 +881,7 @@ void LLWebRTCVoiceClient::setEarLocation(S32 loc)
 
 void LLWebRTCVoiceClient::updatePosition(void)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LLViewerRegion *region = gAgent.getRegion();
     if (region && isAgentAvatarValid())
@@ -1010,7 +1010,7 @@ void LLWebRTCVoiceClient::enforceTether()
 // standard 50m
 void LLWebRTCVoiceClient::sendPositionUpdate(bool force)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     std::string      spatial_data;
 
@@ -1126,7 +1126,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::addParticipantBy
 
 void LLWebRTCVoiceClient::removeParticipantByID(const std::string &channelID, const LLUUID &id, const LLUUID& region)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     participantStatePtr_t result;
     LLWebRTCVoiceClient::sessionState::ptr_t session = sessionState::matchSessionByChannelID(channelID);
@@ -1156,7 +1156,7 @@ LLWebRTCVoiceClient::participantState::participantState(const LLUUID& agent_id,
 LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::addParticipant(const LLUUID& agent_id, const LLUUID& region)
 {
 
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     participantStatePtr_t result;
 
@@ -1194,7 +1194,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::ad
 
 LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::findParticipantByID(const LLUUID& id)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     participantStatePtr_t result;
     participantUUIDMap::iterator iter = mParticipantsByUUID.find(id);
@@ -1209,7 +1209,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::fi
 
 void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceClient::participantStatePtr_t &participant)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (participant)
     {
@@ -1492,7 +1492,7 @@ void LLWebRTCVoiceClient::setMicGain(F32 gain)
 
 void LLWebRTCVoiceClient::setVoiceEnabled(bool enabled)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LL_DEBUGS("Voice")
         << "( " << (enabled ? "enabled" : "disabled") << " )"
@@ -1887,7 +1887,7 @@ void LLWebRTCVoiceClient::sessionState::revive()
 
 void LLWebRTCVoiceClient::sessionState::processSessionStates()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     auto iter = mSessions.begin();
     while (iter != mSessions.end())
@@ -1908,7 +1908,7 @@ void LLWebRTCVoiceClient::sessionState::processSessionStates()
 // process the states on each connection associated with a session.
 bool LLWebRTCVoiceClient::sessionState::processConnectionStates()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     std::list<connectionPtr_t>::iterator iter = mWebRTCConnections.begin();
     while (iter != mWebRTCConnections.end())
@@ -1932,7 +1932,7 @@ bool LLWebRTCVoiceClient::sessionState::processConnectionStates()
 // on our location.
 bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (!mShuttingDown)
     {
@@ -2168,7 +2168,7 @@ void LLVoiceWebRTCConnection::processIceUpdates()
 // will make the cap call to the server sending up the ICE candidates.
 void LLVoiceWebRTCConnection::processIceUpdatesCoro()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (mShutDown || LLWebRTCVoiceClient::isShuttingDown())
     {
@@ -2395,7 +2395,7 @@ void LLVoiceWebRTCConnection::sendData(const std::string &data)
 // The simulator will pass this on to the Secondlife WebRTC server.
 void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LL_DEBUGS("Voice") << "Disconnecting voice." << LL_ENDL;
     if (mWebRTCDataInterface)
@@ -2454,7 +2454,7 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
 // will use the offer and answer to negotiate the session.
 void LLVoiceWebRTCSpatialConnection::requestVoiceConnection()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID);
 
@@ -2527,7 +2527,7 @@ void LLVoiceWebRTCSpatialConnection::requestVoiceConnection()
 
 void LLVoiceWebRTCConnection::OnVoiceConnectionRequestSuccess(const LLSD &result)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (LLWebRTCVoiceClient::isShuttingDown())
     {
@@ -2582,7 +2582,7 @@ static llwebrtc::LLWebRTCPeerConnectionInterface::InitOptions getConnectionOptio
 // Secondlife WebRTC server.
 bool LLVoiceWebRTCConnection::connectionStateMachine()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     processIceUpdates();
 
@@ -2776,7 +2776,7 @@ void LLVoiceWebRTCConnection::OnDataReceived(const std::string& data, bool binar
 // this pointer.
 void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool binary)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     if (mShutDown)
     {
@@ -2943,7 +2943,7 @@ void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface
 // to peers.
 void LLVoiceWebRTCConnection::sendJoin()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
 
     boost::json::object root;
@@ -3017,7 +3017,7 @@ LLVoiceWebRTCAdHocConnection::~LLVoiceWebRTCAdHocConnection()
 // So, we have a separate requestVoiceConnection call.
 void LLVoiceWebRTCAdHocConnection::requestVoiceConnection()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
 
     LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID);
 
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 56742751e8..471174cf5d 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -142,7 +142,7 @@ void LLVOSurfacePatch::updateGL()
 {
     if (mPatchp)
     {
-        LL_PROFILE_ZONE_SCOPED
+        LL_PROFILE_ZONE_SCOPED;
         mPatchp->updateGL();
     }
 }
@@ -995,7 +995,7 @@ void gen_terrain_tangents(U16                    strider_vertex_count,
                           LLStrider<LLVector2>  &texCoords0p,
                           LLStrider<U16>        &indicesp)
 {
-    LL_PROFILE_ZONE_SCOPED
+    LL_PROFILE_ZONE_SCOPED;
 
     LLVector4a            *vertices = new LLVector4a[strider_vertex_count];
     LLVector4a            *normals  = new LLVector4a[strider_vertex_count];
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 014d4134f5..9508d33eb3 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1264,7 +1264,7 @@ void send_agent_pause()
 
 void send_agent_resume()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
     // Note: used to check for LLWorld initialization before it became a singleton.
     // Rather than just remove this check I'm changing it to assure that the message
     // system has been initialized. -MG
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index cbd1077306..6c4a1f43b4 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -107,7 +107,7 @@ public:
 
     virtual void recordMessage(LLError::ELevel level, const std::string& message)
     {
-        LL_PROFILE_ZONE_SCOPED
+        LL_PROFILE_ZONE_SCOPED;
         mFile << message << std::endl;
     }
 
-- 
cgit v1.2.3


From e101d1aa28a51570e6d76dc12df810b1daa71e7e Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 9 Jul 2024 20:51:02 -0400
Subject: Fix excessive clearing of shader cache when toggling mirrors (#1950)

---
 indra/llrender/llshadermgr.cpp      | 6 ------
 indra/llrender/llshadermgr.h        | 1 -
 indra/newview/llviewercontrol.cpp   | 1 +
 indra/newview/llviewershadermgr.cpp | 9 +++++++--
 indra/newview/pipeline.cpp          | 7 +------
 5 files changed, 9 insertions(+), 15 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 8bc00c0cf6..bc542d325e 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -44,7 +44,6 @@ using std::make_pair;
 using std::string;
 
 LLShaderMgr * LLShaderMgr::sInstance = NULL;
-bool LLShaderMgr::sMirrorsEnabled = false;
 
 LLShaderMgr::LLShaderMgr()
 {
@@ -600,11 +599,6 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
         extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_130 1\n");
     }
 
-    if (sMirrorsEnabled)
-    {
-        extra_code_text[extra_code_count++] = strdup("#define HERO_PROBES 1\n");
-    }
-
     // Use alpha float to store bit flags
     // See: C++: addDeferredAttachment(), shader: frag_data[2]
     extra_code_text[extra_code_count++] = strdup("#define GBUFFER_FLAG_SKIP_ATMOS   0.0 \n"); // atmo kill
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index fe6137c448..921ef20997 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -378,7 +378,6 @@ public:
     bool mShaderCacheInitialized = false;
     bool mShaderCacheEnabled = false;
     std::string mShaderCacheDir;
-    static bool sMirrorsEnabled;
 
 protected:
 
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 820d413535..1d483f1b8a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -797,6 +797,7 @@ void settings_setup_listeners()
     setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged);
+    setting_setup_signal_listener(gSavedSettings, "RenderMirrors", handleReflectionProbeDetailChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderHeroProbeResolution", handleHeroProbeResolutionChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 12d0aa4f8e..96354ea18f 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -495,8 +495,6 @@ void LLViewerShaderMgr::setShaders()
 
     mShaderList.clear();
 
-    LLShaderMgr::sMirrorsEnabled = LLPipeline::RenderMirrors;
-
     if (!gGLManager.mHasRequirements)
     {
         // Viewer will show 'hardware requirements' warning later
@@ -755,6 +753,8 @@ std::string LLViewerShaderMgr::loadBasicShaders()
 
     bool ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
 
+    bool mirrors = gSavedSettings.getBOOL("RenderMirrors");
+
     bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f;
 
     S32 probe_level = llclamp(gSavedSettings.getS32("RenderReflectionProbeLevel"), 0, 3);
@@ -782,6 +782,11 @@ std::string LLViewerShaderMgr::loadBasicShaders()
         attribs["REF_SAMPLE_COUNT"] = "32";
     }
 
+    if (mirrors)
+    {
+        attribs["HERO_PROBES"] = "1";
+    }
+
     { // PBR terrain
         const S32 mapping = clamp_terrain_mapping(gSavedSettings.getS32("RenderTerrainPBRPlanarSampleCount"));
         attribs["TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT"] = llformat("%d", mapping);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5598660368..16d66123ae 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1072,12 +1072,7 @@ void LLPipeline::refreshCachedSettings()
     RenderScreenSpaceReflectionAdaptiveStepMultiplier = gSavedSettings.getF32("RenderScreenSpaceReflectionAdaptiveStepMultiplier");
     RenderScreenSpaceReflectionGlossySamples = gSavedSettings.getS32("RenderScreenSpaceReflectionGlossySamples");
     RenderBufferVisualization = gSavedSettings.getS32("RenderBufferVisualization");
-    if (gSavedSettings.getBOOL("RenderMirrors") != RenderMirrors)
-    {
-        RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
-        LLViewerShaderMgr::instance()->clearShaderCache();
-        LLViewerShaderMgr::instance()->setShaders();
-    }
+    RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
     RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
     RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
 
-- 
cgit v1.2.3


From f8b1d8095eb87a927750c3ceeff4cc7d4138a077 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 9 Jul 2024 20:51:38 -0400
Subject: Update meshoptimizer package to 0.21 (#1948)

---
 indra/llmeshoptimizer/llmeshoptimizer.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra')

diff --git a/indra/llmeshoptimizer/llmeshoptimizer.cpp b/indra/llmeshoptimizer/llmeshoptimizer.cpp
index 52ed9b9526..7339454367 100644
--- a/indra/llmeshoptimizer/llmeshoptimizer.cpp
+++ b/indra/llmeshoptimizer/llmeshoptimizer.cpp
@@ -291,6 +291,7 @@ U64 LLMeshOptimizer::simplifyU32(U32 *destination,
             vertex_positions_stride,
             target_index_count,
             target_error,
+            0,
             result_error
             );
     }
@@ -332,6 +333,7 @@ U64 LLMeshOptimizer::simplify(U16 *destination,
             vertex_positions_stride,
             target_index_count,
             target_error,
+            0,
             result_error
             );
     }
-- 
cgit v1.2.3


From 47e2cc271ac924a39ef2b84a2232131120c6aa4f Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Wed, 10 Jul 2024 13:02:52 +0200
Subject: Remove orphaned constants gMinVideoRam and gMaxVideoRam (#1970)

---
 indra/newview/llviewertexture.cpp | 31 +++++++++++++------------------
 indra/newview/llviewertexture.h   |  3 ---
 2 files changed, 13 insertions(+), 21 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9fa71fdff7..9648a9af18 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -63,23 +63,18 @@
 #include "llwindow.h"
 ///////////////////////////////////////////////////////////////////////////////
 
-// extern
-const S32Megabytes gMinVideoRam(32);
-const S32Megabytes gMaxVideoRam(512);
-
-
 // statics
-LLPointer<LLViewerTexture>        LLViewerTexture::sNullImagep = NULL;
-LLPointer<LLViewerTexture>        LLViewerTexture::sBlackImagep = NULL;
-LLPointer<LLViewerTexture>        LLViewerTexture::sCheckerBoardImagep = NULL;
-LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = NULL;
-LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL;
-LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL;
-LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = NULL;
-LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = NULL;
+LLPointer<LLViewerTexture>        LLViewerTexture::sNullImagep = nullptr;
+LLPointer<LLViewerTexture>        LLViewerTexture::sBlackImagep = nullptr;
+LLPointer<LLViewerTexture>        LLViewerTexture::sCheckerBoardImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultIrradiancePBRp;
 LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap;
-LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL;
+LLTexturePipelineTester* LLViewerTextureManager::sTesterp = nullptr;
 F32 LLViewerFetchedTexture::sMaxVirtualSize = 8192.f*8192.f;
 
 const std::string sTesterName("TextureTester");
@@ -91,11 +86,11 @@ LLFrameTimer LLViewerTexture::sEvaluationTimer;
 F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
 
 S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
-const S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
+constexpr S32 MAX_CACHED_RAW_IMAGE_AREA = 64 * 64;
 const S32 MAX_CACHED_RAW_SCULPT_IMAGE_AREA = LLViewerTexture::sMaxSculptRez * LLViewerTexture::sMaxSculptRez;
-const S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128;
-const S32 DEFAULT_ICON_DIMENSIONS = 32;
-const S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256;
+constexpr S32 MAX_CACHED_RAW_TERRAIN_IMAGE_AREA = 128 * 128;
+constexpr S32 DEFAULT_ICON_DIMENSIONS = 32;
+constexpr S32 DEFAULT_THUMBNAIL_DIMENSIONS = 256;
 U32 LLViewerTexture::sMinLargeImageSize = 65536; //256 * 256.
 U32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA;
 bool LLViewerTexture::sFreezeImageUpdates = false;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 5b2e3aaab7..ada818c220 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -42,9 +42,6 @@
 #include <map>
 #include <list>
 
-extern const S32Megabytes gMinVideoRam;
-extern const S32Megabytes gMaxVideoRam;
-
 class LLFace;
 class LLImageGL ;
 class LLImageRaw;
-- 
cgit v1.2.3


From 94ef434cbfa3e1220731a9ddf53066b36bd23784 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 10 Jul 2024 13:31:09 +0300
Subject: #1932 Fix a case where an IM toast wasn't displayed

---
 indra/newview/llimview.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index e39e0a332f..b12c2fdc52 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -372,8 +372,10 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
     // 4. Toast
     if ((("toast" == user_preferences) &&
         (ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) &&
-        (!session_floater->isTornOff() || !LLFloater::isVisible(session_floater)))
-                || !session_floater->isMessagePaneExpanded())
+        (!session_floater->isTornOff()
+         || session_floater->isMinimized()
+         || !LLFloater::isVisible(session_floater)))
+         || !session_floater->isMessagePaneExpanded())
 
     {
         //Show IM toasts (upper right toasts)
-- 
cgit v1.2.3


From 35246a95039e242c6167f6c52a0c6cc49e004f23 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 9 Jul 2024 17:00:31 +0200
Subject: #1959 BugSplat Crash #1489790: VCRUNTIME140!memcmp(72)

---
 indra/llmath/llvolume.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 1c0befb3da..56ac22ca18 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5462,7 +5462,11 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
 
         U32 stream_count = data.w.empty() ? 4 : 5;
 
-        S32 vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
+        S32 vert_count = 0;
+        if (!data.p.empty())
+        {
+            vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
+        }
 
         if (vert_count < 65535 && vert_count != 0)
         {
-- 
cgit v1.2.3


From 8b59d9bb42f7a0421c27daa75672ae775bb8927f Mon Sep 17 00:00:00 2001
From: nat-goodspeed <nat@lindenlab.com>
Date: Wed, 10 Jul 2024 11:15:51 -0400
Subject: Introduce LLCoros::RMutex, use for SettingsConfig::mRecorderMutex
 (#1980)

in llerror.cpp.
---
 indra/llcommon/llcoros.h   | 9 ++++++++-
 indra/llcommon/llerror.cpp | 3 +--
 2 files changed, 9 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index 369d65407e..c3820ae987 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -31,8 +31,9 @@
 
 #include "llexception.h"
 #include <boost/fiber/fss.hpp>
-#include <boost/fiber/future/promise.hpp>
 #include <boost/fiber/future/future.hpp>
+#include <boost/fiber/future/promise.hpp>
+#include <boost/fiber/recursive_mutex.hpp>
 #include "mutex.h"
 #include "llsingleton.h"
 #include "llinstancetracker.h"
@@ -307,6 +308,12 @@ public:
 
     // use mutex, lock, condition_variable suitable for coroutines
     using Mutex = boost::fibers::mutex;
+    using RMutex = boost::fibers::recursive_mutex;
+    // With C++17, LockType is deprecated: at this point we can directly
+    // declare 'std::unique_lock lk(some_mutex)' without explicitly stating
+    // the mutex type. Sadly, making LockType an alias template for
+    // std::unique_lock doesn't work the same way: Class Template Argument
+    // Deduction only works for class templates, not alias templates.
     using LockType = std::unique_lock<Mutex>;
     using cv_status = boost::fibers::cv_status;
     using ConditionVariable = boost::fibers::condition_variable;
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index ff80863497..6c3b9c9542 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -55,7 +55,6 @@
 #include "llsingleton.h"
 #include "llstl.h"
 #include "lltimer.h"
-#include <boost/fiber/recursive_mutex.hpp>
 
 // On Mac, got:
 // #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define
@@ -507,7 +506,7 @@ namespace
         LLError::TimeFunction               mTimeFunction;
 
         Recorders                           mRecorders;
-        boost::fibers::recursive_mutex      mRecorderMutex;
+        LLCoros::RMutex                     mRecorderMutex;
 
         int                                 mShouldLogCallCounter;
 
-- 
cgit v1.2.3


From e0b75e336666a87333dc92becf8411d8bffdaedf Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Tue, 2 Jul 2024 14:19:45 -0700
Subject: secondlife/viewer#1885: Terrain texture repeats: Remove feature flag
 dependency on simulator feature in favor of cap

---
 indra/newview/app_settings/settings.xml | 2 +-
 indra/newview/llviewerregion.cpp        | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c455b6f5f1..26c043ee97 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9267,7 +9267,7 @@
     <key>RenderTerrainPBREnabled</key>
     <map>
       <key>Comment</key>
-      <string>EXPERIMENTAL: Enable PBR Terrain features.</string>
+      <string>Enable PBR Terrain features.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 39244c8246..f58e9046f8 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2496,10 +2496,10 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
                 gSavedSettings.setBOOL("GLTFEnabled", false);
             }
 
-            if (features.has("PBRTerrainTransformsEnabled"))
+            llassert(gAgent.getRegion());
+            if (gAgent.getRegion() && gAgent.getRegion()->isCapabilityAvailable("ModifyRegion"))
             {
-                bool enabled = features["PBRTerrainTransformsEnabled"];
-                gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", enabled);
+                gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", true);
             }
             else
             {
-- 
cgit v1.2.3


From 579a78a8dcbcb98bd181c9262e2288c5cf99febf Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Wed, 10 Jul 2024 20:54:32 +0200
Subject: Neither alpha, tattoo nor universal wearable edit panels contain a
 param list and a main panel (#1978)

---
 indra/newview/llpaneleditwearable.cpp | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index a14f1d54a2..e88f6c0470 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -299,9 +299,9 @@ LLEditWearableDictionary::Subparts::Subparts()
         addEntry(SUBPART_UNDERSHIRT,      new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
         addEntry(SUBPART_UNDERPANTS,      new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
         addEntry(SUBPART_SKIRT,           new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_ALPHA,           new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
-        addEntry(SUBPART_TATTOO,          new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
-        addEntry(SUBPART_UNIVERSAL,       new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
+        addEntry(SUBPART_ALPHA,           new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
+        addEntry(SUBPART_TATTOO,          new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
+        addEntry(SUBPART_UNIVERSAL,       new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
 
         // WT_PHYSICS
         addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN,    new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f), SEX_FEMALE));
@@ -794,8 +794,12 @@ bool LLPanelEditWearable::postBuild()
                                 continue;
                         }
 
-                        const std::string accordion_tab = subpart_entry->mAccordionTab;
-                        LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab);
+                        const std::string& accordion_tab = subpart_entry->mAccordionTab;
+                        if (accordion_tab.empty())
+                        {
+                            continue;
+                        }
+                        LLAccordionCtrlTab *tab = findChild<LLAccordionCtrlTab>(accordion_tab);
                         if (!tab)
                         {
                                 LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
@@ -1199,12 +1203,16 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bo
                                 continue;
                         }
 
-                        const std::string scrolling_panel = subpart_entry->mParamList;
-                        const std::string accordion_tab = subpart_entry->mAccordionTab;
+                        const std::string& scrolling_panel = subpart_entry->mParamList;
+                        const std::string& accordion_tab = subpart_entry->mAccordionTab;
 
-                        LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel);
-                        LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab);
+                        if (scrolling_panel.empty() || accordion_tab.empty())
+                        {
+                            continue;
+                        }
 
+                        LLScrollingPanelList *panel_list = findChild<LLScrollingPanelList>(scrolling_panel);
+                        LLAccordionCtrlTab *tab = findChild<LLAccordionCtrlTab>(accordion_tab);
                         if (!panel_list)
                         {
                                 LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
-- 
cgit v1.2.3


From 52a581a39889dbc977f471c5e31e0fd468cc7bc6 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 10 Jul 2024 20:22:41 +0200
Subject: #1859 BugSplat Crash: SecondLifeViewer!<lambda>::operator()(61)

---
 indra/llwindow/llwindowwin32.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 2f6c966fd8..70316ec36a 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1383,7 +1383,7 @@ bool LLWindowWin32::switchContext(bool fullscreen, const LLCoordScreen& size, bo
 
     gGLManager.initWGL();
 
-    if (wglChoosePixelFormatARB)
+    if (wglChoosePixelFormatARB && wglGetPixelFormatAttribivARB)
     {
         // OK, at this point, use the ARB wglChoosePixelFormatsARB function to see if we
         // can get exactly what we want.
-- 
cgit v1.2.3


From cecc7261341cb6b7d65f0c851522610994a7521b Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 10 Jul 2024 14:43:31 +0300
Subject: viewer#1965 Fixed selection swirls swirling forever when the UI is
 hidden.

---
 indra/newview/llviewerdisplay.cpp | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index c774e17e0c..adcf91f4ed 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1539,6 +1539,11 @@ void render_ui_3d()
         gObjectList.resetObjectBeacons();
         gSky.addSunMoonBeacons();
     }
+    else
+    {
+        // Make sure particle effects disappear
+        LLHUDObject::renderAllForTimer();
+    }
 
     stop_glerror();
 }
-- 
cgit v1.2.3


From aa3fe3352e5a96537aad475e6f6683baaa495090 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 11 Jul 2024 10:40:36 +0300
Subject: viewer#1975 Fixed "Allow Land Resell" option not switching

---
 indra/newview/llfloaterregioninfo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 41d1fcff82..52eddcfc67 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -512,7 +512,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
     panel->getChild<LLUICtrl>("block_fly_over_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLYOVER));
     panel->getChild<LLUICtrl>("allow_damage_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_DAMAGE));
     panel->getChild<LLUICtrl>("restrict_pushobject")->setValue(is_flag_set(region_flags, REGION_FLAGS_RESTRICT_PUSHOBJECT));
-    panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL));
+    panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue(!is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL));
     panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_PARCEL_CHANGES));
     panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_PARCEL_SEARCH));
     panel->getChild<LLUICtrl>("agent_limit_spin")->setValue(LLSD((F32)agent_limit));
-- 
cgit v1.2.3


From 067c4008032ae815c4fc6dbaf347bb91cefd5490 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 11 Jul 2024 16:39:28 +0300
Subject: viewer#1253 Viewer tries to detach attachments in inventory on
 shutdown

---
 indra/newview/llvoavatarself.cpp | 4 ++--
 indra/newview/llvoavatarself.h   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 9c1c304133..57f7734fea 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -699,7 +699,7 @@ bool LLVOAvatarSelf::isValid() const
 // virtual
 void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
 {
-    if (isValid())
+    if (isAgentAvatarValid())
     {
         LLVOAvatar::idleUpdate(agent, time);
         idleUpdateTractorBeam();
@@ -1238,7 +1238,7 @@ bool LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
         // Make sure the inventory is in sync with the avatar.
 
         // Update COF contents, don't trigger appearance update.
-        if (!isValid())
+        if (!isAgentAvatarValid())
         {
             LL_INFOS() << "removeItemLinks skipped, avatar is under destruction" << LL_ENDL;
         }
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 77556c8412..051ac791c0 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -111,7 +111,7 @@ private:
 public:
     /*virtual*/ bool    isSelf() const { return true; }
         virtual bool    isBuddy() const { return false; }
-    /*virtual*/ bool    isValid() const;
+    /*virtual*/ bool    isValid() const; // use isAgentAvatarValid, it's fuller
 
     //--------------------------------------------------------------------
     // Updates
-- 
cgit v1.2.3


From 98941831e4afab1cd5ccb5bab995a671df320f72 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 11 Jul 2024 11:36:36 -0500
Subject: Fix for GLTF scenes not uploading (#1994)

---
 indra/newview/gltf/asset.cpp       |  6 ++++++
 indra/newview/gltfscenemanager.cpp | 10 ++++++++++
 2 files changed, 16 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 5ba5951064..c210b9c61d 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -991,6 +991,12 @@ bool Image::prep(Asset& asset)
         return false;
     }
 
+    if (!asset.mFilename.empty())
+    { // local preview, boost image so it doesn't discard and force to save raw image in case we save out or upload
+        mTexture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
+        mTexture->forceToSaveRawImage(0, F32_MAX);
+    }
+
     return true;
 }
 
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 9bda70e643..44564b7926 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -148,6 +148,16 @@ void GLTFSceneManager::uploadSelection()
                     raw = image.mTexture->getRawImage();
                 }
 
+                if (raw.isNull())
+                {
+                    raw = image.mTexture->getSavedRawImage();
+                }
+
+                if (raw.isNull())
+                {
+                    image.mTexture->readbackRawImage();
+                }
+
                 if (raw.notNull())
                 {
                     LLPointer<LLImageJ2C> j2c = LLViewerTextureList::convertToUploadFile(raw);
-- 
cgit v1.2.3


From 7679c76144057c85faabc196e0d189cebda75875 Mon Sep 17 00:00:00 2001
From: RunitaiLinden <davep@lindenlab.com>
Date: Thu, 11 Jul 2024 12:23:17 -0500
Subject: Fix for tracy build.

---
 indra/llcommon/llsdserialize.cpp     | 2 +-
 indra/newview/lldrawable.cpp         | 2 +-
 indra/newview/llspatialpartition.cpp | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 2a935f7c04..37af366a20 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -950,7 +950,7 @@ LLSDBinaryParser::~LLSDBinaryParser()
 // virtual
 S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
 /**
  * Undefined: '!'<br>
  * Boolean: '1' for true '0' for false<br>
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index d6ecd124c8..60e7171004 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -944,7 +944,7 @@ void LLDrawable::updateTexture()
 
 bool LLDrawable::updateGeometry()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
 
     llassert(mVObjp.notNull());
     bool res = mVObjp && mVObjp->updateGeometry(this);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 05c5bb14c6..85683a544b 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -498,7 +498,7 @@ public:
 
 void LLSpatialGroup::setState(U32 state, S32 mode)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     llassert(state <= LLSpatialGroup::STATE_MASK);
 
@@ -547,7 +547,7 @@ public:
 
 void LLSpatialGroup::clearState(U32 state, S32 mode)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
 
     llassert(state <= LLSpatialGroup::STATE_MASK);
 
-- 
cgit v1.2.3


From cc7a38d9d135ae29d0252e161a0540d254d2ee0e Mon Sep 17 00:00:00 2001
From: cosmic-linden <111533034+cosmic-linden@users.noreply.github.com>
Date: Thu, 11 Jul 2024 12:18:47 -0700
Subject: Partially revert "secondlife/viewer#1885: Terrain texture repeats:
 Remove feature flag dependency on simulator feature in favor of cap"

---
 indra/newview/llviewerregion.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 96c839d918..25c07a5ff9 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2496,10 +2496,10 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
                 gSavedSettings.setBOOL("GLTFEnabled", false);
             }
 
-            llassert(gAgent.getRegion());
-            if (gAgent.getRegion() && gAgent.getRegion()->isCapabilityAvailable("ModifyRegion"))
+            if (features.has("PBRTerrainTransformsEnabled"))
             {
-                gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", true);
+                bool enabled = features["PBRTerrainTransformsEnabled"];
+                gSavedSettings.setBOOL("RenderTerrainPBRTransformsEnabled", enabled);
             }
             else
             {
-- 
cgit v1.2.3


From becdc46bdc319b513e24f4338f6b8d95fab45575 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 11 Jul 2024 18:53:54 +0300
Subject: viewer#1988 "Set empty" for controls ignores "Apply to all"

---
 indra/newview/llsetkeybinddialog.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index e172e15a0e..5dbd579b45 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -337,8 +337,8 @@ void LLSetKeyBindDialog::onCancel(void* user_data)
 void LLSetKeyBindDialog::onBlank(void* user_data)
 {
     LLSetKeyBindDialog* self = (LLSetKeyBindDialog*)user_data;
-    // tmp needs 'no key' button
-    self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, false);
+
+    self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, self->pCheckBox->getValue().asBoolean());
     self->closeFloater();
 }
 
-- 
cgit v1.2.3


From af93e581929f79b9a21ead6fca0a3c58c498b0d5 Mon Sep 17 00:00:00 2001
From: Zi Ree <81702435+zi-ree@users.noreply.github.com>
Date: Fri, 12 Jul 2024 18:08:56 +0200
Subject: Initialize array before use (#2011)

gcc detects usage of this array as uninitialized, so make sure it's initialized. I am not sure if this is a legitimate warning, or if the code guarantees the array gets initialized before use in lines 140-142 and this is a performance optimization.
---
 indra/newview/gltf/primitive.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp
index e1579374d4..81caff8ab2 100644
--- a/indra/newview/gltf/primitive.cpp
+++ b/indra/newview/gltf/primitive.cpp
@@ -109,7 +109,7 @@ struct MikktMesh
 
         for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx)
         {
-            U32 idx[3];
+            U32 idx[3] = {0, 0, 0};
 
             if (prim->mMode == Primitive::Mode::TRIANGLES)
             {
-- 
cgit v1.2.3


From 934021f3244d5a090d5171676762f637a90e6d4e Mon Sep 17 00:00:00 2001
From: Zi Ree <81702435+zi-ree@users.noreply.github.com>
Date: Fri, 12 Jul 2024 18:17:30 +0200
Subject: Make image_list_t iterator const (#2010)

gcc complains about this iterator not being const
---
 indra/newview/llviewertexturelist.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 813fda1647..075f6ae915 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -229,8 +229,8 @@ public:
     bool mForceResetTextureStats;
 
     // to make "for (auto& imagep : gTextureList)" work
-    const image_list_t::iterator begin() const { return mImageList.begin(); }
-    const image_list_t::iterator end() const { return mImageList.end(); }
+    const image_list_t::const_iterator begin() const { return mImageList.cbegin(); }
+    const image_list_t::const_iterator end() const { return mImageList.cend(); }
 
 private:
     typedef std::map< LLTextureKey, LLPointer<LLViewerFetchedTexture> > uuid_map_t;
-- 
cgit v1.2.3


From 4bc5c806c7c48a20d31a39e631601fdd04a51dfe Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 12 Jul 2024 12:56:11 +0300
Subject: viewer#1990 Fixed "Main dictionary" option is switching to the
 previous value

---
 indra/newview/llfloaterspellchecksettings.cpp | 8 ++++++--
 indra/newview/llfloaterspellchecksettings.h   | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp
index 735776f7e5..e58e819345 100644
--- a/indra/newview/llfloaterspellchecksettings.cpp
+++ b/indra/newview/llfloaterspellchecksettings.cpp
@@ -67,7 +67,11 @@ bool LLFloaterSpellCheckerSettings::postBuild(void)
     LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this));
     getChild<LLUICtrl>("spellcheck_remove_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnRemove, this));
     getChild<LLUICtrl>("spellcheck_import_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnImport, this));
-    getChild<LLUICtrl>("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false));
+    getChild<LLUICtrl>("spellcheck_main_combo")->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data)
+    {
+        mMainSelectionChanged = true;
+        refreshDictionaries(false);
+    });
     getChild<LLUICtrl>("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list"));
     getChild<LLUICtrl>("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list"));
     center();
@@ -146,7 +150,7 @@ void LLFloaterSpellCheckerSettings::onBtnRemove()
 
 void LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange()
 {
-    refreshDictionaries(true);
+    refreshDictionaries(!mMainSelectionChanged);
 }
 
 void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings)
diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h
index f05bf68040..ff76ff6ba5 100644
--- a/indra/newview/llfloaterspellchecksettings.h
+++ b/indra/newview/llfloaterspellchecksettings.h
@@ -45,6 +45,8 @@ protected:
     void onBtnRemove();
     void onSpellCheckSettingsChange();
     void refreshDictionaries(bool from_settings);
+
+    bool mMainSelectionChanged{ false };
 };
 
 class LLFloaterSpellCheckerImport : public LLFloater
-- 
cgit v1.2.3


From 27a2531c5bf375ed208d8fd5764a8797f08ce831 Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Sat, 13 Jul 2024 17:39:09 -0400
Subject: Fix: Stop textures from being set as inactive if still on a face.
 (#2017)

Textures were being set to Inactive even if still in scene, causing them to be deleted and re-decoded in a loop.
---
 indra/newview/llviewertexturelist.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index e486449b4d..d31c53d000 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -926,6 +926,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     }
 
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+    bool onFace = false;
     for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
     {
         for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
@@ -934,6 +935,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
 
             if (face && face->getViewerObject())
             {
+                onFace = true;
                 F32 radius;
                 F32 cos_angle_to_view_dir;
                 bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
@@ -1031,7 +1033,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
             imagep->getLastReferencedTimer()->reset();
 
             //reset texture state.
-            imagep->setInactive();
+            if(!onFace)
+                imagep->setInactive();
         }
     }
 
-- 
cgit v1.2.3


From c8310aaea2fe6af7b66780c32afb226d1b4dc2ad Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 12 Jul 2024 21:44:25 +0300
Subject: viewer#2006 Fixed terrain textures not updating in the
 "Region/Estate" floater

---
 indra/newview/llviewerregion.cpp | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 25c07a5ff9..7623ab56a5 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3147,16 +3147,24 @@ void LLViewerRegion::unpackRegionHandshake()
             compp->setParamsReady();
         }
 
-        LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
-        {
-            if (!success) { return; }
-            LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
-            if (!region) { return; }
-            LLVLComposition* compp = region->getComposition();
-            if (!compp) { return; }
-            compp->apply(composition_changes);
-            LLFloaterRegionInfo::sRefreshFromRegion(region);
-        });
+        std::string cap = getCapability("ModifyRegion"); // needed for queueQuery
+        if (cap.empty())
+        {
+            LLFloaterRegionInfo::sRefreshFromRegion(this);
+        }
+        else
+        {
+            LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes)
+            {
+                if (!success) { return; }
+                LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id);
+                if (!region) { return; }
+                LLVLComposition* compp = region->getComposition();
+                if (!compp) { return; }
+                compp->apply(composition_changes);
+                LLFloaterRegionInfo::sRefreshFromRegion(region);
+            });
+        }
     }
 
 
-- 
cgit v1.2.3


From 631379cbc0a3a48bc578ce2e2d9ccef31c8cfc23 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 16 Jul 2024 12:21:47 +0200
Subject: #2034 BugSplat Crash #1494883: LLCullResult::clear(3983)

---
 indra/newview/llspatialpartition.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 05c5bb14c6..2ff9ef1544 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3978,12 +3978,14 @@ void LLCullResult::clear()
 
     for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
     {
-        for (U32 j = 0; j < mRenderMapSize[i]; j++)
+        drawinfo_list_t& render_map = mRenderMap[i];
+        U32 render_map_size = llmin((U32)render_map.size(), mRenderMapSize[i]);
+        for (U32 j = 0; j < render_map_size; j++)
         {
-            mRenderMap[i][j] = 0;
+            render_map[j] = 0;
         }
         mRenderMapSize[i] = 0;
-        mRenderMapEnd[i] = &(mRenderMap[i][0]);
+        mRenderMapEnd[i] = &render_map.front();
     }
 }
 
-- 
cgit v1.2.3


From b05ab692ba60438e3900b351d654bc0124a42f50 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 16 Jul 2024 14:14:36 +0200
Subject: #2039 BugSplat Crash #1494687:
 LLPipeline::calcNearbyLights(LLCamera&)

---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 16d66123ae..6cf7d9f51c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5287,7 +5287,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
     assertInitialized();
 
-    if (LLPipeline::sReflectionRender || gCubeSnapshot || LLPipeline::sRenderingHUDs)
+    if (LLPipeline::sReflectionRender || gCubeSnapshot || LLPipeline::sRenderingHUDs || LLApp::isExiting())
     {
         return;
     }
-- 
cgit v1.2.3


From bd0baebb6eea478260880d04e34f6b3181d883a6 Mon Sep 17 00:00:00 2001
From: Ayane <chanayane83@gmail.com>
Date: Wed, 17 Jul 2024 01:47:22 +0200
Subject: Raised the 512x512 limitation for uploading snapshots to inventory to
 2048x2048 (#2025)

---
 indra/newview/llagentbenefits.cpp          | 13 +++++++++++++
 indra/newview/llagentbenefits.h            |  1 +
 indra/newview/llfloatersnapshot.cpp        |  2 +-
 indra/newview/llpanelsnapshot.cpp          |  6 ++++--
 indra/newview/llpanelsnapshotinventory.cpp | 14 +++++++++++++-
 indra/newview/llpanelsnapshotoptions.cpp   | 15 ++++++++++++++-
 indra/newview/llsnapshotlivepreview.cpp    |  4 ++--
 7 files changed, 48 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp
index e9f00f6556..f651b42010 100644
--- a/indra/newview/llagentbenefits.cpp
+++ b/indra/newview/llagentbenefits.cpp
@@ -195,6 +195,19 @@ S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const
     return getTextureUploadCost();
 }
 
+S32 LLAgentBenefits::getTextureUploadCost(S32 w, S32 h) const
+{
+    if (w > 0 && h > 0)
+    {
+        S32 area = w * h;
+        if (area >= MIN_2K_TEXTURE_AREA)
+        {
+            return get2KTextureUploadCost(area);
+        }
+    }
+    return getTextureUploadCost();
+}
+
 S32 LLAgentBenefits::get2KTextureUploadCost(S32 area) const
 {
     if (m_2k_texture_upload_cost.empty())
diff --git a/indra/newview/llagentbenefits.h b/indra/newview/llagentbenefits.h
index ff23241aa9..c0aa6edd90 100644
--- a/indra/newview/llagentbenefits.h
+++ b/indra/newview/llagentbenefits.h
@@ -54,6 +54,7 @@ public:
     S32 getTextureUploadCost() const;
     S32 getTextureUploadCost(const LLViewerTexture* tex) const;
     S32 getTextureUploadCost(const LLImageBase* tex) const;
+    S32 getTextureUploadCost(S32 w, S32 h) const;
     S32 get2KTextureUploadCost(S32 area) const;
 
     bool findUploadCost(LLAssetType::EType& asset_type, S32& cost) const;
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 75b24a6bbc..700f532318 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -51,7 +51,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
 const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
 
 const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
-const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
 
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 69047a30cd..2cb3db0cf5 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -41,7 +41,7 @@
 
 #include "llagentbenefits.h"
 
-constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 S32 power_of_two(S32 sz, S32 upper)
 {
@@ -61,7 +61,9 @@ LLPanelSnapshot::LLPanelSnapshot()
 // virtual
 bool LLPanelSnapshot::postBuild()
 {
-    getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
+    S32 w = getTypedPreviewWidth();
+    S32 h = getTypedPreviewHeight();
+    getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost(w, h)));
     getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
     if (!getWidthSpinnerName().empty())
     {
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index 4abb89120b..96b17acc40 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -155,7 +155,19 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
 
 void LLPanelSnapshotInventoryBase::onSend()
 {
-    S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
+    S32 w = 0;
+    S32 h = 0;
+
+    if( mSnapshotFloater )
+    {
+        LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
+        if( preview )
+        {
+            preview->getSize(w, h);
+        }
+    }
+
+    S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
     if (can_afford_transaction(expected_upload_cost))
     {
         if (mSnapshotFloater)
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 776de460a9..962d3bba16 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -30,6 +30,7 @@
 #include "llsidetraypanelcontainer.h"
 
 #include "llfloatersnapshot.h" // FIXME: create a snapshot model
+#include "llsnapshotlivepreview.h"
 #include "llfloaterreg.h"
 
 #include "llagentbenefits.h"
@@ -89,7 +90,19 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key)
 
 void LLPanelSnapshotOptions::updateUploadCost()
 {
-    S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
+    S32 w = 0;
+    S32 h = 0;
+
+    if( mSnapshotFloater )
+    {
+        LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
+        if( preview )
+        {
+            preview->getSize(w, h);
+        }
+    }
+
+    S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
     getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
 }
 
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 451f5bd607..ce12db740c 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -65,7 +65,7 @@ constexpr F32 FALL_TIME = 0.6f;
 constexpr S32 BORDER_WIDTH = 6;
 constexpr S32 TOP_PANEL_HEIGHT = 30;
 
-constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList;
 LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL;
@@ -1024,7 +1024,7 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name)
         LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL);
         std::string who_took_it;
         LLAgentUI::buildFullname(who_took_it);
-        S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
+        S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(scaled->getWidth(), scaled->getHeight());
         std::string res_name = outfit_snapshot ? name : "Snapshot : " + pos_string;
         std::string res_desc = outfit_snapshot ? "" : "Taken by " + who_took_it + " at " + pos_string;
         LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;
-- 
cgit v1.2.3


From 2f83b0aed2ad123b86faad5b4cb1b55abc0a3a85 Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Tue, 16 Jul 2024 21:02:57 -0400
Subject: Fix: Update calcDataSizeJ2C to pyramid-base file size estimation
 (#2032)

* Fix: Update calcDataSizeJ2C to pyramid-base file size estimation

Used the loop from the previous LayerFactored method to create a more accurate file size estimation by walking up the pyramid tiles.

Sizes are much larger in many cases and eliminate partial decoder issues with OpenJPEG.

KDU not tested but expected to produce better files as well.

Should also stop decode failures on tiny or very rectangular dimensions.



---------

Co-authored-by: Andrey Lihatskiy <alihatskiy@productengine.com>
---
 indra/llimage/llimagej2c.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 0058b91b0f..5dfd8cd947 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -278,13 +278,20 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
     S32 nb_layers = 1;
     S32 surface = w*h;
     S32 s = 64*64;
+    S32 precision = 8; // assumed bitrate per component channel, might change in future for HDR support
+    S32 totalbytes = (S32)(s * comp * precision * rate); // first level computed before loop
     while (surface > s)
     {
+        if (nb_layers <= (5 - discard_level))
+            totalbytes += (S32)(s * comp * precision * rate);
         nb_layers++;
         s *= 4;
     }
     F32 layer_factor =  3.0f * (7 - llclamp(nb_layers,1,6));
 
+    totalbytes /= 8; // to bytes
+    totalbytes += calcHeaderSizeJ2C();  // header
+
     // Compute w/pow(2,discard_level) and h/pow(2,discard_level)
     w >>= discard_level;
     h >>= discard_level;
@@ -297,7 +304,9 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
     S32 new_bytes = (S32) (sqrt((F32)(w*h))*(F32)(comp)*rate*1000.f/layer_factor);
     S32 old_bytes = (S32)((F32)(w*h*comp)*rate);
     bytes = (LLImage::useNewByteRange() && (new_bytes < old_bytes) ? new_bytes : old_bytes);
-    bytes = llmax(bytes, calcHeaderSizeJ2C());
+    bytes = llmax(totalbytes, calcHeaderSizeJ2C());
+    //LL_WARNS() << "calcDataSizeJ2C w-h-c-d-p " << w << "-" << h << "-" << comp << "-" << discard_level << "-" << precision
+    //           << " Pyramid: " << (S32)totalbytes << " LayerFactored: " << new_bytes << " WJCR: " << old_bytes << LL_ENDL;
     return bytes;
 }
 
-- 
cgit v1.2.3


From 95498368767fcdd8e14b47aae48af51daaf31d4f Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 16 Jul 2024 13:14:12 +0200
Subject: #2036 BugSplat Crash #1494874:
 LLScrollingPanelList::updatePanelVisiblilty()(220)

---
 indra/llui/llscrollingpanellist.cpp | 44 ++++++++++++++-----------------------
 1 file changed, 17 insertions(+), 27 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp
index b158d7b1b7..7696a27320 100644
--- a/indra/llui/llscrollingpanellist.cpp
+++ b/indra/llui/llscrollingpanellist.cpp
@@ -84,42 +84,35 @@ void LLScrollingPanelList::removePanel(LLScrollingPanel* panel)
 
     if (!mPanelList.empty())
     {
-        for (iter = mPanelList.begin(); iter != mPanelList.end(); ++iter, ++index)
-        {
-            if (*iter == panel)
-            {
-                break;
-            }
-        }
+        LLScrollingPanelList::panel_list_t::const_iterator iter =
+            std::find(mPanelList.begin(), mPanelList.end(), panel);
         if (iter != mPanelList.end())
         {
-            removePanel(index);
+            removeChild(panel);
+            mPanelList.erase(iter);
+            rearrange();
         }
     }
 }
 
-void LLScrollingPanelList::removePanel( U32 panel_index )
+void LLScrollingPanelList::removePanel(U32 panel_index)
 {
-    if ( mPanelList.empty() || panel_index >= mPanelList.size() )
+    if (panel_index >= mPanelList.size())
     {
         LL_WARNS() << "Panel index " << panel_index << " is out of range!" << LL_ENDL;
         return;
     }
-    else
-    {
-        removeChild( mPanelList.at(panel_index) );
-        mPanelList.erase( mPanelList.begin() + panel_index );
-    }
 
+    LLScrollingPanelList::panel_list_t::const_iterator iter = mPanelList.begin() + panel_index;
+    removeChild(*iter);
+    mPanelList.erase(iter);
     rearrange();
 }
 
 void LLScrollingPanelList::updatePanels(bool allow_modify)
 {
-    for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
-         iter != mPanelList.end(); ++iter)
+    for (LLScrollingPanel* childp : mPanelList)
     {
-        LLScrollingPanel *childp = *iter;
         childp->updatePanel(allow_modify);
     }
 }
@@ -131,10 +124,8 @@ void LLScrollingPanelList::rearrange()
     if (!mPanelList.empty())
     {
         new_width = new_height = mPadding * 2;
-        for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
-            iter != mPanelList.end(); ++iter)
+        for (LLScrollingPanel* childp : mPanelList)
         {
-            LLScrollingPanel* childp = *iter;
             const LLRect& rect = childp->getRect();
             if (mIsHorizontal)
             {
@@ -180,10 +171,8 @@ void LLScrollingPanelList::rearrange()
 
     // Reposition each of the child views
     S32 pos = mIsHorizontal ? mPadding : rc.getHeight() - mPadding;
-    for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
-        iter != mPanelList.end(); ++iter)
+    for (LLScrollingPanel* childp : mPanelList)
     {
-        LLScrollingPanel* childp = *iter;
         const LLRect& rect = childp->getRect();
         if (mIsHorizontal)
         {
@@ -211,10 +200,11 @@ void LLScrollingPanelList::updatePanelVisiblilty()
         getParent()->getRect().getHeight() - mPadding,
         &parent_screen_rect.mRight, &parent_screen_rect.mTop );
 
-    for (std::deque<LLScrollingPanel*>::iterator iter = mPanelList.begin();
-         iter != mPanelList.end(); ++iter)
+    for (LLScrollingPanel* childp : mPanelList)
     {
-        LLScrollingPanel *childp = *iter;
+        if (childp->isDead())
+            continue;
+
         const LLRect& local_rect = childp->getRect();
         LLRect screen_rect;
         childp->localPointToScreen(
-- 
cgit v1.2.3


From 781cbae21bb56023e0a24fee22bba2c72b0347c2 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 17 Jul 2024 14:40:18 +0300
Subject: viewer-private#251 Fixed state of folder creation in marketplace

---
 indra/newview/llinventorybridge.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 81d738cf42..0f2f0ec942 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1190,6 +1190,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
             || (U32)depth > (max_depth + 1))
         {
             disabled_items.push_back(std::string("New Folder"));
+            disabled_items.push_back(std::string("New Listing Folder"));
         }
     }
 
@@ -4268,6 +4269,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
         if (LLMarketplaceData::instance().isUpdating(mUUID))
         {
             disabled_items.push_back(std::string("New Folder"));
+            disabled_items.push_back(std::string("New Listing Folder"));
             disabled_items.push_back(std::string("Rename"));
             disabled_items.push_back(std::string("Cut"));
             disabled_items.push_back(std::string("Copy"));
@@ -4278,12 +4280,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
     if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK)
     {
         disabled_items.push_back(std::string("New Folder"));
+        disabled_items.push_back(std::string("New Listing Folder"));
         disabled_items.push_back(std::string("upload_def"));
         disabled_items.push_back(std::string("create_new"));
     }
     if (marketplace_listings_id == mUUID)
     {
         disabled_items.push_back(std::string("New Folder"));
+        disabled_items.push_back(std::string("New Listing Folder"));
         disabled_items.push_back(std::string("Rename"));
         disabled_items.push_back(std::string("Cut"));
         disabled_items.push_back(std::string("Delete"));
-- 
cgit v1.2.3


From e3a7ad3d35d1bf51544829b698525e7dcac5a8c8 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 18 Jul 2024 00:01:10 +0300
Subject: viewer#2027 Cannot apply PBR Materials on larger linksets

Split updates into batches that respect server update limit
---
 indra/newview/llgltfmateriallist.cpp | 60 ++++++++++++++++++++++++++++++------
 indra/newview/llgltfmateriallist.h   | 25 +++++++++++++--
 2 files changed, 73 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 215f3dd3a7..25438eae5e 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -55,6 +55,8 @@ LLGLTFMaterialList::modify_queue_t LLGLTFMaterialList::sModifyQueue;
 LLGLTFMaterialList::apply_queue_t LLGLTFMaterialList::sApplyQueue;
 LLSD LLGLTFMaterialList::sUpdates;
 
+const size_t MAX_TASK_UPDATES = 255;
+
 #ifdef SHOW_ASSERT
 // return true if given data is (probably) valid update message for ModifyMaterialParams capability
 static bool is_valid_update(const LLSD& data)
@@ -362,6 +364,17 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
         LLGLTFMaterial* material = new LLGLTFMaterial(*material_override);
         sApplyQueue.push_back({ obj->getID(), side, asset_id, material });
     }
+
+    if (sUpdates.size() >= MAX_TASK_UPDATES)
+    {
+        LLCoros::instance().launch("modifyMaterialCoro",
+            std::bind(&LLGLTFMaterialList::modifyMaterialCoro,
+                gAgent.getRegionCapability("ModifyMaterialParams"),
+                sUpdates,
+                std::shared_ptr<CallbackHolder>(nullptr)));
+
+        sUpdates = LLSD::emptyArray();
+    }
 }
 
 void LLGLTFMaterialList::queueUpdate(const LLSD& data)
@@ -374,16 +387,41 @@ void LLGLTFMaterialList::queueUpdate(const LLSD& data)
     }
 
     sUpdates[sUpdates.size()] = data;
+
+    if (sUpdates.size() >= MAX_TASK_UPDATES)
+    {
+        LLCoros::instance().launch("modifyMaterialCoro",
+            std::bind(&LLGLTFMaterialList::modifyMaterialCoro,
+                gAgent.getRegionCapability("ModifyMaterialParams"),
+                sUpdates,
+                std::shared_ptr<CallbackHolder>(nullptr)));
+
+        sUpdates = LLSD::emptyArray();
+    }
 }
 
 void LLGLTFMaterialList::flushUpdates(void(*done_callback)(bool))
+{
+    std::shared_ptr<CallbackHolder> callback_holder;
+    if (done_callback)
+    {
+        callback_holder = std::make_shared<CallbackHolder>(done_callback);
+    }
+    while (!sModifyQueue.empty() || !sApplyQueue.empty())
+    {
+        flushUpdatesOnce(callback_holder);
+    }
+}
+
+void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callback_holder)
 {
     LLSD& data = sUpdates;
 
-    auto i = data.size();
+    size_t i = data.size();
 
-    for (ModifyMaterialData& e : sModifyQueue)
+    while (!sModifyQueue.empty() && i < MAX_TASK_UPDATES)
     {
+        ModifyMaterialData& e = sModifyQueue.front();
 #ifdef SHOW_ASSERT
         // validate object has a material id
         LLViewerObject* obj = gObjectList.findObject(e.object_id);
@@ -405,11 +443,12 @@ void LLGLTFMaterialList::flushUpdates(void(*done_callback)(bool))
 
         llassert(is_valid_update(data[i]));
         ++i;
+        sModifyQueue.pop_front();
     }
-    sModifyQueue.clear();
 
-    for (ApplyMaterialAssetData& e : sApplyQueue)
+    while (!sApplyQueue.empty() && i < MAX_TASK_UPDATES)
     {
+        ApplyMaterialAssetData& e = sApplyQueue.front();
         data[i]["object_id"] = e.object_id;
         data[i]["side"] = e.side;
         data[i]["asset_id"] = e.asset_id;
@@ -425,8 +464,8 @@ void LLGLTFMaterialList::flushUpdates(void(*done_callback)(bool))
 
         llassert(is_valid_update(data[i]));
         ++i;
+        sApplyQueue.pop_front();
     }
-    sApplyQueue.clear();
 
 #if 0 // debug output of data being sent to capability
     std::stringstream str;
@@ -440,7 +479,7 @@ void LLGLTFMaterialList::flushUpdates(void(*done_callback)(bool))
             std::bind(&LLGLTFMaterialList::modifyMaterialCoro,
                 gAgent.getRegionCapability("ModifyMaterialParams"),
                 sUpdates,
-                done_callback));
+                callback_holder));
 
         sUpdates = LLSD::emptyArray();
     }
@@ -661,7 +700,7 @@ void LLGLTFMaterialList::flushMaterials()
 }
 
 // static
-void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool) )
+void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, std::shared_ptr<CallbackHolder> callback_holder)
 {
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -691,9 +730,12 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
         success = false;
     }
 
-    if (done_callback)
+    if (callback_holder)
     {
-        done_callback(success);
+        // Set to false even if something went through
+        // since at the moment it get used to refresh UI
+        // if update failed
+        callback_holder->mSuccess &= success;
     }
 }
 
diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h
index 982538f106..e79da3592a 100644
--- a/indra/newview/llgltfmateriallist.h
+++ b/indra/newview/llgltfmateriallist.h
@@ -58,7 +58,9 @@ public:
     // NOTE: do not use to revert to asset when applying a new asset id, use queueApply below
     static void queueModify(const LLViewerObject* obj, S32 side, const LLGLTFMaterial* mat);
 
-    // Queue an application of a material asset we want to send to the simulator.  Call "flushUpdates" to flush pending updates.
+    // Queue an application of a material asset we want to send to the simulator.
+    //  Call "flushUpdates" to flush pending updates immediately.
+    //  Will be flushed automatically if queue is full.
     //  object_id - ID of object to apply material asset to
     //  side - TextureEntry index to apply material to, or -1 for all sides
     //  asset_id - ID of material asset to apply, or LLUUID::null to disassociate current material asset
@@ -66,7 +68,9 @@ public:
     // NOTE: Implicitly clears most override data if present
     static void queueApply(const LLViewerObject* obj, S32 side, const LLUUID& asset_id);
 
-    // Queue an application of a material asset we want to send to the simulator.  Call "flushUpdates" to flush pending updates.
+    // Queue an application of a material asset we want to send to the simulator.
+    //  Call "flushUpdates" to flush pending updates immediately.
+    //  Will be flushed automatically if queue is full.
     //  object_id - ID of object to apply material asset to
     //  side - TextureEntry index to apply material to, or -1 for all sides
     //  asset_id - ID of material asset to apply, or LLUUID::null to disassociate current material asset
@@ -104,7 +108,22 @@ private:
     // NOTE: this is NOT for applying overrides from the UI, see queueModifyMaterial above
     void queueOverrideUpdate(const LLUUID& id, S32 side, LLGLTFMaterial* override_data);
 
-    static void modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool));
+
+    class CallbackHolder
+    {
+    public:
+        CallbackHolder(void(*done_callback)(bool))
+            : mCallback(done_callback)
+        {}
+        ~CallbackHolder()
+        {
+            if (mCallback) mCallback(mSuccess);
+        }
+        std::function<void(bool)> mCallback = nullptr;
+        bool mSuccess = true;
+    };
+    static void flushUpdatesOnce(std::shared_ptr<CallbackHolder> callback_holder);
+    static void modifyMaterialCoro(std::string cap_url, LLSD overrides, std::shared_ptr<CallbackHolder> callback_holder);
 
 protected:
     static void onAssetLoadComplete(
-- 
cgit v1.2.3


From e30ff8ad0756d8d936363a658893f156b15bda0a Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 16 Jul 2024 00:34:06 +0200
Subject: #2029 OSMessageBoxWin32 shows message box behind the viewer window

---
 indra/llwindow/llwindowwin32.cpp | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 70316ec36a..94762db5c5 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -187,6 +187,8 @@ DWORD   LLWindowWin32::sWinIMEConversionMode = IME_CMODE_NATIVE;
 DWORD   LLWindowWin32::sWinIMESentenceMode = IME_SMODE_AUTOMATIC;
 LLCoordWindow LLWindowWin32::sWinIMEWindowPosition(-1,-1);
 
+static HWND sWindowHandleForMessageBox = NULL;
+
 // The following class LLWinImm delegates Windows IMM APIs.
 // It was originally introduced to support US Windows XP, on which we needed
 // to dynamically load IMM32.DLL and use GetProcAddress to resolve its entry
@@ -848,6 +850,11 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
 
 LLWindowWin32::~LLWindowWin32()
 {
+    if (sWindowHandleForMessageBox == mWindowHandle)
+    {
+        sWindowHandleForMessageBox = NULL;
+    }
+
     delete mDragDrop;
 
     delete [] mWindowTitle;
@@ -970,6 +977,11 @@ void LLWindowWin32::close()
 
     LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
 
+    if (sWindowHandleForMessageBox == mWindowHandle)
+    {
+        sWindowHandleForMessageBox = NULL;
+    }
+
     mhDC = NULL;
     mWindowHandle = NULL;
 
@@ -1702,10 +1714,15 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
     auto oldWindowHandle = mWindowHandle;
     auto oldDCHandle = mhDC;
 
+    if (sWindowHandleForMessageBox == mWindowHandle)
+    {
+        sWindowHandleForMessageBox = NULL;
+    }
+
     // zero out mWindowHandle and mhDC before destroying window so window
     // thread falls back to peekmessage
-    mWindowHandle = 0;
-    mhDC = 0;
+    mWindowHandle = NULL;
+    mhDC = NULL;
 
     std::promise<std::pair<HWND, HDC>> promise;
     // What follows must be done on the window thread.
@@ -1802,6 +1819,8 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
     auto pair = future.get();
     mWindowHandle = pair.first;
     mhDC = pair.second;
+
+    sWindowHandleForMessageBox = mWindowHandle;
 }
 
 void* LLWindowWin32::createSharedContext()
@@ -3684,7 +3703,14 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
         break;
     }
 
-    int retval_win = MessageBoxW(NULL, // HWND
+    // AG: Of course, the using of the static global variable sWindowHandleForMessageBox
+    // instead of using the field mWindowHandle of the class LLWindowWin32 looks strange.
+    // But in fact, the function OSMessageBoxWin32() doesn't have access to gViewerWindow
+    // because the former is implemented in the library llwindow which is abstract enough.
+    //
+    // "This is why I'm doing it this way, instead of what you would think would be more obvious..."
+    // (C) Nat Goodspeed
+    int retval_win = MessageBoxW(sWindowHandleForMessageBox, // HWND
                                  ll_convert_string_to_wide(text).c_str(),
                                  ll_convert_string_to_wide(caption).c_str(),
                                  uType);
-- 
cgit v1.2.3


From 2f52fecaababfb7b043cac16a363da21c8dd29e4 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 17 Jul 2024 21:14:25 +0200
Subject: #2051 BugSplat Crash #1495268: LLVOAvatar::updateRiggingInfo()

---
 indra/newview/llvoavatar.cpp | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ac95a2f8f7..fadea01d3c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2589,6 +2589,9 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
 
+    if (LLApp::isExiting())
+        return;
+
     if (isDead())
     {
         LL_INFOS() << "Warning!  Idle on dead avatar" << LL_ENDL;
-- 
cgit v1.2.3


From 88f52f1b90af1813dc70525f2e08b16cc5939af5 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Thu, 18 Jul 2024 10:01:15 +0300
Subject: Fix trailing whitespaces in webrtc code to pass pre-commit

---
 indra/llwebrtc/llwebrtc.cpp    | 6 +++---
 indra/llwebrtc/llwebrtc.h      | 4 ++--
 indra/llwebrtc/llwebrtc_impl.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index d5bd913315..6dc632aba4 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -458,7 +458,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptr<webrtc::AudioDeviceMo
     {
         device_module->SetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice);
     }
-    else 
+    else
     {
         device_module->SetPlayoutDevice(device);
     }
@@ -656,7 +656,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn
 // Most peer connection (signaling) happens on
 // the signaling thread.
 
-LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : 
+LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() :
     mWebRTCImpl(nullptr),
     mPeerConnection(nullptr),
     mMute(false),
@@ -1171,7 +1171,7 @@ void LLWebRTCPeerConnectionImpl::OnSuccess(webrtc::SessionDescriptionInterface *
     {
         observer->OnOfferAvailable(mangled_sdp);
     }
-    
+
    mPeerConnection->SetLocalDescription(std::unique_ptr<webrtc::SessionDescriptionInterface>(
                                                      webrtc::CreateSessionDescription(webrtc::SdpType::kOffer, mangled_sdp)),
                                                  rtc::scoped_refptr<webrtc::SetLocalDescriptionObserverInterface>(this));
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index f447ea990a..54eefc8554 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -129,7 +129,7 @@ class LLWebRTCDeviceInterface
     };
 
     virtual void setAudioConfig(AudioConfig config) = 0;
-    
+
     // instructs webrtc to refresh the device list.
     virtual void refreshDevices() = 0;
 
@@ -231,7 +231,7 @@ class LLWebRTCSignalingObserver
 class LLWebRTCPeerConnectionInterface
 {
   public:
-    
+
     struct InitOptions
     {
         // equivalent of PeerConnectionInterface::IceServer
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 6672f8ce90..2fb5525519 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -235,7 +235,7 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS
 
     // The factory that allows creation of native webrtc PeerConnections.
     rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> mPeerConnectionFactory;
-    
+
     rtc::scoped_refptr<webrtc::AudioProcessing>                mAudioProcessingModule;
 
     // more native webrtc stuff
-- 
cgit v1.2.3


From ef9a494134458f3464b250c87da9e247d775989c Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Sun, 14 Jul 2024 12:01:30 +0200
Subject: #1500 Better out of disk space handling

---
 indra/llcommon/llapp.cpp                           | 27 ++++++++++++++++++++++
 indra/llcommon/llapp.h                             |  4 ++++
 indra/llcommon/llapr.cpp                           |  7 +++++-
 indra/newview/llappviewer.cpp                      |  7 ++++++
 indra/newview/llappviewer.h                        |  2 ++
 .../newview/skins/default/xui/en/notifications.xml |  9 ++++++++
 6 files changed, 55 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index b85bd2573b..c2158bb5b8 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -487,6 +487,33 @@ int LLApp::getPid()
 #endif
 }
 
+// static
+void LLApp::notifyOutOfDiskSpace()
+{
+    static const U32Seconds min_interval = U32Seconds(60);
+    static U32Seconds min_time_to_send = U32Seconds(0);
+    U32Seconds now = LLTimer::getTotalTime();
+    if (now < min_time_to_send)
+        return;
+
+    min_time_to_send = now + min_interval;
+
+    if (LLApp* app = instance())
+    {
+        app->sendOutOfDiskSpaceNotification();
+    }
+    else
+    {
+        LL_WARNS() << "No app instance" << LL_ENDL;
+    }
+}
+
+// virtual
+void LLApp::sendOutOfDiskSpaceNotification()
+{
+    LL_WARNS() << "Should never be called" << LL_ENDL; // Should be overridden
+}
+
 #ifndef LL_WINDOWS
 void setup_signals()
 {
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index ad8912ca88..d90ecdf661 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -202,6 +202,8 @@ public:
     static bool isExiting(); // Either quitting or error (app is exiting, cleanly or not)
     static int getPid();
 
+    static void notifyOutOfDiskSpace();
+
     //
     // Sleep for specified time while still running
     //
@@ -301,6 +303,8 @@ protected:
       */
     void stepFrame();
 
+    virtual void sendOutOfDiskSpaceNotification();
+
 private:
     // Contains the filename of the minidump file after a crash.
     char mMinidumpPath[MAX_MINDUMP_PATH_LENGTH];
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index b085f8f5dc..01763c49aa 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -28,6 +28,7 @@
 
 #include "linden_common.h"
 #include "llapr.h"
+#include "llapp.h"
 #include "llmutex.h"
 #include "apr_dso.h"
 
@@ -606,7 +607,11 @@ S32 LLAPRFile::writeEx(const std::string& filename, const void *buf, S32 offset,
         apr_status_t s = apr_file_write(file_handle, buf, &bytes_written);
         if (s != APR_SUCCESS)
         {
-            LL_WARNS("APR") << " Attempting to write filename: " << filename << LL_ENDL;
+            LL_WARNS("APR") << "Attempting to write filename: " << filename << LL_ENDL;
+            if (APR_STATUS_IS_ENOSPC(s))
+            {
+                LLApp::notifyOutOfDiskSpace();
+            }
             ll_apr_warn_status(s);
             bytes_written = 0;
         }
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a10ef451e1..b380b09129 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3067,6 +3067,13 @@ bool LLAppViewer::meetsRequirementsForMaximizedStart()
     return maximizedOk;
 }
 
+// virtual
+void LLAppViewer::sendOutOfDiskSpaceNotification()
+{
+    LL_WARNS() << "Out of disk space notification requested" << LL_ENDL;
+    LLNotificationsUtil::add("OutOfDiskSpace");
+}
+
 bool LLAppViewer::initWindow()
 {
     LL_INFOS("AppInit") << "Initializing window..." << LL_ENDL;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 32d3df4f83..417ab0fa00 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -245,6 +245,8 @@ protected:
 
     virtual bool meetsRequirementsForMaximizedStart(); // Used on first login to decide to launch maximized
 
+    virtual void sendOutOfDiskSpaceNotification();
+
 private:
 
     bool doFrame();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a1e25f48ed..3ba4f2f3e4 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3031,6 +3031,15 @@ This is usually a temporary failure. Please customize and save the wearable agai
   <tag>fail</tag>
   </notification>
 
+  <notification
+   icon="notifytip.tga"
+   name="OutOfDiskSpace"
+   type="notifytip">
+The system is out of disk space. You will need to free up some space on your computer or clear the cache.
+<tag>fail</tag>
+    <unique/>
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="YouHaveBeenLoggedOut"
-- 
cgit v1.2.3


From 6535ce51fd1e3f2b0efdc650310ec75a7638f6f9 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Thu, 18 Jul 2024 09:48:24 +0200
Subject: Remove unnecessary code and (re-)add some more compile time constants
 (#2057)

---
 indra/llimage/llimage.h                 | 42 ++++++++++++++++-----------------
 indra/llimage/llimagej2c.cpp            | 22 +++--------------
 indra/newview/llfloatersnapshot.cpp     |  8 +++----
 indra/newview/llpanelsnapshot.cpp       |  2 +-
 indra/newview/llsnapshotlivepreview.cpp |  4 ++--
 5 files changed, 31 insertions(+), 47 deletions(-)

(limited to 'indra')

diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 42eecbb97c..8b966b8ea3 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -32,37 +32,37 @@
 #include "llpointer.h"
 #include "lltrace.h"
 
-const S32 MIN_IMAGE_MIP =  2; // 4x4, only used for expand/contract power of 2
-const S32 MAX_IMAGE_MIP = 12; // 4096x4096
+constexpr S32 MIN_IMAGE_MIP =  2; // 4x4, only used for expand/contract power of 2
+constexpr S32 MAX_IMAGE_MIP = 12; // 4096x4096
 
 // *TODO : Use MAX_IMAGE_MIP as max discard level and modify j2c management so that the number
 // of levels is read from the header's file, not inferred from its size.
-const S32 MAX_DISCARD_LEVEL = 5;
+constexpr S32 MAX_DISCARD_LEVEL = 5;
 
 // JPEG2000 size constraints
 // Those are declared here as they are germane to other image constraints used in the viewer
 // and declared right here. Some come from the JPEG2000 spec, some conventions specific to SL.
-const S32 MAX_DECOMPOSITION_LEVELS = 32;    // Number of decomposition levels cannot exceed 32 according to jpeg2000 spec
-const S32 MIN_DECOMPOSITION_LEVELS = 5;     // the SL viewer will *crash* trying to decode images with fewer than 5 decomposition levels (unless image is small that is)
-const S32 MAX_PRECINCT_SIZE = 4096;         // No reason to be bigger than MAX_IMAGE_SIZE
-const S32 MIN_PRECINCT_SIZE = 4;            // Can't be smaller than MIN_BLOCK_SIZE
-const S32 MAX_BLOCK_SIZE = 64;              // Max total block size is 4096, hence 64x64 when using square blocks
-const S32 MIN_BLOCK_SIZE = 4;               // Min block dim is 4 according to jpeg2000 spec
-const S32 MIN_LAYER_SIZE = 2000;            // Size of the first quality layer (after header). Must be > to FIRST_PACKET_SIZE!!
-const S32 MAX_NB_LAYERS = 64;               // Max number of layers we'll entertain in SL (practical limit)
-
-const S32 MIN_IMAGE_SIZE = (1<<MIN_IMAGE_MIP); // 4, only used for expand/contract power of 2
-const S32 MAX_IMAGE_SIZE = (1<<MAX_IMAGE_MIP); // 4096
-const S32 MIN_IMAGE_AREA = MIN_IMAGE_SIZE * MIN_IMAGE_SIZE;
-const S32 MAX_IMAGE_AREA = MAX_IMAGE_SIZE * MAX_IMAGE_SIZE;
-const S32 MAX_IMAGE_COMPONENTS = 8;
-const S32 MAX_IMAGE_DATA_SIZE = MAX_IMAGE_AREA * MAX_IMAGE_COMPONENTS; //4096 * 4096 * 8 = 128 MB
+constexpr S32 MAX_DECOMPOSITION_LEVELS = 32;    // Number of decomposition levels cannot exceed 32 according to jpeg2000 spec
+constexpr S32 MIN_DECOMPOSITION_LEVELS = 5;     // the SL viewer will *crash* trying to decode images with fewer than 5 decomposition levels (unless image is small that is)
+constexpr S32 MAX_PRECINCT_SIZE = 4096;         // No reason to be bigger than MAX_IMAGE_SIZE
+constexpr S32 MIN_PRECINCT_SIZE = 4;            // Can't be smaller than MIN_BLOCK_SIZE
+constexpr S32 MAX_BLOCK_SIZE = 64;              // Max total block size is 4096, hence 64x64 when using square blocks
+constexpr S32 MIN_BLOCK_SIZE = 4;               // Min block dim is 4 according to jpeg2000 spec
+constexpr S32 MIN_LAYER_SIZE = 2000;            // Size of the first quality layer (after header). Must be > to FIRST_PACKET_SIZE!!
+constexpr S32 MAX_NB_LAYERS = 64;               // Max number of layers we'll entertain in SL (practical limit)
+
+constexpr S32 MIN_IMAGE_SIZE = (1<<MIN_IMAGE_MIP); // 4, only used for expand/contract power of 2
+constexpr S32 MAX_IMAGE_SIZE = (1<<MAX_IMAGE_MIP); // 4096
+constexpr S32 MIN_IMAGE_AREA = MIN_IMAGE_SIZE * MIN_IMAGE_SIZE;
+constexpr S32 MAX_IMAGE_AREA = MAX_IMAGE_SIZE * MAX_IMAGE_SIZE;
+constexpr S32 MAX_IMAGE_COMPONENTS = 8;
+constexpr S32 MAX_IMAGE_DATA_SIZE = MAX_IMAGE_AREA * MAX_IMAGE_COMPONENTS; //4096 * 4096 * 8 = 128 MB
 
 // Note!  These CANNOT be changed without modifying simulator code
 // *TODO: change both to 1024 when SIM texture fetching is deprecated
-const S32 FIRST_PACKET_SIZE = 600;
-const S32 MAX_IMG_PACKET_SIZE = 1000;
-const S32 HTTP_PACKET_SIZE = 1496;
+constexpr S32 FIRST_PACKET_SIZE = 600;
+constexpr S32 MAX_IMG_PACKET_SIZE = 1000;
+constexpr S32 HTTP_PACKET_SIZE = 1496;
 
 // Base classes for images.
 // There are two major parts for the image:
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 5dfd8cd947..29449a5d2e 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -275,10 +275,10 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
     // For details about the equation used here, see https://wiki.lindenlab.com/wiki/THX1138_KDU_Improvements#Byte_Range_Study
 
     // Estimate the number of layers. This is consistent with what's done for j2c encoding in LLImageJ2CKDU::encodeImpl().
+    constexpr S32 precision = 8; // assumed bitrate per component channel, might change in future for HDR support
     S32 nb_layers = 1;
-    S32 surface = w*h;
+    const S32 surface = w*h;
     S32 s = 64*64;
-    S32 precision = 8; // assumed bitrate per component channel, might change in future for HDR support
     S32 totalbytes = (S32)(s * comp * precision * rate); // first level computed before loop
     while (surface > s)
     {
@@ -287,27 +287,11 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
         nb_layers++;
         s *= 4;
     }
-    F32 layer_factor =  3.0f * (7 - llclamp(nb_layers,1,6));
 
     totalbytes /= 8; // to bytes
     totalbytes += calcHeaderSizeJ2C();  // header
 
-    // Compute w/pow(2,discard_level) and h/pow(2,discard_level)
-    w >>= discard_level;
-    h >>= discard_level;
-    w = llmax(w, 1);
-    h = llmax(h, 1);
-
-    // Temporary: compute both new and old range and pick one according to the settings TextureNewByteRange
-    // *TODO: Take the old code out once we have enough tests done
-    S32 bytes;
-    S32 new_bytes = (S32) (sqrt((F32)(w*h))*(F32)(comp)*rate*1000.f/layer_factor);
-    S32 old_bytes = (S32)((F32)(w*h*comp)*rate);
-    bytes = (LLImage::useNewByteRange() && (new_bytes < old_bytes) ? new_bytes : old_bytes);
-    bytes = llmax(totalbytes, calcHeaderSizeJ2C());
-    //LL_WARNS() << "calcDataSizeJ2C w-h-c-d-p " << w << "-" << h << "-" << comp << "-" << discard_level << "-" << precision
-    //           << " Pyramid: " << (S32)totalbytes << " LayerFactored: " << new_bytes << " WJCR: " << old_bytes << LL_ENDL;
-    return bytes;
+    return totalbytes;
 }
 
 S32 LLImageJ2C::calcHeaderSize()
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 700f532318..e03b11e572 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -46,12 +46,12 @@
 ///----------------------------------------------------------------------------
 /// Local function declarations, constants, enums, and typedefs
 ///----------------------------------------------------------------------------
-LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
+LLSnapshotFloaterView* gSnapshotFloaterView = nullptr;
 
-const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
+constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
 
-const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
-const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
+constexpr S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
+constexpr S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
 
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 2cb3db0cf5..32c9f6f402 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -41,7 +41,7 @@
 
 #include "llagentbenefits.h"
 
-const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
+constexpr S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 S32 power_of_two(S32 sz, S32 upper)
 {
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index ce12db740c..0b73aa493c 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -65,10 +65,10 @@ constexpr F32 FALL_TIME = 0.6f;
 constexpr S32 BORDER_WIDTH = 6;
 constexpr S32 TOP_PANEL_HEIGHT = 30;
 
-const S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
+constexpr S32 MAX_TEXTURE_SIZE = 2048 ; //max upload texture size 2048 * 2048
 
 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList;
-LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL;
+LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = nullptr;
 
 LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Params& p)
     :   LLView(p),
-- 
cgit v1.2.3


From 87b5ecf565e78ca49b2c90478eb2c26d537e4831 Mon Sep 17 00:00:00 2001
From: Ayane <chanayane83@gmail.com>
Date: Thu, 18 Jul 2024 09:48:47 +0200
Subject: Fixes bad upload quality issue with OpenJPEG (#2054)

---
 indra/llimagej2coj/llimagej2coj.cpp | 59 +++++++++++++++++++++++++++++++------
 1 file changed, 50 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index b2bd3186a0..f4bcb97a5d 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -431,23 +431,20 @@ public:
         opj_set_default_encoder_parameters(&parameters);
         parameters.cod_format = OPJ_CODEC_J2K;
         parameters.cp_disto_alloc = 1;
-        parameters.max_cs_size = (1 << 15);
 
         if (reversible)
         {
+            parameters.max_cs_size = 0; // do not limit size for reversible compression
+            parameters.irreversible = 0; // should be the default, but, just in case
             parameters.tcp_numlayers = 1;
-            parameters.tcp_rates[0] = 1.0f;
+            /* documentation seems to be wrong, should be 0.0f for lossless, not 1.0f
+               see https://github.com/uclouvain/openjpeg/blob/39e8c50a2f9bdcf36810ee3d41bcbf1cc78968ae/src/lib/openjp2/j2k.c#L7755
+            */
+            parameters.tcp_rates[0] = 0.0f;
         }
         else
         {
-            parameters.tcp_numlayers = 5;
-            parameters.tcp_rates[0] = 1920.0f;
-            parameters.tcp_rates[1] = 960.0f;
-            parameters.tcp_rates[2] = 480.0f;
-            parameters.tcp_rates[3] = 120.0f;
-            parameters.tcp_rates[4] = 30.0f;
             parameters.irreversible = 1;
-            parameters.tcp_mct = 1;
         }
 
         if (comment_text)
@@ -501,6 +498,50 @@ public:
         parameters.prog_order = OPJ_RLCP;
         parameters.cp_disto_alloc = 1;
 
+        // if not lossless compression, computes tcp_numlayers and max_cs_size depending on the image dimensions
+        if( parameters.irreversible ) {
+
+            // computes a number of layers
+            U32 surface = rawImageIn.getWidth() * rawImageIn.getHeight();
+            U32 nb_layers = 1;
+            U32 s = 64*64;
+            while (surface > s)
+            {
+                nb_layers++;
+                s *= 4;
+            }
+            nb_layers = llclamp(nb_layers, 1, 6);
+
+            parameters.tcp_numlayers = nb_layers;
+            parameters.tcp_rates[nb_layers - 1] = (U32)(1.f / DEFAULT_COMPRESSION_RATE); // 1:8 by default
+
+            // for each subsequent layer, computes its rate and adds surface * numcomps * 1/rate to the max_cs_size
+            U32 max_cs_size = (U32)(surface * image->numcomps * DEFAULT_COMPRESSION_RATE);
+            U32 multiplier;
+            for (int i = nb_layers - 2; i >= 0; i--)
+            {
+                if( i == nb_layers - 2 )
+                {
+                    multiplier = 15;
+                }
+                else if( i == nb_layers - 3 )
+                {
+                    multiplier = 4;
+                }
+                else
+                {
+                    multiplier = 2;
+                }
+                parameters.tcp_rates[i] = parameters.tcp_rates[i + 1] * multiplier;
+                max_cs_size += (U32)(surface * image->numcomps * (1 / parameters.tcp_rates[i]));
+            }
+
+            //ensure that we have at least a minimal size
+            max_cs_size = llmax(max_cs_size, (U32)FIRST_PACKET_SIZE);
+
+            parameters.max_cs_size = max_cs_size;
+        }
+
         if (!opj_setup_encoder(encoder, &parameters, image))
         {
             return false;
-- 
cgit v1.2.3


From ace506cc8aec370b739b40ab2afa7c1fef4cc030 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 18 Jul 2024 07:38:36 +0300
Subject: viewer#1997 Warn user if closing appearance with unsaved changes

---
 indra/newview/llfloatersidepanelcontainer.cpp      | 41 ++++++++++++++++++++++
 indra/newview/llfloatersidepanelcontainer.h        |  9 +++--
 .../newview/skins/default/xui/en/notifications.xml | 14 ++++++++
 3 files changed, 62 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 48547852c4..6c5d2570f2 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -28,6 +28,7 @@
 
 #include "llfloaterreg.h"
 #include "llfloatersidepanelcontainer.h"
+#include "llnotificationsutil.h"
 #include "llpaneleditwearable.h"
 
 // newview includes
@@ -90,6 +91,46 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
     }
 }
 
+void LLFloaterSidePanelContainer::onClickCloseBtn(bool app_quitting)
+{
+    if (!app_quitting)
+    {
+        LLPanelOutfitEdit* panel_outfit_edit =
+            dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
+        if (panel_outfit_edit)
+        {
+            LLFloater* parent = gFloaterView->getParentFloater(panel_outfit_edit);
+            if (parent == this)
+            {
+                LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
+                if (panel_appearance)
+                {
+                    LLPanelEditWearable* edit_wearable_ptr = panel_appearance->getWearable();
+                    if (edit_wearable_ptr && edit_wearable_ptr->getVisible() && edit_wearable_ptr->isDirty())
+                    {
+                        LLNotificationsUtil::add("UsavedWearableChanges", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response)
+                        {
+                            onCloseMsgCallback(notification, response);
+                        });
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    closeFloater();
+}
+
+void LLFloaterSidePanelContainer::onCloseMsgCallback(const LLSD& notification, const LLSD& response)
+{
+    S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+    if (0 == option)
+    {
+        closeFloater();
+    }
+}
+
 LLFloater* LLFloaterSidePanelContainer::getTopmostInventoryFloater()
 {
     LLFloater* topmost_floater = NULL;
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 19d6c747cb..d7f6c309c4 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -49,9 +49,11 @@ public:
     LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams());
     ~LLFloaterSidePanelContainer();
 
-    /*virtual*/ void onOpen(const LLSD& key);
+    void onOpen(const LLSD& key) override;
 
-    /*virtual*/ void closeFloater(bool app_quitting = false);
+    void closeFloater(bool app_quitting = false) override;
+
+    void onClickCloseBtn(bool app_qutting) override;
 
     void cleanup() { destroy(); }
 
@@ -84,6 +86,9 @@ public:
         }
         return panel;
     }
+
+protected:
+    void onCloseMsgCallback(const LLSD& notification, const LLSD& response);
 };
 
 #endif // LL_LLFLOATERSIDEPANELCONTAINER_H
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 3ba4f2f3e4..2c19a89fb2 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4261,6 +4261,20 @@ Unable to add estate manager [AGENT] to banned list.
 Can&apos;t change appearance until clothing and shape are loaded.
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="UsavedWearableChanges"
+   type="alertmodal">
+You have unsaved changes.
+      <tag>group</tag>
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Confirm before I discard unsaved wearable changes"
+     name="okcancelignore"
+     notext="Keep Editing"
+     yestext="Discard"/>
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="ClassifiedMustBeAlphanumeric"
-- 
cgit v1.2.3


From 951ce0ad36e4bf2066c48941c00203463d3fe41d Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 18 Jul 2024 18:14:22 +0300
Subject: viewer#2061 Crash in ~LLScriptEdCore()

---
 indra/newview/llpreviewscript.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index c2188ea638..b7c929f0b5 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -414,7 +414,13 @@ LLScriptEdCore::~LLScriptEdCore()
     if (script_search && script_search->getEditorCore() == this)
     {
         script_search->closeFloater();
-        delete script_search;
+        // closeFloater can delete instance since it's not reusable nor single instance
+        // so make sure instance is still there before deleting
+        script_search = LLFloaterScriptSearch::getInstance();
+        if (script_search)
+        {
+            delete script_search;
+        }
     }
 
     delete mLiveFile;
-- 
cgit v1.2.3


From b0e249d5ae0d3c4633ece8de6e71b99f34bf88f5 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 19 Jul 2024 07:00:38 -0400
Subject: Enable SSE2 instruction support in glm for optimized codegen (#2066)

---
 indra/cmake/00-Common.cmake | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 07deaa56b0..5a1fb72eca 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -32,6 +32,10 @@ add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE})
 # -- which we do. Without one or the other, we get a ton of Boost warnings.
 add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)
 
+# Force enable SSE2 instructions in GLM per the manual
+# https://github.com/g-truc/glm/blob/master/manual.md#section2_10
+add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_SSE2=1)
+
 # Configure crash reporting
 set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
 set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
-- 
cgit v1.2.3


From f0d7ccdbe0ccadb47847ca9ed2939c7c8ed06788 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 17 Jul 2024 22:16:20 +0200
Subject: #2053 BugSplat Crash #1494325:
 LLVOVolume::getReflectionProbeNearClip()

---
 indra/llcommon/llapp.cpp          | 29 +++++++++++------------------
 indra/llwebrtc/llwebrtc.h         |  2 +-
 indra/newview/llviewerdisplay.cpp |  2 +-
 3 files changed, 13 insertions(+), 20 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index c2158bb5b8..6da764f94c 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -90,7 +90,7 @@ bool LLApp::sDisableCrashlogger = false;
 
 // Local flag for whether or not to do logging in signal handlers.
 //static
-bool LLApp::sLogInSignal = false;
+bool LLApp::sLogInSignal = true;
 
 // static
 // Keeps track of application status
@@ -373,6 +373,9 @@ static std::map<LLApp::EAppStatus, const char*> statusDesc
 // static
 void LLApp::setStatus(EAppStatus status)
 {
+    auto status_it = statusDesc.find(status);
+    std::string status_text = status_it != statusDesc.end() ? std::string(status_it->second) : std::to_string(status);
+    LL_INFOS() << "status: " << status_text << LL_ENDL;
     // notify everyone waiting on sStatus any time its value changes
     sStatus.set_all(status);
 
@@ -381,18 +384,7 @@ void LLApp::setStatus(EAppStatus status)
     if (! LLEventPumps::wasDeleted())
     {
         // notify interested parties of status change
-        LLSD statsd;
-        auto found = statusDesc.find(status);
-        if (found != statusDesc.end())
-        {
-            statsd = found->second;
-        }
-        else
-        {
-            // unknown status? at least report value
-            statsd = LLSD::Integer(status);
-        }
-        LLEventPumps::instance().obtain("LLApp").post(llsd::map("status", statsd));
+        LLEventPumps::instance().obtain("LLApp").post(llsd::map("status", status_text));
     }
 }
 
@@ -681,6 +673,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
             {
                 LL_WARNS() << "Signal handler - Handling fatal signal!" << LL_ENDL;
             }
+
             if (LLApp::isError())
             {
                 // Received second fatal signal while handling first, just die right now
@@ -718,11 +711,11 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
             clear_signals();
             raise(signum);
             return;
-        } else {
-            if (LLApp::sLogInSignal)
-            {
-                LL_INFOS() << "Signal handler - Unhandled signal " << signum << ", ignoring!" << LL_ENDL;
-            }
+        }
+
+        if (LLApp::sLogInSignal)
+        {
+            LL_INFOS() << "Signal handler - Unhandled signal " << signum << ", ignoring!" << LL_ENDL;
         }
     }
 }
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index 54eefc8554..62b40636d2 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -230,7 +230,7 @@ class LLWebRTCSignalingObserver
 // allows for management of this peer connection.
 class LLWebRTCPeerConnectionInterface
 {
-  public:
+public:
 
     struct InitOptions
     {
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index adcf91f4ed..2ae3d016c4 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -654,7 +654,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
 
     gPipeline.resetFrameStats();    // Reset per-frame statistics.
 
-    if (!gDisconnected)
+    if (!gDisconnected && !LLApp::isExiting())
     {
         // Render mirrors and associated hero probes before we render the rest of the scene.
         // This ensures the scene state in the hero probes are exactly the same as the rest of the scene before we render it.
-- 
cgit v1.2.3


From 54c15a7054af296a62b91f677b11a97cea94bfe8 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 19 Jul 2024 14:35:41 +0300
Subject: viewer#1923 Fix dependent floater going too far from parent

---
 indra/llui/llfloater.cpp | 56 +++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 48 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d0eb9a1873..12d5c41de1 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1205,24 +1205,64 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
             {
                 S32 delta_x = 0;
                 S32 delta_y = 0;
+
+                // take translation of dependee floater into account
+                delta_x += new_rect.mLeft - old_rect.mLeft;
+                delta_y += new_rect.mBottom - old_rect.mBottom;
+
                 // check to see if it snapped to right or top, and move if dependee floater is resizing
                 LLRect dependent_rect = floaterp->getRect();
-                if (dependent_rect.mLeft - getRect().mLeft >= old_rect.getWidth() || // dependent on my right?
-                    dependent_rect.mRight == getRect().mLeft + old_rect.getWidth()) // dependent aligned with my right
+                if ((dependent_rect.mLeft - getRect().mLeft >= old_rect.getWidth() || // dependent on my right?
+                     dependent_rect.mRight == getRect().mLeft + old_rect.getWidth()) // dependent aligned with my right
+                    && dependent_rect.mBottom <= old_rect.mTop + 1)
                 {
                     // was snapped directly onto right side or aligned with it
                     delta_x += new_rect.getWidth() - old_rect.getWidth();
+
+                    // make sure dependent still touches floater and din't go too high,
+                    // it can go over edge, but should't detach completely
+                    if (delta_y > 0
+                        && dependent_rect.mBottom + delta_y > new_rect.mTop)
+                    {
+                        delta_y = llmax(new_rect.mTop - dependent_rect.mBottom, 0);
+                    }
+                }
+                else if (dependent_rect.mRight == old_rect.mLeft)
+                {
+                    // make sure dependent still touches floater and don't go too high
+                    if (delta_y > 0
+                        && dependent_rect.mBottom <= old_rect.mTop
+                        && dependent_rect.mBottom + delta_y > new_rect.mTop)
+                    {
+                        delta_y = llmax(new_rect.mTop - dependent_rect.mBottom, 0);
+                    }
                 }
-                if (dependent_rect.mBottom - getRect().mBottom >= old_rect.getHeight() ||
-                    dependent_rect.mTop == getRect().mBottom + old_rect.getHeight())
+
+                if ((dependent_rect.mBottom - getRect().mBottom >= old_rect.getHeight() ||
+                     dependent_rect.mTop == getRect().mBottom + old_rect.getHeight())
+                    && dependent_rect.mLeft <= old_rect.mRight + 1)
                 {
                     // was snapped directly onto top side or aligned with it
                     delta_y += new_rect.getHeight() - old_rect.getHeight();
-                }
 
-                // take translation of dependee floater into account as well
-                delta_x += new_rect.mLeft - old_rect.mLeft;
-                delta_y += new_rect.mBottom - old_rect.mBottom;
+                    // make sure dependent still touches floater
+                    // and din't go too far to the right
+                    if (delta_x > 0
+                        && dependent_rect.mLeft + delta_x > new_rect.mRight)
+                    {
+                        delta_x = llmax(new_rect.mRight - dependent_rect.mLeft, 0);
+                    }
+                }
+                else if (dependent_rect.mTop == old_rect.mBottom)
+                {
+                    // make sure dependent still touches floater and don't go too far to the right
+                    if (delta_x > 0
+                        && dependent_rect.mLeft <= old_rect.mRight
+                        && dependent_rect.mLeft + delta_x > new_rect.mRight)
+                    {
+                        delta_x = llmax(new_rect.mRight - dependent_rect.mLeft, 0);
+                    }
+                }
 
                 dependent_rect.translate(delta_x, delta_y);
                 floaterp->setShape(dependent_rect, by_user);
-- 
cgit v1.2.3


From bffd4a12b8e6677d8cd8bec2e38909e5200b69dd Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Sat, 20 Jul 2024 06:37:23 -0400
Subject: calcDataSizeJ2C adjusted to use maximum possible components (#2073)

Previous pyramid walking calculation (#2032) assumed the incoming components variable can be accurate but unfortunately the needs_aux is only set to true if the face has an alpha mask setting.

Without this information we must assume the J2C files have the maximum component size of four so that alpha channels are found when decoding both the color and aux textures.
---
 indra/llimage/llimagej2c.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 29449a5d2e..42f3e92257 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -276,14 +276,15 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
 
     // Estimate the number of layers. This is consistent with what's done for j2c encoding in LLImageJ2CKDU::encodeImpl().
     constexpr S32 precision = 8; // assumed bitrate per component channel, might change in future for HDR support
+    constexpr S32 max_components = 4; // assumed the file has four components; three color and alpha
     S32 nb_layers = 1;
     const S32 surface = w*h;
     S32 s = 64*64;
-    S32 totalbytes = (S32)(s * comp * precision * rate); // first level computed before loop
+    S32 totalbytes = (S32)(s * max_components * precision * rate); // first level computed before loop
     while (surface > s)
     {
         if (nb_layers <= (5 - discard_level))
-            totalbytes += (S32)(s * comp * precision * rate);
+            totalbytes += (S32)(s * max_components * precision * rate);
         nb_layers++;
         s *= 4;
     }
-- 
cgit v1.2.3


From 3887404678756d46e082de016887b5837bf14217 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 20 Jul 2024 17:49:22 -0400
Subject: Add newer MSVC redist libs to copy action (#2075)

---
 indra/cmake/Copy3rdPartyLibs.cmake | 5 +++++
 indra/newview/viewer_manifest.py   | 5 +++++
 2 files changed, 10 insertions(+)

(limited to 'indra')

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 30dee3c6c1..3f43ec6729 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -137,9 +137,14 @@ if(WINDOWS)
     # Check each of them.
     foreach(release_msvc_file
             msvcp${MSVC_VER}.dll
+            msvcp${MSVC_VER}_1.dll
+            msvcp${MSVC_VER}_2.dll
+            msvcp${MSVC_VER}_atomic_wait.dll
+            msvcp${MSVC_VER}_codecvt_ids.dll
             msvcr${MSVC_VER}.dll
             vcruntime${MSVC_VER}.dll
             vcruntime${MSVC_VER}_1.dll
+            vcruntime${MSVC_VER}_threads.dll
             )
         if(redist_path AND EXISTS "${redist_path}/${release_msvc_file}")
             MESSAGE(STATUS "Copying redist file from ${redist_path}/${release_msvc_file}")
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 470c8bc8a8..5b6ac27575 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -567,8 +567,13 @@ class Windows_x86_64_Manifest(ViewerManifest):
             # These need to be installed as a SxS assembly, currently a 'private' assembly.
             # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
             self.path("msvcp140.dll")
+            self.path_optional("msvcp140_1.dll")
+            self.path_optional("msvcp140_2.dll")
+            self.path_optional("msvcp140_atomic_wait.dll")
+            self.path_optional("msvcp140_codecvt_ids.dll")
             self.path("vcruntime140.dll")
             self.path_optional("vcruntime140_1.dll")
+            self.path_optional("vcruntime140_threads.dll")
 
             # SLVoice executable
             with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')):
-- 
cgit v1.2.3


From 7d2cd036ead5212f724aea706346e4dbe5386c09 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 21 Jul 2024 20:10:02 -0400
Subject: Fix rare shutdown crash in LLViewerObjectList

---
 indra/newview/llviewermessage.cpp    |  2 +-
 indra/newview/llviewerobject.cpp     | 10 +++++-----
 indra/newview/llviewerobjectlist.cpp | 24 +++++++++++-------------
 indra/newview/llviewerobjectlist.h   | 14 +++++++-------
 4 files changed, 24 insertions(+), 26 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9a9d7a1baa..872a9a1581 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3602,7 +3602,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
         U32 local_id;
         mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i);
 
-        LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port);
+        gObjectList.getUUIDFromLocal(id, local_id, ip, port);
         if (id == LLUUID::null)
         {
             LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 8738151930..094d866bc1 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1940,14 +1940,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 
                 if(mesgsys != NULL)
                 {
-                LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+                    gObjectList.getUUIDFromLocal(parent_uuid,
                                                         parent_id,
                                                         mesgsys->getSenderIP(),
                                                         mesgsys->getSenderPort());
                 }
                 else
                 {
-                    LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+                    gObjectList.getUUIDFromLocal(parent_uuid,
                                                         parent_id,
                                                         mRegionp->getHost().getAddress(),
                                                         mRegionp->getHost().getPort());
@@ -2062,7 +2062,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 
                 // Debugging for suspected problems with local ids.
                 //LLUUID parent_uuid;
-                //LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() );
+                //gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() );
                 //if (parent_uuid != cur_parentp->getID() )
                 //{
                 //  LL_ERRS() << "Local ID match but UUID mismatch of viewer object" << LL_ENDL;
@@ -2085,14 +2085,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 
                     if(mesgsys != NULL)
                     {
-                    LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+                        gObjectList.getUUIDFromLocal(parent_uuid,
                                                         parent_id,
                                                         gMessageSystem->getSenderIP(),
                                                         gMessageSystem->getSenderPort());
                     }
                     else
                     {
-                        LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+                        gObjectList.getUUIDFromLocal(parent_uuid,
                                                         parent_id,
                                                         mRegionp->getHost().getAddress(),
                                                         mRegionp->getHost().getPort());
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 9e274e0566..cda8c99594 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -99,8 +99,6 @@ extern LLPipeline   gPipeline;
 
 // Statics for object lookup tables.
 U32                     LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::map<U64, U32>      LLViewerObjectList::sIPAndPortToIndex;
-std::map<U64, LLUUID>   LLViewerObjectList::sIndexAndLocalIDToUUID;
 
 LLViewerObjectList::LLViewerObjectList()
 {
@@ -138,17 +136,17 @@ void LLViewerObjectList::getUUIDFromLocal(LLUUID &id,
 {
     U64 ipport = (((U64)ip) << 32) | (U64)port;
 
-    U32 index = sIPAndPortToIndex[ipport];
+    U32 index = mIPAndPortToIndex[ipport];
 
     if (!index)
     {
         index = sSimulatorMachineIndex++;
-        sIPAndPortToIndex[ipport] = index;
+        mIPAndPortToIndex[ipport] = index;
     }
 
     U64 indexid = (((U64)index) << 32) | (U64)local_id;
 
-    id = get_if_there(sIndexAndLocalIDToUUID, indexid, LLUUID::null);
+    id = get_if_there(mIndexAndLocalIDToUUID, indexid, LLUUID::null);
 }
 
 U64 LLViewerObjectList::getIndex(const U32 local_id,
@@ -157,7 +155,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
 {
     U64 ipport = (((U64)ip) << 32) | (U64)port;
 
-    U32 index = sIPAndPortToIndex[ipport];
+    U32 index = mIPAndPortToIndex[ipport];
 
     if (!index)
     {
@@ -177,14 +175,14 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
         U32 ip = objectp->getRegion()->getHost().getAddress();
         U32 port = objectp->getRegion()->getHost().getPort();
         U64 ipport = (((U64)ip) << 32) | (U64)port;
-        U32 index = sIPAndPortToIndex[ipport];
+        U32 index = mIPAndPortToIndex[ipport];
 
         // LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
 
         U64 indexid = (((U64)index) << 32) | (U64)local_id;
 
-        std::map<U64, LLUUID>::iterator iter = sIndexAndLocalIDToUUID.find(indexid);
-        if (iter == sIndexAndLocalIDToUUID.end())
+        std::map<U64, LLUUID>::iterator iter = mIndexAndLocalIDToUUID.find(indexid);
+        if (iter == mIndexAndLocalIDToUUID.end())
         {
             return false;
         }
@@ -192,7 +190,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp)
         // Found existing entry
         if (iter->second == objectp->getID())
         {   // Full UUIDs match, so remove the entry
-            sIndexAndLocalIDToUUID.erase(iter);
+            mIndexAndLocalIDToUUID.erase(iter);
             return true;
         }
         // UUIDs did not match - this would zap a valid entry, so don't erase it
@@ -210,17 +208,17 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
 {
     U64 ipport = (((U64)ip) << 32) | (U64)port;
 
-    U32 index = sIPAndPortToIndex[ipport];
+    U32 index = mIPAndPortToIndex[ipport];
 
     if (!index)
     {
         index = sSimulatorMachineIndex++;
-        sIPAndPortToIndex[ipport] = index;
+        mIPAndPortToIndex[ipport] = index;
     }
 
     U64 indexid = (((U64)index) << 32) | (U64)local_id;
 
-    sIndexAndLocalIDToUUID[indexid] = id;
+    mIndexAndLocalIDToUUID[indexid] = id;
 
     //LL_INFOS() << "Adding object to table, full ID " << id
     //  << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL;
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index f0f236d6ae..ebdfd0d369 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -171,18 +171,18 @@ public:
     // used to discount stats from this frame
     bool mWasPaused;
 
-    static void getUUIDFromLocal(LLUUID &id,
+    void getUUIDFromLocal(LLUUID &id,
                                 const U32 local_id,
                                 const U32 ip,
                                 const U32 port);
-    static void setUUIDAndLocal(const LLUUID &id,
+    void setUUIDAndLocal(const LLUUID &id,
                                 const U32 local_id,
                                 const U32 ip,
                                 const U32 port); // Requires knowledge of message system info!
 
-    static bool removeFromLocalIDTable(const LLViewerObject* objectp);
+    bool removeFromLocalIDTable(const LLViewerObject* objectp);
     // Used ONLY by the orphaned object code.
-    static U64 getIndex(const U32 local_id, const U32 ip, const U32 port);
+    U64 getIndex(const U32 local_id, const U32 ip, const U32 port);
 
     S32 mNumUnknownUpdates;
     S32 mNumDeadObjectUpdates;
@@ -216,9 +216,9 @@ protected:
     S32 mCurLazyUpdateIndex;
 
     static U32 sSimulatorMachineIndex;
-    static std::map<U64, U32> sIPAndPortToIndex;
+    std::map<U64, U32> mIPAndPortToIndex;
 
-    static std::map<U64, LLUUID> sIndexAndLocalIDToUUID;
+    std::map<U64, LLUUID> mIndexAndLocalIDToUUID;
 
     friend class LLViewerObject;
 
@@ -257,7 +257,7 @@ extern LLViewerObjectList gObjectList;
  */
 inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id)
 {
-    std::map<LLUUID, LLPointer<LLViewerObject> >::iterator iter = mUUIDObjectMap.find(id);
+    auto iter = mUUIDObjectMap.find(id);
     if(iter != mUUIDObjectMap.end())
     {
         return iter->second;
-- 
cgit v1.2.3


From 3013424057d8963bb55eca4bd58a91c21e4395fc Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 21 Jul 2024 20:10:21 -0400
Subject: Fix rare shutdown crash in gCacheName

---
 indra/llmessage/llcachename.cpp         | 33 ++++++++++++++++-----------------
 indra/llmessage/llcachename.h           |  7 ++++---
 indra/newview/llfloateravatarpicker.cpp |  2 +-
 indra/newview/llinventorybridge.cpp     |  2 +-
 4 files changed, 22 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 63ac46722a..64f660d0ce 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -53,7 +53,6 @@ const U32 PENDING_TIMEOUT_SECS = 5 * 60;
 
 // Globals
 LLCacheName* gCacheName = NULL;
-std::map<std::string, std::string> LLCacheName::sCacheName;
 
 /// ---------------------------------------------------------------------------
 /// class LLCacheNameEntry
@@ -215,7 +214,7 @@ public:
     Impl(LLMessageSystem* msg);
     ~Impl();
 
-    bool getName(const LLUUID& id, std::string& first, std::string& last);
+    bool getName(const LLUUID& id, std::string& first, std::string& last, std::map<std::string, std::string>& default_names);
 
     boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback);
     void addPending(const LLUUID& id, const LLHost& host);
@@ -247,9 +246,9 @@ LLCacheName::LLCacheName(LLMessageSystem* msg)
 LLCacheName::LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host)
     : impl(* new Impl(msg))
 {
-    sCacheName["waiting"] = "(Loading...)";
-    sCacheName["nobody"] = "(nobody)";
-    sCacheName["none"] = "(none)";
+    mCacheName["waiting"] = "(Loading...)";
+    mCacheName["nobody"] = "(nobody)";
+    mCacheName["none"] = "(none)";
     setUpstream(upstream_host);
 }
 
@@ -274,7 +273,7 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg)
 
 LLCacheName::Impl::~Impl()
 {
-    for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
+    std::for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
     mCache.clear();
     for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
     mReplyQueue.clear();
@@ -402,11 +401,11 @@ void LLCacheName::exportFile(std::ostream& ostr)
 }
 
 
-bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last)
+bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last, std::map<std::string, std::string>& default_names)
 {
     if(id.isNull())
     {
-        first = sCacheName["nobody"];
+        first = default_names["nobody"];
         last.clear();
         return true;
     }
@@ -420,7 +419,7 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin
     }
     else
     {
-        first = sCacheName["waiting"];
+        first = default_names["waiting"];
         last.clear();
         if (!isRequestPending(id))
         {
@@ -434,8 +433,8 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin
 // static
 void LLCacheName::localizeCacheName(std::string key, std::string value)
 {
-    if (key!="" && value!= "" )
-        sCacheName[key]=value;
+    if (!key.empty() && !value.empty())
+        mCacheName[key]=value;
     else
         LL_WARNS()<< " Error localizing cache key " << key << " To "<< value<<LL_ENDL;
 }
@@ -443,7 +442,7 @@ void LLCacheName::localizeCacheName(std::string key, std::string value)
 bool LLCacheName::getFullName(const LLUUID& id, std::string& fullname)
 {
     std::string first_name, last_name;
-    bool res = impl.getName(id, first_name, last_name);
+    bool res = impl.getName(id, first_name, last_name, mCacheName);
     fullname = buildFullName(first_name, last_name);
     return res;
 }
@@ -454,7 +453,7 @@ bool LLCacheName::getGroupName(const LLUUID& id, std::string& group)
 {
     if(id.isNull())
     {
-        group = sCacheName["none"];
+        group = mCacheName["none"];
         return true;
     }
 
@@ -475,7 +474,7 @@ bool LLCacheName::getGroupName(const LLUUID& id, std::string& group)
     }
     else
     {
-        group = sCacheName["waiting"];
+        group = mCacheName["waiting"];
         if (!impl.isRequestPending(id))
         {
             impl.mAskGroupQueue.insert(id);
@@ -614,7 +613,7 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, co
     {
         LLCacheNameSignal signal;
         signal.connect(callback);
-        signal(id, sCacheName["nobody"], is_group);
+        signal(id, mCacheName["nobody"], is_group);
         return res;
     }
 
@@ -754,14 +753,14 @@ void LLCacheName::dumpStats()
 
 void LLCacheName::clear()
 {
-    for_each(impl.mCache.begin(), impl.mCache.end(), DeletePairedPointer());
+    std::for_each(impl.mCache.begin(), impl.mCache.end(), DeletePairedPointer());
     impl.mCache.clear();
 }
 
 //static
 std::string LLCacheName::getDefaultName()
 {
-    return sCacheName["waiting"];
+    return mCacheName["waiting"];
 }
 
 //static
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index 1df713c7c7..609387b6de 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -127,15 +127,16 @@ public:
     void dumpStats();   // Dumps the sizes of the cache and associated queues.
     void clear();       // Deletes all entries from the cache
 
-    static std::string getDefaultName();
+    std::string getDefaultName();
 
     // Returns "Resident", the default last name for SLID-based accounts
     // that have no last name.
     static std::string getDefaultLastName();
 
-    static void localizeCacheName(std::string key, std::string value);
-    static std::map<std::string, std::string> sCacheName;
+    void localizeCacheName(std::string key, std::string value);
+
 private:
+    std::map<std::string, std::string> mCacheName;
 
     class Impl;
     Impl& impl;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 6087e6c0ee..08a54b7369 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -300,7 +300,7 @@ void LLFloaterAvatarPicker::populateNearMe()
         if (!LLAvatarNameCache::get(av, &av_name))
         {
             element["columns"][0]["column"] = "name";
-            element["columns"][0]["value"] = LLCacheName::getDefaultName();
+            element["columns"][0]["value"] = gCacheName->getDefaultName();
             all_loaded = false;
         }
         else
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0f2f0ec942..e40ab86010 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6293,7 +6293,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
         if (item && (item->getCreatorUUID() != gAgent.getID()) &&
             (!item->getCreatorUUID().isNull()))
         {
-            std::string callingcard_name = LLCacheName::getDefaultName();
+            std::string callingcard_name = gCacheName->getDefaultName();
             LLAvatarName av_name;
             if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
             {
-- 
cgit v1.2.3


From 8a3c9a0b9d3bdf193b49f7f82378558c275948a6 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 02:25:09 -0400
Subject: Introduce scroll wheel support to LLComboBox

---
 indra/llui/llcombobox.cpp | 14 ++++++++++++++
 indra/llui/llcombobox.h   |  1 +
 2 files changed, 15 insertions(+)

(limited to 'indra')

diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 79dce1c714..ee1700e009 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -875,6 +875,20 @@ bool LLComboBox::handleUnicodeCharHere(llwchar uni_char)
     return result;
 }
 
+// virtual
+bool LLComboBox::handleScrollWheel(S32 x, S32 y, S32 clicks)
+{
+    if (mList->getVisible()) return mList->handleScrollWheel(x, y, clicks);
+    if (mAllowTextEntry) // We might be editable
+        if (!mList->getFirstSelected()) // We aren't in the list, don't kill their text
+            return false;
+
+    setCurrentByIndex(llclamp(getCurrentIndex() + clicks, 0, getItemCount() - 1));
+    prearrangeList();
+    onCommit();
+    return true;
+}
+
 void LLComboBox::setTextEntry(const LLStringExplicit& text)
 {
     if (mTextEntry)
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index cc1c2885fc..9dc6fa9257 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -114,6 +114,7 @@ public:
     virtual bool    handleToolTip(S32 x, S32 y, MASK mask);
     virtual bool    handleKeyHere(KEY key, MASK mask);
     virtual bool    handleUnicodeCharHere(llwchar uni_char);
+    virtual bool    handleScrollWheel(S32 x, S32 y, S32 clicks);
 
     // LLUICtrl interface
     virtual void    clear();                    // select nothing
-- 
cgit v1.2.3


From 7ebbc58ae310b5c41efb3fe1460d63663ab92004 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 08:29:35 -0400
Subject: Cache various frequently accessed settings (#2080)

---
 indra/llui/lllayoutstack.cpp        |  2 +-
 indra/newview/llagentcamera.cpp     |  2 +-
 indra/newview/llcontrolavatar.cpp   | 19 ++++++-------------
 indra/newview/lldrawpoolalpha.cpp   |  2 +-
 indra/newview/lldrawpoolterrain.cpp |  3 ++-
 indra/newview/llmeshrepository.cpp  | 25 ++++++++++---------------
 indra/newview/llviewerdisplay.cpp   |  2 +-
 indra/newview/llviewerwindow.cpp    |  2 +-
 indra/newview/llvoavatar.cpp        |  9 ++++++---
 indra/newview/pipeline.cpp          |  5 +++--
 10 files changed, 32 insertions(+), 39 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 7ee31ebd00..3a3aa7e4df 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -209,7 +209,7 @@ LLLayoutStack::Params::Params()
     open_time_constant("open_time_constant", 0.02f),
     close_time_constant("close_time_constant", 0.03f),
     resize_bar_overlap("resize_bar_overlap", 1),
-    border_size("border_size", LLCachedControl<S32>(*LLUI::getInstance()->mSettingGroups["config"], "UIResizeBarHeight", 0)),
+    border_size("border_size", LLUI::getInstance()->mSettingGroups["config"]->getS32("UIResizeBarHeight")),
     show_drag_handle("show_drag_handle", false),
     drag_handle_first_indent("drag_handle_first_indent", 0),
     drag_handle_second_indent("drag_handle_second_indent", 0),
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 8eda754d4c..e7531f963b 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1931,7 +1931,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
                     }
                     else
                     {
-                        LLCachedControl<F32> dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength");
+                        static LLCachedControl<F32> dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength");
                         target_lag = vel * dynamic_camera_strength / 30.f;
                     }
 
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 716333b217..2a52b7dde9 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -99,19 +99,11 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
 
 void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_scale_fixup) const
 {
-    F32 max_legal_offset = MAX_LEGAL_OFFSET;
-    if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
-    {
-        max_legal_offset = gSavedSettings.getF32("AnimatedObjectsMaxLegalOffset");
-    }
-    max_legal_offset = llmax(max_legal_offset,0.f);
+    static LLCachedControl<F32> anim_max_legal_offset(gSavedSettings, "AnimatedObjectsMaxLegalOffset", MAX_LEGAL_OFFSET);
+    F32 max_legal_offset = llmax(anim_max_legal_offset(), 0.f);
 
-    F32 max_legal_size = MAX_LEGAL_SIZE;
-    if (gSavedSettings.getControl("AnimatedObjectsMaxLegalSize"))
-    {
-        max_legal_size = gSavedSettings.getF32("AnimatedObjectsMaxLegalSize");
-    }
-    max_legal_size = llmax(max_legal_size, 1.f);
+    static LLCachedControl<F32> anim_max_legal_size(gSavedSettings, "AnimatedObjectsMaxLegalSize", MAX_LEGAL_SIZE);
+    F32 max_legal_size = llmax(anim_max_legal_size(), 1.f);
 
     new_pos_fixup = LLVector3();
     new_scale_fixup = 1.0f;
@@ -419,7 +411,8 @@ bool LLControlAvatar::updateCharacter(LLAgent &agent)
 //virtual
 void LLControlAvatar::updateDebugText()
 {
-    if (gSavedSettings.getBOOL("DebugAnimatedObjects"))
+    static LLCachedControl<bool> debug_animated_objects(gSavedSettings, "DebugAnimatedObjects");
+    if (debug_animated_objects)
     {
         S32 total_linkset_count = 0;
         if (mRootVolp)
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 2d702ecf32..cb1439b403 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -208,7 +208,7 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
     forwardRender();
 
     // final pass, render to depth for depth of field effects
-    if (!LLPipeline::sImpostorRender && gSavedSettings.getBOOL("RenderDepthOfField") && !gCubeSnapshot && !LLPipeline::sRenderingHUDs && getType() == LLDrawPool::POOL_ALPHA_POST_WATER)
+    if (!LLPipeline::sImpostorRender && LLPipeline::RenderDepthOfField && !gCubeSnapshot && !LLPipeline::sRenderingHUDs && getType() == LLDrawPool::POOL_ALPHA_POST_WATER)
     {
         //update depth buffer sampler
         simple_shader = fullbright_shader = &gDeferredFullbrightAlphaMaskProgram;
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index afc5cc9d4e..7d2912d81f 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -107,7 +107,8 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
 
 void LLDrawPoolTerrain::prerender()
 {
-    sPBRDetailMode = gSavedSettings.getS32("RenderTerrainPBRDetail");
+    static LLCachedControl<S32> render_terrain_pbr_detail(gSavedSettings, "RenderTerrainPBRDetail");
+    sPBRDetailMode = render_terrain_pbr_detail;
 }
 
 void LLDrawPoolTerrain::boostTerrainDetailTextures()
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index cd75e1c313..c02a12e6b2 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1685,9 +1685,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
             file.read(buffer, bytes);
             if (headerReceived(mesh_params, buffer, bytes) == MESH_OK)
             {
-                std::string mid;
-                mesh_params.getSculptID().toString(mid);
-                LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+                LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mesh_params.getSculptID() << " - was retrieved from the cache." << LL_ENDL;
 
                 // Found mesh in cache
                 return true;
@@ -1703,9 +1701,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c
 
     if (!http_url.empty())
     {
-        std::string mid;
-        mesh_params.getSculptID().toString(mid);
-        LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+        LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh header for ID " << mesh_params.getSculptID() << " - was retrieved from the simulator." << LL_ENDL;
 
         //grab first 4KB if we're going to bother with a fetch.  Cache will prevent future fetches if a full mesh fits
         //within the first 4KB
@@ -1793,9 +1789,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
                     {
                         delete[] buffer;
 
-                        std::string mid;
-                        mesh_id.toString(mid);
-                        LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the cache." << LL_ENDL;
+                        LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the cache." << LL_ENDL;
 
                         return true;
                     }
@@ -1810,9 +1804,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
 
             if (!http_url.empty())
             {
-                std::string mid;
-                mesh_id.toString(mid);
-                LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mid << " - was retrieved from the simulator." << LL_ENDL;
+                LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL;
 
                 LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size));
                 LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
@@ -4607,7 +4599,8 @@ F32 LLMeshRepository::getStreamingCostLegacy(LLMeshHeader& header, F32 radius, S
         *unscaled_value = weighted_avg;
     }
 
-    return weighted_avg/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
+    static LLCachedControl<U32> mesh_triangle_budget(gSavedSettings, "MeshTriangleBudget");
+    return weighted_avg / mesh_triangle_budget * 15000.f;
 }
 
 LLMeshCostData::LLMeshCostData()
@@ -4758,7 +4751,8 @@ F32 LLMeshCostData::getEstTrisForStreamingCost()
 
 F32 LLMeshCostData::getRadiusBasedStreamingCost(F32 radius)
 {
-    return getRadiusWeightedTris(radius)/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
+    static LLCachedControl<U32> mesh_triangle_budget(gSavedSettings, "MeshTriangleBudget");
+    return getRadiusWeightedTris(radius)/mesh_triangle_budget*15000.f;
 }
 
 F32 LLMeshCostData::getTriangleBasedStreamingCost()
@@ -5334,8 +5328,9 @@ bool LLMeshRepository::meshUploadEnabled()
 
 bool LLMeshRepository::meshRezEnabled()
 {
+    static LLCachedControl<bool> mesh_enabled(gSavedSettings, "MeshEnabled");
     LLViewerRegion *region = gAgent.getRegion();
-    if(gSavedSettings.getBOOL("MeshEnabled") &&
+    if(mesh_enabled &&
        region)
     {
         return region->meshRezEnabled();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 2ae3d016c4..fbbcf9bd84 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1596,7 +1596,7 @@ void render_ui_2d()
     }
 
 
-    if (gSavedSettings.getBOOL("RenderUIBuffer"))
+    if (LLPipeline::RenderUIBuffer)
     {
         if (LLView::sIsRectDirty)
         {
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 957048566e..2869c53992 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2675,7 +2675,7 @@ void LLViewerWindow::draw()
 
     //S32 screen_x, screen_y;
 
-    if (!gSavedSettings.getBOOL("RenderUIBuffer"))
+    if (!LLPipeline::RenderUIBuffer)
     {
         LLView::sDirtyRect = getWindowRectScaled();
     }
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fadea01d3c..fcd2f74108 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4070,12 +4070,14 @@ void LLVOAvatar::updateDebugText()
 {
     // Leave mDebugText uncleared here, in case a derived class has added some state first
 
-    if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+    static LLCachedControl<bool> debug_av_appearance_message(gSavedSettings, "DebugAvatarAppearanceMessage");
+    if (debug_av_appearance_message)
     {
         updateAppearanceMessageDebugText();
     }
 
-    if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+    static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+    if (debug_av_composite_baked)
     {
         if (!mBakedTextureDebugText.empty())
             addDebugText(mBakedTextureDebugText);
@@ -8592,7 +8594,8 @@ LLMotion* LLVOAvatar::findMotion(const LLUUID& id) const
 // colorized if using deferred rendering.
 void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
 {
-    if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+    static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+    if (debug_av_composite_baked)
     {
         avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
         avatar_joint_mesh_list_t::iterator end  = mBakedTextureDatas[i].mJointMeshes.end();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6cf7d9f51c..42a6987a18 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4565,7 +4565,8 @@ void LLPipeline::renderDebug()
         mReflectionMapManager.renderDebug();
     }
 
-    if (gSavedSettings.getBOOL("RenderReflectionProbeVolumes") && !hud_only)
+    static LLCachedControl<bool> render_ref_probe_volumes(gSavedSettings, "RenderReflectionProbeVolumes");
+    if (render_ref_probe_volumes && !hud_only)
     {
         LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("probe debug display");
 
@@ -8960,7 +8961,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
 
         gGL.diffuseColor4f(1, 1, 1, 1);
 
-        S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
+        S32 shadow_detail = RenderShadowDetail;
 
         // if not using VSM, disable color writes
         if (shadow_detail <= 2)
-- 
cgit v1.2.3


From ac2f20fc0393371d41296267c654df8cffdeedb4 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 09:10:19 -0400
Subject: Use thread pool to create plugin processes to reduce
 created/destroyed threads and fix various crashes (#2079)

---
 indra/llplugin/llpluginprocessparent.cpp | 149 +++++++++++++------------------
 indra/llplugin/llpluginprocessparent.h   |   9 +-
 2 files changed, 62 insertions(+), 96 deletions(-)

(limited to 'indra')

diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 00abcf740f..bd1e19c294 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -34,6 +34,9 @@
 #include "llpluginmessageclasses.h"
 #include "llsdserialize.h"
 #include "stringize.h"
+#include "threadpool.h"
+#include "workqueue.h"
+
 #include "llapr.h"
 
 //virtual
@@ -79,29 +82,8 @@ protected:
 
 };
 
-
-class LLPluginProcessCreationThread : public LLThread
-{
-public:
-    LLPluginProcessCreationThread(LLPluginProcessParent *parent) :
-        LLThread("LLPluginProcessCreationThread", gAPRPoolp),
-        pParent(parent)
-    {
-    }
-protected:
-    // Inherited from LLThread, should run once
-    /*virtual*/ void run(void)
-    {
-        pParent->createPluginProcess();
-    }
-private:
-    LLPluginProcessParent *pParent;
-
-};
-
 LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner):
-    mIncomingQueueMutex(),
-    pProcessCreationThread(NULL)
+    mIncomingQueueMutex()
 {
     if(!sInstancesMutex)
     {
@@ -130,18 +112,6 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner):
 LLPluginProcessParent::~LLPluginProcessParent()
 {
     LL_DEBUGS("Plugin") << "destructor" << LL_ENDL;
-    if (pProcessCreationThread)
-    {
-        if (!pProcessCreationThread->isStopped())
-        {
-            // Shouldn't happen at this stage
-            LL_WARNS("Plugin") << "Shutting down active pProcessCreationThread" << LL_ENDL;
-            pProcessCreationThread->shutdown();
-            ms_sleep(20);
-        }
-        delete pProcessCreationThread;
-        pProcessCreationThread = NULL;
-    }
 
     // Destroy any remaining shared memory regions
     sharedMemoryRegionsType::iterator iter;
@@ -352,35 +322,6 @@ bool LLPluginProcessParent::accept()
     return result;
 }
 
-bool LLPluginProcessParent::createPluginProcess()
-{
-    if (!mProcess)
-    {
-        // Only argument to the launcher is the port number we're listening on
-        mProcessParams.args.add(stringize(mBoundPort));
-        mProcess = LLProcess::create(mProcessParams);
-        return mProcess != NULL;
-    }
-
-    return false;
-}
-
-void LLPluginProcessParent::clearProcessCreationThread()
-{
-    if (pProcessCreationThread)
-    {
-        if (!pProcessCreationThread->isStopped())
-        {
-            pProcessCreationThread->shutdown();
-        }
-        else
-        {
-            delete pProcessCreationThread;
-            pProcessCreationThread = NULL;
-        }
-    }
-}
-
 void LLPluginProcessParent::idle(void)
 {
     bool idle_again;
@@ -542,30 +483,72 @@ void LLPluginProcessParent::idle(void)
 
             case STATE_LISTENING:
                 {
+                    // Only argument to the launcher is the port number we're listening on
+                    mProcessParams.args.add(stringize(mBoundPort));
+
                     // Launch the plugin process.
-                    if (mDebug && !pProcessCreationThread)
+                    if (mDebug && !mProcess)
                     {
-                        createPluginProcess();
-                        if (!mProcess)
+                        if (!(mProcess = LLProcess::create(mProcessParams)))
                         {
                             errorState();
                         }
                     }
-                    else if (pProcessCreationThread == NULL)
-                    {
-                        // exe plugin process allocation can be hindered by a number
-                        // of factors, don't hold whole viewer because of it, use thread
-                        pProcessCreationThread = new LLPluginProcessCreationThread(this);
-                        pProcessCreationThread->start();
-                    }
-                    else if (!mProcess && pProcessCreationThread->isStopped())
+                    else if (!mProcess && !mProcessCreationRequested)
                     {
-                        delete pProcessCreationThread;
-                        pProcessCreationThread = NULL;
-                        errorState();
+                        mProcessCreationRequested = true;
+                        LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
+                        // *NOTE: main_queue->postTo casts this refcounted smart pointer to a weak
+                        // pointer
+                        LL::WorkQueue::ptr_t general_queue = LL::WorkQueue::getInstance("General");
+                        llassert_always(main_queue);
+                        llassert_always(general_queue);
+
+                        auto process_params = mProcessParams;
+
+                        bool posted = main_queue->postTo(
+                            general_queue,
+                            [process_params]() // Work done on general queue
+                            {
+                                return LLProcess::create(process_params);
+                            },
+                            [this](LLProcessPtr new_process) // Callback to main thread
+                                mutable {
+                                ptr_t that;
+                                {
+                                    // this grabs a copy of the smart pointer to ourselves to ensure that we do not
+                                    // get destroyed until after this method returns.
+                                    LLCoros::LockType lock(*sInstancesMutex);
+                                    mapInstances_t::iterator it = sInstances.find(this);
+                                    if (it != sInstances.end())
+                                        that = (*it).second;
+                                }
+
+                                if (that)
+                                {
+                                    if (new_process)
+                                    {
+                                        that->mProcess = new_process;
+                                    }
+                                    else
+                                    {
+                                        that->mProcessCreationRequested = false;
+                                        that->errorState();
+                                    }
+                                }
+
+                            });
+                        if (!posted)
+                        {
+                            LL_WARNS("Plugin") << "Failed to dispath process creation to threadpool" << LL_ENDL;
+                            if (!(mProcess = LLProcess::create(mProcessParams)))
+                            {
+                                mProcessCreationRequested = false;
+                                errorState();
+                            }
+                        }
                     }
 
-
                     if (mProcess)
                     {
                         if(mDebug)
@@ -595,15 +578,6 @@ void LLPluginProcessParent::idle(void)
                         // This will allow us to time out if the process never starts.
                         mHeartbeat.start();
                         mHeartbeat.setTimerExpirySec(mPluginLaunchTimeout);
-
-                        // pProcessCreationThread should have stopped by this point,
-                        // but check just in case it paused on statistics sync
-                        if (pProcessCreationThread && pProcessCreationThread->isStopped())
-                        {
-                            delete pProcessCreationThread;
-                            pProcessCreationThread = NULL;
-                        }
-
                         setState(STATE_LAUNCHED);
                     }
                 }
@@ -706,7 +680,6 @@ void LLPluginProcessParent::idle(void)
                 killSockets();
                 setState(STATE_DONE);
                 dirtyPollSet();
-                clearProcessCreationThread();
                 break;
 
             case STATE_DONE:
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index d1c4933d81..334f1411af 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -69,11 +69,6 @@ public:
               const std::string &plugin_filename,
               bool debug);
 
-    // Creates a process
-    // returns true if process already exists or if created,
-    // false if failed to create
-    bool createPluginProcess();
-
     void idle(void);
 
     // returns true if the plugin is on its way to steady state
@@ -168,15 +163,13 @@ private:
 
     bool accept();
 
-    void clearProcessCreationThread();
-
     LLSocket::ptr_t mListenSocket;
     LLSocket::ptr_t mSocket;
     U32 mBoundPort;
 
     LLProcess::Params mProcessParams;
     LLProcessPtr mProcess;
-    LLThread *pProcessCreationThread;
+    bool mProcessCreationRequested = false;
 
     std::string mPluginFile;
     std::string mPluginDir;
-- 
cgit v1.2.3


From e1c8126d157dc39415d1a743d8f4fdb1277746db Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 10:58:33 -0400
Subject: Fix nullptr crash in LLScrollListCtrl::getSelectedItemLabel

---
 indra/llui/llscrolllistctrl.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 74a9641836..1d9564d107 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1479,7 +1479,11 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
     item = getFirstSelected();
     if (item)
     {
-        return item->getColumn(column)->getValue().asString();
+        auto col = item->getColumn(column);
+        if(col)
+        {
+            return col->getValue().asString();
+        }
     }
 
     return LLStringUtil::null;
-- 
cgit v1.2.3


From 75799eb22b546de8130190479c57ce112f973c80 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 10:59:07 -0400
Subject: Fix crash in LLViewerWindow::handleDragNDrop

---
 indra/newview/llviewerwindow.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2869c53992..9dc12c4856 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1271,7 +1271,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
                         LLTextureEntry *te = obj->getTE(object_face);
 
                         // can modify URL if we can modify the object or we have navigate permissions
-                        bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT );
+                        bool allow_modify_url = obj->permModify() || (te && obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ));
 
                         if (te && allow_modify_url )
                         {
-- 
cgit v1.2.3


From 3bd774894f651b0f1a300909193af8299fe3dabc Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 10:59:35 -0400
Subject: Fix nullptr crash in handleVSyncChanged

---
 indra/newview/llviewercontrol.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 1d483f1b8a..0e1f4c09c7 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -263,12 +263,15 @@ static bool handleAnisotropicChanged(const LLSD& newvalue)
 static bool handleVSyncChanged(const LLSD& newvalue)
 {
     LLPerfStats::tunables.vsyncEnabled = newvalue.asBoolean();
-    gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
-
-    if (newvalue.asBoolean())
+    if (gViewerWindow && gViewerWindow->getWindow())
     {
-        U32 current_target = gSavedSettings.getU32("TargetFPS");
-        gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target));
+        gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
+
+        if (newvalue.asBoolean())
+        {
+            U32 current_target = gSavedSettings.getU32("TargetFPS");
+            gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target));
+        }
     }
 
     return true;
-- 
cgit v1.2.3


From d609cbaf54498e685315cffc14cfdeb0c139dcf0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 10:59:59 -0400
Subject: Fix nullptr crash in LLInventoryPanel::itemChanged

---
 indra/newview/llinventorypanel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6c58eb2ca4..1a6e25fb0f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -643,7 +643,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
             }
 
             // Select any newly created object that has the auto rename at top of folder root set.
-            if(mFolderRoot.get()->getRoot()->needsAutoRename())
+            if(mFolderRoot.get() && mFolderRoot.get()->getRoot()->needsAutoRename())
             {
                 setSelection(item_id, false);
             }
-- 
cgit v1.2.3


From fdc0e14c1ba6e963ca6fd19381d9d1a77599c209 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:00:37 -0400
Subject: Fix nullptr crash in LLLandmarksPanel::isActionEnabled

---
 indra/newview/llpanellandmarks.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 99133d1fb3..45cfd146be 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -647,10 +647,18 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
 
     if ("collapse_all" == command_name)
     {
+        if (!mCurrentSelectedList)
+        {
+            return false;
+        }
         return has_expanded_folders(mCurrentSelectedList->getRootFolder());
     }
     else if ("expand_all" == command_name)
     {
+        if (!mCurrentSelectedList)
+        {
+            return false;
+        }
         return has_collapsed_folders(mCurrentSelectedList->getRootFolder());
     }
     else if ("sort_by_date" == command_name)
-- 
cgit v1.2.3


From 177a21d072e05dd28a09368e3b235d362b258f9e Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:00:58 -0400
Subject: Fix nullptr crash in LLLandmarksPanel::canItemBeModified

---
 indra/newview/llpanellandmarks.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 45cfd146be..fb7ccbfe4c 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -967,12 +967,12 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
 
     // then ask LLFolderView permissions
 
-    LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
+    LLFolderView* root_folder = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : nullptr;
 
     if ("copy" == command_name)
     {
         // we shouldn't be able to copy folders from My Inventory Panel
-        return can_be_modified && root_folder->canCopy();
+        return can_be_modified && root_folder && root_folder->canCopy();
     }
     else if ("collapse" == command_name)
     {
@@ -989,7 +989,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
 
         if ("cut" == command_name)
         {
-            can_be_modified = root_folder->canCut();
+            can_be_modified = root_folder && root_folder->canCut();
         }
         else if ("rename" == command_name)
         {
@@ -1001,7 +1001,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
         }
         else if("paste" == command_name)
         {
-            can_be_modified = root_folder->canPaste();
+            can_be_modified = root_folder && root_folder->canPaste();
         }
         else
         {
-- 
cgit v1.2.3


From baca6ae98061b407295352dd6fdd4901a724e862 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:01:24 -0400
Subject: Fix nullptr crash in LLInvFVBridge::getClipboardEntries

---
 indra/newview/llinventorybridge.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e40ab86010..8f3dc3ce16 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -961,7 +961,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
         }
     }
 
-    if (obj->getType() != LLAssetType::AT_CATEGORY)
+    if (obj && obj->getType() != LLAssetType::AT_CATEGORY)
     {
         items.push_back(std::string("Paste Separator"));
     }
-- 
cgit v1.2.3


From dbc7704a4a6d992845abf38d6bfc5d9f3ffe5893 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:02:09 -0400
Subject: Fix null region pointer crash in LLIMView

---
 indra/newview/llimview.cpp | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b12c2fdc52..33e6d2d1b2 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3042,13 +3042,16 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
 
             gIMMgr->addSession(correct_session_name, type, session_id, payload["voice_channel_info"]);
 
-            std::string url = gAgent.getRegion()->getCapability(
+            std::string url = gAgent.getRegionCapability(
                 "ChatSessionRequest");
 
             if (voice)
             {
-                LLCoros::instance().launch("chatterBoxInvitationCoro",
-                                           boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"]));
+                if(!url.empty())
+                {
+                    LLCoros::instance().launch("chatterBoxInvitationCoro",
+                        boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"]));
+                }
 
                 // send notification message to the corresponding chat
                 if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc")
@@ -4063,9 +4066,12 @@ public:
                     // Send request for chat history, if enabled.
                     if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory"))
                     {
-                        std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
-                        LLCoros::instance().launch("chatterBoxHistoryCoro",
-                            boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0));
+                        std::string url = gAgent.getRegionCapability("ChatSessionRequest");
+                        if (!url.empty())
+                        {
+                            LLCoros::instance().launch("chatterBoxHistoryCoro",
+                                boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0));
+                        }
                     }
                 }
             }
-- 
cgit v1.2.3


From d1e8e8d24d7adb7e5a64e0495a9b71aa5acda6e4 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:02:31 -0400
Subject: Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked

---
 indra/newview/llfloaterimcontainer.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index add389748f..08e13276b3 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -988,11 +988,14 @@ void LLFloaterIMContainer::onAddButtonClicked()
 {
     LLView * button = findChild<LLView>("conversations_pane_buttons_expanded")->findChild<LLButton>("add_btn");
     LLFloater* root_floater = gFloaterView->getParentFloater(this);
-    LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button);
-
-    if (picker && root_floater)
+    if (button && root_floater)
     {
-        root_floater->addDependentFloater(picker);
+        LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button);
+
+        if (picker)
+        {
+            root_floater->addDependentFloater(picker);
+        }
     }
 }
 
-- 
cgit v1.2.3


From 15877bf396f1b37784a8449540335960190862d0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 22 Jul 2024 11:03:11 -0400
Subject: Whitespace fix

---
 indra/newview/llxmlrpctransaction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index ba48b58f3b..48461241a2 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -316,7 +316,7 @@ bool LLXMLRPCTransaction::Impl::process()
         if (!LLXMLNode::parseBuffer(mResponseText.data(), mResponseText.size(),
                                     root, nullptr))
         {
- 	        LL_WARNS() << "Failed parsing XML in response; request URI: "
+            LL_WARNS() << "Failed parsing XML in response; request URI: "
                        << mURI << LL_ENDL;
         }
         else if (parseResponse(root))
-- 
cgit v1.2.3


From bd6b6acf223ebeec5ada8059422473227396f6a6 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 22 Jul 2024 18:47:41 +0300
Subject: Update expired cert in integration test

see fe8c976 for more info
---
 indra/newview/tests/llsechandler_basic_test.cpp | 670 ++++++++++++------------
 1 file changed, 345 insertions(+), 325 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index f6ed745e96..f4ee15319e 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -232,381 +232,402 @@ namespace tut
         "Certificate:\n"
         "    Data:\n"
         "        Version: 3 (0x2)\n"
-        "        Serial Number:\n"
-        "            82:2f:8f:eb:8d:06:24:b0\n"
+        "        Serial Number: ef:54:d8:f7:da:18:e8:19\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
         "        Issuer: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
         "        Validity\n"
-        "            Not Before: May 22 22:19:45 2018 GMT\n"
-        "            Not After : May 17 22:19:45 2038 GMT\n"
+        "            Not Before: Jul 23 11:46:26 2024 GMT\n"
+        "            Not After : Jul 21 11:46:26 2034 GMT\n"
         "        Subject: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
         "        Subject Public Key Info:\n"
         "            Public Key Algorithm: rsaEncryption\n"
         "                Public-Key: (4096 bit)\n"
         "                Modulus:\n"
-        "                    00:bd:e0:79:dd:3b:a6:ac:87:d0:39:f0:58:c7:a4:\n"
-        "                    42:42:f6:5f:93:b0:36:04:b5:e2:d5:f7:2a:c0:6c:\n"
-        "                    a0:13:d2:1e:02:81:57:02:50:4c:57:b7:ef:27:9e:\n"
-        "                    f6:f1:f1:30:30:72:1e:57:34:e5:3f:82:3c:21:c4:\n"
-        "                    66:d2:73:63:6c:91:e6:dd:49:9e:9c:b1:34:6a:81:\n"
-        "                    45:a1:6e:c4:50:28:f2:d8:e3:fe:80:2f:83:aa:28:\n"
-        "                    91:b4:8c:57:c9:f1:16:d9:0c:87:3c:25:80:a0:81:\n"
-        "                    8d:71:f2:96:e2:16:f1:97:c4:b0:d8:53:bb:13:6c:\n"
-        "                    73:54:2f:29:94:85:cf:86:6e:75:71:ad:39:e3:fc:\n"
-        "                    39:12:53:93:1c:ce:39:e0:33:da:49:b7:3d:af:b0:\n"
-        "                    37:ce:77:09:03:27:32:70:c0:9c:7f:9c:89:ce:90:\n"
-        "                    45:b0:7d:94:8b:ff:13:27:ba:88:7f:ae:c4:aa:73:\n"
-        "                    d5:47:b8:87:69:89:80:0c:c1:22:18:78:c2:0d:47:\n"
-        "                    d9:10:ff:80:79:0d:46:71:ec:d9:ba:c9:f3:77:fd:\n"
-        "                    92:6d:1f:0f:d9:54:18:6d:f6:72:24:5c:5c:3d:43:\n"
-        "                    49:35:3e:1c:28:de:7e:44:dc:29:c3:9f:62:04:46:\n"
-        "                    aa:c4:e6:69:6a:15:f8:e3:74:1c:14:e9:f4:97:7c:\n"
-        "                    30:6c:d4:28:fc:2a:0e:1d:6d:39:2e:1d:f9:17:43:\n"
-        "                    35:5d:23:e7:ba:e3:a8:e9:97:6b:3c:3e:23:ef:d8:\n"
-        "                    bc:fb:7a:57:37:39:93:59:03:fc:78:ca:b1:31:ef:\n"
-        "                    26:19:ed:56:e1:63:c3:ad:99:80:5b:47:b5:03:35:\n"
-        "                    5f:fe:6a:a6:21:63:ec:50:fb:4e:c9:f9:ae:a5:66:\n"
-        "                    d0:55:33:8d:e6:c5:50:5a:c6:8f:5c:34:45:a7:72:\n"
-        "                    da:50:f6:66:4c:19:f5:d1:e4:fb:11:8b:a1:b5:4e:\n"
-        "                    09:43:81:3d:39:28:86:3b:fe:07:28:97:02:b5:3a:\n"
-        "                    07:5f:4a:20:80:1a:7d:a4:8c:f7:6c:f6:c5:9b:f6:\n"
-        "                    61:e5:c7:b0:c3:d5:58:38:7b:bb:47:1e:34:d6:16:\n"
-        "                    55:c5:d2:6c:b0:93:77:b1:90:69:06:b1:53:cb:1b:\n"
-        "                    84:71:cf:b8:87:1b:1e:44:35:b4:2b:bb:04:59:58:\n"
-        "                    0b:e8:93:d8:ae:21:9b:b1:1c:89:30:ae:11:80:77:\n"
-        "                    cc:16:f3:d6:35:ed:a1:b3:70:b3:4f:cd:a1:56:99:\n"
-        "                    ee:0e:c0:00:a4:09:70:c3:5b:0b:be:a1:07:18:dd:\n"
-        "                    c6:f4:6d:8b:58:bc:f9:bb:4b:01:2c:f6:cc:2c:9b:\n"
-        "                    87:0e:b1:4f:9c:10:be:fc:45:e2:a4:ec:7e:fc:ff:\n"
-        "                    45:b8:53\n"
+        "                    00:c6:cc:07:f4:0b:17:06:4d:a6:30:b4:c7:02:6b:\n"
+        "                    9d:a4:47:a6:09:0e:60:1a:32:d4:6b:42:88:ee:c5:\n"
+        "                    b9:e9:fb:b5:0b:60:dc:a2:45:92:a5:bb:88:12:fc:\n"
+        "                    42:1a:80:32:79:16:62:7a:97:af:84:28:53:3c:c1:\n"
+        "                    f2:68:c0:4e:45:e4:0a:63:f9:34:1d:a2:8b:cc:70:\n"
+        "                    df:c6:65:c0:ba:31:32:d2:9d:0c:c8:ce:dc:11:12:\n"
+        "                    a4:11:fa:d3:c8:56:e2:31:8a:e3:fb:91:40:da:25:\n"
+        "                    55:d1:f2:75:9b:4d:fa:b8:1f:b5:6d:9b:e1:fe:5d:\n"
+        "                    e8:c4:02:79:14:ef:7d:5a:b3:3a:1e:b6:d0:60:2c:\n"
+        "                    90:dc:22:e2:c5:ae:85:1f:b4:9d:7a:20:f8:af:63:\n"
+        "                    56:25:1a:64:f3:9c:3f:9a:cf:68:08:0a:37:db:d0:\n"
+        "                    a3:65:26:db:80:82:ff:e0:1b:51:c8:ee:f6:ad:c2:\n"
+        "                    b4:f2:ab:d2:e8:85:86:77:28:d0:63:4a:71:78:41:\n"
+        "                    e3:8c:7f:71:51:31:af:24:3f:fa:8d:d0:d8:0b:e2:\n"
+        "                    7e:79:33:8a:bb:d2:00:9e:2e:c8:cd:d5:50:92:b8:\n"
+        "                    5c:5a:0b:99:ef:05:39:67:da:be:70:36:51:37:37:\n"
+        "                    20:6f:84:ab:29:11:00:7b:38:32:ba:0b:bc:34:a6:\n"
+        "                    b5:c6:a7:f0:c0:25:2d:38:0b:72:40:ab:cf:e6:ff:\n"
+        "                    97:75:ff:e2:a9:3c:2a:57:ce:e4:52:20:8c:de:fe:\n"
+        "                    68:ce:54:85:37:ba:b3:7f:2e:53:58:ea:9b:ac:79:\n"
+        "                    6b:16:65:b8:11:88:5a:46:eb:9e:9e:80:3c:89:91:\n"
+        "                    35:e0:c5:33:45:c8:86:4d:25:51:39:b1:72:97:2b:\n"
+        "                    b3:c8:c9:e8:11:cd:32:41:c8:c1:56:22:7e:33:81:\n"
+        "                    85:61:ab:da:9e:6e:5f:24:1c:0f:9b:fa:da:9d:86:\n"
+        "                    1a:66:f6:32:2a:10:80:ea:72:7a:4a:ef:c0:f2:7c:\n"
+        "                    43:02:e6:70:19:6a:e1:02:0a:00:80:51:1c:a3:03:\n"
+        "                    8b:6d:89:9f:91:37:90:d6:d8:9c:73:77:06:9e:bc:\n"
+        "                    95:89:66:ee:43:40:a3:ee:43:a3:f6:2d:43:dd:7b:\n"
+        "                    f0:2f:0b:12:37:49:b7:81:5a:e2:54:6d:71:88:ff:\n"
+        "                    fe:7e:41:25:35:4c:b4:b9:62:65:dd:9f:1f:7a:06:\n"
+        "                    6e:2b:20:58:78:da:08:66:a8:f1:89:de:8f:7f:5c:\n"
+        "                    5e:c2:72:33:7f:b6:8e:41:4c:26:f6:4c:d4:0e:11:\n"
+        "                    44:da:c7:14:f7:8b:79:4e:53:29:87:15:b1:12:e9:\n"
+        "                    19:2b:54:33:d6:2e:7f:bd:42:20:be:fc:d7:9c:b4:\n"
+        "                    7a:0a:db\n"
         "                Exponent: 65537 (0x10001)\n"
         "        X509v3 extensions:\n"
-        "            X509v3 Subject Key Identifier: \n"
-        "                8A:22:C6:9C:2E:11:F3:40:0C:CE:82:0C:22:59:FF:F8:7F:D0:B9:13\n"
-        "            X509v3 Authority Key Identifier: \n"
-        "                keyid:8A:22:C6:9C:2E:11:F3:40:0C:CE:82:0C:22:59:FF:F8:7F:D0:B9:13\n"
+        "            X509v3 Subject Key Identifier:\n"
+        "                4D:7D:AE:0D:A5:5E:22:5A:6A:8F:19:61:54:B3:58:CB:7B:C0:BD:DA\n"
+        "            X509v3 Authority Key Identifier:\n"
+        "                keyid:4D:7D:AE:0D:A5:5E:22:5A:6A:8F:19:61:54:B3:58:CB:7B:C0:BD:DA\n"
         "\n"
-        "            X509v3 Basic Constraints: critical\n"
+        "            X509v3 Basic Constraints:\n"
         "                CA:TRUE\n"
-        "            X509v3 Key Usage: critical\n"
-        "                Digital Signature, Certificate Sign, CRL Sign\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
-        "         b3:cb:33:eb:0e:02:64:f4:55:9a:3d:03:9a:cf:6a:4c:18:43:\n"
-        "         f7:42:cb:65:dc:61:52:e5:9f:2f:42:97:3c:93:16:22:d4:af:\n"
-        "         ae:b2:0f:c3:9b:ef:e0:cc:ee:b6:b1:69:a3:d8:da:26:c3:ad:\n"
-        "         3b:c5:64:dc:9f:d4:c2:53:4b:91:6d:c4:92:09:0b:ac:f0:99:\n"
-        "         be:6f:b9:3c:03:4a:6d:9f:01:5d:ec:5a:9a:f3:a7:e5:3b:2c:\n"
-        "         99:57:7d:7e:25:15:68:20:12:30:96:16:86:f5:db:74:90:60:\n"
-        "         fe:8b:df:99:f6:f7:62:49:9f:bc:8d:45:23:0a:c8:73:b8:79:\n"
-        "         80:3c:b9:e5:72:85:4b:b3:81:66:74:a2:72:92:4c:44:fd:7b:\n"
-        "         46:2e:21:a2:a9:81:a2:f3:26:4d:e3:89:7d:78:b0:c6:6f:b5:\n"
-        "         87:cb:ee:25:ed:27:1f:75:13:fa:6d:e9:37:73:ad:07:bb:af:\n"
-        "         d3:6c:87:ea:02:01:70:bd:53:aa:ce:39:2c:d4:66:39:33:aa:\n"
-        "         d1:9c:ee:67:e3:a9:45:d2:7b:2e:54:09:af:70:5f:3f:5a:67:\n"
-        "         2e:6c:72:ef:e0:9d:92:28:4a:df:ba:0b:b7:23:ca:5b:04:11:\n"
-        "         45:d1:51:e9:ea:c9:ec:54:fa:34:46:ae:fc:dc:6c:f8:1e:2c:\n"
-        "         9e:f4:71:51:8d:b5:a1:26:9a:13:30:be:1e:41:25:59:58:05:\n"
-        "         2c:64:c8:f9:5e:38:ae:dc:93:b0:8a:d6:38:74:02:cb:ce:ce:\n"
-        "         95:31:76:f6:7c:bf:a4:a1:8e:27:fd:ca:74:82:d1:e1:4d:b6:\n"
-        "         48:51:fa:c5:17:59:22:a3:84:be:82:c8:83:ec:61:a0:f4:ee:\n"
-        "         2c:e3:a3:ea:e5:51:c9:d3:4f:db:85:bd:ba:7a:52:14:b6:03:\n"
-        "         ed:43:17:d8:d7:1c:22:5e:c9:56:d9:d6:81:96:11:e3:5e:01:\n"
-        "         40:91:30:09:da:a3:5f:d3:27:60:e5:9d:6c:da:d0:f0:39:01:\n"
-        "         23:4a:a6:15:7a:4a:82:eb:ec:72:4a:1d:36:dc:6f:83:c4:85:\n"
-        "         84:b5:8d:cd:09:e5:12:63:f3:21:56:c8:64:6b:db:b8:cf:d4:\n"
-        "         df:ca:a8:24:8e:df:8d:63:a5:96:84:bf:ff:8b:7e:46:7a:f0:\n"
-        "         c7:73:7c:70:8a:f5:17:d0:ac:c8:89:1e:d7:89:42:0f:4d:66:\n"
-        "         c4:d8:bb:36:a8:ae:ca:e1:cf:e2:88:f6:cf:b0:44:4a:5f:81:\n"
-        "         50:4b:d6:28:81:cd:6c:f0:ec:e6:09:08:f2:59:91:a2:69:ac:\n"
-        "         c7:81:fa:ab:61:3e:db:6f:f6:7f:db:1a:9e:b9:5d:cc:cc:33:\n"
-        "         fa:95:c6:f7:8d:4b:30:f3\n"
+        "         5b:40:71:96:c8:d1:57:3f:fc:f2:3c:75:fb:c9:a6:a7:63:8a:\n"
+        "         22:23:96:0f:40:77:77:e2:7f:76:fc:5f:7b:1c:bd:ea:ca:f0:\n"
+        "         be:1a:fd:59:e6:0e:00:d1:78:44:01:28:f4:01:68:67:78:cf:\n"
+        "         78:43:36:ac:b2:5c:13:0e:2a:94:59:88:9e:64:46:42:0a:9b:\n"
+        "         be:7d:2d:10:11:fe:8b:64:01:fb:00:c5:2e:47:63:c0:93:3a:\n"
+        "         4a:f8:6c:fc:a9:16:58:ab:bc:7b:6b:20:31:9d:d7:d8:84:01:\n"
+        "         cc:ce:52:7f:a1:18:2f:5c:c9:59:58:9a:98:b9:ef:54:d7:a0:\n"
+        "         56:79:28:ba:ad:f5:e5:fd:7e:d8:d6:be:dd:25:76:6f:fa:8a:\n"
+        "         07:f6:8e:0f:83:43:19:ee:96:c4:c9:54:df:19:5a:4c:ae:25:\n"
+        "         57:a2:5d:d5:e8:0a:66:d8:19:e9:c4:44:ba:6a:3b:b3:86:ae:\n"
+        "         44:c0:7c:6e:e5:a0:6c:45:bb:7f:34:94:e9:d3:d4:f4:04:0b:\n"
+        "         eb:fc:9a:fa:67:d4:e5:83:5e:08:09:9c:70:a9:d3:0d:8a:08:\n"
+        "         ed:3c:04:33:4f:ac:02:d9:5c:99:62:12:fc:0e:8d:55:8a:ce:\n"
+        "         ca:28:5a:1a:9e:c9:59:8e:f0:f5:19:c7:30:1e:59:1f:3c:77:\n"
+        "         6d:fc:a2:31:ec:bf:83:fd:14:26:91:68:88:05:4c:87:82:e0:\n"
+        "         33:f4:ee:d8:56:97:23:3a:00:9b:e7:a2:10:c2:83:28:c6:c0:\n"
+        "         c1:92:49:95:c1:d3:e1:43:e8:8f:0c:d0:ae:e3:50:17:1a:8d:\n"
+        "         0f:4a:60:71:76:8e:9e:fb:15:76:cd:cd:69:2c:59:24:69:d2:\n"
+        "         0f:f2:d5:0e:96:95:2b:2e:d7:81:ed:b3:7b:6f:ce:60:32:b5:\n"
+        "         f0:f6:74:ea:27:3a:ee:2c:96:7b:e0:06:6c:33:25:c4:60:da:\n"
+        "         76:de:c4:a1:22:b6:b1:63:57:10:3c:62:60:98:47:39:9e:38:\n"
+        "         ce:c7:ef:75:75:19:d3:26:2a:cf:46:e3:b0:72:38:49:ee:c3:\n"
+        "         4e:52:97:e5:e5:b8:bc:b1:45:56:98:54:0a:63:c8:87:ff:a0:\n"
+        "         cb:28:12:5c:8f:a2:6e:a7:f9:50:98:2d:a5:26:08:df:16:29:\n"
+        "         19:63:7f:6c:b4:41:20:f7:5d:ef:6a:90:fd:1a:08:1c:c2:4c:\n"
+        "         3e:77:ea:e0:df:c0:dd:aa:a2:36:e7:e8:be:98:39:0a:68:59:\n"
+        "         8e:a0:71:2f:7c:92:ab:e0:c4:c1:c2:eb:89:b6:34:ce:44:ab:\n"
+        "         f9:f6:a4:c8:7b:ad:a8:bc:c9:04:7c:d5:4c:a4:d2:8b:54:23:\n"
+        "         89:68:86:4e:07:36:d9:bc\n"
         "-----BEGIN CERTIFICATE-----\n"
-        "MIIGXDCCBESgAwIBAgIJAIIvj+uNBiSwMA0GCSqGSIb3DQEBCwUAMIG6MQswCQYD\n"
+        "MIIGSTCCBDGgAwIBAgIJAO9U2PfaGOgZMA0GCSqGSIb3DQEBCwUAMIG6MQswCQYD\n"
         "VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j\n"
         "aXNjbzETMBEGA1UECgwKTGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25kIExpZmUg\n"
         "RW5naW5lZXJpbmcxITAfBgNVBAMMGEludGVncmF0aW9uIFRlc3QgUm9vdCBDQTEk\n"
-        "MCIGCSqGSIb3DQEJARYVbm9yZXBseUBsaW5kZW5sYWIuY29tMB4XDTE4MDUyMjIy\n"
-        "MTk0NVoXDTM4MDUxNzIyMTk0NVowgboxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApD\n"
+        "MCIGCSqGSIb3DQEJARYVbm9yZXBseUBsaW5kZW5sYWIuY29tMB4XDTI0MDcyMzEx\n"
+        "NDYyNloXDTM0MDcyMTExNDYyNlowgboxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApD\n"
         "YWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRMwEQYDVQQKDApMaW5k\n"
         "ZW4gTGFiMSAwHgYDVQQLDBdTZWNvbmQgTGlmZSBFbmdpbmVlcmluZzEhMB8GA1UE\n"
         "AwwYSW50ZWdyYXRpb24gVGVzdCBSb290IENBMSQwIgYJKoZIhvcNAQkBFhVub3Jl\n"
         "cGx5QGxpbmRlbmxhYi5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC\n"
-        "AQC94HndO6ash9A58FjHpEJC9l+TsDYEteLV9yrAbKAT0h4CgVcCUExXt+8nnvbx\n"
-        "8TAwch5XNOU/gjwhxGbSc2NskebdSZ6csTRqgUWhbsRQKPLY4/6AL4OqKJG0jFfJ\n"
-        "8RbZDIc8JYCggY1x8pbiFvGXxLDYU7sTbHNULymUhc+GbnVxrTnj/DkSU5Mczjng\n"
-        "M9pJtz2vsDfOdwkDJzJwwJx/nInOkEWwfZSL/xMnuoh/rsSqc9VHuIdpiYAMwSIY\n"
-        "eMINR9kQ/4B5DUZx7Nm6yfN3/ZJtHw/ZVBht9nIkXFw9Q0k1Phwo3n5E3CnDn2IE\n"
-        "RqrE5mlqFfjjdBwU6fSXfDBs1Cj8Kg4dbTkuHfkXQzVdI+e646jpl2s8PiPv2Lz7\n"
-        "elc3OZNZA/x4yrEx7yYZ7VbhY8OtmYBbR7UDNV/+aqYhY+xQ+07J+a6lZtBVM43m\n"
-        "xVBaxo9cNEWnctpQ9mZMGfXR5PsRi6G1TglDgT05KIY7/gcolwK1OgdfSiCAGn2k\n"
-        "jPds9sWb9mHlx7DD1Vg4e7tHHjTWFlXF0mywk3exkGkGsVPLG4Rxz7iHGx5ENbQr\n"
-        "uwRZWAvok9iuIZuxHIkwrhGAd8wW89Y17aGzcLNPzaFWme4OwACkCXDDWwu+oQcY\n"
-        "3cb0bYtYvPm7SwEs9swsm4cOsU+cEL78ReKk7H78/0W4UwIDAQABo2MwYTAdBgNV\n"
-        "HQ4EFgQUiiLGnC4R80AMzoIMIln/+H/QuRMwHwYDVR0jBBgwFoAUiiLGnC4R80AM\n"
-        "zoIMIln/+H/QuRMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJ\n"
-        "KoZIhvcNAQELBQADggIBALPLM+sOAmT0VZo9A5rPakwYQ/dCy2XcYVLlny9ClzyT\n"
-        "FiLUr66yD8Ob7+DM7raxaaPY2ibDrTvFZNyf1MJTS5FtxJIJC6zwmb5vuTwDSm2f\n"
-        "AV3sWprzp+U7LJlXfX4lFWggEjCWFob123SQYP6L35n292JJn7yNRSMKyHO4eYA8\n"
-        "ueVyhUuzgWZ0onKSTET9e0YuIaKpgaLzJk3jiX14sMZvtYfL7iXtJx91E/pt6Tdz\n"
-        "rQe7r9Nsh+oCAXC9U6rOOSzUZjkzqtGc7mfjqUXSey5UCa9wXz9aZy5scu/gnZIo\n"
-        "St+6C7cjylsEEUXRUenqyexU+jRGrvzcbPgeLJ70cVGNtaEmmhMwvh5BJVlYBSxk\n"
-        "yPleOK7ck7CK1jh0AsvOzpUxdvZ8v6Shjif9ynSC0eFNtkhR+sUXWSKjhL6CyIPs\n"
-        "YaD07izjo+rlUcnTT9uFvbp6UhS2A+1DF9jXHCJeyVbZ1oGWEeNeAUCRMAnao1/T\n"
-        "J2DlnWza0PA5ASNKphV6SoLr7HJKHTbcb4PEhYS1jc0J5RJj8yFWyGRr27jP1N/K\n"
-        "qCSO341jpZaEv/+LfkZ68MdzfHCK9RfQrMiJHteJQg9NZsTYuzaorsrhz+KI9s+w\n"
-        "REpfgVBL1iiBzWzw7OYJCPJZkaJprMeB+qthPttv9n/bGp65XczMM/qVxveNSzDz\n"
+        "AQDGzAf0CxcGTaYwtMcCa52kR6YJDmAaMtRrQojuxbnp+7ULYNyiRZKlu4gS/EIa\n"
+        "gDJ5FmJ6l6+EKFM8wfJowE5F5Apj+TQdoovMcN/GZcC6MTLSnQzIztwREqQR+tPI\n"
+        "VuIxiuP7kUDaJVXR8nWbTfq4H7Vtm+H+XejEAnkU731aszoettBgLJDcIuLFroUf\n"
+        "tJ16IPivY1YlGmTznD+az2gICjfb0KNlJtuAgv/gG1HI7vatwrTyq9LohYZ3KNBj\n"
+        "SnF4QeOMf3FRMa8kP/qN0NgL4n55M4q70gCeLsjN1VCSuFxaC5nvBTln2r5wNlE3\n"
+        "NyBvhKspEQB7ODK6C7w0prXGp/DAJS04C3JAq8/m/5d1/+KpPCpXzuRSIIze/mjO\n"
+        "VIU3urN/LlNY6puseWsWZbgRiFpG656egDyJkTXgxTNFyIZNJVE5sXKXK7PIyegR\n"
+        "zTJByMFWIn4zgYVhq9qebl8kHA+b+tqdhhpm9jIqEIDqcnpK78DyfEMC5nAZauEC\n"
+        "CgCAURyjA4ttiZ+RN5DW2JxzdwaevJWJZu5DQKPuQ6P2LUPde/AvCxI3SbeBWuJU\n"
+        "bXGI//5+QSU1TLS5YmXdnx96Bm4rIFh42ghmqPGJ3o9/XF7CcjN/to5BTCb2TNQO\n"
+        "EUTaxxT3i3lOUymHFbES6RkrVDPWLn+9QiC+/NectHoK2wIDAQABo1AwTjAdBgNV\n"
+        "HQ4EFgQUTX2uDaVeIlpqjxlhVLNYy3vAvdowHwYDVR0jBBgwFoAUTX2uDaVeIlpq\n"
+        "jxlhVLNYy3vAvdowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAW0Bx\n"
+        "lsjRVz/88jx1+8mmp2OKIiOWD0B3d+J/dvxfexy96srwvhr9WeYOANF4RAEo9AFo\n"
+        "Z3jPeEM2rLJcEw4qlFmInmRGQgqbvn0tEBH+i2QB+wDFLkdjwJM6Svhs/KkWWKu8\n"
+        "e2sgMZ3X2IQBzM5Sf6EYL1zJWViamLnvVNegVnkouq315f1+2Na+3SV2b/qKB/aO\n"
+        "D4NDGe6WxMlU3xlaTK4lV6Jd1egKZtgZ6cREumo7s4auRMB8buWgbEW7fzSU6dPU\n"
+        "9AQL6/ya+mfU5YNeCAmccKnTDYoI7TwEM0+sAtlcmWIS/A6NVYrOyihaGp7JWY7w\n"
+        "9RnHMB5ZHzx3bfyiMey/g/0UJpFoiAVMh4LgM/Tu2FaXIzoAm+eiEMKDKMbAwZJJ\n"
+        "lcHT4UPojwzQruNQFxqND0pgcXaOnvsVds3NaSxZJGnSD/LVDpaVKy7Xge2ze2/O\n"
+        "YDK18PZ06ic67iyWe+AGbDMlxGDadt7EoSK2sWNXEDxiYJhHOZ44zsfvdXUZ0yYq\n"
+        "z0bjsHI4Se7DTlKX5eW4vLFFVphUCmPIh/+gyygSXI+ibqf5UJgtpSYI3xYpGWN/\n"
+        "bLRBIPdd72qQ/RoIHMJMPnfq4N/A3aqiNufovpg5CmhZjqBxL3ySq+DEwcLribY0\n"
+        "zkSr+fakyHutqLzJBHzVTKTSi1QjiWiGTgc22bw=\n"
         "-----END CERTIFICATE-----\n"
-                                   );
+    );
+
 
     const std::string mPemIntermediateCert(
         "Certificate:\n"
         "    Data:\n"
         "        Version: 3 (0x2)\n"
-        "        Serial Number: 4096 (0x1000)\n"
+        "        Serial Number: 85:bb:4b:66:26:db:9a:c6\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
         "        Issuer: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
         "        Validity\n"
-        "            Not Before: May 22 22:39:08 2018 GMT\n"
-        "            Not After : May 19 22:39:08 2028 GMT\n"
-        "        Subject: C=US, ST=California, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Intermediate CA/emailAddress=noreply@lindenlab.com\n"
+        "            Not Before: Jul 23 11:46:33 2024 GMT\n"
+        "            Not After : Jul 21 11:46:33 2034 GMT\n"
+        "        Subject: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Intermediate CA/emailAddress=noreply@lindenlab.com\n"
         "        Subject Public Key Info:\n"
         "            Public Key Algorithm: rsaEncryption\n"
         "                Public-Key: (4096 bit)\n"
         "                Modulus:\n"
-        "                    00:ce:a3:70:e2:c4:fb:4b:97:90:a1:30:bb:c1:1b:\n"
-        "                    13:b9:aa:7e:46:17:a3:26:8d:69:3f:5e:73:95:e8:\n"
-        "                    6a:b1:0a:b4:8f:50:65:e3:c6:5c:39:24:34:df:0b:\n"
-        "                    b7:cc:ce:62:0c:36:5a:12:2c:fe:35:4c:e9:1c:ac:\n"
-        "                    80:5e:24:99:d7:aa:bd:be:48:c0:62:64:77:36:88:\n"
-        "                    66:ce:f4:a8:dd:d2:76:24:62:90:55:41:fc:1d:13:\n"
-        "                    4e:a7:4e:57:bc:a8:a4:59:4b:2c:5a:1c:d8:cc:16:\n"
-        "                    de:e8:88:30:c9:95:df:2f:a6:14:28:0f:eb:34:46:\n"
-        "                    12:58:ba:da:0e:e6:de:9c:15:f6:f4:e3:9f:74:aa:\n"
-        "                    70:89:79:8b:e9:5a:7b:18:54:15:94:3a:23:0a:65:\n"
-        "                    78:05:d9:33:90:2a:ce:15:18:0d:52:fc:5c:31:65:\n"
-        "                    20:d0:12:37:8c:11:80:ba:d4:b0:82:73:00:4b:49:\n"
-        "                    be:cb:d6:bc:e7:cd:61:f3:00:98:99:74:5a:37:81:\n"
-        "                    49:96:7e:14:01:1b:86:d2:d0:06:94:40:63:63:46:\n"
-        "                    11:fc:33:5c:bd:3a:5e:d4:e5:44:47:64:50:bd:a6:\n"
-        "                    97:55:70:64:9b:26:cc:de:20:82:90:6a:83:41:9c:\n"
-        "                    6f:71:47:14:be:cb:68:7c:85:be:ef:2e:76:12:19:\n"
-        "                    d3:c9:87:32:b4:ac:60:20:16:28:2d:af:bc:e8:01:\n"
-        "                    c6:7f:fb:d8:11:d5:f4:b7:14:bd:27:08:5b:72:be:\n"
-        "                    09:e0:91:c8:9c:7b:b4:b3:12:ef:32:36:be:b1:b9:\n"
-        "                    a2:b7:e3:69:47:30:76:ba:9c:9b:19:99:4d:53:dd:\n"
-        "                    5c:e8:2c:f1:b2:64:69:cf:15:bd:f8:bb:58:95:73:\n"
-        "                    58:38:95:b4:7a:cf:84:29:a6:c2:db:f0:bd:ef:97:\n"
-        "                    26:d4:99:ac:d7:c7:be:b0:0d:11:f4:26:86:2d:77:\n"
-        "                    42:52:25:d7:56:c7:e3:97:b1:36:5c:97:71:d0:9b:\n"
-        "                    f5:b5:50:8d:f9:ff:fb:10:77:3c:b5:53:6d:a1:43:\n"
-        "                    35:a9:03:32:05:ab:d7:f5:d1:19:bd:5f:92:a3:00:\n"
-        "                    2a:79:37:a4:76:4f:e9:32:0d:e4:86:bb:ea:c3:1a:\n"
-        "                    c5:33:e8:16:d4:a5:d8:e0:e8:bb:c2:f0:22:15:e2:\n"
-        "                    d9:8c:ae:ac:7d:2b:bf:eb:a3:4c:3b:29:1d:94:ac:\n"
-        "                    a3:bb:6d:ba:6d:03:91:03:cf:46:12:c4:66:21:c5:\n"
-        "                    c6:67:d8:11:19:79:01:0e:6e:84:1c:76:6f:11:3d:\n"
-        "                    eb:94:89:c5:6a:26:1f:cd:e0:11:8b:51:ee:99:35:\n"
-        "                    69:e5:7f:0b:77:2a:94:e4:4b:64:b9:83:04:30:05:\n"
-        "                    e4:a2:e3\n"
+        "                    00:be:f7:d2:cb:e4:5c:46:7b:e2:11:22:89:72:da:\n"
+        "                    77:72:ec:05:87:19:f7:77:07:fd:67:d7:af:13:d5:\n"
+        "                    76:12:92:dd:69:4d:22:47:b0:3d:94:8a:6a:95:85:\n"
+        "                    34:b8:78:c3:9d:63:32:b1:4b:0a:b6:0e:05:7b:ab:\n"
+        "                    06:23:fc:0d:21:b5:fc:c6:6a:5a:36:be:6e:fc:c7:\n"
+        "                    47:97:a3:18:2e:33:cd:0e:8a:75:2b:b7:29:e9:68:\n"
+        "                    4a:90:53:45:db:73:ff:b3:e5:c1:d4:6b:dd:3a:b1:\n"
+        "                    ef:53:9f:23:e9:c6:87:ce:67:b9:fb:a4:d5:76:21:\n"
+        "                    03:cb:c5:72:6b:c5:a6:07:55:fb:47:90:e8:92:38:\n"
+        "                    73:14:11:8e:ff:21:b9:35:64:5a:61:c7:fc:1f:e4:\n"
+        "                    4d:47:e5:03:cc:0b:c3:69:66:71:84:0c:18:2f:61:\n"
+        "                    7f:34:dd:f2:91:e3:b7:9d:a8:b8:db:3f:6e:6f:96:\n"
+        "                    fa:34:06:82:04:c8:18:cc:de:8b:7f:26:b5:48:53:\n"
+        "                    fb:fb:15:7b:0e:38:60:fe:da:21:98:8d:73:07:b2:\n"
+        "                    6b:fd:ad:21:59:e7:84:66:e1:04:16:1c:be:13:34:\n"
+        "                    28:43:2c:09:3d:e4:77:2a:a4:ad:6d:f9:26:04:f7:\n"
+        "                    43:73:9b:d9:ea:1a:43:6a:b4:db:88:f8:f9:bd:34:\n"
+        "                    f8:a6:e8:7a:ab:b4:b2:e1:29:47:a6:ba:b8:65:9c:\n"
+        "                    c6:b3:af:13:43:38:ef:2a:05:77:9f:8f:f0:0c:56:\n"
+        "                    21:c2:92:d2:2c:c3:32:50:d1:62:ae:51:fc:99:e6:\n"
+        "                    b8:38:f8:83:1d:8d:40:11:e0:1d:51:5d:3f:fa:55:\n"
+        "                    61:b6:18:09:1e:71:af:95:64:9c:ea:c6:11:64:f0:\n"
+        "                    a8:02:7d:bb:c8:54:2e:57:48:32:7c:51:66:0d:d6:\n"
+        "                    3e:0e:ed:5e:30:a8:a6:47:03:64:5c:89:21:45:90:\n"
+        "                    e1:4c:91:bc:bd:81:6e:73:a9:14:27:e6:0d:6d:38:\n"
+        "                    dc:50:9d:b2:56:66:60:6c:66:b9:5d:bb:8c:96:2d:\n"
+        "                    89:5e:0d:2b:ed:b8:03:31:ce:0a:ff:82:03:f5:b2:\n"
+        "                    3b:e5:27:de:61:d8:8f:bf:a2:6a:64:b0:4a:87:23:\n"
+        "                    40:28:a3:f1:ec:96:50:cd:83:50:2d:78:71:92:f2:\n"
+        "                    88:75:b0:9d:cd:0b:e4:62:a6:a5:63:11:fc:b4:ba:\n"
+        "                    9f:c6:67:40:2c:ad:a4:ef:94:f0:f9:a0:ba:e1:52:\n"
+        "                    2e:27:d9:6b:1d:82:23:ed:3c:0b:0b:d2:bc:14:be:\n"
+        "                    6d:b1:69:ad:3e:25:3a:66:d2:d1:af:9f:88:45:25:\n"
+        "                    6b:6e:be:1f:a0:e7:b2:9f:6d:24:94:0d:f4:c2:75:\n"
+        "                    f9:1f:5d\n"
         "                Exponent: 65537 (0x10001)\n"
         "        X509v3 extensions:\n"
-        "            X509v3 Subject Key Identifier: \n"
-        "                83:21:DE:EC:C0:79:03:6D:1E:83:F3:E5:97:29:D5:5A:C0:96:40:FA\n"
-        "            X509v3 Authority Key Identifier: \n"
-        "                keyid:8A:22:C6:9C:2E:11:F3:40:0C:CE:82:0C:22:59:FF:F8:7F:D0:B9:13\n"
-        "\n"
-        "            X509v3 Basic Constraints: critical\n"
+        "            X509v3 Basic Constraints:\n"
         "                CA:TRUE, pathlen:0\n"
-        "            X509v3 Key Usage: critical\n"
+        "            X509v3 Key Usage:\n"
         "                Digital Signature, Certificate Sign, CRL Sign\n"
+        "            X509v3 Subject Key Identifier:\n"
+        "                56:98:DC:45:25:11:E2:8C:2B:EA:D6:C6:E2:C8:BE:2C:C8:69:FF:FF\n"
+        "            X509v3 Authority Key Identifier:\n"
+        "                keyid:4D:7D:AE:0D:A5:5E:22:5A:6A:8F:19:61:54:B3:58:CB:7B:C0:BD:DA\n"
+        "                DirName:/C=US/ST=California/L=San Francisco/O=Linden Lab/OU=Second Life Engineering/CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
+        "                serial:EF:54:D8:F7:DA:18:E8:19\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
-        "         a3:6c:85:9a:2e:4e:7e:5d:83:63:0f:f5:4f:a9:7d:ec:0e:6f:\n"
-        "         ae:d7:ba:df:64:e0:46:0e:3d:da:18:15:2c:f3:73:ca:81:b1:\n"
-        "         10:d9:53:14:21:7d:72:5c:94:88:a5:9d:ad:ab:45:42:c6:64:\n"
-        "         a9:d9:2e:4e:29:47:2c:b1:95:07:b7:62:48:68:1f:68:13:1c:\n"
-        "         d2:a0:fb:5e:38:24:4a:82:0a:87:c9:93:20:43:7e:e9:f9:79:\n"
-        "         ef:03:a2:bd:9e:24:6b:0a:01:5e:4a:36:c5:7d:7a:fe:d6:aa:\n"
-        "         2f:c2:8c:38:8a:99:3c:b0:6a:e5:60:be:56:d6:eb:60:03:55:\n"
-        "         24:42:a0:1a:fa:91:24:a3:53:15:75:5d:c8:eb:7c:1e:68:5a:\n"
-        "         7e:13:34:e3:85:37:1c:76:3f:77:67:1b:ed:1b:52:17:fc:4a:\n"
-        "         a3:e2:74:84:80:2c:69:fc:dd:7d:26:97:c4:2a:69:7d:9c:dc:\n"
-        "         61:97:70:29:a7:3f:2b:5b:2b:22:51:fd:fe:6a:5d:f9:e7:14:\n"
-        "         48:b7:2d:c8:33:58:fc:f2:5f:27:f7:26:16:be:be:b5:aa:a2:\n"
-        "         64:53:3c:69:e8:b5:61:eb:ab:91:a5:b4:09:9b:f6:98:b8:5c:\n"
-        "         5b:24:2f:93:f5:2b:9c:8c:58:fb:26:3f:67:53:d7:42:64:e8:\n"
-        "         79:77:73:41:4e:e3:02:39:0b:b6:68:97:8b:84:e8:1d:83:a8:\n"
-        "         15:f1:06:46:47:80:42:5e:14:e2:61:8a:76:84:d5:d4:71:7f:\n"
-        "         4e:ff:d9:74:87:ff:32:c5:87:20:0a:d4:59:40:3e:d8:17:ef:\n"
-        "         da:65:e9:0a:51:fe:1e:c3:46:91:d2:ee:e4:23:57:97:87:d4:\n"
-        "         a6:a5:eb:ef:81:6a:d8:8c:d6:1f:8e:b1:18:4c:6b:89:32:55:\n"
-        "         53:68:26:9e:bb:03:be:2c:e9:8b:ff:97:9c:1c:ac:28:c3:9f:\n"
-        "         0b:b7:93:23:24:31:63:e4:19:13:f2:bb:08:71:b7:c5:c5:c4:\n"
-        "         10:ff:dc:fc:33:54:a4:5e:ec:a3:fe:0a:80:ca:9c:bc:95:6f:\n"
-        "         5f:39:91:3b:61:69:16:94:0f:57:4b:fc:4b:b1:be:72:98:5d:\n"
-        "         10:f9:08:a7:d6:e0:e8:3d:5d:54:7d:fa:4b:6a:dd:98:41:ed:\n"
-        "         84:a1:39:67:5c:6c:7f:0c:b0:e1:98:c1:14:ed:fe:1e:e8:05:\n"
-        "         8d:7f:6a:24:cb:1b:05:42:0d:7f:13:ba:ca:b5:91:db:a5:f0:\n"
-        "         40:2b:70:7a:2a:a5:5d:ed:56:0c:f0:c2:72:ee:63:dd:cb:5d:\n"
-        "         76:f6:08:e6:e6:30:ef:3a:b2:16:34:41:a4:e1:30:14:bc:c7:\n"
-        "         f9:23:3a:1a:70:df:b8:cc\n"
+        "         ae:d0:30:ac:31:49:20:86:0b:34:01:58:08:94:68:cc:38:9c:\n"
+        "         f7:13:5c:46:19:33:ed:54:5e:e4:43:f3:59:33:5c:50:d9:89:\n"
+        "         8b:ee:75:67:a8:c7:0e:d1:30:c2:4e:a3:2e:a8:64:2d:6a:a8:\n"
+        "         f4:bd:b1:32:dc:bc:46:48:5d:1a:18:d8:e8:0b:8c:fe:7b:51:\n"
+        "         d9:dd:b9:e3:4b:d1:f9:e0:22:46:dd:37:5b:b2:cb:72:8e:9c:\n"
+        "         4b:da:67:df:fd:ce:86:49:21:31:4e:99:b6:d4:38:0b:14:5d:\n"
+        "         ad:97:ba:8f:e2:08:15:85:73:eb:4a:7d:01:49:af:63:ae:2d:\n"
+        "         e3:9d:0a:d7:11:c2:03:d3:15:21:97:be:3d:d2:ea:ab:cc:93:\n"
+        "         16:98:64:80:72:eb:c2:78:0a:09:69:c4:2b:5d:df:30:7b:be:\n"
+        "         9b:02:34:73:62:9f:95:b1:cf:08:e8:9e:57:a8:37:31:cf:2c:\n"
+        "         8c:18:b1:d5:7a:25:90:d6:b6:76:28:1b:e2:b1:cf:1b:f1:ef:\n"
+        "         dd:2f:d3:07:af:81:e3:5f:fc:5a:e7:3c:a9:37:0d:9c:78:5b:\n"
+        "         58:dc:89:54:70:a4:5b:ff:9f:64:30:a3:85:12:32:69:a5:02:\n"
+        "         73:d9:1d:ff:69:1f:d4:97:8f:d0:a8:90:8c:dd:2e:45:a1:b1:\n"
+        "         e3:8a:82:fc:fc:08:41:01:51:92:87:9a:09:7b:35:c3:cc:48:\n"
+        "         81:39:30:a9:f4:41:3b:06:a3:06:21:cc:4b:bc:1b:76:58:94:\n"
+        "         d1:e4:22:70:7f:20:7e:7a:b4:fa:7f:e8:79:c1:8c:89:9e:e9:\n"
+        "         e3:72:2a:43:72:47:9e:bb:26:ed:64:2c:c8:54:f7:b4:95:c2:\n"
+        "         c4:e9:8b:df:d5:10:a7:ed:a5:7a:94:97:c4:76:45:e3:6c:c0:\n"
+        "         0e:a6:2a:76:d5:1d:2f:ad:99:32:c6:7b:f6:41:e0:65:37:0f:\n"
+        "         c0:1f:c5:99:4a:75:fd:6c:e0:f1:f0:58:49:2d:81:10:ca:d8:\n"
+        "         eb:2b:c3:9b:a9:d9:a9:f5:6c:6d:26:fd:b8:32:92:58:f4:65:\n"
+        "         0b:d1:8e:03:1e:d5:6a:95:d4:46:9e:65:dd:e5:85:36:e6:31:\n"
+        "         77:3a:1a:20:2b:07:b7:f1:9a:4e:8d:54:22:5a:54:1c:72:5c:\n"
+        "         1f:b4:1a:5b:21:ed:06:5a:9a:e5:3c:01:c9:9b:af:50:61:f2:\n"
+        "         29:6b:ec:6d:19:bb:2e:02:94:ca:36:71:ef:45:39:f1:a5:25:\n"
+        "         10:0e:90:bc:a7:b3:5b:ab:af:f1:19:88:6a:09:2f:1f:d0:24:\n"
+        "         a8:62:ed:d9:1a:65:89:65:16:a5:55:de:33:e8:7a:81:66:72:\n"
+        "         91:17:5e:1d:22:72:f7:b8\n"
         "-----BEGIN CERTIFICATE-----\n"
-        "MIIGSDCCBDCgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgboxCzAJBgNVBAYTAlVT\n"
-        "MRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRMw\n"
-        "EQYDVQQKDApMaW5kZW4gTGFiMSAwHgYDVQQLDBdTZWNvbmQgTGlmZSBFbmdpbmVl\n"
-        "cmluZzEhMB8GA1UEAwwYSW50ZWdyYXRpb24gVGVzdCBSb290IENBMSQwIgYJKoZI\n"
-        "hvcNAQkBFhVub3JlcGx5QGxpbmRlbmxhYi5jb20wHhcNMTgwNTIyMjIzOTA4WhcN\n"
-        "MjgwNTE5MjIzOTA4WjCBqjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3Ju\n"
-        "aWExEzARBgNVBAoMCkxpbmRlbiBMYWIxIDAeBgNVBAsMF1NlY29uZCBMaWZlIEVu\n"
-        "Z2luZWVyaW5nMSkwJwYDVQQDDCBJbnRlZ3JhdGlvbiBUZXN0IEludGVybWVkaWF0\n"
-        "ZSBDQTEkMCIGCSqGSIb3DQEJARYVbm9yZXBseUBsaW5kZW5sYWIuY29tMIICIjAN\n"
-        "BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAzqNw4sT7S5eQoTC7wRsTuap+Rhej\n"
-        "Jo1pP15zlehqsQq0j1Bl48ZcOSQ03wu3zM5iDDZaEiz+NUzpHKyAXiSZ16q9vkjA\n"
-        "YmR3NohmzvSo3dJ2JGKQVUH8HRNOp05XvKikWUssWhzYzBbe6IgwyZXfL6YUKA/r\n"
-        "NEYSWLraDubenBX29OOfdKpwiXmL6Vp7GFQVlDojCmV4BdkzkCrOFRgNUvxcMWUg\n"
-        "0BI3jBGAutSwgnMAS0m+y9a8581h8wCYmXRaN4FJln4UARuG0tAGlEBjY0YR/DNc\n"
-        "vTpe1OVER2RQvaaXVXBkmybM3iCCkGqDQZxvcUcUvstofIW+7y52EhnTyYcytKxg\n"
-        "IBYoLa+86AHGf/vYEdX0txS9Jwhbcr4J4JHInHu0sxLvMja+sbmit+NpRzB2upyb\n"
-        "GZlNU91c6CzxsmRpzxW9+LtYlXNYOJW0es+EKabC2/C975cm1Jms18e+sA0R9CaG\n"
-        "LXdCUiXXVsfjl7E2XJdx0Jv1tVCN+f/7EHc8tVNtoUM1qQMyBavX9dEZvV+SowAq\n"
-        "eTekdk/pMg3khrvqwxrFM+gW1KXY4Oi7wvAiFeLZjK6sfSu/66NMOykdlKyju226\n"
-        "bQORA89GEsRmIcXGZ9gRGXkBDm6EHHZvET3rlInFaiYfzeARi1HumTVp5X8LdyqU\n"
-        "5EtkuYMEMAXkouMCAwEAAaNmMGQwHQYDVR0OBBYEFIMh3uzAeQNtHoPz5Zcp1VrA\n"
-        "lkD6MB8GA1UdIwQYMBaAFIoixpwuEfNADM6CDCJZ//h/0LkTMBIGA1UdEwEB/wQI\n"
-        "MAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQCjbIWa\n"
-        "Lk5+XYNjD/VPqX3sDm+u17rfZOBGDj3aGBUs83PKgbEQ2VMUIX1yXJSIpZ2tq0VC\n"
-        "xmSp2S5OKUcssZUHt2JIaB9oExzSoPteOCRKggqHyZMgQ37p+XnvA6K9niRrCgFe\n"
-        "SjbFfXr+1qovwow4ipk8sGrlYL5W1utgA1UkQqAa+pEko1MVdV3I63weaFp+EzTj\n"
-        "hTccdj93ZxvtG1IX/Eqj4nSEgCxp/N19JpfEKml9nNxhl3Appz8rWysiUf3+al35\n"
-        "5xRIty3IM1j88l8n9yYWvr61qqJkUzxp6LVh66uRpbQJm/aYuFxbJC+T9SucjFj7\n"
-        "Jj9nU9dCZOh5d3NBTuMCOQu2aJeLhOgdg6gV8QZGR4BCXhTiYYp2hNXUcX9O/9l0\n"
-        "h/8yxYcgCtRZQD7YF+/aZekKUf4ew0aR0u7kI1eXh9SmpevvgWrYjNYfjrEYTGuJ\n"
-        "MlVTaCaeuwO+LOmL/5ecHKwow58Lt5MjJDFj5BkT8rsIcbfFxcQQ/9z8M1SkXuyj\n"
-        "/gqAypy8lW9fOZE7YWkWlA9XS/xLsb5ymF0Q+Qin1uDoPV1UffpLat2YQe2EoTln\n"
-        "XGx/DLDhmMEU7f4e6AWNf2okyxsFQg1/E7rKtZHbpfBAK3B6KqVd7VYM8MJy7mPd\n"
-        "y1129gjm5jDvOrIWNEGk4TAUvMf5IzoacN+4zA==\n"
+        "MIIHNjCCBR6gAwIBAgIJAIW7S2Ym25rGMA0GCSqGSIb3DQEBCwUAMIG6MQswCQYD\n"
+        "VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j\n"
+        "aXNjbzETMBEGA1UECgwKTGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25kIExpZmUg\n"
+        "RW5naW5lZXJpbmcxITAfBgNVBAMMGEludGVncmF0aW9uIFRlc3QgUm9vdCBDQTEk\n"
+        "MCIGCSqGSIb3DQEJARYVbm9yZXBseUBsaW5kZW5sYWIuY29tMB4XDTI0MDcyMzEx\n"
+        "NDYzM1oXDTM0MDcyMTExNDYzM1owgcIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApD\n"
+        "YWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRMwEQYDVQQKDApMaW5k\n"
+        "ZW4gTGFiMSAwHgYDVQQLDBdTZWNvbmQgTGlmZSBFbmdpbmVlcmluZzEpMCcGA1UE\n"
+        "AwwgSW50ZWdyYXRpb24gVGVzdCBJbnRlcm1lZGlhdGUgQ0ExJDAiBgkqhkiG9w0B\n"
+        "CQEWFW5vcmVwbHlAbGluZGVubGFiLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIP\n"
+        "ADCCAgoCggIBAL730svkXEZ74hEiiXLad3LsBYcZ93cH/WfXrxPVdhKS3WlNIkew\n"
+        "PZSKapWFNLh4w51jMrFLCrYOBXurBiP8DSG1/MZqWja+bvzHR5ejGC4zzQ6KdSu3\n"
+        "KeloSpBTRdtz/7PlwdRr3Tqx71OfI+nGh85nufuk1XYhA8vFcmvFpgdV+0eQ6JI4\n"
+        "cxQRjv8huTVkWmHH/B/kTUflA8wLw2lmcYQMGC9hfzTd8pHjt52ouNs/bm+W+jQG\n"
+        "ggTIGMzei38mtUhT+/sVew44YP7aIZiNcweya/2tIVnnhGbhBBYcvhM0KEMsCT3k\n"
+        "dyqkrW35JgT3Q3Ob2eoaQ2q024j4+b00+Kboequ0suEpR6a6uGWcxrOvE0M47yoF\n"
+        "d5+P8AxWIcKS0izDMlDRYq5R/JnmuDj4gx2NQBHgHVFdP/pVYbYYCR5xr5VknOrG\n"
+        "EWTwqAJ9u8hULldIMnxRZg3WPg7tXjCopkcDZFyJIUWQ4UyRvL2BbnOpFCfmDW04\n"
+        "3FCdslZmYGxmuV27jJYtiV4NK+24AzHOCv+CA/WyO+Un3mHYj7+iamSwSocjQCij\n"
+        "8eyWUM2DUC14cZLyiHWwnc0L5GKmpWMR/LS6n8ZnQCytpO+U8PmguuFSLifZax2C\n"
+        "I+08CwvSvBS+bbFprT4lOmbS0a+fiEUla26+H6Dnsp9tJJQN9MJ1+R9dAgMBAAGj\n"
+        "ggEzMIIBLzAPBgNVHRMECDAGAQH/AgEAMAsGA1UdDwQEAwIBhjAdBgNVHQ4EFgQU\n"
+        "VpjcRSUR4owr6tbG4si+LMhp//8wge8GA1UdIwSB5zCB5IAUTX2uDaVeIlpqjxlh\n"
+        "VLNYy3vAvdqhgcCkgb0wgboxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y\n"
+        "bmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRMwEQYDVQQKDApMaW5kZW4gTGFi\n"
+        "MSAwHgYDVQQLDBdTZWNvbmQgTGlmZSBFbmdpbmVlcmluZzEhMB8GA1UEAwwYSW50\n"
+        "ZWdyYXRpb24gVGVzdCBSb290IENBMSQwIgYJKoZIhvcNAQkBFhVub3JlcGx5QGxp\n"
+        "bmRlbmxhYi5jb22CCQDvVNj32hjoGTANBgkqhkiG9w0BAQsFAAOCAgEArtAwrDFJ\n"
+        "IIYLNAFYCJRozDic9xNcRhkz7VRe5EPzWTNcUNmJi+51Z6jHDtEwwk6jLqhkLWqo\n"
+        "9L2xMty8RkhdGhjY6AuM/ntR2d2540vR+eAiRt03W7LLco6cS9pn3/3OhkkhMU6Z\n"
+        "ttQ4CxRdrZe6j+IIFYVz60p9AUmvY64t450K1xHCA9MVIZe+PdLqq8yTFphkgHLr\n"
+        "wngKCWnEK13fMHu+mwI0c2KflbHPCOieV6g3Mc8sjBix1XolkNa2digb4rHPG/Hv\n"
+        "3S/TB6+B41/8Wuc8qTcNnHhbWNyJVHCkW/+fZDCjhRIyaaUCc9kd/2kf1JeP0KiQ\n"
+        "jN0uRaGx44qC/PwIQQFRkoeaCXs1w8xIgTkwqfRBOwajBiHMS7wbdliU0eQicH8g\n"
+        "fnq0+n/oecGMiZ7p43IqQ3JHnrsm7WQsyFT3tJXCxOmL39UQp+2lepSXxHZF42zA\n"
+        "DqYqdtUdL62ZMsZ79kHgZTcPwB/FmUp1/Wzg8fBYSS2BEMrY6yvDm6nZqfVsbSb9\n"
+        "uDKSWPRlC9GOAx7VapXURp5l3eWFNuYxdzoaICsHt/GaTo1UIlpUHHJcH7QaWyHt\n"
+        "Blqa5TwByZuvUGHyKWvsbRm7LgKUyjZx70U58aUlEA6QvKezW6uv8RmIagkvH9Ak\n"
+        "qGLt2RpliWUWpVXeM+h6gWZykRdeHSJy97g=\n"
         "-----END CERTIFICATE-----\n"
-                                           );
+    );
 
     const std::string mPemChildCert(
         "Certificate:\n"
         "    Data:\n"
         "        Version: 3 (0x2)\n"
-        "        Serial Number: 4096 (0x1000)\n"
+        "        Serial Number: 9e:8d:34:13:e7:9b:f9:31\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
-        "        Issuer: C=US, ST=California, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Intermediate CA/emailAddress=noreply@lindenlab.com\n"
+        "        Issuer: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Intermediate CA/emailAddress=noreply@lindenlab.com\n"
         "        Validity\n"
-        "            Not Before: May 22 22:58:15 2018 GMT\n"
-        "            Not After : Jul 19 22:58:15 2024 GMT\n"
+        "            Not Before: Jul 23 11:46:39 2024 GMT\n"
+        "            Not After : Jul 21 11:46:39 2034 GMT\n"
         "        Subject: C=US, ST=California, L=San Francisco, O=Linden Lab, OU=Second Life Engineering, CN=Integration Test Server Cert/emailAddress=noreply@lindenlab.com\n"
         "        Subject Public Key Info:\n"
         "            Public Key Algorithm: rsaEncryption\n"
-        "                Public-Key: (2048 bit)\n"
+        "                Public-Key: (4096 bit)\n"
         "                Modulus:\n"
-        "                    00:bf:a1:1c:76:82:4a:10:1d:25:0e:02:e2:7a:64:\n"
-        "                    54:c7:94:c5:c0:98:d5:35:f3:cb:cb:30:ba:31:9c:\n"
-        "                    bd:4c:2f:4a:4e:24:03:4b:87:5c:c1:5c:fe:d9:89:\n"
-        "                    3b:cb:01:bc:eb:a5:b7:78:dc:b3:58:e5:78:a7:15:\n"
-        "                    34:50:30:aa:16:3a:b2:94:17:6d:1e:7f:b2:70:1e:\n"
-        "                    96:41:bb:1d:e3:22:80:fa:dc:00:6a:fb:34:3e:67:\n"
-        "                    e7:c2:21:2f:1b:d3:af:04:49:91:eb:bb:60:e0:26:\n"
-        "                    52:75:28:8a:08:5b:91:56:4e:51:50:40:51:70:af:\n"
-        "                    cb:80:66:c8:59:e9:e2:48:a8:62:d0:26:67:80:0a:\n"
-        "                    12:16:d1:f6:15:9e:1f:f5:92:37:f3:c9:2f:03:9e:\n"
-        "                    22:f6:60:5a:76:45:8c:01:2c:99:54:72:19:db:b7:\n"
-        "                    72:e6:5a:69:f3:e9:31:65:5d:0f:c7:5c:9c:17:29:\n"
-        "                    71:14:7f:db:47:c9:1e:65:a2:41:b0:2f:14:17:ec:\n"
-        "                    4b:25:f2:43:8f:b4:a3:8d:37:1a:07:34:b3:29:bb:\n"
-        "                    8a:44:8e:84:08:a2:1b:76:7a:cb:c2:39:2f:6e:e3:\n"
-        "                    fc:d6:91:b5:1f:ce:58:91:57:70:35:6e:25:a9:48:\n"
-        "                    0e:07:cf:4e:dd:16:42:65:cf:8a:42:b3:27:e6:fe:\n"
-        "                    6a:e3\n"
+        "                    00:d8:ac:0c:27:8f:ea:c0:4d:21:e4:75:55:31:57:\n"
+        "                    83:46:47:14:1e:f5:67:ae:98:60:c4:97:6d:e8:53:\n"
+        "                    f2:4d:3b:ec:6f:08:bc:1e:c0:e2:a6:75:b5:90:1d:\n"
+        "                    30:a2:59:68:32:10:2b:29:67:fc:99:f1:24:6a:36:\n"
+        "                    73:60:31:6b:c7:a0:b8:b0:38:60:b1:59:23:2c:ab:\n"
+        "                    25:a2:c8:b0:bc:2c:c6:d7:4c:87:37:1b:5e:51:a4:\n"
+        "                    63:3e:c4:6d:ed:da:5e:d3:ad:8a:6d:52:e4:87:38:\n"
+        "                    33:76:cf:f2:86:58:b3:10:a4:91:8d:3d:4f:27:9a:\n"
+        "                    8b:b4:d7:67:90:31:1c:f5:7f:78:af:6f:f2:dd:39:\n"
+        "                    d0:16:16:7b:46:ad:88:1b:3b:74:6b:10:29:8b:64:\n"
+        "                    ba:ed:9f:a7:69:99:55:8f:73:0d:18:a3:7f:40:20:\n"
+        "                    3a:41:4a:94:39:62:8b:fe:c6:9d:79:d0:cd:1c:e2:\n"
+        "                    d4:74:bb:43:75:eb:86:8b:30:c1:8d:cc:14:ab:75:\n"
+        "                    2e:f5:3e:0c:05:cb:e4:c3:92:d8:81:8c:df:a5:4e:\n"
+        "                    2e:0b:ae:17:15:9b:e6:dd:9e:16:46:42:27:92:8a:\n"
+        "                    0e:3a:74:1e:d1:3f:ee:7e:a5:d7:ec:1c:63:d4:96:\n"
+        "                    5b:36:f9:15:ee:da:66:ac:5e:de:91:d9:08:24:fb:\n"
+        "                    5d:fc:9b:77:dd:ff:20:a6:67:6f:48:41:5e:5a:ac:\n"
+        "                    13:a4:2c:2a:f2:a3:15:86:e2:84:33:34:e3:91:27:\n"
+        "                    8b:37:ba:b0:c7:5e:1a:0d:b9:f2:4e:0c:55:e6:bb:\n"
+        "                    d9:63:f5:05:7b:aa:19:e5:57:ce:a5:b1:46:4b:b3:\n"
+        "                    04:f6:a0:97:26:ed:48:ed:97:93:a6:75:b1:a3:42:\n"
+        "                    fc:cc:57:89:da:44:e9:16:a6:30:2c:01:8e:f2:ed:\n"
+        "                    be:45:05:08:8a:af:1e:07:51:89:cf:51:4c:aa:f3:\n"
+        "                    b3:f0:6f:db:21:80:11:32:0a:23:e2:ff:cc:59:15:\n"
+        "                    eb:ff:d2:b8:d6:a1:c1:b4:96:12:82:bf:3f:68:ad:\n"
+        "                    c8:61:50:f8:88:4f:d0:be:8e:29:64:1a:16:a5:d9:\n"
+        "                    29:76:16:cd:70:37:c4:f2:1f:4e:c6:57:36:dd:c1:\n"
+        "                    27:19:72:ef:98:7e:34:25:3f:76:b1:ea:15:b2:38:\n"
+        "                    6e:d3:43:03:7a:2b:78:91:9a:19:26:2a:31:b7:5e:\n"
+        "                    b7:22:c4:fd:bf:93:10:a4:23:3f:d7:79:53:28:5d:\n"
+        "                    2e:ba:0c:b0:5e:0a:b4:c4:a1:71:75:88:1b:b2:0e:\n"
+        "                    2c:67:08:7b:f0:f6:37:d3:aa:39:50:03:a3:7c:17:\n"
+        "                    1d:52:52:2a:6b:d0:a2:54:2e:ba:11:bc:26:a9:16:\n"
+        "                    a6:1b:79\n"
         "                Exponent: 65537 (0x10001)\n"
         "        X509v3 extensions:\n"
-        "            X509v3 Basic Constraints: \n"
+        "            X509v3 Basic Constraints:\n"
         "                CA:FALSE\n"
-        "            Netscape Cert Type: \n"
-        "                SSL Server\n"
-        "            Netscape Comment: \n"
-        "                OpenSSL Generated Server Certificate\n"
-        "            X509v3 Subject Key Identifier: \n"
-        "                BB:59:9F:DE:6B:51:A7:6C:B3:6D:5B:8B:42:F7:B1:65:77:17:A4:E4\n"
-        "            X509v3 Authority Key Identifier: \n"
-        "                keyid:83:21:DE:EC:C0:79:03:6D:1E:83:F3:E5:97:29:D5:5A:C0:96:40:FA\n"
-        "                DirName:/C=US/ST=California/L=San Francisco/O=Linden Lab/OU=Second Life Engineering/CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
-        "                serial:10:00\n"
-        "\n"
-        "            X509v3 Key Usage: critical\n"
+        "            X509v3 Key Usage:\n"
         "                Digital Signature, Key Encipherment\n"
-        "            X509v3 Extended Key Usage: \n"
+        "            X509v3 Extended Key Usage:\n"
         "                TLS Web Server Authentication\n"
+        "            X509v3 Subject Key Identifier:\n"
+        "                7B:1A:F9:2B:C4:B2:F6:AE:D6:F2:8E:B1:73:FB:DD:11:CA:DB:F8:87\n"
+        "            X509v3 Authority Key Identifier:\n"
+        "                keyid:56:98:DC:45:25:11:E2:8C:2B:EA:D6:C6:E2:C8:BE:2C:C8:69:FF:FF\n"
+        "                DirName:/C=US/ST=California/L=San Francisco/O=Linden Lab/OU=Second Life Engineering/CN=Integration Test Root CA/emailAddress=noreply@lindenlab.com\n"
+        "                serial:85:BB:4B:66:26:DB:9A:C6\n"
         "    Signature Algorithm: sha256WithRSAEncryption\n"
-        "         18:a6:58:55:9b:d4:af:7d:8a:27:d3:28:3a:4c:4b:42:4e:f0:\n"
-        "         30:d6:d9:95:11:48:12:0a:96:40:d9:2b:21:39:c5:d4:8d:e5:\n"
-        "         10:bc:68:78:69:0b:9f:15:4a:0b:f1:ab:99:45:0c:20:5f:27:\n"
-        "         df:e7:14:2d:4a:30:f2:c2:8d:37:73:36:1a:27:55:5a:08:5f:\n"
-        "         71:a1:5e:05:83:b2:59:fe:02:5e:d7:4a:30:15:23:58:04:cf:\n"
-        "         48:cc:b0:71:88:9c:6b:57:f0:04:0a:d3:a0:64:6b:ee:f3:5f:\n"
-        "         ea:ac:e1:2b:b9:7f:79:b8:db:ce:72:48:72:db:c8:5c:38:72:\n"
-        "         31:55:d0:ff:6b:bd:73:23:a7:30:18:5d:ed:47:18:0a:67:8e:\n"
-        "         53:32:0e:99:9b:96:72:45:7f:c6:00:2c:5d:1a:97:53:75:3a:\n"
-        "         0b:49:3d:3a:00:37:14:67:0c:28:97:34:87:aa:c5:32:e4:ae:\n"
-        "         34:83:12:4a:10:f7:0e:74:d4:5f:73:bd:ef:0c:b7:d8:0a:7d:\n"
-        "         8e:8d:5a:48:bd:f4:8e:7b:f9:4a:15:3b:61:c9:5e:40:59:6e:\n"
-        "         c7:a8:a4:02:28:72:c5:54:8c:77:f4:55:a7:86:c0:38:a0:68:\n"
-        "         19:da:0f:72:5a:a9:7e:69:9f:9c:3a:d6:66:aa:e1:f4:fd:f9:\n"
-        "         b8:4b:6c:71:9e:f0:38:02:c7:6a:9e:dc:e6:fb:ef:23:59:4f:\n"
-        "         5c:84:0a:df:ea:86:1f:fd:0e:5c:fa:c4:e5:50:1c:10:cf:89:\n"
-        "         4e:08:0e:4c:4b:61:1a:49:12:f7:e9:4b:17:71:43:7b:6d:b6:\n"
-        "         b5:9f:d4:3b:c7:88:53:48:63:b6:00:80:8f:49:0a:c5:7e:58:\n"
-        "         ac:78:d8:b9:06:b0:bc:86:e2:2e:48:5b:c3:24:fa:aa:72:d8:\n"
-        "         ec:f6:c7:91:9f:0f:c8:b5:fd:2b:b2:a7:bc:2f:40:20:2b:47:\n"
-        "         e0:d1:1d:94:52:6f:6b:be:12:b6:8c:dc:11:db:71:e6:19:ef:\n"
-        "         a8:71:8b:ad:d3:32:c0:1c:a4:3f:b3:0f:af:e5:50:e1:ff:41:\n"
-        "         a4:b7:6f:57:71:af:fd:16:4c:e8:24:b3:99:1b:cf:12:8f:43:\n"
-        "         05:80:ba:18:19:0a:a5:ec:49:81:41:4c:7e:28:b2:21:f2:59:\n"
-        "         6e:4a:ed:de:f9:fa:99:85:60:1f:e6:c2:42:5c:08:00:3c:84:\n"
-        "         06:a9:24:d4:cf:7b:6e:1b:59:1d:f4:70:16:03:a1:e0:0b:00:\n"
-        "         95:5c:39:03:fc:9d:1c:8e:f7:59:0c:61:47:f6:7f:07:22:48:\n"
-        "         83:40:ac:e1:98:5f:c7:be:05:d5:29:2b:bf:0d:03:0e:e9:5e:\n"
-        "         2b:dd:09:18:fe:5e:30:61\n"
+        "         ad:7c:50:12:24:62:62:83:e9:dd:81:1a:12:1c:6d:ae:1e:a6:\n"
+        "         01:cc:93:8b:ac:83:7c:3d:57:d7:7f:d2:13:40:82:c7:27:07:\n"
+        "         31:d8:c4:01:04:64:9c:dc:ae:7b:52:bd:f5:62:7a:d0:7c:13:\n"
+        "         1a:19:86:6a:ce:9a:ba:69:07:77:75:b6:67:56:d0:c3:8d:6f:\n"
+        "         59:5f:ac:31:83:32:2c:4f:8c:85:8c:f3:56:5b:e0:83:16:19:\n"
+        "         c9:55:4d:56:2c:e0:06:f8:71:85:4b:7e:c6:20:b3:f6:5b:85:\n"
+        "         6a:b7:0f:0e:0c:75:38:6a:aa:53:cc:b0:bf:c1:fd:a1:01:8a:\n"
+        "         7e:5a:0b:4d:51:fc:1b:14:b0:8d:62:17:b7:5d:6a:64:30:80:\n"
+        "         aa:50:9a:23:9e:19:46:11:9d:49:d1:35:81:87:80:8c:9c:71:\n"
+        "         61:26:07:23:5d:a7:ea:4e:0c:53:77:bd:eb:18:6d:63:8b:2c:\n"
+        "         e1:83:bb:bb:f8:3e:7c:e8:0d:19:1e:be:35:aa:99:0f:c7:25:\n"
+        "         0c:a8:f9:74:02:c8:4c:8e:bb:13:18:fd:aa:21:34:bc:2d:9f:\n"
+        "         10:96:e2:99:e3:9a:d7:91:0e:1e:77:20:70:e9:b4:63:25:f8:\n"
+        "         ea:14:1f:24:b0:6a:8b:2a:f4:61:b1:0d:7d:18:bc:1d:6d:04:\n"
+        "         11:b2:9f:a2:a7:55:be:2b:2c:2f:c1:d8:95:13:73:af:1c:96:\n"
+        "         49:30:9c:9c:94:81:6c:9b:a7:87:5c:cf:46:95:95:4a:6f:bf:\n"
+        "         df:c9:3d:74:3e:24:6e:44:1e:14:8b:68:23:e4:00:b5:a5:b7:\n"
+        "         5b:a9:ea:16:5f:fa:b1:d3:1a:b1:9b:36:ef:a4:7a:6f:a3:b0:\n"
+        "         97:35:ac:70:c0:cc:8e:a2:d3:40:0e:c1:70:0b:d5:ce:cd:51:\n"
+        "         82:8a:40:72:04:8d:62:af:ba:a8:e7:a8:e9:b9:99:b7:5c:5d:\n"
+        "         27:96:b2:3d:f9:0d:26:8c:3f:db:ac:86:97:be:f1:2c:0b:ca:\n"
+        "         90:07:93:96:f4:75:c3:e8:4c:f6:a8:a2:3f:da:11:21:e7:b1:\n"
+        "         8c:62:36:ae:91:a9:2a:73:ba:67:f5:24:16:c3:ee:b7:b1:b4:\n"
+        "         e3:8a:28:23:84:cf:38:c6:f0:8e:21:f6:b8:76:9a:6d:d1:e3:\n"
+        "         74:81:7a:22:20:a0:82:2a:31:8a:ba:44:0b:61:5a:aa:ba:c6:\n"
+        "         07:99:36:0a:24:06:2f:8e:c1:1c:4b:f0:65:72:fb:e9:b5:31:\n"
+        "         59:13:2c:c6:f8:5b:91:e2:d8:96:f3:1a:06:0b:2a:62:12:4d:\n"
+        "         5e:65:c9:e9:e4:00:99:a6:d3:60:1f:c3:d6:cc:a6:9b:a5:14:\n"
+        "         1b:4d:db:e7:3d:52:7e:2c\n"
         "-----BEGIN CERTIFICATE-----\n"
-        "MIIGbjCCBFagAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgaoxCzAJBgNVBAYTAlVT\n"
-        "MRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQKDApMaW5kZW4gTGFiMSAwHgYD\n"
-        "VQQLDBdTZWNvbmQgTGlmZSBFbmdpbmVlcmluZzEpMCcGA1UEAwwgSW50ZWdyYXRp\n"
-        "b24gVGVzdCBJbnRlcm1lZGlhdGUgQ0ExJDAiBgkqhkiG9w0BCQEWFW5vcmVwbHlA\n"
-        "bGluZGVubGFiLmNvbTAeFw0xODA1MjIyMjU4MTVaFw0yNDA3MTkyMjU4MTVaMIG+\n"
-        "MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2Fu\n"
-        "IEZyYW5jaXNjbzETMBEGA1UECgwKTGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25k\n"
-        "IExpZmUgRW5naW5lZXJpbmcxJTAjBgNVBAMMHEludGVncmF0aW9uIFRlc3QgU2Vy\n"
-        "dmVyIENlcnQxJDAiBgkqhkiG9w0BCQEWFW5vcmVwbHlAbGluZGVubGFiLmNvbTCC\n"
-        "ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL+hHHaCShAdJQ4C4npkVMeU\n"
-        "xcCY1TXzy8swujGcvUwvSk4kA0uHXMFc/tmJO8sBvOult3jcs1jleKcVNFAwqhY6\n"
-        "spQXbR5/snAelkG7HeMigPrcAGr7ND5n58IhLxvTrwRJkeu7YOAmUnUoighbkVZO\n"
-        "UVBAUXCvy4BmyFnp4kioYtAmZ4AKEhbR9hWeH/WSN/PJLwOeIvZgWnZFjAEsmVRy\n"
-        "Gdu3cuZaafPpMWVdD8dcnBcpcRR/20fJHmWiQbAvFBfsSyXyQ4+0o403Ggc0sym7\n"
-        "ikSOhAiiG3Z6y8I5L27j/NaRtR/OWJFXcDVuJalIDgfPTt0WQmXPikKzJ+b+auMC\n"
-        "AwEAAaOCAYYwggGCMAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgZAMDMGCWCG\n"
-        "SAGG+EIBDQQmFiRPcGVuU1NMIEdlbmVyYXRlZCBTZXJ2ZXIgQ2VydGlmaWNhdGUw\n"
-        "HQYDVR0OBBYEFLtZn95rUadss21bi0L3sWV3F6TkMIHoBgNVHSMEgeAwgd2AFIMh\n"
-        "3uzAeQNtHoPz5Zcp1VrAlkD6oYHApIG9MIG6MQswCQYDVQQGEwJVUzETMBEGA1UE\n"
-        "CAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzETMBEGA1UECgwK\n"
-        "TGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25kIExpZmUgRW5naW5lZXJpbmcxITAf\n"
-        "BgNVBAMMGEludGVncmF0aW9uIFRlc3QgUm9vdCBDQTEkMCIGCSqGSIb3DQEJARYV\n"
-        "bm9yZXBseUBsaW5kZW5sYWIuY29tggIQADAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0l\n"
-        "BAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBABimWFWb1K99iifTKDpM\n"
-        "S0JO8DDW2ZURSBIKlkDZKyE5xdSN5RC8aHhpC58VSgvxq5lFDCBfJ9/nFC1KMPLC\n"
-        "jTdzNhonVVoIX3GhXgWDsln+Al7XSjAVI1gEz0jMsHGInGtX8AQK06Bka+7zX+qs\n"
-        "4Su5f3m4285ySHLbyFw4cjFV0P9rvXMjpzAYXe1HGApnjlMyDpmblnJFf8YALF0a\n"
-        "l1N1OgtJPToANxRnDCiXNIeqxTLkrjSDEkoQ9w501F9zve8Mt9gKfY6NWki99I57\n"
-        "+UoVO2HJXkBZbseopAIocsVUjHf0VaeGwDigaBnaD3JaqX5pn5w61maq4fT9+bhL\n"
-        "bHGe8DgCx2qe3Ob77yNZT1yECt/qhh/9Dlz6xOVQHBDPiU4IDkxLYRpJEvfpSxdx\n"
-        "Q3tttrWf1DvHiFNIY7YAgI9JCsV+WKx42LkGsLyG4i5IW8Mk+qpy2Oz2x5GfD8i1\n"
-        "/Suyp7wvQCArR+DRHZRSb2u+EraM3BHbceYZ76hxi63TMsAcpD+zD6/lUOH/QaS3\n"
-        "b1dxr/0WTOgks5kbzxKPQwWAuhgZCqXsSYFBTH4osiHyWW5K7d75+pmFYB/mwkJc\n"
-        "CAA8hAapJNTPe24bWR30cBYDoeALAJVcOQP8nRyO91kMYUf2fwciSINArOGYX8e+\n"
-        "BdUpK78NAw7pXivdCRj+XjBh\n"
+        "MIIHSTCCBTGgAwIBAgIJAJ6NNBPnm/kxMA0GCSqGSIb3DQEBCwUAMIHCMQswCQYD\n"
+        "VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j\n"
+        "aXNjbzETMBEGA1UECgwKTGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25kIExpZmUg\n"
+        "RW5naW5lZXJpbmcxKTAnBgNVBAMMIEludGVncmF0aW9uIFRlc3QgSW50ZXJtZWRp\n"
+        "YXRlIENBMSQwIgYJKoZIhvcNAQkBFhVub3JlcGx5QGxpbmRlbmxhYi5jb20wHhcN\n"
+        "MjQwNzIzMTE0NjM5WhcNMzQwNzIxMTE0NjM5WjCBvjELMAkGA1UEBhMCVVMxEzAR\n"
+        "BgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNV\n"
+        "BAoMCkxpbmRlbiBMYWIxIDAeBgNVBAsMF1NlY29uZCBMaWZlIEVuZ2luZWVyaW5n\n"
+        "MSUwIwYDVQQDDBxJbnRlZ3JhdGlvbiBUZXN0IFNlcnZlciBDZXJ0MSQwIgYJKoZI\n"
+        "hvcNAQkBFhVub3JlcGx5QGxpbmRlbmxhYi5jb20wggIiMA0GCSqGSIb3DQEBAQUA\n"
+        "A4ICDwAwggIKAoICAQDYrAwnj+rATSHkdVUxV4NGRxQe9WeumGDEl23oU/JNO+xv\n"
+        "CLwewOKmdbWQHTCiWWgyECspZ/yZ8SRqNnNgMWvHoLiwOGCxWSMsqyWiyLC8LMbX\n"
+        "TIc3G15RpGM+xG3t2l7TrYptUuSHODN2z/KGWLMQpJGNPU8nmou012eQMRz1f3iv\n"
+        "b/LdOdAWFntGrYgbO3RrECmLZLrtn6dpmVWPcw0Yo39AIDpBSpQ5Yov+xp150M0c\n"
+        "4tR0u0N164aLMMGNzBSrdS71PgwFy+TDktiBjN+lTi4LrhcVm+bdnhZGQieSig46\n"
+        "dB7RP+5+pdfsHGPUlls2+RXu2masXt6R2Qgk+138m3fd/yCmZ29IQV5arBOkLCry\n"
+        "oxWG4oQzNOORJ4s3urDHXhoNufJODFXmu9lj9QV7qhnlV86lsUZLswT2oJcm7Ujt\n"
+        "l5OmdbGjQvzMV4naROkWpjAsAY7y7b5FBQiKrx4HUYnPUUyq87Pwb9shgBEyCiPi\n"
+        "/8xZFev/0rjWocG0lhKCvz9orchhUPiIT9C+jilkGhal2Sl2Fs1wN8TyH07GVzbd\n"
+        "wScZcu+YfjQlP3ax6hWyOG7TQwN6K3iRmhkmKjG3XrcixP2/kxCkIz/XeVMoXS66\n"
+        "DLBeCrTEoXF1iBuyDixnCHvw9jfTqjlQA6N8Fx1SUipr0KJULroRvCapFqYbeQID\n"
+        "AQABo4IBQjCCAT4wCQYDVR0TBAIwADALBgNVHQ8EBAMCBaAwEwYDVR0lBAwwCgYI\n"
+        "KwYBBQUHAwEwHQYDVR0OBBYEFHsa+SvEsvau1vKOsXP73RHK2/iHMIHvBgNVHSME\n"
+        "gecwgeSAFFaY3EUlEeKMK+rWxuLIvizIaf//oYHApIG9MIG6MQswCQYDVQQGEwJV\n"
+        "UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzET\n"
+        "MBEGA1UECgwKTGluZGVuIExhYjEgMB4GA1UECwwXU2Vjb25kIExpZmUgRW5naW5l\n"
+        "ZXJpbmcxITAfBgNVBAMMGEludGVncmF0aW9uIFRlc3QgUm9vdCBDQTEkMCIGCSqG\n"
+        "SIb3DQEJARYVbm9yZXBseUBsaW5kZW5sYWIuY29tggkAhbtLZibbmsYwDQYJKoZI\n"
+        "hvcNAQELBQADggIBAK18UBIkYmKD6d2BGhIcba4epgHMk4usg3w9V9d/0hNAgscn\n"
+        "BzHYxAEEZJzcrntSvfVietB8ExoZhmrOmrppB3d1tmdW0MONb1lfrDGDMixPjIWM\n"
+        "81Zb4IMWGclVTVYs4Ab4cYVLfsYgs/ZbhWq3Dw4MdThqqlPMsL/B/aEBin5aC01R\n"
+        "/BsUsI1iF7ddamQwgKpQmiOeGUYRnUnRNYGHgIyccWEmByNdp+pODFN3vesYbWOL\n"
+        "LOGDu7v4PnzoDRkevjWqmQ/HJQyo+XQCyEyOuxMY/aohNLwtnxCW4pnjmteRDh53\n"
+        "IHDptGMl+OoUHySwaosq9GGxDX0YvB1tBBGyn6KnVb4rLC/B2JUTc68clkkwnJyU\n"
+        "gWybp4dcz0aVlUpvv9/JPXQ+JG5EHhSLaCPkALWlt1up6hZf+rHTGrGbNu+kem+j\n"
+        "sJc1rHDAzI6i00AOwXAL1c7NUYKKQHIEjWKvuqjnqOm5mbdcXSeWsj35DSaMP9us\n"
+        "hpe+8SwLypAHk5b0dcPoTPaooj/aESHnsYxiNq6RqSpzumf1JBbD7rextOOKKCOE\n"
+        "zzjG8I4h9rh2mm3R43SBeiIgoIIqMYq6RAthWqq6xgeZNgokBi+OwRxL8GVy++m1\n"
+        "MVkTLMb4W5Hi2JbzGgYLKmISTV5lyenkAJmm02Afw9bMppulFBtN2+c9Un4s\n"
         "-----END CERTIFICATE-----\n"
-                                    );
+    );
+
 
     // Test wrapper declaration : wrapping nothing for the moment
     struct sechandler_basic_test
@@ -701,14 +722,13 @@ namespace tut
         //std::ostringstream llsd_value;
         //llsd_value << LLSDOStreamer<LLSDNotationFormatter>(llsd_cert) << std::endl;
         LL_DEBUGS() << "test 1 cert " << llsd_cert << LL_ENDL;
-
         ensure_equals("Issuer Name/commonName", (std::string)llsd_cert["issuer_name"]["commonName"], "Integration Test Intermediate CA");
         ensure_equals("Issuer Name/countryName", (std::string)llsd_cert["issuer_name"]["countryName"], "US");
         ensure_equals("Issuer Name/state", (std::string)llsd_cert["issuer_name"]["stateOrProvinceName"], "California");
         ensure_equals("Issuer Name/org name", (std::string)llsd_cert["issuer_name"]["organizationName"], "Linden Lab");
         ensure_equals("Issuer Name/org unit", (std::string)llsd_cert["issuer_name"]["organizationalUnitName"], "Second Life Engineering");
         ensure_equals("Issuer name string", (std::string)llsd_cert["issuer_name_string"],
-                      "emailAddress=noreply@lindenlab.com,CN=Integration Test Intermediate CA,OU=Second Life Engineering,O=Linden Lab,ST=California,C=US");
+                      "emailAddress=noreply@lindenlab.com,CN=Integration Test Intermediate CA,OU=Second Life Engineering,O=Linden Lab,L=San Francisco,ST=California,C=US");
         ensure_equals("subject Name/commonName", (std::string)llsd_cert["subject_name"]["commonName"],
                       "Integration Test Server Cert");
         ensure_equals("subject Name/countryName", (std::string)llsd_cert["subject_name"]["countryName"], "US");
@@ -721,9 +741,9 @@ namespace tut
         ensure_equals("subject name string",
                (std::string)llsd_cert["subject_name_string"],
                       "emailAddress=noreply@lindenlab.com,CN=Integration Test Server Cert,OU=Second Life Engineering,O=Linden Lab,L=San Francisco,ST=California,C=US");
-        ensure_equals("serial number", (std::string)llsd_cert["serial_number"], "1000");
-        ensure_equals("valid from", (std::string)llsd_cert["valid_from"], "2018-05-22T22:58:15Z");
-        ensure_equals("valid to", (std::string)llsd_cert["valid_to"], "2024-07-19T22:58:15Z");
+        ensure_equals("serial number", (std::string)llsd_cert["serial_number"], "9E8D3413E79BF931");
+        ensure_equals("valid from", (std::string)llsd_cert["valid_from"], "2024-07-23T11:46:39Z");
+        ensure_equals("valid to", (std::string)llsd_cert["valid_to"], "2034-07-21T11:46:39Z");
         LLSD expectedKeyUsage = LLSD::emptyArray();
         expectedKeyUsage.append(LLSD((std::string)"digitalSignature"));
         expectedKeyUsage.append(LLSD((std::string)"keyEncipherment"));
@@ -1042,7 +1062,7 @@ namespace tut
 
         //validate find
         LLSD find_info = LLSD::emptyMap();
-        find_info["subjectKeyIdentifier"] = "bb:59:9f:de:6b:51:a7:6c:b3:6d:5b:8b:42:f7:b1:65:77:17:a4:e4";
+        find_info["subjectKeyIdentifier"] = "7b:1a:f9:2b:c4:b2:f6:ae:d6:f2:8e:b1:73:fb:dd:11:ca:db:f8:87";
         LLBasicCertificateVector::iterator found_cert = test_vector->find(find_info);
         ensure("found some cert", found_cert != test_vector->end());
         X509* found_x509 = (*found_cert).get()->getOpenSSLX509();
@@ -1225,7 +1245,7 @@ namespace tut
         X509_STORE_CTX_set0_untrusted(test_store, NULL);
         test_chain = new LLBasicCertificateChain(test_store);
         X509_STORE_CTX_free(test_store);
-        ensure_equals("two elements in store", test_chain->size(), 1);
+        ensure_equals("two elements in store [1]", test_chain->size(), 1);
         X509* test_cert = (*test_chain)[0]->getOpenSSLX509();
         ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert));
         X509_free(test_cert);
@@ -1238,7 +1258,7 @@ namespace tut
         sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509IntermediateCert);
         test_chain = new LLBasicCertificateChain(test_store);
         X509_STORE_CTX_free(test_store);
-        ensure_equals("two elements in store", test_chain->size(), 2);
+        ensure_equals("two elements in store [2]", test_chain->size(), 2);
         test_cert = (*test_chain)[0]->getOpenSSLX509();
         ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert));
         X509_free(test_cert);
@@ -1254,7 +1274,7 @@ namespace tut
         sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509TestCert);
         test_chain = new LLBasicCertificateChain(test_store);
         X509_STORE_CTX_free(test_store);
-        ensure_equals("two elements in store", test_chain->size(), 1);
+        ensure_equals("two elements in store [3]", test_chain->size(), 1);
         test_cert = (*test_chain)[0]->getOpenSSLX509();
         ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert));
         X509_free(test_cert);
@@ -1267,7 +1287,7 @@ namespace tut
         sk_X509_push(X509_STORE_CTX_get0_untrusted(test_store), mX509TestCert);
         test_chain = new LLBasicCertificateChain(test_store);
         X509_STORE_CTX_free(test_store);
-        ensure_equals("two elements in store", test_chain->size(), 2);
+        ensure_equals("two elements in store [4]", test_chain->size(), 2);
         test_cert = (*test_chain)[0]->getOpenSSLX509();
         ensure("validate first element in store is expected cert", !X509_cmp(test_cert, mX509ChildCert));
         X509_free(test_cert);
-- 
cgit v1.2.3


From aaa5caeca89cb08f785fec1785d8edeca6eda0ae Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 23 Jul 2024 10:45:57 +0200
Subject: #1318 Pagination in the Group Interface

---
 indra/llui/llscrolllistctrl.cpp      |  41 +++---
 indra/newview/llgroupmgr.cpp         | 248 +++++++++++++++++----------------
 indra/newview/llgroupmgr.h           |  16 +--
 indra/newview/llpanelgroupbulk.cpp   | 213 ++++++++++++++--------------
 indra/newview/llpanelgroupbulkimpl.h |   5 +-
 indra/newview/llpanelgrouproles.cpp  | 259 ++++++++++++++---------------------
 6 files changed, 367 insertions(+), 415 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 1d9564d107..8512555b49 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1479,10 +1479,9 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
     item = getFirstSelected();
     if (item)
     {
-        auto col = item->getColumn(column);
-        if(col)
+        if (LLScrollListCell* cell = item->getColumn(column))
         {
-            return col->getValue().asString();
+            return cell->getValue().asString();
         }
     }
 
@@ -2720,7 +2719,8 @@ struct SameSortColumn
 bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending)
 {
     LLScrollListColumn* sort_column = getColumn(column_idx);
-    if (!sort_column) return false;
+    if (!sort_column)
+        return false;
 
     sort_column->mSortDirection = ascending ? LLScrollListColumn::ASCENDING : LLScrollListColumn::DESCENDING;
 
@@ -2733,32 +2733,28 @@ bool LLScrollListCtrl::setSort(S32 column_idx, bool ascending)
         mSortColumns.push_back(new_sort_column);
         return true;
     }
-    else
-    {
-        // grab current sort column
-        sort_column_t cur_sort_column = mSortColumns.back();
 
-        // remove any existing sort criterion referencing this column
-        // and add the new one
-        mSortColumns.erase(remove_if(mSortColumns.begin(), mSortColumns.end(), SameSortColumn(column_idx)), mSortColumns.end());
-        mSortColumns.push_back(new_sort_column);
+    // grab current sort column
+    sort_column_t cur_sort_column = mSortColumns.back();
 
-        // did the sort criteria change?
-        return (cur_sort_column != new_sort_column);
-    }
+    // remove any existing sort criterion referencing this column
+    // and add the new one
+    mSortColumns.erase(remove_if(mSortColumns.begin(), mSortColumns.end(), SameSortColumn(column_idx)), mSortColumns.end());
+    mSortColumns.push_back(new_sort_column);
+
+    // did the sort criteria change?
+    return cur_sort_column != new_sort_column;
 }
 
 S32 LLScrollListCtrl::getLinesPerPage()
 {
-    //if mPageLines is NOT provided display all item
     if (mPageLines)
     {
         return mPageLines;
     }
-    else
-    {
-        return mLineHeight ? mItemListRect.getHeight() / mLineHeight : getItemCount();
-    }
+
+    // If mPageLines is NOT provided then display all items
+    return mLineHeight ? mItemListRect.getHeight() / mLineHeight : getItemCount();
 }
 
 
@@ -2774,7 +2770,7 @@ void LLScrollListCtrl::sortByColumn(const std::string& name, bool ascending)
     column_map_t::iterator itor = mColumns.find(name);
     if (itor != mColumns.end())
     {
-        sortByColumnIndex((*itor).second->mIndex, ascending);
+        sortByColumnIndex(itor->second->mIndex, ascending);
     }
 }
 
@@ -3093,8 +3089,7 @@ std::string LLScrollListCtrl::getSortColumnName()
 {
     LLScrollListColumn* column = mSortColumns.empty() ? NULL : mColumnsIndexed[mSortColumns.back().first];
 
-    if (column) return column->mName;
-    else return "";
+    return column ? column->mName : LLStringUtil::null;
 }
 
 bool LLScrollListCtrl::hasSortOrder() const
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 1057bc25e0..090ed7b0e2 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -806,7 +806,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid)
 
     mPendingBanRequest = false;
 
-    LLGroupMemberData* member_data = (*mi).second;
+    LLGroupMemberData* member_data = mi->second;
     if (member_data && member_data->isInRole(mOwnerRole))
     {
         return; // can't ban group owner
@@ -832,8 +832,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid)
 // LLGroupMgr
 //
 
-LLGroupMgr::LLGroupMgr():
-    mMemberRequestInFlight(false)
+LLGroupMgr::LLGroupMgr()
 {
 }
 
@@ -968,11 +967,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
     LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
     if (!group_datap || (group_datap->mMemberRequestID != request_id))
     {
-        LL_WARNS() << "processGroupMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL;
+        LL_WARNS() << "Received incorrect (stale?) group or request id" << LL_ENDL;
         return;
     }
 
-    msg->getS32(_PREHASH_GroupData, "MemberCount", group_datap->mMemberCount );
+    msg->getS32Fast(_PREHASH_GroupData, _PREHASH_MemberCount, group_datap->mMemberCount);
 
     if (group_datap->mMemberCount > 0)
     {
@@ -987,12 +986,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
         {
             LLUUID member_id;
 
-            msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_AgentID, member_id, i );
-            msg->getS32(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
-            msg->getU64(_PREHASH_MemberData, "AgentPowers", agent_powers, i);
+            msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_AgentID, member_id, i);
+            msg->getS32Fast(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
+            msg->getU64Fast(_PREHASH_MemberData, _PREHASH_AgentPowers, agent_powers, i);
             msg->getStringFast(_PREHASH_MemberData, _PREHASH_OnlineStatus, online_status, i);
-            msg->getString(_PREHASH_MemberData, "Title", title, i);
-            msg->getBOOL(_PREHASH_MemberData,"IsOwner",is_owner,i);
+            msg->getStringFast(_PREHASH_MemberData, _PREHASH_Title, title, i);
+            msg->getBOOLFast(_PREHASH_MemberData, _PREHASH_IsOwner, is_owner, i);
 
             if (member_id.notNull())
             {
@@ -1037,7 +1036,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
 
     group_datap->mMemberVersion.generate();
 
-    if (group_datap->mMembers.size() ==  (U32)group_datap->mMemberCount)
+    if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount)
     {
         group_datap->mMemberDataComplete = true;
         group_datap->mMemberRequestID.setNull();
@@ -1678,13 +1677,12 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id)
     if (group_datap->mRoleMembersRequestID.isNull())
     {
         // Don't send the request if we don't have all the member or role data
-        if (!group_datap->isMemberDataComplete()
-            || !group_datap->isRoleDataComplete())
+        if (!group_datap->isMemberDataComplete() || !group_datap->isRoleDataComplete())
         {
             // *TODO: KLW FIXME: Should we start a member or role data request?
             LL_INFOS("GrpMgr") << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N")
-                << " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
-                << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
+                << ", MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N")
+                << ", RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL;
             group_datap->mPendingRoleMemberRequest = true;
             return;
         }
@@ -1984,14 +1982,14 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
     group_datap->mMemberVersion.generate();
 }
 
-void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID groupId)
+void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id)
 {
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
         httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
     LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
 
-    std::string finalUrl = url + "?group_id=" + groupId.asString();
+    std::string finalUrl = url + "?group_id=" + group_id.asString();
 
     LLSD result = httpAdapter->getAndSuspend(httpRequest, finalUrl);
 
@@ -2012,8 +2010,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID groupId)
     }
 }
 
-void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
-    U32 action, uuid_vec_t banList, bool update)
+void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id,
+    U32 action, uuid_vec_t ban_list, bool update)
 {
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -2026,20 +2024,16 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
 
     httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
 
-
-    std::string finalUrl = url + "?group_id=" + groupId.asString();
+    std::string finalUrl = url + "?group_id=" + group_id.asString();
 
     LLSD postData = LLSD::emptyMap();
     postData["ban_action"] = (LLSD::Integer)action;
     // Add our list of potential banned residents to the list
     postData["ban_ids"] = LLSD::emptyArray();
-    LLSD banEntry;
 
-    uuid_vec_t::const_iterator it = banList.begin();
-    for (; it != banList.end(); ++it)
+    for (const LLUUID& ban_id : ban_list)
     {
-        banEntry = (*it);
-        postData["ban_ids"].append(banEntry);
+        postData["ban_ids"].append(ban_id);
     }
 
     LL_WARNS() << "post: " << ll_pretty_print_sd(postData) << LL_ENDL;
@@ -2064,7 +2058,7 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID groupId,
 
     if (update)
     {
-        getGroupBanRequestCoro(url, groupId);
+        getGroupBanRequestCoro(url, group_id);
     }
 }
 
@@ -2151,55 +2145,66 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content)
     LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST);
 }
 
-void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID groupId)
+void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column)
 {
+    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
         httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
     LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
-    LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
-
-    mMemberRequestInFlight = true;
+    LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
 
     LLSD postData = LLSD::emptyMap();
-    postData["group_id"] = groupId;
+    postData["group_id"] = group_id;
+    if (page_size)
+    {
+        postData["page_size"] = LLSD::Integer(page_size);
+        if (page_start)
+        {
+            postData["page_start"] = LLSD::Integer(page_start);
+        }
+        if (!sort_column.empty())
+        {
+            postData["sort_column"] = sort_column;
+        }
+    }
 
-    LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData, httpOpts);
+    LLSD response = httpAdapter->postAndSuspend(httpRequest, url, postData, httpOpts);
 
-    LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+    mMemberRequestInFlight = false;
+
+    LLSD httpResults = response.get(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
 
     if (!status)
     {
         LL_WARNS("GrpMgr") << "Error receiving group member data " << LL_ENDL;
-        mMemberRequestInFlight = false;
         return;
     }
 
-    result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
-    LLGroupMgr::processCapGroupMembersRequest(result);
-    mMemberRequestInFlight = false;
+    response.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
+    processCapGroupMembersResponse(response, page_size, page_start, sort_column);
 }
 
-void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
+void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_size, U32 page_start, const std::string& sort_column)
 {
     static U32 lastGroupMemberRequestFrame = 0;
 
     // Have we requested the information already this frame?
     // Todo: make this per group, we can invite to one group and simultaneously be checking another one
-    if ((lastGroupMemberRequestFrame == gFrameCount) || (mMemberRequestInFlight))
+    if ((lastGroupMemberRequestFrame == gFrameCount) || mMemberRequestInFlight)
         return;
 
     LLViewerRegion* currentRegion = gAgent.getRegion();
     // Thank you FS:Ansariel!
-    if(!currentRegion)
+    if (!currentRegion)
     {
         LL_WARNS("GrpMgr") << "Agent does not have a current region. Uh-oh!" << LL_ENDL;
         return;
     }
 
     // Check to make sure we have our capabilities
-    if(!currentRegion->capabilitiesReceived())
+    if (!currentRegion->capabilitiesReceived())
     {
         LL_WARNS("GrpMgr") << " Capabilities not received!" << LL_ENDL;
         return;
@@ -2209,9 +2214,9 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
     std::string cap_url =  currentRegion->getCapability("GroupMemberData");
 
     // Thank you FS:Ansariel!
-    if(cap_url.empty())
+    if (cap_url.empty())
     {
-        LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability.  Falling back to UDP fetch." << LL_ENDL;
+        LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability. Falling back to UDP fetch." << LL_ENDL;
         sendGroupMembersRequest(group_id);
         return;
     }
@@ -2221,120 +2226,121 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
 
     lastGroupMemberRequestFrame = gFrameCount;
 
-    LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro",
-        boost::bind(&LLGroupMgr::groupMembersRequestCoro, this, cap_url, group_id));
-}
+    mMemberRequestInFlight = true;
 
+    LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro", [&]()
+        {
+            groupMembersRequestCoro(cap_url, group_id, page_size, page_start, sort_column);
+        });
+}
 
-void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
+void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column)
 {
+    LLUUID group_id = response["group_id"].asUUID();
+    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
+
     // Did we get anything in content?
-    if(!content.size())
+    if (!response.size())
     {
-        LL_DEBUGS("GrpMgr") << "No group member data received." << LL_ENDL;
+        LL_INFOS("GrpMgr") << "No group member data received." << LL_ENDL;
         return;
     }
 
-    LLUUID group_id = content["group_id"].asUUID();
-
     LLGroupMgrGroupData* group_datap = getGroupData(group_id);
-    if(!group_datap)
+    if (!group_datap)
     {
         LL_WARNS("GrpMgr") << "Received incorrect, possibly stale, group or request id" << LL_ENDL;
         return;
     }
 
-    // If we have no members, there's no reason to do anything else
-    S32 num_members = content["member_count"];
-    if (num_members < 1)
-    {
-        LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL;
-        // Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237
-        group_datap->mMemberDataComplete = true;
-        group_datap->mChanged = true;
-        LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
-        return;
-    }
-
-    group_datap->mMemberCount = num_members;
+    LLSD members = response["members"];
+    LLSD titles = response["titles"];
+    LLSD defaults = response["defaults"];
 
-    LLSD    member_list = content["members"];
-    LLSD    titles      = content["titles"];
-    LLSD    defaults    = content["defaults"];
-
-    std::string online_status;
-    std::string title;
-    S32         contribution;
-    U64         member_powers;
-    // If this is changed to a bool, make sure to change the LLGroupMemberData constructor
-    bool        is_owner;
+    size_t members_before = group_datap->mMembers.size();
+    size_t members_loaded = members.size();
 
     // Compute this once, rather than every time.
-    U64 default_powers  = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
+    std::string default_title = titles.size() ? titles[0].asString() : LLStringUtil::null;
+    U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
 
-    LLSD::map_const_iterator member_iter_start  = member_list.beginMap();
-    LLSD::map_const_iterator member_iter_end    = member_list.endMap();
-    for( ; member_iter_start != member_iter_end; ++member_iter_start)
+    auto members_end = members.endMap();
+    for (auto it = members.beginMap(); it != members_end; ++it)
     {
         // Reset defaults
-        online_status   = "unknown";
-        title           = titles[0].asString();
-        contribution    = 0;
-        member_powers   = default_powers;
-        is_owner        = false;
+        std::string online_status = "unknown";
+        std::string title = default_title;
+        U64 member_powers = default_powers;
+        S32 donated_square_meters = 0;
+        bool is_owner = false;
 
-        const LLUUID member_id(member_iter_start->first);
-        LLSD member_info = member_iter_start->second;
+        const LLUUID member_id(it->first);
+        LLSD member_info = it->second;
 
-        if(member_info.has("last_login"))
+        if (member_info.has("last_login"))
         {
             online_status = member_info["last_login"].asString();
-            if(online_status == "Online")
+            if (online_status == "Online")
+            {
                 online_status = LLTrans::getString("group_member_status_online");
+            }
             else
+            {
                 formatDateString(online_status);
+            }
         }
 
-        if(member_info.has("title"))
+        if (member_info.has("title"))
+        {
             title = titles[member_info["title"].asInteger()].asString();
+        }
 
-        if(member_info.has("powers"))
+        if (member_info.has("powers"))
+        {
             member_powers = llstrtou64(member_info["powers"].asString().c_str(), NULL, 16);
+        }
 
-        if(member_info.has("donated_square_meters"))
-            contribution = member_info["donated_square_meters"];
+        if (member_info.has("donated_square_meters"))
+        {
+            donated_square_meters = member_info["donated_square_meters"];
+        }
 
-        if(member_info.has("owner"))
+        if (member_info.has("owner"))
+        {
             is_owner = true;
+        }
 
         LLGroupMemberData* data = new LLGroupMemberData(member_id,
-            contribution,
-            member_powers,
-            title,
-            online_status,
-            is_owner);
-
-        LLGroupMemberData* member_old = group_datap->mMembers[member_id];
-        if (member_old && group_datap->mRoleMemberDataComplete)
-        {
-            LLGroupMemberData::role_list_t::iterator rit = member_old->roleBegin();
-            LLGroupMemberData::role_list_t::iterator end = member_old->roleEnd();
+            donated_square_meters, member_powers, title, online_status, is_owner);
 
-            for ( ; rit != end; ++rit)
+        if (group_datap->mRoleMemberDataComplete)
+        {
+            if (LLGroupMemberData* member_old = group_datap->mMembers[member_id])
             {
-                data->addRole((*rit).first,(*rit).second);
+                auto role_end = member_old->roleEnd();
+                for (auto role_it = member_old->roleBegin(); role_it != role_end; ++role_it)
+                {
+                    data->addRole(role_it->first, role_it->second);
+                }
+            }
+            else
+            {
+                group_datap->mRoleMemberDataComplete = false;
             }
-        }
-        else
-        {
-            group_datap->mRoleMemberDataComplete = false;
         }
 
         group_datap->mMembers[member_id] = data;
     }
 
+    group_datap->mMemberCount = (S32)group_datap->mMembers.size();
+    group_datap->mMemberDataComplete = true;
+    group_datap->mMemberRequestID.setNull();
     group_datap->mMemberVersion.generate();
 
+    LL_INFOS("GrpMgr") << "members before: " << members_before
+        << ", members loaded: " << members_loaded
+        << ", members now: " << group_datap->mMemberCount << LL_ENDL;
+
     // Technically, we have this data, but to prevent completely overhauling
     // this entire system (it would be nice, but I don't have the time),
     // I'm going to be dumb and just call services I most likely don't need
@@ -2342,12 +2348,16 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
     //
     // TODO:
     // Refactor to reduce multiple calls for data we already have.
-    if(group_datap->mTitles.size() < 1)
+    if (group_datap->mTitles.size() < 1)
+    {
         sendGroupTitlesRequest(group_id);
+    }
 
+    if (page_size && members_loaded >= page_size)
+    {
+        sendCapGroupMembersRequest(group_id, page_size, (U32)group_datap->mMemberCount, sort_column);
+    }
 
-    group_datap->mMemberDataComplete = true;
-    group_datap->mMemberRequestID.setNull();
     // Make the role-member data request
     if (group_datap->mPendingRoleMemberRequest || !group_datap->mRoleMemberDataComplete)
     {
@@ -2357,10 +2367,8 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
 
     group_datap->mChanged = true;
     notifyObservers(GC_MEMBER_DATA);
-
 }
 
-
 void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
 {
     LL_DEBUGS("GrpMgr") << "LLGroupMgr::sendGroupRoleChanges" << LL_ENDL;
@@ -2379,9 +2387,11 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
 void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id)
 {
     LL_DEBUGS("GrpMgr") << "LLGroupMgr::cancelGroupRoleChanges" << LL_ENDL;
-    LLGroupMgrGroupData* group_datap = getGroupData(group_id);
 
-    if (group_datap) group_datap->cancelRoleChanges();
+    if (LLGroupMgrGroupData* group_datap = getGroupData(group_id))
+    {
+        group_datap->cancelRoleChanges();
+    }
 }
 
 //static
@@ -2503,5 +2513,3 @@ void LLGroupMgr::debugClearAllGroups(void*)
     LLGroupMgr::getInstance()->clearGroups();
     LLGroupMgr::parseRoleActions("role_actions.xml");
 }
-
-
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index 18efae7654..f96c5ccc14 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -403,7 +403,7 @@ public:
                                        bool mature_publish);
 
     static void sendGroupMemberJoin(const LLUUID& group_id);
-    static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs);
+    static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID, LLUUID>& role_member_pairs);
     static void sendGroupMemberEjects(const LLUUID& group_id,
                                       uuid_vec_t& member_ids);
 
@@ -413,7 +413,8 @@ public:
                                     const uuid_vec_t &ban_list = uuid_vec_t());
 
 
-    void sendCapGroupMembersRequest(const LLUUID& group_id);
+    void sendCapGroupMembersRequest(const LLUUID& group_id,
+        U32 page_size = 0, U32 page_start = 0, const std::string& sort_column = LLStringUtil::null);
 
     void cancelGroupRoleChanges(const LLUUID& group_id);
 
@@ -436,16 +437,15 @@ public:
     void clearGroupData(const LLUUID& group_id);
 
 private:
-    void groupMembersRequestCoro(std::string url, LLUUID groupId);
-    void processCapGroupMembersRequest(const LLSD& content);
+    void groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column);
+    void processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column);
 
-    void getGroupBanRequestCoro(std::string url, LLUUID groupId);
-    void postGroupBanRequestCoro(std::string url, LLUUID groupId, U32 action, uuid_vec_t banList, bool update);
+    void getGroupBanRequestCoro(std::string url, LLUUID group_id);
+    void postGroupBanRequestCoro(std::string url, LLUUID group_id, U32 action, uuid_vec_t ban_list, bool update);
 
     static void processGroupBanRequest(const LLSD& content);
 
     void notifyObservers(LLGroupChange gc);
-    void notifyObserver(const LLUUID& group_id, LLGroupChange gc);
     void addGroup(LLGroupMgrGroupData* group_datap);
     LLGroupMgrGroupData* createGroupData(const LLUUID &id);
     bool hasPendingPropertyRequest(const LLUUID& id);
@@ -465,7 +465,7 @@ private:
     typedef std::map<LLUUID,observer_set_t> observer_map_t;
     observer_map_t mParticularObservers;
 
-    bool mMemberRequestInFlight;
+    bool mMemberRequestInFlight { false };
 };
 
 
diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp
index f54ec45a3c..433db74cda 100644
--- a/indra/newview/llpanelgroupbulk.cpp
+++ b/indra/newview/llpanelgroupbulk.cpp
@@ -68,33 +68,36 @@ LLPanelGroupBulkImpl::LLPanelGroupBulkImpl(const LLUUID& group_id) :
     mAlreadyInGroup(),
     mConfirmedOwnerInvite(false),
     mListFullNotificationSent(false)
-{}
+{
+}
 
 LLPanelGroupBulkImpl::~LLPanelGroupBulkImpl()
 {
-    if(mAvatarNameCacheConnection.connected())
+    if (mAvatarNameCacheConnection.connected())
     {
         mAvatarNameCacheConnection.disconnect();
     }
 }
 
+// static
 void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata)
 {
-    LLPanelGroupBulk* panelp = (LLPanelGroupBulk*)userdata;
-
-    if(panelp)
+    if (LLPanelGroupBulk* panelp = (LLPanelGroupBulk*)userdata)
     {
-        //Right now this is hard coded with some knowledge that it is part
-        //of a floater since the avatar picker needs to be added as a dependent
-        //floater to the parent floater.
-        //Soon the avatar picker will be embedded into this panel
-        //instead of being it's own separate floater.  But that is next week.
-        //This will do for now. -jwolk May 10, 2006
+        // Right now this is hard coded with some knowledge that it is part
+        // of a floater since the avatar picker needs to be added as a dependent
+        // floater to the parent floater.
+        // Soon the avatar picker will be embedded into this panel
+        // instead of being it's own separate floater.  But that is next week.
+        // This will do for now. -jwolk May 10, 2006
         LLView* button = panelp->findChild<LLButton>("add_button");
         LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
         LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
-            boost::bind(callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button);
-        if(picker)
+            [&](const uuid_vec_t& agent_ids, const std::vector<LLAvatarName>&)
+            {
+                panelp->mImplementation->addUsers(agent_ids);
+            }, true, false, false, root_floater->getName(), button);
+        if (picker)
         {
             root_floater->addDependentFloater(picker);
             LLGroupMgr::getInstance()->sendCapGroupMembersRequest(panelp->mImplementation->mGroupID);
@@ -102,70 +105,72 @@ void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata)
     }
 }
 
+// static
 void LLPanelGroupBulkImpl::callbackClickRemove(void* userdata)
 {
-    LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
-    if (selfp)
+    if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
+    {
         selfp->handleRemove();
+    }
 }
 
+// static
 void LLPanelGroupBulkImpl::callbackClickCancel(void* userdata)
 {
-    LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
-    if(selfp)
+    if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
+    {
         (*(selfp->mCloseCallback))(selfp->mCloseCallbackUserData);
+    }
 }
 
+// static
 void LLPanelGroupBulkImpl::callbackSelect(LLUICtrl* ctrl, void* userdata)
 {
-    LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata;
-    if (selfp)
+    if (LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*)userdata)
+    {
         selfp->handleSelection();
+    }
 }
 
-void LLPanelGroupBulkImpl::callbackAddUsers(const uuid_vec_t& agent_ids, void* user_data)
+void LLPanelGroupBulkImpl::addUsers(const uuid_vec_t& agent_ids)
 {
     std::vector<std::string> names;
-    for (S32 i = 0; i < (S32)agent_ids.size(); i++)
+    for (const LLUUID& agent_id : agent_ids)
     {
         LLAvatarName av_name;
-        if (LLAvatarNameCache::get(agent_ids[i], &av_name))
+        if (LLAvatarNameCache::get(agent_id, &av_name))
         {
-            onAvatarNameCache(agent_ids[i], av_name, user_data);
+            onAvatarNameCache(agent_id, av_name);
         }
         else
         {
-            LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*) user_data;
-            if (selfp)
+            if (mAvatarNameCacheConnection.connected())
             {
-                if (selfp->mAvatarNameCacheConnection.connected())
-                {
-                    selfp->mAvatarNameCacheConnection.disconnect();
-                }
-                // *TODO : Add a callback per avatar name being fetched.
-                selfp->mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_ids[i],boost::bind(onAvatarNameCache, _1, _2, user_data));
+                mAvatarNameCacheConnection.disconnect();
             }
+            // *TODO : Add a callback per avatar name being fetched.
+            mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id,
+                [&](const LLUUID& agent_id, const LLAvatarName& av_name)
+                {
+                    onAvatarNameCache(agent_id, av_name);
+                });
         }
     }
 }
 
-void LLPanelGroupBulkImpl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, void* user_data)
+void LLPanelGroupBulkImpl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
 {
-    LLPanelGroupBulkImpl* selfp = (LLPanelGroupBulkImpl*) user_data;
-
-    if (selfp)
+    if (mAvatarNameCacheConnection.connected())
     {
-        if (selfp->mAvatarNameCacheConnection.connected())
-        {
-            selfp->mAvatarNameCacheConnection.disconnect();
-        }
-        std::vector<std::string> names;
-        uuid_vec_t agent_ids;
-        agent_ids.push_back(agent_id);
-        names.push_back(av_name.getCompleteName());
-
-        selfp->addUsers(names, agent_ids);
+        mAvatarNameCacheConnection.disconnect();
     }
+
+    std::vector<std::string> names;
+    uuid_vec_t agent_ids;
+    agent_ids.push_back(agent_id);
+    names.push_back(av_name.getCompleteName());
+
+    addUsers(names, agent_ids);
 }
 
 void LLPanelGroupBulkImpl::handleRemove()
@@ -174,17 +179,15 @@ void LLPanelGroupBulkImpl::handleRemove()
     if (selection.empty())
         return;
 
-    std::vector<LLScrollListItem*>::iterator iter;
-    for(iter = selection.begin(); iter != selection.end(); ++iter)
+    for (const LLScrollListItem* item : selection)
     {
-        mInviteeIDs.erase((*iter)->getUUID());
+        mInviteeIDs.erase(item->getUUID());
     }
 
     mBulkAgentList->deleteSelectedItems();
     mRemoveButton->setEnabled(false);
 
-    if( mOKButton && mOKButton->getEnabled() &&
-        mBulkAgentList->isEmpty())
+    if (mOKButton && mOKButton->getEnabled() && mBulkAgentList->isEmpty())
     {
         mOKButton->setEnabled(false);
     }
@@ -192,24 +195,17 @@ void LLPanelGroupBulkImpl::handleRemove()
 
 void LLPanelGroupBulkImpl::handleSelection()
 {
-    std::vector<LLScrollListItem*> selection = mBulkAgentList->getAllSelected();
-    if (selection.empty())
-        mRemoveButton->setEnabled(false);
-    else
-        mRemoveButton->setEnabled(true);
+    mRemoveButton->setEnabled(mBulkAgentList->getFirstSelected());
 }
 
 void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const uuid_vec_t& agent_ids)
 {
-    std::string name;
-    LLUUID id;
-
-    if(mListFullNotificationSent)
+    if (mListFullNotificationSent)
     {
         return;
     }
 
-    if( !mListFullNotificationSent &&
+    if (!mListFullNotificationSent &&
         (names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES))
     {
         mListFullNotificationSent = true;
@@ -223,32 +219,35 @@ void LLPanelGroupBulkImpl::addUsers(const std::vector<std::string>& names, const
 
     for (S32 i = 0; i < (S32)names.size(); ++i)
     {
-        name = names[i];
-        id = agent_ids[i];
+        const LLUUID& id = agent_ids[i];
 
-        if(mInviteeIDs.find(id) != mInviteeIDs.end())
+        if (mInviteeIDs.find(id) != mInviteeIDs.end())
         {
             continue;
         }
 
-        //add the name to the names list
+        // Add the name to the name list
         LLSD row;
         row["id"] = id;
-        row["columns"][0]["value"] = name;
+        row["columns"][0]["value"] = names[i];
 
         mBulkAgentList->addElement(row);
         mInviteeIDs.insert(id);
 
         // We've successfully added someone to the list.
-        if(mOKButton && !mOKButton->getEnabled())
+        if (mOKButton && !mOKButton->getEnabled())
+        {
             mOKButton->setEnabled(true);
+        }
     }
 }
 
 void LLPanelGroupBulkImpl::setGroupName(std::string name)
 {
-    if(mGroupName)
+    if (mGroupName)
+    {
         mGroupName->setText(name);
+    }
 }
 
 
@@ -258,7 +257,8 @@ LLPanelGroupBulk::LLPanelGroupBulk(const LLUUID& group_id) :
     mPendingGroupPropertiesUpdate(false),
     mPendingRoleDataUpdate(false),
     mPendingMemberDataUpdate(false)
-{}
+{
+}
 
 LLPanelGroupBulk::~LLPanelGroupBulk()
 {
@@ -269,11 +269,15 @@ void LLPanelGroupBulk::clear()
 {
     mImplementation->mInviteeIDs.clear();
 
-    if(mImplementation->mBulkAgentList)
+    if (mImplementation->mBulkAgentList)
+    {
         mImplementation->mBulkAgentList->deleteAllItems();
+    }
 
-    if(mImplementation->mOKButton)
+    if (mImplementation->mOKButton)
+    {
         mImplementation->mOKButton->setEnabled(false);
+    }
 }
 
 void LLPanelGroupBulk::update()
@@ -292,12 +296,14 @@ void LLPanelGroupBulk::updateGroupName()
 {
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID);
 
-    if( gdatap &&
+    if (gdatap &&
         gdatap->isGroupPropertiesDataComplete())
     {
         // Only do work if the current group name differs
-        if(mImplementation->mGroupName->getText().compare(gdatap->mName) != 0)
+        if (mImplementation->mGroupName->getText().compare(gdatap->mName) != 0)
+        {
             mImplementation->setGroupName(gdatap->mName);
+        }
     }
     else
     {
@@ -308,43 +314,34 @@ void LLPanelGroupBulk::updateGroupName()
 void LLPanelGroupBulk::updateGroupData()
 {
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID);
-    if(gdatap && gdatap->isGroupPropertiesDataComplete())
+    if (gdatap && gdatap->isGroupPropertiesDataComplete())
     {
         mPendingGroupPropertiesUpdate = false;
     }
-    else
+    else if (!mPendingGroupPropertiesUpdate)
     {
-        if(!mPendingGroupPropertiesUpdate)
-        {
-            mPendingGroupPropertiesUpdate = true;
-            LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
-        }
+        mPendingGroupPropertiesUpdate = true;
+        LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
     }
 
-    if(gdatap && gdatap->isRoleDataComplete())
+    if (gdatap && gdatap->isRoleDataComplete())
     {
         mPendingRoleDataUpdate = false;
     }
-    else
+    else if (!mPendingRoleDataUpdate)
     {
-        if(!mPendingRoleDataUpdate)
-        {
-            mPendingRoleDataUpdate = true;
-            LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
-        }
+        mPendingRoleDataUpdate = true;
+        LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
     }
 
-    if(gdatap && gdatap->isMemberDataComplete())
+    if (gdatap && gdatap->isMemberDataComplete())
     {
         mPendingMemberDataUpdate = false;
     }
-    else
+    else if (!mPendingMemberDataUpdate)
     {
-        if(!mPendingMemberDataUpdate)
-        {
-            mPendingMemberDataUpdate = true;
-            LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
-        }
+        mPendingMemberDataUpdate = true;
+        LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
     }
 }
 
@@ -367,21 +364,20 @@ void LLPanelGroupBulk::setCloseCallback(void (*close_callback)(void*), void* dat
 void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
 {
     std::vector<std::string> names;
-    for (S32 i = 0; i < (S32)agent_ids.size(); i++)
+    for (size_t i = 0; i < agent_ids.size(); i++)
     {
         std::string fullname;
-        LLUUID agent_id = agent_ids[i];
+        const LLUUID& agent_id = agent_ids[i];
         LLViewerObject* dest = gObjectList.findObject(agent_id);
-        if(dest && dest->isAvatar())
+        if (dest && dest->isAvatar())
         {
             LLNameValue* nvfirst = dest->getNVPair("FirstName");
             LLNameValue* nvlast = dest->getNVPair("LastName");
-            if(nvfirst && nvlast)
+            if (nvfirst && nvlast)
             {
-                fullname = LLCacheName::buildFullName(
-                    nvfirst->getString(), nvlast->getString());
-
+                fullname = LLCacheName::buildFullName(nvfirst->getString(), nvlast->getString());
             }
+
             if (!fullname.empty())
             {
                 names.push_back(fullname);
@@ -394,20 +390,25 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids)
         }
         else
         {
-            //looks like user try to invite offline friend
-            //for offline avatar_id gObjectList.findObject() will return null
-            //so we need to do this additional search in avatar tracker, see EXT-4732
+            // Looks like the user tries to invite a friend which is offline.
+            // For offline avatar_id gObjectList.findObject() will return null
+            // so we need to do this additional search in avatar tracker, see EXT-4732
             if (LLAvatarTracker::instance().isBuddy(agent_id))
             {
                 LLAvatarName av_name;
                 if (!LLAvatarNameCache::get(agent_id, &av_name))
                 {
-                    // actually it should happen, just in case
-                    LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupBulk::addUserCallback, this, _1, _2));
+                    // Actually it shouldn't happen, just in case
+                    LLAvatarNameCache::get(LLUUID(agent_id),
+                        [&](const LLUUID& agent_id, const LLAvatarName& av_name)
+                        {
+                            addUserCallback(agent_id, av_name);
+                        });
                     // for this special case!
-                    //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
+                    // when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
                     // removed id will be added in callback
                     agent_ids.erase(agent_ids.begin() + i);
+                    i--; // To process the next agent_id with the same index
                 }
                 else
                 {
diff --git a/indra/newview/llpanelgroupbulkimpl.h b/indra/newview/llpanelgroupbulkimpl.h
index 963780200a..5a479f8117 100644
--- a/indra/newview/llpanelgroupbulkimpl.h
+++ b/indra/newview/llpanelgroupbulkimpl.h
@@ -50,9 +50,10 @@ public:
     static void callbackClickCancel(void* userdata);
 
     static void callbackSelect(LLUICtrl* ctrl, void* userdata);
-    static void callbackAddUsers(const uuid_vec_t& agent_ids, void* user_data);
 
-    static void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, void* user_data);
+    void addUsers(const uuid_vec_t& agent_ids);
+
+    void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
 
     void handleRemove();
     void handleSelection();
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index bc56b49e5d..864d73683e 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -812,20 +812,14 @@ bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
 {
     LLPanelGroupSubTab::postBuildSubTab(root);
 
-    // Upcast parent so we can ask it for sibling controls.
-    LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
-
     // Look recursively from the parent to find all our widgets.
-    bool recurse = true;
-    mHeader = parent->findChild<LLPanel>("members_header", recurse);
-    mFooter = parent->findChild<LLPanel>("members_footer", recurse);
-
-    mMembersList        = parent->getChild<LLNameListCtrl>("member_list", recurse);
-    mAssignedRolesList  = parent->getChild<LLScrollListCtrl>("member_assigned_roles", recurse);
-    mAllowedActionsList = parent->getChild<LLScrollListCtrl>("member_allowed_actions", recurse);
-    mActionDescription = parent->getChild<LLTextEditor>("member_action_description", recurse);
+    mHeader = root->findChild<LLPanel>("members_header");
+    mFooter = root->findChild<LLPanel>("members_footer");
 
-    if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return false;
+    mMembersList = root->getChild<LLNameListCtrl>("member_list");
+    mAssignedRolesList = root->getChild<LLScrollListCtrl>("member_assigned_roles");
+    mAllowedActionsList = root->getChild<LLScrollListCtrl>("member_allowed_actions");
+    mActionDescription = root->getChild<LLTextEditor>("member_action_description");
 
     mAllowedActionsList->setCommitOnSelectionChange(true);
     mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this));
@@ -844,31 +838,22 @@ bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
     row["columns"][2]["column"] = "online";
     mMembersList->addElement(row);
     std::string order_by = gSavedSettings.getString("GroupMembersSortOrder");
-    if(!order_by.empty())
+    if (!order_by.empty())
     {
         mMembersList->sortByColumn(order_by, true);
     }
 
-    LLButton* button = parent->getChild<LLButton>("member_invite", recurse);
-    if ( button )
-    {
-        button->setClickedCallback(onInviteMember, this);
-        button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
-    }
+    LLButton* button = root->getChild<LLButton>("member_invite");
+    button->setClickedCallback(onInviteMember, this);
+    button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
 
-    mEjectBtn = parent->getChild<LLButton>("member_eject", recurse);
-    if ( mEjectBtn )
-    {
-        mEjectBtn->setClickedCallback(onEjectMembers, this);
-        mEjectBtn->setEnabled(false);
-    }
+    mEjectBtn = root->getChild<LLButton>("member_eject");
+    mEjectBtn->setClickedCallback(onEjectMembers, this);
+    mEjectBtn->setEnabled(false);
 
-    mBanBtn = parent->getChild<LLButton>("member_ban", recurse);
-    if(mBanBtn)
-    {
-        mBanBtn->setClickedCallback(onBanMember, this);
-        mBanBtn->setEnabled(false);
-    }
+    mBanBtn = root->getChild<LLButton>("member_ban");
+    mBanBtn->setClickedCallback(onBanMember, this);
+    mBanBtn->setEnabled(false);
 
     return true;
 }
@@ -1371,11 +1356,13 @@ void LLPanelGroupMembersSubTab::activate()
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
 
     LLPanelGroupSubTab::activate();
-    if(!mActivated)
+    if (!mActivated)
     {
         if (!gdatap || !gdatap->isMemberDataComplete())
         {
-            LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
+            const U32 page_size = 50;
+            std::string sort_column = mMembersList->getSortColumnName();
+            LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID, page_size, 0, sort_column);
         }
 
         if (!gdatap || !gdatap->isRoleMemberDataComplete())
@@ -1483,8 +1470,7 @@ bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD&
 
 void LLPanelGroupMembersSubTab::applyMemberChanges()
 {
-    //sucks to do a find again here, but it is in constant time, so, could
-    //be worse
+    // Sucks to do a find again here, but it is in constant time, so, could be worse
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
     if (!gdatap)
     {
@@ -1492,8 +1478,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
         return;
     }
 
-    //we need to add all of the changed roles data
-    //for each member whose role changed
+    // We need to add all of the changed roles data for each member whose role changed
     for (member_role_changes_map_t::iterator member = mMemberRoleChangeData.begin();
          member != mMemberRoleChangeData.end(); ++member)
     {
@@ -1511,7 +1496,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
     mMemberRoleChangeData.clear();
 
     LLGroupMgr::getInstance()->sendGroupRoleMemberChanges(mGroupID);
-    //force a UI update
+    // Force an UI update
     handleMemberSelect();
 
     mChanged = false;
@@ -1522,32 +1507,23 @@ void LLPanelGroupMembersSubTab::applyMemberChanges()
 bool LLPanelGroupMembersSubTab::matchesSearchFilter(const std::string& fullname)
 {
     // If the search filter is empty, everything passes.
-    if (mSearchFilter.empty()) return true;
+    if (mSearchFilter.empty())
+        return true;
 
     // Create a full name, and compare it to the search filter.
     std::string fullname_lc(fullname);
     LLStringUtil::toLower(fullname_lc);
 
     std::string::size_type match = fullname_lc.find(mSearchFilter);
-
-    if (std::string::npos == match)
-    {
-        // not found
-        return false;
-    }
-    else
-    {
-        return true;
-    }
+    return match != std::string::npos;
 }
 
 U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& agent_id)
 {
-    //we loop over all of the changes
-    //if we are adding a role, then we simply add the role's powers
-    //if we are removing a role, we store that role id away
-    //and then we have to build the powers up bases on the roles the agent
-    //is in
+    // We loop over all of the changes
+    // If we are adding a role, then we simply add the role's powers
+    // If we are removing a role, we store that role id away
+    // and then we have to build the powers up bases on the roles the agent is in
 
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
     if (!gdatap)
@@ -1557,7 +1533,7 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
     }
 
     LLGroupMgrGroupData::member_list_t::iterator iter = gdatap->mMembers.find(agent_id);
-    if ( iter == gdatap->mMembers.end() )
+    if (iter == gdatap->mMembers.end())
     {
         LL_WARNS() << "LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges() -- No member data for member with UUID " << agent_id << LL_ENDL;
         return GP_NO_POWERS;
@@ -1570,37 +1546,36 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag
         return GP_NO_POWERS;
     }
 
-    //see if there are unsaved role changes for this agent
+    // See if there are unsaved role changes for this agent
     role_change_data_map_t* role_change_datap = NULL;
     member_role_changes_map_t::iterator member = mMemberRoleChangeData.find(agent_id);
-    if ( member != mMemberRoleChangeData.end() )
+    if (member != mMemberRoleChangeData.end())
     {
-        //this member has unsaved role changes
-        //so grab them
-        role_change_datap = (*member).second;
+        // This member has unsaved role changes
+        // so grab them
+        role_change_datap = member->second;
     }
 
     U64 new_powers = GP_NO_POWERS;
 
-    if ( role_change_datap )
+    if (role_change_datap)
     {
         uuid_vec_t roles_to_be_removed;
 
-        for (role_change_data_map_t::iterator role = role_change_datap->begin();
-             role != role_change_datap->end(); ++ role)
+        for (const auto& role : *role_change_datap)
         {
-            if ( role->second == RMC_ADD )
+            if (role.second == RMC_ADD)
             {
-                new_powers |= gdatap->getRolePowers(role->first);
+                new_powers |= gdatap->getRolePowers(role.first);
             }
             else
             {
-                roles_to_be_removed.push_back(role->first);
+                roles_to_be_removed.push_back(role.first);
             }
         }
 
-        //loop over the member's current roles, summing up
-        //the powers (not including the role we are removing)
+        // loop over the member's current roles, summing up
+        // the powers (not including the role we are removing)
         for (LLGroupMemberData::role_list_t::iterator current_role = member_data->roleBegin();
              current_role != member_data->roleEnd(); ++current_role)
         {
@@ -1661,9 +1636,10 @@ void LLPanelGroupMembersSubTab::draw()
 
 void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 {
-    if (mGroupID.isNull()) return;
+    if (mGroupID.isNull())
+        return;
 
-    if ( GC_TITLES == gc || GC_PROPERTIES == gc )
+    if (GC_TITLES == gc || GC_PROPERTIES == gc)
     {
         // Don't care about title or general group properties updates.
         return;
@@ -1677,9 +1653,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
     }
 
     // Wait for both all data to be retrieved before displaying anything.
-    if (   gdatap->isMemberDataComplete()
-        && gdatap->isRoleDataComplete()
-        && gdatap->isRoleMemberDataComplete())
+    if (gdatap->isMemberDataComplete() &&
+        gdatap->isRoleDataComplete() &&
+        gdatap->isRoleMemberDataComplete())
     {
         mMemberProgress = gdatap->mMembers.begin();
         mPendingMemberUpdate = true;
@@ -1690,18 +1666,18 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
         // Build a string with info on retrieval progress.
         std::ostringstream retrieved;
 
-        if ( gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size() )
+        if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && !gdatap->mMembers.size())
         {
             // MAINT-5237
             retrieved << "Member list not available.";
         }
-        else if ( !gdatap->isMemberDataComplete() )
+        else if (!gdatap->isMemberDataComplete())
         {
             // Still busy retreiving member list.
             retrieved << "Retrieving member list (" << gdatap->mMembers.size()
                       << " / " << gdatap->mMemberCount << ")...";
         }
-        else if( !gdatap->isRoleDataComplete() )
+        else if (!gdatap->isRoleDataComplete())
         {
             // Still busy retreiving role list.
             retrieved << "Retrieving role list (" << gdatap->mRoles.size()
@@ -1719,7 +1695,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
 
 void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
 {
-    if (!data) return;
+    if (!data)
+        return;
+
     LLUIString donated = getString("donation_area");
     donated.setArg("[AREA]", llformat("%d", data->getContribution()));
 
@@ -1765,7 +1743,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb
     if (matchesSearchFilter(av_name.getAccountName()))
     {
         addMemberToList(member);
-        if(!mMembersList->getEnabled())
+        if (!mMembersList->getEnabled())
         {
             mMembersList->setEnabled(true);
         }
@@ -1788,15 +1766,15 @@ void LLPanelGroupMembersSubTab::updateMembers()
 
     // Make sure all data is still complete.  Incomplete data
     // may occur if we refresh.
-    if (   !gdatap->isMemberDataComplete()
-        || !gdatap->isRoleDataComplete()
-        || !gdatap->isRoleMemberDataComplete())
+    if (!gdatap->isMemberDataComplete() ||
+        !gdatap->isRoleDataComplete() ||
+        !gdatap->isRoleMemberDataComplete())
     {
         return;
     }
 
-    //cleanup list only for first iteration
-    if(mMemberProgress == gdatap->mMembers.begin())
+    // Cleanup list only for first iteration
+    if (mMemberProgress == gdatap->mMembers.begin())
     {
         mMembersList->deleteAllItems();
     }
@@ -1806,7 +1784,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
     LLTimer update_time;
     update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME);
 
-    for( ; mMemberProgress != end && !update_time.hasExpired(); ++mMemberProgress)
+    for (; mMemberProgress != end && !update_time.hasExpired(); ++mMemberProgress)
     {
         if (!mMemberProgress->second)
             continue;
@@ -1866,7 +1844,8 @@ void LLPanelGroupMembersSubTab::onBanMember(void* user_data)
 void LLPanelGroupMembersSubTab::confirmBanMembers()
 {
     std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
-    if (selection.empty()) return;
+    if (selection.empty())
+        return;
 
     auto selection_count = selection.size();
     if (selection_count == 1)
@@ -1912,8 +1891,7 @@ void LLPanelGroupMembersSubTab::updateActionDescription()
         return;
     }
 
-    LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata();
-    if (rap)
+    if (LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata())
     {
         std::string desc = rap->mLongDescription.empty() ? rap->mDescription : rap->mLongDescription;
         mActionDescription->setText(desc);
@@ -1923,23 +1901,22 @@ void LLPanelGroupMembersSubTab::updateActionDescription()
 void LLPanelGroupMembersSubTab::handleBanMember()
 {
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
-    if(!gdatap)
+    if (!gdatap)
     {
         LL_WARNS("Groups") << "Unable to get group data for group " << mGroupID << LL_ENDL;
         return;
     }
 
     std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
-    if(selection.empty())
+    if (selection.empty())
     {
         return;
     }
 
     uuid_vec_t ban_ids;
-    std::vector<LLScrollListItem*>::iterator itor;
-    for(itor = selection.begin(); itor != selection.end(); ++itor)
+    for (const LLScrollListItem* item : selection)
     {
-        LLUUID ban_id = (*itor)->getUUID();
+        LLUUID ban_id = item->getUUID();
         ban_ids.push_back(ban_id);
 
         LLGroupBanData ban_data;
@@ -1983,54 +1960,33 @@ bool LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
     LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
 
     // Look recursively from the parent to find all our widgets.
-    bool recurse = true;
-    mHeader = parent->findChild<LLPanel>("roles_header", recurse);
-    mFooter = parent->findChild<LLPanel>("roles_footer", recurse);
-
-
-    mRolesList      = parent->getChild<LLScrollListCtrl>("role_list", recurse);
-    mAssignedMembersList    = parent->getChild<LLNameListCtrl>("role_assigned_members", recurse);
-    mAllowedActionsList = parent->getChild<LLScrollListCtrl>("role_allowed_actions", recurse);
-    mActionDescription  = parent->getChild<LLTextEditor>("role_action_description", recurse);
+    mHeader = parent->findChild<LLPanel>("roles_header");
+    mFooter = parent->findChild<LLPanel>("roles_footer");
 
-    mRoleName = parent->getChild<LLLineEditor>("role_name", recurse);
-    mRoleTitle = parent->getChild<LLLineEditor>("role_title", recurse);
-    mRoleDescription = parent->getChild<LLTextEditor>("role_description", recurse);
+    mRolesList = parent->getChild<LLScrollListCtrl>("role_list");
+    mAssignedMembersList = parent->getChild<LLNameListCtrl>("role_assigned_members");
+    mAllowedActionsList = parent->getChild<LLScrollListCtrl>("role_allowed_actions");
+    mActionDescription  = parent->getChild<LLTextEditor>("role_action_description");
 
-    mMemberVisibleCheck = parent->getChild<LLCheckBoxCtrl>("role_visible_in_list", recurse);
+    mRoleName = parent->getChild<LLLineEditor>("role_name");
+    mRoleTitle = parent->getChild<LLLineEditor>("role_title");
+    mRoleDescription = parent->getChild<LLTextEditor>("role_description");
 
-    if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList || !mActionDescription
-        || !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck)
-    {
-        LL_WARNS() << "ARG! element not found." << LL_ENDL;
-        return false;
-    }
+    mMemberVisibleCheck = parent->getChild<LLCheckBoxCtrl>("role_visible_in_list");
 
     mRemoveEveryoneTxt = getString("cant_delete_role");
 
-    mCreateRoleButton =
-        parent->getChild<LLButton>("role_create", recurse);
-    if ( mCreateRoleButton )
-    {
-        mCreateRoleButton->setClickedCallback(onCreateRole, this);
-        mCreateRoleButton->setEnabled(false);
-    }
+    mCreateRoleButton = parent->getChild<LLButton>("role_create");
+    mCreateRoleButton->setClickedCallback(onCreateRole, this);
+    mCreateRoleButton->setEnabled(false);
 
-    mCopyRoleButton =
-        parent->getChild<LLButton>("role_copy", recurse);
-    if ( mCopyRoleButton )
-    {
-        mCopyRoleButton->setClickedCallback(onCopyRole, this);
-        mCopyRoleButton->setEnabled(false);
-    }
+    mCopyRoleButton = parent->getChild<LLButton>("role_copy");
+    mCopyRoleButton->setClickedCallback(onCopyRole, this);
+    mCopyRoleButton->setEnabled(false);
 
-    mDeleteRoleButton =
-        parent->getChild<LLButton>("role_delete", recurse);
-    if ( mDeleteRoleButton )
-    {
-        mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
-        mDeleteRoleButton->setEnabled(false);
-    }
+    mDeleteRoleButton = parent->getChild<LLButton>("role_delete");
+    mDeleteRoleButton->setClickedCallback(onDeleteRole, this);
+    mDeleteRoleButton->setEnabled(false);
 
     mRolesList->setCommitOnSelectionChange(true);
     mRolesList->setCommitCallback(onRoleSelect, this);
@@ -2949,26 +2905,19 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
     mActionMembers->deleteAllItems();
     mActionRoles->deleteAllItems();
 
-    U64 power_mask = GP_NO_POWERS;
-    std::vector<LLScrollListItem*> selection =
-                            mActionList->getAllSelected();
-    if (selection.empty()) return;
-
-    LLRoleAction* rap;
+    std::vector<LLScrollListItem*> selection = mActionList->getAllSelected();
+    if (selection.empty())
+        return;
 
-    std::vector<LLScrollListItem*>::iterator itor;
-    for (itor = selection.begin() ;
-         itor != selection.end(); ++itor)
+    U64 power_mask = GP_NO_POWERS;
+    for (const LLScrollListItem* item : selection)
     {
-        rap = (LLRoleAction*)( (*itor)->getUserdata() );
-        power_mask |= rap->mPowerBit;
+        power_mask |= ((LLRoleAction*)item->getUserdata())->mPowerBit;
     }
 
     if (selection.size() == 1)
     {
-        LLScrollListItem* item = selection[0];
-        rap = (LLRoleAction*)(item->getUserdata());
-
+        LLRoleAction* rap = (LLRoleAction*)selection.front()->getUserdata();
         if (rap->mLongDescription.empty())
         {
             mActionDescription->setText(rap->mDescription);
@@ -2985,21 +2934,19 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
 
     LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
 
-    if (!gdatap) return;
+    if (!gdatap)
+        return;
 
     if (gdatap->isMemberDataComplete())
     {
-        LLGroupMgrGroupData::member_list_t::iterator it = gdatap->mMembers.begin();
-        LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
-        LLGroupMemberData* gmd;
-
-        for ( ; it != end; ++it)
+        for (const auto& it : gdatap->mMembers)
         {
-            gmd = (*it).second;
-            if (!gmd) continue;
-            if ((gmd->getAgentPowers() & power_mask) == power_mask)
+            if (LLGroupMemberData* gmd = it.second)
             {
-                mActionMembers->addNameItem(gmd->getID());
+                if ((gmd->getAgentPowers() & power_mask) == power_mask)
+                {
+                    mActionMembers->addNameItem(gmd->getID());
+                }
             }
         }
     }
-- 
cgit v1.2.3


From 603f448393d43cb1fc67083b40c950a1d03fa4a6 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 24 Jul 2024 17:15:07 +0200
Subject: #2095 Crash #1497728: LLInventorySingleFolderPanel::hasVisibleItems

---
 indra/newview/llinventorypanel.cpp | 17 +++++++++++------
 indra/newview/llinventorypanel.h   |  6 +++---
 2 files changed, 14 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 1a6e25fb0f..9e4f4c0adc 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -2334,14 +2334,14 @@ void LLInventorySingleFolderPanel::clearNavigationHistory()
     mBackwardFolders.clear();
 }
 
-bool LLInventorySingleFolderPanel::isBackwardAvailable()
+bool LLInventorySingleFolderPanel::isBackwardAvailable() const
 {
-    return (!mBackwardFolders.empty() && (mFolderID != mBackwardFolders.back()));
+    return !mBackwardFolders.empty() && (mFolderID != mBackwardFolders.back());
 }
 
-bool LLInventorySingleFolderPanel::isForwardAvailable()
+bool LLInventorySingleFolderPanel::isForwardAvailable() const
 {
-    return (!mForwardFolders.empty() && (mFolderID != mForwardFolders.back()));
+    return !mForwardFolders.empty() && (mFolderID != mForwardFolders.back());
 }
 
 boost::signals2::connection LLInventorySingleFolderPanel::setRootChangedCallback(root_changed_callback_t cb)
@@ -2406,9 +2406,14 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
     }
 }
 
-bool LLInventorySingleFolderPanel::hasVisibleItems()
+bool LLInventorySingleFolderPanel::hasVisibleItems() const
 {
-    return mFolderRoot.get()->hasVisibleChildren();
+    if (const LLFolderView* root = mFolderRoot.get())
+    {
+        return root->hasVisibleChildren();
+    }
+
+    return false;
 }
 
 void LLInventorySingleFolderPanel::doCreate(const LLSD& userdata)
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 6dead2cf6d..56909c8d98 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -420,10 +420,10 @@ public:
     void doToSelected(const LLSD& userdata);
     void doShare();
 
-    bool isBackwardAvailable();
-    bool isForwardAvailable();
+    bool isBackwardAvailable() const;
+    bool isForwardAvailable() const;
 
-    bool hasVisibleItems();
+    bool hasVisibleItems() const;
 
     void setNavBackwardList(std::list<LLUUID> backward_list) { mBackwardFolders = backward_list; }
     void setNavForwardList(std::list<LLUUID> forward_list) { mForwardFolders = forward_list; }
-- 
cgit v1.2.3


From df459684d430910e44ddb1abc6f231c6d460442f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 15:02:09 -0400
Subject: Fix warning/misnamed button image PushButton_Disabled_Selected to
 PushButton_Selected_Disabled

---
 indra/newview/skins/default/xui/en/panel_scrolling_param.xml | 4 ++--
 indra/newview/skins/default/xui/en/widgets/drop_down.xml     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index 2035bc2caa..ec642131ae 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -84,7 +84,7 @@
      enabled="false"
      height="132"
      image_disabled="PushButton_Disabled"
-     image_disabled_selected="PushButton_Disabled_Selected"
+     image_disabled_selected="PushButton_Selected_Disabled"
      image_selected="PushButton_Selected"
      image_unselected="PushButton_Off"
      layout="topleft"
@@ -97,7 +97,7 @@
      enabled="false"
      height="132"
      image_disabled="PushButton_Disabled"
-     image_disabled_selected="PushButton_Disabled_Selected"
+     image_disabled_selected="PushButton_Selected_Disabled"
      image_selected="PushButton_Selected"
      image_unselected="PushButton_Off"
      layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/widgets/drop_down.xml b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
index 75ed485645..80f98b64fc 100644
--- a/indra/newview/skins/default/xui/en/widgets/drop_down.xml
+++ b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
@@ -12,7 +12,7 @@
                           image_unselected="PushButton_Off"
                           image_selected="PushButton_Selected"
                           image_disabled="PushButton_Disabled"
-                          image_disabled_selected="PushButton_Disabled_Selected"
+                          image_disabled_selected="PushButton_Selected_Disabled"
                           image_overlay="Combobox_Over"
                           image_overlay_alignment="right" />
   <drop_down.combo_list bg_writeable_color="white" />
-- 
cgit v1.2.3


From 4b543b618b101aca9dee1f224d8dbd4fbf937d71 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 15:05:08 -0400
Subject: Cache more frequently accessed settings

---
 indra/newview/llhudtext.cpp        |  3 ++-
 indra/newview/llmeshrepository.cpp |  3 ++-
 indra/newview/lloutfitgallery.cpp  |  3 ++-
 indra/newview/llphysicsmotion.cpp  | 33 +++++++++++++++++----------------
 indra/newview/lltoolpie.cpp        |  3 ++-
 5 files changed, 25 insertions(+), 20 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 5ee0ab437d..78afe43ffe 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -392,7 +392,8 @@ void LLHUDText::updateVisibility()
 
     LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
     F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
-    F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance");
+    static LLCachedControl<bool> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance");
+    F32 max_draw_distance = prim_text_max_dist;
 
     if(max_draw_distance < 0)
     {
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c02a12e6b2..1c64ed6822 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3743,7 +3743,8 @@ void LLMeshRepository::notifyLoadedMeshes()
               ? (2 * LLAppCoreHttp::PIPELINING_DEPTH)
               : 5);
 
-    LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
+    static LLCachedControl<U32> mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests");
+    LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req;
     LLMeshRepoThread::sRequestHighWater = llclamp(scale * S32(LLMeshRepoThread::sMaxConcurrentRequests),
                                                   REQUEST2_HIGH_WATER_MIN,
                                                   REQUEST2_HIGH_WATER_MAX);
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 96be917019..b1b9f69f4f 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -416,7 +416,8 @@ void LLOutfitGallery::updateRowsIfNeeded()
 
 bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2)
 {
-    if(gSavedSettings.getBOOL("OutfitGallerySortByName") ||
+    static LLCachedControl<bool> outfit_gallery_sort_by_name(gSavedSettings, "OutfitGallerySortByName");
+    if(outfit_gallery_sort_by_name ||
             ((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage())))
     {
         std::string name1 = item1->getItemName();
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 6782aa2123..86291708b0 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -454,25 +454,26 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
 bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
-        // Skip if disabled globally.
-        if (!gSavedSettings.getBOOL("AvatarPhysics"))
-        {
-                return true;
-        }
+    // Skip if disabled globally.
+    static LLCachedControl<bool> av_physics(gSavedSettings, "AvatarPhysics");
+    if (!av_physics)
+    {
+            return true;
+    }
 
-        bool update_visuals = false;
-        for (motion_vec_t::iterator iter = mMotions.begin();
-             iter != mMotions.end();
-             ++iter)
-        {
-                LLPhysicsMotion *motion = (*iter);
-                update_visuals |= motion->onUpdate(time);
-        }
+    bool update_visuals = false;
+    for (motion_vec_t::iterator iter = mMotions.begin();
+            iter != mMotions.end();
+            ++iter)
+    {
+            LLPhysicsMotion *motion = (*iter);
+            update_visuals |= motion->onUpdate(time);
+    }
 
-        if (update_visuals)
-                mCharacter->updateVisualParams();
+    if (update_visuals)
+            mCharacter->updateVisualParams();
 
-        return true;
+    return true;
 }
 
 // Return true if character has to update visual params.
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 531e657a1e..8cdc2e94f4 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1424,7 +1424,8 @@ void LLToolPie::handleDeselect()
 
 LLTool* LLToolPie::getOverrideTool(MASK mask)
 {
-    if (gSavedSettings.getBOOL("EnableGrab"))
+    static LLCachedControl<bool> enable_grab(gSavedSettings, "EnableGrab");
+    if (enable_grab)
     {
         if (mask == DEFAULT_GRAB_MASK)
         {
-- 
cgit v1.2.3


From 2fa69bc13e8c629f1e3dd5eafa3dd07c83dbb4ae Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 04:32:35 -0400
Subject: Fix matrix stack underflow during avatar preview generation (#2098)

---
 indra/newview/pipeline.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 42a6987a18..056affb68e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10574,10 +10574,13 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
     sShadowRender = false;
     popRenderTypeMask();
 
-    gGL.matrixMode(LLRender::MM_PROJECTION);
-    gGL.popMatrix();
-    gGL.matrixMode(LLRender::MM_MODELVIEW);
-    gGL.popMatrix();
+    if (!preview_avatar)
+    {
+        gGL.matrixMode(LLRender::MM_PROJECTION);
+        gGL.popMatrix();
+        gGL.matrixMode(LLRender::MM_MODELVIEW);
+        gGL.popMatrix();
+    }
 
     if (!preview_avatar && !for_profile)
     {
-- 
cgit v1.2.3


From ca70244339291b2a06aab55e865339c534433372 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 25 Jul 2024 13:05:47 +0200
Subject: #1318 Pagination in the Group Interface (small fix)

---
 indra/newview/llgroupmgr.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 090ed7b0e2..ec2002d8c5 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -2332,14 +2332,16 @@ void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_s
         group_datap->mMembers[member_id] = data;
     }
 
-    group_datap->mMemberCount = (S32)group_datap->mMembers.size();
+    U32 member_count = (U32)group_datap->mMembers.size();
+
+    group_datap->mMemberCount = (S32)member_count;
     group_datap->mMemberDataComplete = true;
     group_datap->mMemberRequestID.setNull();
     group_datap->mMemberVersion.generate();
 
     LL_INFOS("GrpMgr") << "members before: " << members_before
         << ", members loaded: " << members_loaded
-        << ", members now: " << group_datap->mMemberCount << LL_ENDL;
+        << ", members now: " << member_count << LL_ENDL;
 
     // Technically, we have this data, but to prevent completely overhauling
     // this entire system (it would be nice, but I don't have the time),
@@ -2353,9 +2355,9 @@ void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_s
         sendGroupTitlesRequest(group_id);
     }
 
-    if (page_size && members_loaded >= page_size)
+    if (page_size && members_loaded >= page_size && member_count > members_before)
     {
-        sendCapGroupMembersRequest(group_id, page_size, (U32)group_datap->mMemberCount, sort_column);
+        sendCapGroupMembersRequest(group_id, page_size, member_count, sort_column);
     }
 
     // Make the role-member data request
-- 
cgit v1.2.3


From c5611e692282c98a0dd4af347a1c1e19ef823370 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:37:35 -0400
Subject: Fix up LLWindowShade getChild calls during draw

---
 indra/llui/llwindowshade.cpp | 46 +++++++++++++++++++++-----------------------
 indra/llui/llwindowshade.h   |  7 +++++++
 2 files changed, 29 insertions(+), 24 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llwindowshade.cpp b/indra/llui/llwindowshade.cpp
index e48bc94b0a..8131a56288 100644
--- a/indra/llui/llwindowshade.cpp
+++ b/indra/llui/llwindowshade.cpp
@@ -81,8 +81,8 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
     panel_p.background_visible = true;
     panel_p.bg_alpha_image = params.bg_image;
     panel_p.auto_resize = false;
-    LLLayoutPanel* notification_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
-    stackp->addChild(notification_panel);
+    mNotificationsArea = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+    stackp->addChild(mNotificationsArea);
 
     panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
     panel_p.auto_resize = true;
@@ -92,15 +92,15 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
     panel_p.mouse_opaque = false;
     panel_p.background_visible = false;
     panel_p.bg_alpha_color = params.shade_color;
-    LLLayoutPanel* dummy_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
-    stackp->addChild(dummy_panel);
+    mBackgroundArea = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+    stackp->addChild(mBackgroundArea);
 
     layout_p = LLUICtrlFactory::getDefaultParams<LLLayoutStack>();
     layout_p.rect = LLRect(0, 30, 800, 0);
     layout_p.follows.flags = FOLLOWS_ALL;
     layout_p.orientation = LLLayoutStack::HORIZONTAL;
     stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
-    notification_panel->addChild(stackp);
+    mNotificationsArea->addChild(stackp);
 
     panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
     panel_p.rect.height = 30;
@@ -121,7 +121,8 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
     text_p.name = "notification_text";
     text_p.use_ellipses = true;
     text_p.wrap = true;
-    panel->addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
+    mNotificationsText = LLUICtrlFactory::create<LLTextBox>(text_p);
+    panel->addChild(mNotificationsText);
 
     panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
     panel_p.auto_resize = false;
@@ -154,11 +155,9 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
 
 void LLWindowShade::draw()
 {
-    LLRect message_rect = getChild<LLTextBox>("notification_text")->getTextBoundingRect();
+    LLRect message_rect = mNotificationsText->getTextBoundingRect();
 
-    LLLayoutPanel* notification_area = getChild<LLLayoutPanel>("notification_area");
-
-    notification_area->reshape(notification_area->getRect().getWidth(),
+    mNotificationsArea->reshape(mNotificationsArea->getRect().getWidth(),
         llclamp(message_rect.getHeight() + 15,
                 llmax(mFormHeight, MIN_NOTIFICATION_AREA_HEIGHT),
                 MAX_NOTIFICATION_AREA_HEIGHT));
@@ -176,21 +175,21 @@ void LLWindowShade::draw()
     {
         hide();
     }
-    else if (notification_area->getVisibleAmount() < 0.01f)
+    else if (mNotificationsArea->getVisibleAmount() < 0.01f)
     {
         displayLatestNotification();
     }
 
-    if (!notification_area->getVisible() && (notification_area->getVisibleAmount() < 0.001f))
+    if (!mNotificationsArea->getVisible() && (mNotificationsArea->getVisibleAmount() < 0.001f))
     {
-        getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(false);
+        mBackgroundArea->setBackgroundVisible(false);
         setMouseOpaque(false);
     }
 }
 
 void LLWindowShade::hide()
 {
-    getChildRef<LLLayoutPanel>("notification_area").setVisible(false);
+    mNotificationsArea->setVisible(false);
 }
 
 void LLWindowShade::onCloseNotification()
@@ -244,13 +243,12 @@ void LLWindowShade::displayLatestNotification()
     LLSD payload = notification->getPayload();
 
     LLNotificationFormPtr formp = notification->getForm();
-    LLLayoutPanel& notification_area = getChildRef<LLLayoutPanel>("notification_area");
-    notification_area.getChild<LLUICtrl>("notification_icon")->setValue(notification->getIcon());
-    notification_area.getChild<LLUICtrl>("notification_text")->setValue(notification->getMessage());
-    notification_area.getChild<LLUICtrl>("notification_text")->setToolTip(notification->getMessage());
+    mNotificationsArea->getChild<LLUICtrl>("notification_icon")->setValue(notification->getIcon());
+    mNotificationsText->setValue(notification->getMessage());
+    mNotificationsText->setToolTip(notification->getMessage());
 
     LLNotificationForm::EIgnoreType ignore_type = formp->getIgnoreType();
-    LLLayoutPanel& form_elements = notification_area.getChildRef<LLLayoutPanel>("form_elements");
+    LLLayoutPanel& form_elements = mNotificationsArea->getChildRef<LLLayoutPanel>("form_elements");
     form_elements.deleteAllChildren();
     form_elements.reshape(form_elements.getRect().getWidth(), MIN_NOTIFICATION_AREA_HEIGHT);
 
@@ -355,25 +353,25 @@ void LLWindowShade::displayLatestNotification()
         (*it)->translate(0, delta_y);
     }
 
-    getChildRef<LLLayoutPanel>("notification_area").setVisible(true);
-    getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(mModal);
+    mNotificationsArea->setVisible(true);
+    mBackgroundArea->setBackgroundVisible(mModal);
 
     setMouseOpaque(mModal);
 }
 
 void LLWindowShade::setBackgroundImage(LLUIImage* image)
 {
-    getChild<LLLayoutPanel>("notification_area")->setTransparentImage(image);
+    mNotificationsArea->setTransparentImage(image);
 }
 
 void LLWindowShade::setTextColor(LLColor4 color)
 {
-    getChild<LLTextBox>("notification_text")->setColor(color);
+    mNotificationsText->setColor(color);
 }
 
 bool LLWindowShade::isShown() const
 {
-    return getChildRef<LLLayoutPanel>("notification_area").getVisible();
+    return mNotificationsArea->getVisible();
 }
 
 void LLWindowShade::setCanClose(bool can_close)
diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h
index a401394d78..da29188943 100644
--- a/indra/llui/llwindowshade.h
+++ b/indra/llui/llwindowshade.h
@@ -31,6 +31,9 @@
 #include "llnotifications.h"
 #include "lluiimage.h"
 
+class LLLayoutPanel;
+class LLTextBox;
+
 class LLWindowShade : public LLUICtrl
 {
 public:
@@ -68,6 +71,10 @@ private:
     void onEnterNotificationText(LLUICtrl* ctrl, const std::string& name);
     void onClickIgnore(LLUICtrl* ctrl);
 
+    LLLayoutPanel* mBackgroundArea = nullptr;
+    LLLayoutPanel* mNotificationsArea = nullptr;
+    LLTextBox* mNotificationsText = nullptr;
+
     std::vector<LLNotificationPtr>  mNotifications;
     LLSD                mNotificationResponse;
     bool                mModal;
-- 
cgit v1.2.3


From 39a8bba844a6fadf0f528a141c0136a1ae45af42 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:38:06 -0400
Subject: Fix up LLScrollListCtrl getChild during draw

---
 indra/llui/llscrolllistctrl.cpp | 29 ++++++++++++-----------------
 indra/llui/llscrolllistctrl.h   |  2 +-
 2 files changed, 13 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 8512555b49..10d0ae0678 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -196,7 +196,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
     mHighlightedItem(-1),
     mBorder(NULL),
     mSortCallback(NULL),
-    mCommentTextView(NULL),
     mNumDynamicWidthColumns(0),
     mTotalStaticColumnWidth(0),
     mTotalColumnPadding(0),
@@ -288,13 +287,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
         addColumn(*row_it);
     }
 
-    for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows.begin();
-        row_it != p.contents.rows.end();
-        ++row_it)
-    {
-        addRow(*row_it);
-    }
-
     LLTextBox::Params text_p;
     text_p.name("comment_text");
     text_p.border_visible(false);
@@ -302,7 +294,15 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
     text_p.follows.flags(FOLLOWS_ALL);
     // word wrap was added accroding to the EXT-6841
     text_p.wrap(true);
-    addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
+    mCommentText = LLUICtrlFactory::create<LLTextBox>(text_p);
+    addChild(mCommentText);
+
+    for (LLInitParam::ParamIterator<LLScrollListItem::Params>::const_iterator row_it = p.contents.rows.begin();
+        row_it != p.contents.rows.end();
+        ++row_it)
+    {
+        addRow(*row_it);
+    }
 }
 
 S32 LLScrollListCtrl::getSearchColumn()
@@ -541,12 +541,7 @@ void LLScrollListCtrl::updateLayout()
         getRect().getWidth() - 2 * mBorderThickness,
         getRect().getHeight() - (2 * mBorderThickness ) - heading_size );
 
-    if (mCommentTextView == NULL)
-    {
-        mCommentTextView = getChildView("comment_text");
-    }
-
-    mCommentTextView->setShape(mItemListRect);
+    mCommentText->setShape(mItemListRect);
 
     // how many lines of content in a single "page"
     S32 page_lines =  getLinesPerPage();
@@ -1244,7 +1239,7 @@ void LLScrollListCtrl::deselectAllItems(bool no_commit_on_change)
 
 void LLScrollListCtrl::setCommentText(const std::string& comment_text)
 {
-    getChild<LLTextBox>("comment_text")->setValue(comment_text);
+    mCommentText->setValue(comment_text);
 }
 
 LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
@@ -1727,7 +1722,7 @@ void LLScrollListCtrl::draw()
 
     updateColumns();
 
-    getChildView("comment_text")->setVisible(mItemList.empty());
+    mCommentText->setVisible(mItemList.empty());
 
     drawItems();
 
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index f25ba61fd4..1f9f26e08b 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -530,7 +530,7 @@ private:
     class LLViewBorder* mBorder;
     LLHandle<LLContextMenu> mPopupMenuHandle;
 
-    LLView          *mCommentTextView;
+    LLTextBox*      mCommentText = nullptr;
 
     LLWString       mSearchString;
     LLFrameTimer    mSearchTimer;
-- 
cgit v1.2.3


From 5a3a6c6914b9c7a3b8e9f51075035326329d947d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:38:43 -0400
Subject: Fix excessive getChild calls from LLScrollBar reshape

---
 indra/llui/llscrollbar.cpp | 24 ++++++++++++------------
 indra/llui/llscrollbar.h   |  3 +++
 2 files changed, 15 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 9c73b1ba3f..d0eec387bd 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -113,7 +113,8 @@ LLScrollbar::LLScrollbar(const Params & p)
     up_btn.tab_stop(false);
     up_btn.follows.flags = (mOrientation == VERTICAL ? (FOLLOWS_RIGHT | FOLLOWS_TOP) : (FOLLOWS_LEFT | FOLLOWS_BOTTOM));
 
-    addChild(LLUICtrlFactory::create<LLButton>(up_btn));
+    mLineUpBtn = LLUICtrlFactory::create<LLButton>(up_btn);
+    addChild(mLineUpBtn);
 
     LLButton::Params down_btn(mOrientation == VERTICAL ? p.down_button : p.right_button);
     down_btn.name(std::string("Line Down"));
@@ -123,7 +124,8 @@ LLScrollbar::LLScrollbar(const Params & p)
     down_btn.mouse_held_callback.function(boost::bind(&LLScrollbar::onLineDownBtnPressed, this, _2));
     down_btn.tab_stop(false);
 
-    addChild(LLUICtrlFactory::create<LLButton>(down_btn));
+    mLineDownBtn = LLUICtrlFactory::create<LLButton>(down_btn);
+    addChild(mLineDownBtn);
 }
 
 
@@ -468,22 +470,20 @@ void LLScrollbar::reshape(S32 width, S32 height, bool called_from_parent)
 {
     if (width == getRect().getWidth() && height == getRect().getHeight()) return;
     LLView::reshape( width, height, called_from_parent );
-    LLButton* up_button = getChild<LLButton>("Line Up");
-    LLButton* down_button = getChild<LLButton>("Line Down");
 
     if (mOrientation == VERTICAL)
     {
-        up_button->reshape(up_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
-        down_button->reshape(down_button->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
-        up_button->setOrigin(0, getRect().getHeight() - up_button->getRect().getHeight());
-        down_button->setOrigin(0, 0);
+        mLineUpBtn->reshape(mLineUpBtn->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
+        mLineDownBtn->reshape(mLineDownBtn->getRect().getWidth(), llmin(getRect().getHeight() / 2, mThickness));
+        mLineUpBtn->setOrigin(0, getRect().getHeight() - mLineUpBtn->getRect().getHeight());
+        mLineDownBtn->setOrigin(0, 0);
     }
     else
     {
-        up_button->reshape(llmin(getRect().getWidth() / 2, mThickness), up_button->getRect().getHeight());
-        down_button->reshape(llmin(getRect().getWidth() / 2, mThickness), down_button->getRect().getHeight());
-        up_button->setOrigin(0, 0);
-        down_button->setOrigin(getRect().getWidth() - down_button->getRect().getWidth(), 0);
+        mLineUpBtn->reshape(llmin(getRect().getWidth() / 2, mThickness), mLineUpBtn->getRect().getHeight());
+        mLineDownBtn->reshape(llmin(getRect().getWidth() / 2, mThickness), mLineDownBtn->getRect().getHeight());
+        mLineUpBtn->setOrigin(0, 0);
+        mLineDownBtn->setOrigin(getRect().getWidth() - mLineDownBtn->getRect().getWidth(), 0);
     }
     updateThumbRect();
 }
diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h
index 7b935aa51b..9607355a9d 100644
--- a/indra/llui/llscrollbar.h
+++ b/indra/llui/llscrollbar.h
@@ -161,6 +161,9 @@ private:
     LLUIImagePtr        mTrackImageH;
 
     S32                 mThickness;
+
+    LLButton*           mLineUpBtn = nullptr;
+    LLButton*           mLineDownBtn = nullptr;
 };
 
 
-- 
cgit v1.2.3


From 316d815e7b97091a6ae34d48fc7672c59d613713 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:39:30 -0400
Subject: Fix getChild calls during draw in LLProgressView

---
 indra/newview/llprogressview.cpp | 15 +++++++++------
 indra/newview/llprogressview.h   |  4 ++++
 2 files changed, 13 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 7bef0339c5..135e42437a 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -81,6 +81,11 @@ bool LLProgressView::postBuild()
 {
     mProgressBar = getChild<LLProgressBar>("login_progress_bar");
 
+    mLogosLabel = getChild<LLTextBox>("logos_lbl");
+
+    mProgressText = getChild<LLTextBox>("progress_text");
+    mMessageText = getChild<LLTextBox>("message_text");
+
     // media control that is used to play intro video
     mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
     mMediaCtrl->setVisible( false );        // hidden initially
@@ -238,9 +243,8 @@ void LLProgressView::drawLogos(F32 alpha)
 
     // logos are tied to label,
     // due to potential resizes we have to figure offsets out on draw or resize
-    LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
     S32 offset_x, offset_y;
-    logos_label->localPointToScreen(0, 0, &offset_x, &offset_y);
+    mLogosLabel->localPointToScreen(0, 0, &offset_x, &offset_y);
     std::vector<TextureData>::const_iterator iter = mLogosList.begin();
     std::vector<TextureData>::const_iterator end = mLogosList.end();
     for (; iter != end; iter++)
@@ -325,7 +329,7 @@ void LLProgressView::draw()
 
 void LLProgressView::setText(const std::string& text)
 {
-    getChild<LLUICtrl>("progress_text")->setValue(text);
+    mProgressText->setValue(text);
 }
 
 void LLProgressView::setPercent(const F32 percent)
@@ -336,7 +340,7 @@ void LLProgressView::setPercent(const F32 percent)
 void LLProgressView::setMessage(const std::string& msg)
 {
     mMessage = msg;
-    getChild<LLUICtrl>("message_text")->setValue(mMessage);
+    mMessageText->setValue(mMessage);
 }
 
 void LLProgressView::loadLogo(const std::string &path,
@@ -387,8 +391,7 @@ void LLProgressView::initLogos()
     S32 icon_width, icon_height;
 
     // We don't know final screen rect yet, so we can't precalculate position fully
-    LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
-    S32 texture_start_x = (S32)logos_label->getFont()->getWidthF32(logos_label->getText()) + default_pad;
+    S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getText()) + default_pad;
     S32 texture_start_y = -7;
 
     // Normally we would just preload these textures from textures.xml,
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index db3f4a2e32..15b04a8eb9 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -36,6 +36,7 @@ class LLImageRaw;
 class LLButton;
 class LLProgressBar;
 class LLViewerTexture;
+class LLTextBox;
 
 class LLProgressView :
     public LLPanel,
@@ -85,6 +86,9 @@ public:
 protected:
     LLProgressBar* mProgressBar;
     LLMediaCtrl* mMediaCtrl;
+    LLTextBox* mLogosLabel = nullptr;
+    LLTextBox* mProgressText = nullptr;
+    LLTextBox* mMessageText = nullptr;
     F32 mPercentDone;
     std::string mMessage;
     LLButton*   mCancelBtn;
-- 
cgit v1.2.3


From 29c8fb0a76b4271471c5cbdf356d5256cb37e3ea Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:41:27 -0400
Subject: Fix excessive getChild calls during teleport from LLPanelGroup

---
 indra/newview/llpanelgroup.cpp | 127 ++++++++++++++++++-----------------------
 indra/newview/llpanelgroup.h   |  14 ++++-
 2 files changed, 68 insertions(+), 73 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 519f157973..598df0135e 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -113,7 +113,7 @@ void LLPanelGroup::onOpen(const LLSD& key)
     if(!key.has("action"))
     {
         setGroupID(group_id);
-        getChild<LLAccordionCtrl>("groups_accordion")->expandDefaultTab();
+        mGroupsAccordion->expandDefaultTab();
         return;
     }
 
@@ -148,24 +148,26 @@ void LLPanelGroup::onOpen(const LLSD& key)
 
 bool LLPanelGroup::postBuild()
 {
+    mGroupsAccordion = getChild<LLAccordionCtrl>("groups_accordion");
+
     mDefaultNeedsApplyMesg = getString("default_needs_apply_text");
     mWantApplyMesg = getString("want_apply_text");
 
-    LLButton* button;
+    mButtonApply = getChild<LLButton>("btn_apply");
+    mButtonApply->setClickedCallback(onBtnApply, this);
+    mButtonApply->setVisible(true);
+    mButtonApply->setEnabled(false);
 
-    button = getChild<LLButton>("btn_apply");
-    button->setClickedCallback(onBtnApply, this);
-    button->setVisible(true);
-    button->setEnabled(false);
+    mButtonCall = getChild<LLButton>("btn_call");
+    mButtonCall->setClickedCallback(onBtnGroupCallClicked, this);
 
-    button = getChild<LLButton>("btn_call");
-    button->setClickedCallback(onBtnGroupCallClicked, this);
+    mButtonChat = getChild<LLButton>("btn_chat");
+    mButtonChat->setClickedCallback(onBtnGroupChatClicked, this);
 
-    button = getChild<LLButton>("btn_chat");
-    button->setClickedCallback(onBtnGroupChatClicked, this);
+    mButtonRefresh = getChild<LLButton>("btn_refresh");
+    mButtonRefresh->setClickedCallback(onBtnRefresh, this);
 
-    button = getChild<LLButton>("btn_refresh");
-    button->setClickedCallback(onBtnRefresh, this);
+    mButtonCancel = getChild<LLButton>("btn_cancel");
 
     childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
 
@@ -184,7 +186,7 @@ bool LLPanelGroup::postBuild()
     if(panel_general)
     {
         panel_general->setupCtrls(this);
-        button = panel_general->getChild<LLButton>("btn_join");
+        LLButton* button = panel_general->getChild<LLButton>("btn_join");
         button->setVisible(false);
         button->setEnabled(true);
 
@@ -199,9 +201,8 @@ bool LLPanelGroup::postBuild()
     return true;
 }
 
-void LLPanelGroup::reposButton(const std::string& name)
+void LLPanelGroup::reposButton(LLButton* button)
 {
-    LLButton* button = findChild<LLButton>(name);
     if(!button)
         return;
     LLRect btn_rect = button->getRect();
@@ -211,23 +212,20 @@ void LLPanelGroup::reposButton(const std::string& name)
 
 void LLPanelGroup::reposButtons()
 {
-    LLButton* button_refresh = findChild<LLButton>("btn_refresh");
-    LLButton* button_cancel = findChild<LLButton>("btn_cancel");
-
-    if(button_refresh && button_cancel && button_refresh->getVisible() && button_cancel->getVisible())
+    if(mButtonRefresh && mButtonCancel && mButtonRefresh->getVisible() && mButtonCancel->getVisible())
     {
-        LLRect btn_refresh_rect = button_refresh->getRect();
-        LLRect btn_cancel_rect = button_cancel->getRect();
+        LLRect btn_refresh_rect = mButtonRefresh->getRect();
+        LLRect btn_cancel_rect = mButtonCancel->getRect();
         btn_refresh_rect.setLeftTopAndSize( btn_cancel_rect.mLeft + btn_cancel_rect.getWidth() + 2,
             btn_refresh_rect.getHeight() + 2, btn_refresh_rect.getWidth(), btn_refresh_rect.getHeight());
-        button_refresh->setRect(btn_refresh_rect);
+        mButtonRefresh->setRect(btn_refresh_rect);
     }
 
-    reposButton("btn_apply");
-    reposButton("btn_refresh");
-    reposButton("btn_cancel");
-    reposButton("btn_chat");
-    reposButton("btn_call");
+    reposButton(mButtonApply);
+    reposButton(mButtonRefresh);
+    reposButton(mButtonCancel);
+    reposButton(mButtonChat);
+    reposButton(mButtonCall);
 }
 
 void LLPanelGroup::reshape(S32 width, S32 height, bool called_from_parent )
@@ -279,9 +277,9 @@ void LLPanelGroup::onBtnJoin()
     }
     else
     {
-    LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
-    LLGroupActions::join(mID);
-}
+        LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
+        LLGroupActions::join(mID);
+    }
 }
 
 void LLPanelGroup::changed(LLGroupChange gc)
@@ -299,7 +297,7 @@ void LLPanelGroup::onChange(EStatusType status, const LLSD& channelInfo, bool pr
         return;
     }
 
-    childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
+    mButtonCall->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
 }
 
 void LLPanelGroup::notifyObservers()
@@ -372,32 +370,23 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
         group_name_ctrl->setToolTip(group_name);
     }
 
-    LLButton* button_apply = findChild<LLButton>("btn_apply");
-    LLButton* button_refresh = findChild<LLButton>("btn_refresh");
-
-    LLButton* button_cancel = findChild<LLButton>("btn_cancel");
-    LLButton* button_call = findChild<LLButton>("btn_call");
-    LLButton* button_chat = findChild<LLButton>("btn_chat");
-
-
     bool is_null_group_id = group_id == LLUUID::null;
-    if(button_apply)
-        button_apply->setVisible(!is_null_group_id);
-    if(button_refresh)
-        button_refresh->setVisible(!is_null_group_id);
+    if(mButtonApply)
+        mButtonApply->setVisible(!is_null_group_id);
+    if(mButtonRefresh)
+        mButtonRefresh->setVisible(!is_null_group_id);
 
-    if(button_cancel)
-        button_cancel->setVisible(!is_null_group_id);
+    if(mButtonCancel)
+        mButtonCancel->setVisible(!is_null_group_id);
 
-    if(button_call)
-            button_call->setVisible(!is_null_group_id);
-    if(button_chat)
-            button_chat->setVisible(!is_null_group_id);
+    if(mButtonCall)
+            mButtonCall->setVisible(!is_null_group_id);
+    if(mButtonChat)
+            mButtonChat->setVisible(!is_null_group_id);
 
     getChild<LLUICtrl>("prepend_founded_by")->setVisible(!is_null_group_id);
 
-    LLAccordionCtrl* tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
-    tab_ctrl->reset();
+    mGroupsAccordion->reset();
 
     LLAccordionCtrlTab* tab_general = getChild<LLAccordionCtrlTab>("group_general_tab");
     LLAccordionCtrlTab* tab_roles = getChild<LLAccordionCtrlTab>("group_roles_tab");
@@ -431,10 +420,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
         getChild<LLUICtrl>("group_name")->setVisible(false);
         getChild<LLUICtrl>("group_name_editor")->setVisible(true);
 
-        if(button_call)
-            button_call->setVisible(false);
-        if(button_chat)
-            button_chat->setVisible(false);
+        if(mButtonCall)
+            mButtonCall->setVisible(false);
+        if(mButtonChat)
+            mButtonChat->setVisible(false);
     }
     else
     {
@@ -463,15 +452,15 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
         getChild<LLUICtrl>("group_name")->setVisible(true);
         getChild<LLUICtrl>("group_name_editor")->setVisible(false);
 
-        if(button_apply)
-            button_apply->setVisible(is_member);
-        if(button_call)
-            button_call->setVisible(is_member);
-        if(button_chat)
-            button_chat->setVisible(is_member);
+        if(mButtonApply)
+            mButtonApply->setVisible(is_member);
+        if(mButtonCall)
+            mButtonCall->setVisible(is_member);
+        if(mButtonChat)
+            mButtonChat->setVisible(is_member);
     }
 
-    tab_ctrl->arrange();
+    mGroupsAccordion->arrange();
 
     reposButtons();
     update(GC_ALL);//show/hide "join" button if data is already ready
@@ -539,20 +528,18 @@ void LLPanelGroup::draw()
     if (mRefreshTimer.hasExpired())
     {
         mRefreshTimer.stop();
-        childEnable("btn_refresh");
-        childEnable("groups_accordion");
+        if(mButtonRefresh) mButtonRefresh->setEnabled(true);
+        mGroupsAccordion->setEnabled(true);
     }
 
-    LLButton* button_apply = findChild<LLButton>("btn_apply");
-
-    if(button_apply && button_apply->getVisible())
+    if(mButtonApply && mButtonApply->getVisible())
     {
         bool enable = false;
         std::string mesg;
         for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
             enable = enable || (*it)->needsApply(mesg);
 
-        childSetEnabled("btn_apply", enable);
+        mButtonApply->setEnabled(enable);
     }
 }
 
@@ -568,8 +555,8 @@ void LLPanelGroup::refreshData()
     setGroupID(getID());
 
     // 5 second timeout
-    childDisable("btn_refresh");
-    childDisable("groups_accordion");
+    if(mButtonRefresh) mButtonRefresh->setEnabled(false);
+    mGroupsAccordion->setEnabled(false);
 
     mRefreshTimer.start();
     mRefreshTimer.setTimerExpirySec(5);
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index ede8118720..1dbc8c32ff 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -33,11 +33,12 @@
 
 class LLOfferInfo;
 
-const F32 UPDATE_MEMBERS_SECONDS_PER_FRAME = 0.005; // 5ms
+const F32 UPDATE_MEMBERS_SECONDS_PER_FRAME = 0.005f; // 5ms
 
 // Forward declares
 class LLPanelGroupTab;
 class LLTabContainer;
+class LLAccordionCtrl;
 class LLAgent;
 
 
@@ -98,7 +99,7 @@ protected:
     static void onBtnGroupCallClicked(void*);
     static void onBtnGroupChatClicked(void*);
 
-    void reposButton(const std::string& name);
+    void reposButton(LLButton* button);
     void reposButtons();
 
 
@@ -114,7 +115,14 @@ protected:
 
     std::vector<LLPanelGroupTab* > mTabs;
 
-    LLButton*       mButtonJoin;
+    LLAccordionCtrl* mGroupsAccordion = nullptr;
+
+    LLButton*       mButtonJoin = nullptr;
+    LLButton*       mButtonApply = nullptr;
+    LLButton*       mButtonCall = nullptr;
+    LLButton*       mButtonChat = nullptr;
+    LLButton*       mButtonRefresh = nullptr;
+    LLButton*       mButtonCancel = nullptr;
     LLUICtrl*       mJoinText;
 };
 
-- 
cgit v1.2.3


From 7dd3f5db0b7da458a49df8ae2f40138a83021dec Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:41:58 -0400
Subject: Fix getChild calls during draw in LLFloaterWorldMap

---
 indra/newview/llfloaterworldmap.cpp | 122 +++++++++++++++++++++---------------
 indra/newview/llfloaterworldmap.h   |  30 ++++++++-
 2 files changed, 102 insertions(+), 50 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 2a72a361d6..d459716fc4 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -39,6 +39,8 @@
 #include "llbutton.h"
 #include "llcallingcard.h"
 #include "llcombobox.h"
+#include "llcheckboxctrl.h"
+#include "llsliderctrl.h"
 #include "llviewercontrol.h"
 #include "llcommandhandler.h"
 #include "lldraghandle.h"
@@ -317,15 +319,36 @@ bool LLFloaterWorldMap::postBuild()
     mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
     mMapView->setPan(0, 0, true);
 
+    mTeleportButton = getChild<LLButton>("Teleport");
+    mShowDestinationButton = getChild<LLButton>("Show Destination");
+    mCopySlurlButton = getChild<LLButton>("copy_slurl");
+    mGoHomeButton = getChild<LLButton>("Go Home");
+
+    mPeopleCheck = getChild<LLCheckBoxCtrl>("people_chk");
+    mInfohubCheck = getChild<LLCheckBoxCtrl>("infohub_chk");
+    mTelehubCheck = getChild<LLCheckBoxCtrl>("telehub_chk");
+    mLandSaleCheck = getChild<LLCheckBoxCtrl>("land_for_sale_chk");
+    mEventsCheck = getChild<LLCheckBoxCtrl>("event_chk");
+    mEventsMatureCheck = getChild<LLCheckBoxCtrl>("events_mature_chk");
+    mEventsAdultCheck = getChild<LLCheckBoxCtrl>("events_adult_chk");
+
+    mAvatarIcon = getChild<LLUICtrl>("avatar_icon");
+    mLandmarkIcon = getChild<LLUICtrl>("landmark_icon");
+    mLocationIcon = getChild<LLUICtrl>("location_icon");
+
+    mTeleportCoordSpinX = getChild<LLUICtrl>("teleport_coordinate_x");
+    mTeleportCoordSpinY = getChild<LLUICtrl>("teleport_coordinate_y");
+    mTeleportCoordSpinZ = getChild<LLUICtrl>("teleport_coordinate_z");
+
     LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
     avatar_combo->selectFirstItem();
     avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
     avatar_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
     mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);
 
-    LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
-    location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
-    location_editor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
+    mLocationEditor = getChild<LLSearchEditor>("location");
+    mLocationEditor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
+    mLocationEditor->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
 
     getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
     mListSearchResults = childGetListInterface("search_results");
@@ -336,8 +359,9 @@ bool LLFloaterWorldMap::postBuild()
     landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
     mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
 
+    mZoomSlider = getChild<LLSliderCtrl>("zoom slider");
     F32 slider_zoom = mMapView->getZoom();
-    getChild<LLUICtrl>("zoom slider")->setValue(slider_zoom);
+    mZoomSlider->setValue(slider_zoom);
 
     getChild<LLPanel>("expand_btn_panel")->setMouseDownCallback(boost::bind(&LLFloaterWorldMap::onExpandCollapseBtn, this));
 
@@ -414,7 +438,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
         const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
         LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id);
 
-        getChild<LLUICtrl>("location")->setFocus( true);
+        mLocationEditor->setFocus( true);
         gFocusMgr.triggerFocusFlash();
 
         buildAvatarIDList();
@@ -452,9 +476,9 @@ bool LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
         S32 map_y = y - mMapView->getRect().mBottom;
         if (mMapView->pointInView(map_x, map_y))
         {
-            F32 old_slider_zoom = (F32) getChild<LLUICtrl>("zoom slider")->getValue().asReal();
+            F32 old_slider_zoom = (F32) mZoomSlider->getValue().asReal();
             F32 slider_zoom     = old_slider_zoom + ((F32) clicks * -0.3333f);
-            getChild<LLUICtrl>("zoom slider")->setValue(LLSD(slider_zoom));
+            mZoomSlider->setValue(LLSD(slider_zoom));
             mMapView->zoomWithPivot(slider_zoom, map_x, map_y);
             return true;
         }
@@ -483,32 +507,32 @@ void LLFloaterWorldMap::draw()
     LLViewerRegion* regionp = gAgent.getRegion();
     bool agent_on_prelude = (regionp && regionp->isPrelude());
     bool enable_go_home = gAgent.isGodlike() || !agent_on_prelude;
-    getChildView("Go Home")->setEnabled(enable_go_home);
+    mGoHomeButton->setEnabled(enable_go_home);
 
     updateLocation();
 
     LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
     if (LLTracker::TRACKING_AVATAR == tracking_status)
     {
-        getChild<LLUICtrl>("avatar_icon")->setColor( map_track_color);
+        mAvatarIcon->setColor( map_track_color);
     }
     else
     {
-        getChild<LLUICtrl>("avatar_icon")->setColor( map_track_disabled_color);
+        mAvatarIcon->setColor( map_track_disabled_color);
     }
 
     if (LLTracker::TRACKING_LANDMARK == tracking_status)
     {
-        getChild<LLUICtrl>("landmark_icon")->setColor( map_track_color);
+        mLandmarkIcon->setColor( map_track_color);
     }
     else
     {
-        getChild<LLUICtrl>("landmark_icon")->setColor( map_track_disabled_color);
+        mLandmarkIcon->setColor( map_track_disabled_color);
     }
 
     if (LLTracker::TRACKING_LOCATION == tracking_status)
     {
-        getChild<LLUICtrl>("location_icon")->setColor( map_track_color);
+        mLocationIcon->setColor( map_track_color);
     }
     else
     {
@@ -518,11 +542,11 @@ void LLFloaterWorldMap::draw()
             double value = fmod(seconds, 2);
             value = 0.5 + 0.5*cos(value * F_PI);
             LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0);
-            getChild<LLUICtrl>("location_icon")->setColor( loading_color);
+            mLocationIcon->setColor( loading_color);
         }
         else
         {
-            getChild<LLUICtrl>("location_icon")->setColor( map_track_disabled_color);
+            mLocationIcon->setColor( map_track_disabled_color);
         }
     }
 
@@ -532,27 +556,27 @@ void LLFloaterWorldMap::draw()
         centerOnTarget(true);
     }
 
-    getChildView("Teleport")->setEnabled((bool)tracking_status);
+    mTeleportButton->setEnabled((bool)tracking_status);
     //  getChildView("Clear")->setEnabled((bool)tracking_status);
-    getChildView("Show Destination")->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking());
-    getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
+    mShowDestinationButton->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking());
+    mCopySlurlButton->setEnabled((mSLURL.isValid()) );
 
     setMouseOpaque(true);
     getDragHandle()->setMouseOpaque(true);
 
-    mMapView->zoom((F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal());
+    mMapView->zoom((F32)mZoomSlider->getValue().asReal());
 
     // Enable/disable checkboxes depending on the zoom level
     // If above threshold level (i.e. low res) -> Disable all checkboxes
     // If under threshold level (i.e. high res) -> Enable all checkboxes
     bool enable = mMapView->showRegionInfo();
-    getChildView("people_chk")->setEnabled(enable);
-    getChildView("infohub_chk")->setEnabled(enable);
-    getChildView("telehub_chk")->setEnabled(enable);
-    getChildView("land_for_sale_chk")->setEnabled(enable);
-    getChildView("event_chk")->setEnabled(enable);
-    getChildView("events_mature_chk")->setEnabled(enable);
-    getChildView("events_adult_chk")->setEnabled(enable);
+    mPeopleCheck->setEnabled(enable);
+    mInfohubCheck->setEnabled(enable);
+    mTelehubCheck->setEnabled(enable);
+    mLandSaleCheck->setEnabled(enable);
+    mEventsCheck->setEnabled(enable);
+    mEventsMatureCheck->setEnabled(enable);
+    mEventsAdultCheck->setEnabled(enable);
 
     LLFloater::draw();
 }
@@ -576,7 +600,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
         // convenience.
         if(gAgent.isGodlike())
         {
-            getChild<LLUICtrl>("teleport_coordinate_z")->setValue(LLSD(200.f));
+            mTeleportCoordSpinZ->setValue(LLSD(200.f));
         }
         // Don't re-request info if we already have it or we won't have it in time to teleport
         if (mTrackedStatus != LLTracker::TRACKING_AVATAR || avatar_id != mTrackedAvatarID)
@@ -711,9 +735,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
 // enable/disable teleport destination coordinates
 void LLFloaterWorldMap::enableTeleportCoordsDisplay( bool enabled )
 {
-    childSetEnabled("teleport_coordinate_x", enabled );
-    childSetEnabled("teleport_coordinate_y", enabled );
-    childSetEnabled("teleport_coordinate_z", enabled );
+    mTeleportCoordSpinX->setEnabled(enabled);
+    mTeleportCoordSpinY->setEnabled(enabled);
+    mTeleportCoordSpinZ->setEnabled(enabled);
 }
 
 // update display of teleport destination coordinates - pos is in global coordinates
@@ -728,9 +752,9 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
     F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, (F64)REGION_HEIGHT_METERS );
 
     // write in the values
-    childSetValue("teleport_coordinate_x", region_local_x );
-    childSetValue("teleport_coordinate_y", region_local_y );
-    childSetValue("teleport_coordinate_z", region_local_z );
+    mTeleportCoordSpinX->setValue(region_local_x);
+    mTeleportCoordSpinY->setValue(region_local_y);
+    mTeleportCoordSpinZ->setValue(region_local_z);
 }
 
 void LLFloaterWorldMap::updateLocation()
@@ -757,7 +781,7 @@ void LLFloaterWorldMap::updateLocation()
                 mSetToUserPosition = false;
 
                 // Fill out the location field
-                getChild<LLUICtrl>("location")->setValue(agent_sim_name);
+                mLocationEditor->setValue(agent_sim_name);
 
                 // update the coordinate display with location of avatar in region
                 updateTeleportCoordsDisplay( agentPos );
@@ -790,7 +814,7 @@ void LLFloaterWorldMap::updateLocation()
             }
         }
 
-        getChild<LLUICtrl>("location")->setValue(sim_name);
+        mLocationEditor->setValue(sim_name);
 
         // refresh coordinate display to reflect where user clicked.
         LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
@@ -825,17 +849,17 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3
     else
     {
         // fill in UI based on URL
-        gFloaterWorldMap->getChild<LLUICtrl>("location")->setValue(region_name);
+        mLocationEditor->setValue(region_name);
 
         // Save local coords to highlight position after region global
         // position is returned.
-        gFloaterWorldMap->mCompletingRegionPos.set(
+        mCompletingRegionPos.set(
                                                    (F32)x_coord, (F32)y_coord, (F32)z_coord);
 
         // pass sim name to combo box
-        gFloaterWorldMap->mCompletingRegionName = region_name;
+        mCompletingRegionName = region_name;
         LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name);
-        LLStringUtil::toLower(gFloaterWorldMap->mCompletingRegionName);
+        LLStringUtil::toLower(mCompletingRegionName);
         LLWorldMap::getInstance()->setTrackingCommit();
     }
 }
@@ -1067,7 +1091,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
 
     F32 min_power = log(pixels_per_region/256.f)/log(2.f);
 
-    getChild<LLSliderCtrl>("zoom slider")->setMinValue(min_power);
+    mZoomSlider->setMinValue(min_power);
 }
 
 
@@ -1229,7 +1253,7 @@ void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus )
 void LLFloaterWorldMap::updateSearchEnabled()
 {
     if (childHasKeyboardFocus("location") &&
-        getChild<LLUICtrl>("location")->getValue().asString().length() > 0)
+        mLocationEditor->getValue().asString().length() > 0)
     {
         setDefaultBtn("DoSearch");
     }
@@ -1250,14 +1274,14 @@ void LLFloaterWorldMap::onLocationCommit()
     mCompletingRegionName = "";
     mLastRegionName = "";
 
-    std::string str = getChild<LLUICtrl>("location")->getValue().asString();
+    std::string str = mLocationEditor->getValue().asString();
 
     // Trim any leading and trailing spaces in the search target
     std::string saved_str = str;
     LLStringUtil::trim( str );
     if ( str != saved_str )
     {   // Set the value in the UI if any spaces were removed
-        getChild<LLUICtrl>("location")->setValue(str);
+        mLocationEditor->setValue(str);
     }
 
     // Don't try completing empty name (STORM-1427).
@@ -1287,11 +1311,11 @@ void LLFloaterWorldMap::onCoordinatesCommit()
         return;
     }
 
-    S32 x_coord = (S32)childGetValue("teleport_coordinate_x").asReal();
-    S32 y_coord = (S32)childGetValue("teleport_coordinate_y").asReal();
-    S32 z_coord = (S32)childGetValue("teleport_coordinate_z").asReal();
+    S32 x_coord = (S32)mTeleportCoordSpinX->getValue().asReal();
+    S32 y_coord = (S32)mTeleportCoordSpinY->getValue().asReal();
+    S32 z_coord = (S32)mTeleportCoordSpinZ->getValue().asReal();
 
-    const std::string region_name = childGetValue("location").asString();
+    const std::string region_name = mLocationEditor->getValue().asString();
 
     trackURL( region_name, x_coord, y_coord, z_coord );
 }
@@ -1420,7 +1444,7 @@ void LLFloaterWorldMap::teleport()
         && av_tracker.haveTrackingInfo() )
     {
         pos_global = av_tracker.getGlobalPos();
-        pos_global.mdV[VZ] = getChild<LLUICtrl>("teleport_coordinate_z")->getValue();
+        pos_global.mdV[VZ] = mTeleportCoordSpinZ->getValue();
     }
     else if ( LLTracker::TRACKING_LANDMARK == tracking_status)
     {
@@ -1654,7 +1678,7 @@ void LLFloaterWorldMap::onCommitSearchResult()
             pos_global.mdV[VY] += (F64)pos_local.mV[VY];
             pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
 
-            getChild<LLUICtrl>("location")->setValue(sim_name);
+            mLocationEditor->setValue(sim_name);
             trackLocation(pos_global);
             setDefaultBtn("Teleport");
             break;
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 6765157e55..269b231e37 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -45,6 +45,11 @@ class LLItemInfo;
 class LLLineEditor;
 class LLTabContainer;
 class LLWorldMapView;
+class LLButton;
+class LLCheckBoxCtrl;
+class LLSliderCtrl;
+class LLSpinCtrl;
+class LLSearchEditor;
 
 class LLFloaterWorldMap : public LLFloater
 {
@@ -142,7 +147,6 @@ protected:
     void            buildLandmarkIDLists();
     void            flyToLandmark();
     void            teleportToLandmark();
-    void            setLandmarkVisited();
 
     void            buildAvatarIDList();
     void            flyToAvatar();
@@ -195,6 +199,30 @@ private:
     LLCtrlListInterface *   mListLandmarkCombo;
     LLCtrlListInterface *   mListSearchResults;
 
+    LLButton*               mTeleportButton = nullptr;
+    LLButton*               mShowDestinationButton = nullptr;
+    LLButton*               mCopySlurlButton = nullptr;
+    LLButton*               mGoHomeButton = nullptr;
+
+    LLCheckBoxCtrl*         mPeopleCheck = nullptr;
+    LLCheckBoxCtrl*         mInfohubCheck = nullptr;
+    LLCheckBoxCtrl*         mTelehubCheck = nullptr;
+    LLCheckBoxCtrl*         mLandSaleCheck = nullptr;
+    LLCheckBoxCtrl*         mEventsCheck = nullptr;
+    LLCheckBoxCtrl*         mEventsMatureCheck = nullptr;
+    LLCheckBoxCtrl*         mEventsAdultCheck = nullptr;
+
+    LLUICtrl*               mAvatarIcon = nullptr;
+    LLUICtrl*               mLandmarkIcon = nullptr;
+    LLUICtrl*               mLocationIcon = nullptr;
+
+    LLSearchEditor*         mLocationEditor = nullptr;
+    LLUICtrl*               mTeleportCoordSpinX = nullptr;
+    LLUICtrl*               mTeleportCoordSpinY = nullptr;
+    LLUICtrl*               mTeleportCoordSpinZ = nullptr;
+
+    LLSliderCtrl*           mZoomSlider = nullptr;
+
     boost::signals2::connection mTeleportFinishConnection;
 };
 
-- 
cgit v1.2.3


From 2d595bd00cde3c0501ce44b6ab2b11d53347828d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:42:20 -0400
Subject: Fix findChild calls during draw from LLFloaterSnapshot

---
 indra/newview/llfloatersnapshot.cpp | 9 +++++----
 indra/newview/llfloatersnapshot.h   | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index e03b11e572..ddc567c029 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -192,7 +192,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
         }
     }
 
-    bool use_freeze_frame = floaterp->getChild<LLUICtrl>("freeze_frame_check")->getValue().asBoolean();
+    bool use_freeze_frame = floaterp->mFreezeFrameCheck && floaterp->mFreezeFrameCheck->getValue().asBoolean();
 
     if (use_freeze_frame)
     {
@@ -720,7 +720,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool
                 new_width = spanel->getTypedPreviewWidth();
                 new_height = spanel->getTypedPreviewHeight();
 
-                // Limit custom size for inventory snapshots to 512x512 px.
+                // Limit custom size for inventory snapshots to 2048x2048 px.
                 if (getActiveSnapshotType(view) == LLSnapshotModel::SNAPSHOT_TEXTURE)
                 {
                     new_width = llmin(new_width, MAX_TEXTURE_SIZE);
@@ -1002,8 +1002,9 @@ bool LLFloaterSnapshot::postBuild()
     getChild<LLUICtrl>("layer_types")->setValue("colors");
     getChildView("layer_types")->setEnabled(false);
 
-    getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
-    childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this);
+    mFreezeFrameCheck = getChild<LLUICtrl>("freeze_frame_check");
+    mFreezeFrameCheck->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
+    mFreezeFrameCheck->setCommitCallback(&ImplBase::onCommitFreezeFrame, this);
 
     getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
     childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this);
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index ac5a472b03..6df851b839 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -72,6 +72,7 @@ protected:
     LLUICtrl* mThumbnailPlaceholder;
     LLUICtrl *mRefreshBtn, *mRefreshLabel;
     LLUICtrl *mSucceessLblPanel, *mFailureLblPanel;
+    LLUICtrl* mFreezeFrameCheck = nullptr;
 };
 
 class LLFloaterSnapshotBase::ImplBase
-- 
cgit v1.2.3


From b5491416a0d26261b90fd37edf462fe9b9e0ab36 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 23 Jul 2024 21:43:09 -0400
Subject: Fix getChild calls during draw from LLFloaterIMSessionTab

---
 indra/newview/llfloaterimsessiontab.cpp | 4 ++--
 indra/newview/llfloaterimsessiontab.h   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index a0b56b14f0..2eebb6cc64 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -262,6 +262,7 @@ bool LLFloaterIMSessionTab::postBuild()
 {
     bool result;
 
+    mContentsView = getChild<LLView>("contents_view");
     mBodyStack = getChild<LLLayoutStack>("main_stack");
     mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels");
 
@@ -861,7 +862,6 @@ void LLFloaterIMSessionTab::hideOrShowTitle()
 {
     const LLFloater::Params& default_params = LLFloater::getDefaultParams();
     S32 floater_header_size = default_params.header_height;
-    LLView* floater_contents = getChild<LLView>("contents_view");
 
     LLRect floater_rect = getLocalRect();
     S32 top_border_of_contents = floater_rect.mTop - (isTornOff()? floater_header_size : 0);
@@ -869,7 +869,7 @@ void LLFloaterIMSessionTab::hideOrShowTitle()
     LLRect contents_rect (0, top_border_of_contents, floater_rect.mRight, floater_rect.mBottom);
     mDragHandle->setShape(handle_rect);
     mDragHandle->setVisible(isTornOff());
-    floater_contents->setShape(contents_rect);
+    mContentsView->setShape(contents_rect);
 }
 
 void LLFloaterIMSessionTab::updateSessionName(const std::string& name)
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 0a8502cfc5..29e10184b1 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -164,6 +164,7 @@ protected:
     LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item);
 
     LLUUID mSessionID;
+    LLView* mContentsView;
     LLLayoutStack* mBodyStack;
     LLLayoutStack* mParticipantListAndHistoryStack;
     LLLayoutPanel* mParticipantListPanel;   // add the widgets to that see mConversationsListPanel
-- 
cgit v1.2.3


From 11448d490faeb0bb979f6296b97252548a9415a6 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 11:52:47 -0400
Subject: Fix findChild stutter during teleports

---
 indra/newview/llviewermenu.cpp | 75 +++++++++++++++++++++++++++++++++---------
 1 file changed, 59 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2687938b35..4fcfe1a120 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -350,7 +350,10 @@ class LLMenuParcelObserver : public LLParcelObserver
 public:
     LLMenuParcelObserver();
     ~LLMenuParcelObserver();
-    virtual void changed();
+    void changed() override;
+private:
+    LLHandle<LLUICtrl> mLandBuyHandle;
+    LLHandle<LLUICtrl> mLandBuyPassHandle;
 };
 
 static LLMenuParcelObserver* gMenuParcelObserver = NULL;
@@ -359,6 +362,8 @@ static LLUIListener sUIListener;
 
 LLMenuParcelObserver::LLMenuParcelObserver()
 {
+    mLandBuyHandle = gMenuLand->getChild<LLMenuItemCallGL>("Land Buy")->getHandle();
+    mLandBuyPassHandle = gMenuLand->getChild<LLMenuItemCallGL>("Land Buy Pass")->getHandle();
     LLViewerParcelMgr::getInstance()->addObserver(this);
 }
 
@@ -372,18 +377,17 @@ void LLMenuParcelObserver::changed()
     LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
     if (gMenuLand && parcel)
     {
-        LLView* child = gMenuLand->findChild<LLView>("Land Buy Pass");
-        if (child)
-        {
-            child->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
-        }
+	    if (!mLandBuyPassHandle.isDead())
+	    {
+	        LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
+	        static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+	    }
 
-        child = gMenuLand->findChild<LLView>("Land Buy");
-        if (child)
-        {
-            bool buyable = enable_buy_land(NULL);
-            child->setEnabled(buyable);
-        }
+	    if (!mLandBuyHandle.isDead())
+	    {
+	        bool buyable = enable_buy_land(NULL);
+	        static_cast<LLMenuItemCallGL*>(mLandBuyHandle.get())->setEnabled(buyable);
+	    }
     }
 }
 
@@ -402,10 +406,34 @@ void initialize_menus();
 // Break up groups of more than 6 items with separators
 //-----------------------------------------------------------------------------
 
-void set_merchant_SLM_menu()
+void set_merchant_SLM_menu();
+
+class LLSLMMenuUpdater
+{
+public:
+    LLSLMMenuUpdater();
+    ~LLSLMMenuUpdater() = default;
+
+    void setMerchantMenu();
+    void checkMerchantStatus(bool force);
+
+private:
+    LLHandle<LLView> mMarketplaceListingsItem;
+};
+
+static LLSLMMenuUpdater* gSLMMenuUpdater = NULL;
+
+LLSLMMenuUpdater::LLSLMMenuUpdater()
+{
+    mMarketplaceListingsItem = gMenuHolder->getChild<LLView>("MarketplaceListings")->getHandle();
+}
+void LLSLMMenuUpdater::setMerchantMenu()
 {
     // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool
-    gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(true);
+    if(!mMarketplaceListingsItem.isDead())
+    {
+        mMarketplaceListingsItem.get()->setVisible(true);
+    }
     LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
     gToolBarView->enableCommand(command->id(), true);
 
@@ -422,7 +450,7 @@ void set_merchant_SLM_menu()
     }
 }
 
-void check_merchant_status(bool force)
+void LLSLMMenuUpdater::checkMerchantStatus(bool force)
 {
     if (force)
     {
@@ -430,7 +458,10 @@ void check_merchant_status(bool force)
         LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED);
     }
     // Hide SLM related menu item
-    gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(false);
+    if(!mMarketplaceListingsItem.isDead())
+    {
+        mMarketplaceListingsItem.get()->setVisible(false);
+    }
 
     // Also disable the toolbar button for Marketplace Listings
     LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
@@ -440,6 +471,16 @@ void check_merchant_status(bool force)
     LLMarketplaceData::instance().initializeSLM(boost::bind(&set_merchant_SLM_menu));
 }
 
+void set_merchant_SLM_menu()
+{
+   if(gSLMMenuUpdater) gSLMMenuUpdater->setMerchantMenu();
+}
+
+void check_merchant_status(bool force)
+{
+   if(gSLMMenuUpdater) gSLMMenuUpdater->checkMerchantStatus(force);
+}
+
 void init_menus()
 {
     // Initialize actions
@@ -555,6 +596,8 @@ void init_menus()
     // Let land based option enable when parcel changes
     gMenuParcelObserver = new LLMenuParcelObserver();
 
+    gSLMMenuUpdater = new LLSLMMenuUpdater();
+
     gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
     gLoginMenuBarView->arrangeAndClear();
     LLRect menuBarRect = gLoginMenuBarView->getRect();
-- 
cgit v1.2.3


From c8e988e1a16e9b6f7f8befaaf9752250dca25183 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 12:44:02 -0400
Subject: Fix excessive findChild calls when a docked control is open from
 LLDockControl::getAllowedRect

---
 indra/llui/lldockcontrol.cpp | 7 ++++++-
 indra/llui/lldockcontrol.h   | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index bf0862e8a9..11dbad8c09 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -43,6 +43,8 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,
         mDockWidgetHandle = dockWidget->getHandle();
     }
 
+    mNonToolbarPanelHandle = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getHandle();
+
     if (dockableFloater->isDocked())
     {
         on();
@@ -97,7 +99,10 @@ void LLDockControl::setDock(LLView* dockWidget)
 
 void LLDockControl::getAllowedRect(LLRect& rect)
 {
-    rect = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getRect();
+    if(!mNonToolbarPanelHandle.isDead())
+    {
+        rect = mNonToolbarPanelHandle.get()->getRect();
+    }
 }
 
 void LLDockControl::repositionDockable()
diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h
index fb0bf7d251..7e31330713 100644
--- a/indra/llui/lldockcontrol.h
+++ b/indra/llui/lldockcontrol.h
@@ -84,6 +84,7 @@ private:
     bool mDockWidgetVisible;
     DocAt mDockAt;
     LLHandle<LLView> mDockWidgetHandle;
+    LLHandle<LLView> mNonToolbarPanelHandle;
     LLRect mPrevDockRect;
     LLRect mRootRect;
     LLRect mFloaterRect;
-- 
cgit v1.2.3


From 24fb96c9af5cb2d566617a8bef827af29b1d8f58 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 12:45:06 -0400
Subject: Fix LLViewerEventRecorder triggering findChild events when it's
 disabled

---
 indra/llui/llviewereventrecorder.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp
index 1bf3e3c43b..e5e0545dad 100644
--- a/indra/llui/llviewereventrecorder.cpp
+++ b/indra/llui/llviewereventrecorder.cpp
@@ -98,6 +98,7 @@ void LLViewerEventRecorder::setMouseGlobalCoords(S32 x, S32 y) {
 }
 
 void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 global_x, S32 global_y, std::string mName) {
+    if (!logEvents) return;
 
   LLView * target_view = LLUI::getInstance()->resolvePath(LLUI::getInstance()->getRootView(), xui);
   if (! target_view) {
@@ -126,6 +127,8 @@ void LLViewerEventRecorder::updateMouseEventInfo(S32 local_x, S32 local_y, S32 g
 
 void LLViewerEventRecorder::logVisibilityChange(std::string xui, std::string name, bool visibility, std::string event_subtype) {
 
+    if (!logEvents) return;
+
   LLSD  event=LLSD::emptyMap();
 
   event.insert("event",LLSD(std::string("visibility")));
@@ -167,6 +170,7 @@ void LLViewerEventRecorder::update_xui(std::string xui) {
 
 void LLViewerEventRecorder::logKeyEvent(KEY key, MASK mask) {
 
+    if (!logEvents) return;
   // NOTE: Event recording only logs keydown events - the viewer itself hides keyup events at a fairly low level in the code and does not appear to care about them anywhere
 
   LLSD event = LLSD::emptyMap();
-- 
cgit v1.2.3


From 63d32e8b32b99d511c557f4fd390d974f3672ab7 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 12:58:01 -0400
Subject: Fix accidental memory leak from gSLMMenuUpdater

---
 indra/newview/llviewermenu.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4fcfe1a120..888b607bfb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2795,6 +2795,9 @@ class LLAdminOnSaveState: public view_listener_t
 //-----------------------------------------------------------------------------
 void cleanup_menus()
 {
+    delete gSLMMenuUpdater;
+    gSLMMenuUpdater = nullptr;
+
     delete gMenuParcelObserver;
     gMenuParcelObserver = NULL;
 
@@ -2811,7 +2814,7 @@ void cleanup_menus()
     gMenuAttachmentSelf = NULL;
 
     delete gMenuAttachmentOther;
-    gMenuAttachmentSelf = NULL;
+    gMenuAttachmentOther = NULL;
 
     delete gMenuLand;
     gMenuLand = NULL;
-- 
cgit v1.2.3


From 7e82c1de5242e7dacafe7d69abb753f6fe528e0f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 12:59:55 -0400
Subject: Fix performance floater getChild while drawing

---
 indra/newview/llfloaterperformance.cpp | 17 ++++++++++++-----
 indra/newview/llfloaterperformance.h   |  9 +++++++++
 2 files changed, 21 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 3a633a7ff8..d5782accef 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -152,6 +152,13 @@ bool LLFloaterPerformance::postBuild()
     mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
     mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this));
 
+    mCheckTuneContinous = mAutoadjustmentsPanel->getChild<LLCheckBoxCtrl>("AutoTuneContinuous");
+    mTextWIPDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("wip_desc");
+    mTextDisplayDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("display_desc");
+
+    mTextFPSLabel = getChild<LLTextBox>("fps_lbl");
+    mTextFPSValue = getChild<LLTextBox>("fps_value");
+
     gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
 
     return true;
@@ -512,7 +519,7 @@ void LLFloaterPerformance::setFPSText()
 {
     const S32 NUM_PERIODS = 50;
     S32 current_fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS));
-    getChild<LLTextBox>("fps_value")->setValue(current_fps);
+    mTextFPSValue->setValue(current_fps);
 
     std::string fps_text = getString("fps_text");
     static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true);
@@ -521,7 +528,7 @@ void LLFloaterPerformance::setFPSText()
     {
         fps_text += getString("max_text");
     }
-    getChild<LLTextBox>("fps_lbl")->setValue(fps_text);
+    mTextFPSLabel->setValue(fps_text);
 }
 
 void LLFloaterPerformance::detachItem(const LLUUID& item_id)
@@ -722,10 +729,10 @@ void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled)
     static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
     mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
     mStopAutotuneBtn->setEnabled(autotune_enabled && !auto_tune_locked);
-    getChild<LLCheckBoxCtrl>("AutoTuneContinuous")->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
+    mCheckTuneContinous->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
 
-    getChild<LLTextBox>("wip_desc")->setVisible(autotune_enabled && !auto_tune_locked);
-    getChild<LLTextBox>("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled);
+    mTextWIPDesc->setVisible(autotune_enabled && !auto_tune_locked);
+    mTextDisplayDesc->setVisible(LLPerfStats::tunables.vsyncEnabled);
 }
 
 void LLFloaterPerformance::enableAutotuneWarning()
diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h
index 089a508455..a7100eb350 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -30,7 +30,9 @@
 #include "lllistcontextmenu.h"
 
 class LLCharacter;
+class LLCheckBoxCtrl;
 class LLNameListCtrl;
+class LLTextBox;
 
 class LLFloaterPerformance : public LLFloater
 {
@@ -90,6 +92,13 @@ private:
     LLButton* mStartAutotuneBtn;
     LLButton* mStopAutotuneBtn;
 
+    LLTextBox* mTextWIPDesc = nullptr;
+    LLTextBox* mTextDisplayDesc = nullptr;
+    LLTextBox* mTextFPSLabel = nullptr;
+    LLTextBox* mTextFPSValue = nullptr;
+
+    LLCheckBoxCtrl* mCheckTuneContinous = nullptr;
+
     LLListContextMenu* mContextMenu;
 
     LLTimer* mUpdateTimer;
-- 
cgit v1.2.3


From 0a420e7d9ab54162a04472c756a3994b6597445d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 17:45:01 -0400
Subject: Fix find child during draw in texture picker

---
 indra/newview/lltexturectrl.cpp | 4 ++--
 indra/newview/lltexturectrl.h   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index e154777aef..35057a910a 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -558,6 +558,7 @@ bool LLFloaterTexturePicker::postBuild()
     mResolutionLabel = getChild<LLTextBox>("size_lbl");
     mResolutionWarning = getChild<LLTextBox>("over_limit_lbl");
 
+    mPreviewWidget = getChild<LLView>("preview_widget");
 
     mDefaultBtn = getChild<LLButton>("Default");
     mNoneBtn = getChild<LLButton>("None");
@@ -653,7 +654,6 @@ void LLFloaterTexturePicker::draw()
     bool valid_dims = updateImageStats();
 
     // if we're inactive, gray out "apply immediate" checkbox
-    getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected);
     mSelectBtn->setEnabled(mActive && mCanApply && valid_dims);
     mPipetteBtn->setEnabled(mActive);
     mPipetteBtn->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
@@ -731,7 +731,7 @@ void LLFloaterTexturePicker::draw()
         }
 
         // Border
-        LLRect border = getChildView("preview_widget")->getRect();
+        LLRect border = mPreviewWidget->getRect();
         gl_rect_2d( border, LLColor4::black, false );
 
 
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 3c6cff4eaa..df5e763139 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -437,6 +437,7 @@ protected:
     LLButton*           mPipetteBtn;
     LLButton*           mSelectBtn;
     LLButton*           mCancelBtn;
+    LLView*             mPreviewWidget = nullptr;
 
 private:
     bool mCanApply;
-- 
cgit v1.2.3


From 70f332d02e687c2c3d4806ccda0e1dcd8bde1232 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 18:47:24 -0400
Subject: Fix findChild during draw in the parcel/region environment panel

---
 indra/newview/llfloaterland.cpp       |   8 +-
 indra/newview/llfloaterregioninfo.cpp |  12 +--
 indra/newview/llpanelenvironment.cpp  | 180 +++++++++++++++++++---------------
 indra/newview/llpanelenvironment.h    |  32 ++++++
 4 files changed, 142 insertions(+), 90 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 41b6025e0f..aebadb36ae 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -3331,10 +3331,10 @@ bool LLPanelLandEnvironment::postBuild()
     if (!LLPanelEnvironmentInfo::postBuild())
         return false;
 
-    getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
-    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(false);
-    getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
-    getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
+    mBtnUseDefault->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION));
+    mCheckAllowOverride->setVisible(false);
+    mPanelEnvRegionMsg->setVisible(false);
+    mPanelEnvAltitudes->setVisible(true);
 
     return true;
 }
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 52eddcfc67..fc6abf4bfe 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -4201,11 +4201,11 @@ bool LLPanelRegionEnvironment::postBuild()
     if (!LLPanelEnvironmentInfo::postBuild())
         return false;
 
-    getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
-    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(true);
-    getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true);
+    mBtnUseDefault->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT));
+    mCheckAllowOverride->setVisible(true);
+    mPanelEnvAltitudes->setVisible(true);
 
-    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
+    mCheckAllowOverride->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); });
 
     mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this));
     return true;
@@ -4227,7 +4227,7 @@ void LLPanelRegionEnvironment::refresh()
 
     LLPanelEnvironmentInfo::refresh();
 
-    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
+    mCheckAllowOverride->setValue(mAllowOverride);
 }
 
 bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region)
@@ -4293,7 +4293,7 @@ bool LLPanelRegionEnvironment::confirmUpdateEstateEnvironment(const LLSD& notifi
 
     case 1:
         mAllowOverride = mAllowOverrideRestore;
-        getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setValue(mAllowOverride);
+        mCheckAllowOverride->setValue(mAllowOverride);
         break;
     default:
         break;
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index a706e339ea..0c8bbbf308 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -41,6 +41,7 @@
 #include "llfloater.h"
 #include "llfloaterreg.h"
 #include "llfloatereditextdaycycle.h"
+#include "lliconctrl.h"
 #include "llmultisliderctrl.h"
 #include "llnotificationsutil.h"
 #include "llsettingsvo.h"
@@ -109,10 +110,7 @@ const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_MASK(
         LLPanelEnvironmentInfo::DIRTY_FLAG_DAYOFFSET |
         LLPanelEnvironmentInfo::DIRTY_FLAG_ALTITUDES);
 
-const U32 ALTITUDE_SLIDER_COUNT = 3;
 const F32 ALTITUDE_DEFAULT_HEIGHT_STEP = 1000;
-const U32 ALTITUDE_MARKERS_COUNT = 3;
-const U32 ALTITUDE_PREFIXERS_COUNT = 5;
 
 const std::string slider_marker_base = "mark";
 
@@ -167,24 +165,58 @@ LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo()
 
 bool LLPanelEnvironmentInfo::postBuild()
 {
+    mIconGround = getChild<LLIconCtrl>(ICN_GROUND);
+    mIconWater = getChild<LLIconCtrl>(ICN_WATER);
 
-    getChild<LLUICtrl>(BTN_USEDEFAULT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); });
-    getChild<LLUICtrl>(BTN_SELECTINV)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnSelect(); });
-    getChild<LLUICtrl>(BTN_EDIT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnEdit(); });
-    getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnRstAltitudes(); });
+    mPanelEnvAltitudes = getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES);
+    mPanelEnvConfig = getChild<LLUICtrl>(PNL_SETTINGS);
+    mPanelEnvButtons = getChild <LLUICtrl>(PNL_BUTTONS);
+    mPanelEnvDisabled = getChild<LLUICtrl>(PNL_DISABLED);
+    mPanelEnvRegionMsg = getChild<LLUICtrl>(PNL_REGION_MSG);
 
-    getChild<LLUICtrl>(SLD_DAYLENGTH)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged((F32)value.asReal()); });
-    getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
-    getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
-    getChild<LLUICtrl>(SLD_DAYOFFSET)->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged((F32)value.asReal()); });
-    getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
-    getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
+    mEnvironmentDisabledText = getChild<LLTextBox>(TXT_DISABLED);
+    mLabelApparentTime = getChild<LLTextBox>(LBL_TIMEOFDAY);
 
-    getChild<LLMultiSliderCtrl>(SLD_ALTITUDES)->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); });
-    getChild<LLMultiSliderCtrl>(SLD_ALTITUDES)->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onAltSliderMouseUp(); });
+    mBtnUseDefault = getChild<LLButton>(BTN_USEDEFAULT);
+    mBtnUseDefault->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); });
+
+    mBtnSelectInv = getChild<LLButton>(BTN_SELECTINV);
+    mBtnSelectInv->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnSelect(); });
+
+    mBtnEdit = getChild<LLButton>(BTN_EDIT);
+    mBtnEdit->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnEdit(); });
+
+    mBtnResetAltitudes = getChild<LLButton>(BTN_RST_ALTITUDES);
+    mBtnResetAltitudes->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnRstAltitudes(); });
+
+    mCheckAllowOverride = getChild<LLCheckBoxCtrl>(CHK_ALLOWOVERRIDE);
+
+    mSliderDayLength = getChild<LLSliderCtrl>(SLD_DAYLENGTH);
+    mSliderDayLength->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayLengthChanged((F32)value.asReal()); });
+    mSliderDayLength->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
+    mSliderDayLength->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
+
+    mSliderDayOffset = getChild<LLSliderCtrl>(SLD_DAYOFFSET);
+    mSliderDayOffset->setCommitCallback([this](LLUICtrl *, const LLSD &value) { onSldDayOffsetChanged((F32)value.asReal()); });
+    mSliderDayOffset->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
+    mSliderDayOffset->setSliderEditorCommitCallback([this](LLUICtrl *, const LLSD &) { onDayLenOffsetMouseUp(); });
+
+    mMultiSliderAltitudes = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
+    mMultiSliderAltitudes->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); });
+    mMultiSliderAltitudes->setSliderMouseUpCallback([this](LLUICtrl *, const LLSD &) { onAltSliderMouseUp(); });
 
     mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version) { onEnvironmentChanged(env, version); });
 
+    for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++)
+    {
+        mAltitudeMarkers[idx] = findChild<LLUICtrl>(slider_marker_base + llformat("%u", idx));
+    }
+
+    for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
+    {
+        mAltitudePrefixers[idx] = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
+    }
+
     for (U32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; idx++)
     {
         LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
@@ -262,8 +294,8 @@ void LLPanelEnvironmentInfo::refresh()
     if (dayoffset.value() > 12.0f)
         dayoffset -= F32Hours(24.0);
 
-    getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setValue(daylength.value());
-    getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setValue(dayoffset.value());
+    mSliderDayLength->setValue(daylength.value());
+    mSliderDayOffset->setValue(dayoffset.value());
 
     udpateApparentTimeOfDay();
 
@@ -273,40 +305,39 @@ void LLPanelEnvironmentInfo::refresh()
 
     if (altitudes.size() > 0)
     {
-        LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
-        sld->clear();
+        mMultiSliderAltitudes->clear();
 
         for (S32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; ++idx)
         {
             // make sure values are in range, server is supposed to validate them,
             // but issues happen, try to fix values in such case
-            F32 altitude = llclamp(altitudes[idx + 1], sld->getMinValue(), sld->getMaxValue());
-            bool res = sld->addSlider(altitude, alt_sliders[idx]);
+            F32 altitude = llclamp(altitudes[idx + 1], mMultiSliderAltitudes->getMinValue(), mMultiSliderAltitudes->getMaxValue());
+            bool res = mMultiSliderAltitudes->addSlider(altitude, alt_sliders[idx]);
             if (!res)
             {
                 LL_WARNS_ONCE("ENVPANEL") << "Failed to validate altitude from server for parcel id" << getParcelId() << LL_ENDL;
                 // Find a spot to insert altitude.
                 // Assuming everything alright with slider, we should find new place in 11 steps top (step 25m, no overlap 100m)
-                F32 alt_step = (altitude > (sld->getMaxValue() / 2)) ? -sld->getIncrement() : sld->getIncrement();
+                F32 alt_step = (altitude > (mMultiSliderAltitudes->getMaxValue() / 2)) ? -mMultiSliderAltitudes->getIncrement() : mMultiSliderAltitudes->getIncrement();
                 for (U32 i = 0; i < 30; i++)
                 {
                     altitude += alt_step;
-                    if (altitude > sld->getMaxValue())
+                    if (altitude > mMultiSliderAltitudes->getMaxValue())
                     {
-                        altitude = sld->getMinValue();
+                        altitude = mMultiSliderAltitudes->getMinValue();
                     }
-                    else if (altitude < sld->getMinValue())
+                    else if (altitude < mMultiSliderAltitudes->getMinValue())
                     {
-                        altitude = sld->getMaxValue();
+                        altitude = mMultiSliderAltitudes->getMaxValue();
                     }
-                    res = sld->addSlider(altitude, alt_sliders[idx]);
+                    res = mMultiSliderAltitudes->addSlider(altitude, alt_sliders[idx]);
                     if (res) break;
                 }
             }
             if (res)
             {
                 // slider has some auto correction that might have kicked in
-                altitude = sld->getSliderValue(alt_sliders[idx]);
+                altitude = mMultiSliderAltitudes->getSliderValue(alt_sliders[idx]);
             }
             else
             {
@@ -316,12 +347,12 @@ void LLPanelEnvironmentInfo::refresh()
             updateAltLabel(alt_prefixes[idx], idx + 2, altitude);
             mAltitudes[alt_sliders[idx]] = AltitudeData(idx + 2, idx, altitude);
         }
-        if (sld->getCurNumSliders() != ALTITUDE_SLIDER_COUNT)
+        if (mMultiSliderAltitudes->getCurNumSliders() != ALTITUDE_SLIDER_COUNT)
         {
             LL_WARNS("ENVPANEL") << "Failed to add altitude sliders!" << LL_ENDL;
         }
         readjustAltLabels();
-        sld->resetCurSlider();
+        mMultiSliderAltitudes->resetCurSlider();
     }
 
     updateAltLabel(alt_prefixes[3], 1, 0); // ground
@@ -455,77 +486,75 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
     if (mNoEnvironment || (!LLEnvironment::instance().isExtendedEnvironmentEnabled() && !isRegion()))
     {
         is_unavailable = true;
-        getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_LEGACY));
+        mEnvironmentDisabledText->setText(getString(STR_LEGACY));
     }
     else if (mNoSelection)
     {
         is_unavailable = true;
-        getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_NO_PARCEL));
+        mEnvironmentDisabledText->setText(getString(STR_NO_PARCEL));
     }
     else if (mCrossRegion)
     {
         is_unavailable = true;
-        getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_CROSS_REGION));
+        mEnvironmentDisabledText->setText(getString(STR_CROSS_REGION));
     }
     else if (!isRegion() && !mAllowOverride)
     {
         is_unavailable = true;
-        getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_DISALLOWED));
+        mEnvironmentDisabledText->setText(getString(STR_DISALLOWED));
     }
     else if (!is_bigenough)
     {
         is_unavailable = true;
-        getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_TOO_SMALL));
+        mEnvironmentDisabledText->setText(getString(STR_TOO_SMALL));
     }
 
     if (is_unavailable)
     {
-        getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(false);
-        getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(false);
-        getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
-        getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(false);
-        getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false);
+        mPanelEnvConfig->setVisible(false);
+        mPanelEnvButtons->setVisible(false);
+        mPanelEnvDisabled->setVisible(true);
+        mPanelEnvAltitudes->setVisible(false);
+        mPanelEnvRegionMsg->setVisible(false);
         updateEditFloater(mCurrentEnvironment, false);
 
         return false;
     }
-    getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(true);
-    getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(true);
-    getChild<LLUICtrl>(PNL_DISABLED)->setVisible(false);
-    getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(isRegion());
+    mPanelEnvConfig->setVisible(true);
+    mPanelEnvButtons->setVisible(true);
+    mPanelEnvDisabled->setVisible(false);
+    mPanelEnvRegionMsg->setVisible(isRegion());
 
-    getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled());
-    getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setVisible(isRegion());
+    mPanelEnvAltitudes->setVisible(LLEnvironment::instance().isExtendedEnvironmentEnabled());
+    mBtnResetAltitudes->setVisible(isRegion());
 
     bool can_enable = enabled && !is_legacy && mCurrentEnvironment && (mCurEnvVersion != INVALID_PARCEL_ENVIRONMENT_VERSION);
-    getChild<LLUICtrl>(BTN_SELECTINV)->setEnabled(can_enable);
-    getChild<LLUICtrl>(BTN_USEDEFAULT)->setEnabled(can_enable);
-    getChild<LLUICtrl>(BTN_EDIT)->setEnabled(can_enable);
-    getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(can_enable);
-    getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(can_enable);
-    getChild<LLUICtrl>(SLD_ALTITUDES)->setEnabled(can_enable && isRegion());
-    getChild<LLUICtrl>(ICN_GROUND)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
-    getChild<LLUICtrl>(ICN_WATER)->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
-    getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setEnabled(can_enable && isRegion());
-    getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(can_enable);
-    getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(can_enable && isRegion());
+    mBtnSelectInv->setEnabled(can_enable);
+    mBtnUseDefault->setEnabled(can_enable);
+    mBtnEdit->setEnabled(can_enable);
+    mSliderDayLength->setEnabled(can_enable);
+    mSliderDayOffset->setEnabled(can_enable);
+    mMultiSliderAltitudes->setEnabled(can_enable && isRegion());
+    mIconGround->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
+    mIconWater->setColor((can_enable && isRegion()) ? LLColor4::white : LLColor4::grey % 0.8f);
+    mBtnResetAltitudes->setEnabled(can_enable && isRegion());
+    mPanelEnvAltitudes->setEnabled(can_enable);
+    mCheckAllowOverride->setEnabled(can_enable && isRegion());
 
     for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++)
     {
-        LLUICtrl* marker = findChild<LLUICtrl>(slider_marker_base + llformat("%u", idx));
-        if (marker)
+        if (mAltitudeMarkers[idx])
         {
             static LLColor4 marker_color(0.75f, 0.75f, 0.75f, 1.f);
-            marker->setColor((can_enable && isRegion()) ? marker_color : marker_color % 0.3f);
+            mAltitudeMarkers[idx]->setColor((can_enable && isRegion()) ? marker_color : marker_color % 0.3f);
         }
     }
 
     for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
     {
-        LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
-        if (drop_target)
+        if (mAltitudePrefixers[idx])
         {
-            drop_target->setDndEnabled(can_enable);
+            mAltitudePrefixers[idx]->setDndEnabled(can_enable);
         }
     }
 
@@ -544,13 +573,7 @@ void LLPanelEnvironmentInfo::clearDirtyFlag(U32 flag)
 
 void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_prefix, U32 sky_index, F32 alt_value)
 {
-    LLMultiSliderCtrl *sld = findChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
-    if (!sld)
-    {
-        LL_WARNS() << "Failed to find slider " << SLD_ALTITUDES << LL_ENDL;
-        return;
-    }
-    LLRect sld_rect = sld->getRect();
+    LLRect sld_rect = mMultiSliderAltitudes->getRect();
     S32 sld_range = sld_rect.getHeight();
     S32 sld_bottom = sld_rect.mBottom;
     S32 sld_offset = sld_rect.getWidth(); // Roughly identical to thumb's width in slider.
@@ -596,14 +619,11 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
     // Very simple "adjust after the fact" method
     // Note: labels can be in any order
 
-    LLMultiSliderCtrl *sld = findChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
-    if (!sld) return;
-
     LLView* view_midle = NULL;
     U32 midle_ind = 0;
     S32 shift_up = 0;
     S32 shift_down = 0;
-    LLRect sld_rect = sld->getRect();
+    LLRect sld_rect = mMultiSliderAltitudes->getRect();
 
     // Find the middle one
     for (U32 i = 0; i < ALTITUDE_SLIDER_COUNT; i++)
@@ -907,10 +927,10 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
 
     if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0) || (mCurrentEnvironment->mDayOffset.value() < 1.0))
     {
-        getChild<LLUICtrl>(LBL_TIMEOFDAY)->setVisible(false);
+        mLabelApparentTime->setVisible(false);
         return;
     }
-    getChild<LLUICtrl>(LBL_TIMEOFDAY)->setVisible(true);
+    mLabelApparentTime->setVisible(true);
 
     S32Seconds now((S32)LLDate::now().secondsSinceEpoch());
 
@@ -932,10 +952,10 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
     std::string lblminute(((minutesofhour.value() < 10) ? "0" : "") + LLSD(minutesofhour.value()).asString());
 
 
-    getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[HH]", LLSD(hourofday.value()).asString());
-    getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[MM]", lblminute);
-    getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[AP]", std::string(am_pm ? "PM" : "AM"));
-    getChild<LLUICtrl>(LBL_TIMEOFDAY)->setTextArg("[PRC]", LLSD((S32)(100 * perc)).asString());
+    mLabelApparentTime->setTextArg("[HH]", LLSD(hourofday.value()).asString());
+    mLabelApparentTime->setTextArg("[MM]", lblminute);
+    mLabelApparentTime->setTextArg("[AP]", std::string(am_pm ? "PM" : "AM"));
+    mLabelApparentTime->setTextArg("[PRC]", LLSD((S32)(100 * perc)).asString());
 
 }
 
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index b478142987..0544524ece 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -39,6 +39,7 @@
 #include "llestateinfomodel.h"
 
 class LLViewerRegion;
+class LLIconCtrl;
 
 class LLPanelEnvironmentInfo : public LLPanel
 {
@@ -63,6 +64,10 @@ public:
 protected:
     LOG_CLASS(LLPanelEnvironmentInfo);
 
+    static constexpr U32 ALTITUDE_SLIDER_COUNT = 3;
+    static constexpr U32 ALTITUDE_MARKERS_COUNT = 3;
+    static constexpr U32 ALTITUDE_PREFIXERS_COUNT = 5;
+
     static const std::string    BTN_SELECTINV;
     static const std::string    BTN_EDIT;
     static const std::string    BTN_USEDEFAULT;
@@ -168,6 +173,33 @@ protected:
     altitudes_data_t                mAltitudes;
     S32                             mCurEnvVersion; // used to filter duplicate callbacks/refreshes
 
+    LLUICtrl* mPanelEnvAltitudes = nullptr;
+    LLUICtrl* mPanelEnvConfig = nullptr;
+    LLUICtrl* mPanelEnvButtons = nullptr;
+    LLUICtrl* mPanelEnvDisabled = nullptr;
+    LLUICtrl* mPanelEnvRegionMsg = nullptr;
+
+    LLButton* mBtnSelectInv = nullptr;
+    LLButton* mBtnEdit = nullptr;
+    LLButton* mBtnUseDefault = nullptr;
+    LLButton* mBtnResetAltitudes = nullptr;
+
+    LLMultiSliderCtrl* mMultiSliderAltitudes = nullptr;
+
+    LLSliderCtrl* mSliderDayLength = nullptr;
+    LLSliderCtrl* mSliderDayOffset = nullptr;
+
+    LLTextBox* mEnvironmentDisabledText = nullptr;
+    LLTextBox* mLabelApparentTime = nullptr;
+
+    LLCheckBoxCtrl* mCheckAllowOverride = nullptr;
+
+    LLIconCtrl* mIconGround = nullptr;
+    LLIconCtrl* mIconWater = nullptr;
+
+    std::array<LLUICtrl*, ALTITUDE_MARKERS_COUNT> mAltitudeMarkers;
+    std::array<LLSettingsDropTarget*, ALTITUDE_PREFIXERS_COUNT> mAltitudePrefixers;
+
 protected:
     typedef boost::signals2::connection connection_t;
 
-- 
cgit v1.2.3


From e3deb8340a5f2e5b1c997e66042f3515f33f5cea Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 19:30:29 -0400
Subject: Fix excessive findChild calls during about land floater draw

---
 indra/newview/llfloaterland.cpp       | 258 +++++++++++++++++-----------------
 indra/newview/llfloaterland.h         |  18 ++-
 indra/newview/llfloaterregioninfo.cpp |   1 -
 indra/newview/llpanelland.cpp         |  78 +++++-----
 indra/newview/llpanelland.h           |  21 ++-
 5 files changed, 199 insertions(+), 177 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index aebadb36ae..bec76fe5e4 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2443,19 +2443,34 @@ LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
 
 bool LLPanelLandAccess::postBuild()
 {
-    childSetCommitCallback("public_access", onCommitPublicAccess, this);
-    childSetCommitCallback("limit_payment", onCommitAny, this);
-    childSetCommitCallback("limit_age_verified", onCommitAny, this);
-    childSetCommitCallback("GroupCheck", onCommitGroupCheck, this);
-    childSetCommitCallback("PassCheck", onCommitAny, this);
-    childSetCommitCallback("pass_combo", onCommitAny, this);
-    childSetCommitCallback("PriceSpin", onCommitAny, this);
-    childSetCommitCallback("HoursSpin", onCommitAny, this);
-
-    childSetAction("add_allowed", boost::bind(&LLPanelLandAccess::onClickAddAccess, this));
-    childSetAction("remove_allowed", onClickRemoveAccess, this);
-    childSetAction("add_banned", boost::bind(&LLPanelLandAccess::onClickAddBanned, this));
-    childSetAction("remove_banned", onClickRemoveBanned, this);
+    mPaymentInfoCheck = getChild<LLUICtrl>("limit_payment");
+    mPaymentInfoCheck->setCommitCallback(onCommitAny, this);
+    mAgeVerifiedCheck = getChild<LLUICtrl>("limit_age_verified");
+    mAgeVerifiedCheck->setCommitCallback(onCommitAny, this);
+    mTemporaryPassCheck = getChild<LLUICtrl>("PassCheck");
+    mTemporaryPassCheck->setCommitCallback(onCommitAny, this);
+    mPublicAccessCheck = getChild<LLUICtrl>("public_access");
+    mPublicAccessCheck->setCommitCallback(onCommitPublicAccess, this);
+    mGroupAccessCheck = getChild<LLUICtrl>("GroupCheck");
+    mGroupAccessCheck->setCommitCallback(onCommitGroupCheck, this);
+    mTemporaryPassCombo = getChild<LLComboBox>("pass_combo");
+    mGroupAccessCheck->setCommitCallback(onCommitAny, this);
+    mTemporaryPassPriceSpin = getChild<LLUICtrl>("PriceSpin");
+    mGroupAccessCheck->setCommitCallback(onCommitAny, this);
+    mTemporaryPassHourSpin = getChild<LLUICtrl>("HoursSpin");
+    mGroupAccessCheck->setCommitCallback(onCommitAny, this);
+
+    mAllowText = getChild<LLUICtrl>("AllowedText");
+    mBanText = getChild<LLUICtrl>("BanCheck");
+
+    mBtnAddAllowed = getChild<LLButton>("add_allowed");
+    mBtnAddAllowed->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickAddAccess, this));
+    mBtnRemoveAllowed = getChild<LLButton>("remove_allowed");
+    mBtnRemoveAllowed->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickRemoveAccess, this));
+    mBtnAddBanned = getChild<LLButton>("add_banned");
+    mBtnAddBanned->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickAddBanned, this));
+    mBtnRemoveBanned = getChild<LLButton>("remove_banned");
+    mBtnRemoveBanned->setCommitCallback(boost::bind(&LLPanelLandAccess::onClickRemoveBanned, this));
 
     mListAccess = getChild<LLNameListCtrl>("AccessList");
     if (mListAccess)
@@ -2494,17 +2509,17 @@ void LLPanelLandAccess::refresh()
 
         if (parcel->getRegionAllowAccessOverride())
         {
-            getChild<LLUICtrl>("public_access")->setValue(public_access);
-            getChild<LLUICtrl>("GroupCheck")->setValue(use_group);
+            mPublicAccessCheck->setValue(public_access);
+            mGroupAccessCheck->setValue(use_group);
         }
         else
         {
-            getChild<LLUICtrl>("public_access")->setValue(true);
-            getChild<LLUICtrl>("GroupCheck")->setValue(false);
+            mPublicAccessCheck->setValue(true);
+            mGroupAccessCheck->setValue(false);
         }
         std::string group_name;
         gCacheName->getGroupName(parcel->getGroupID(), group_name);
-        getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
+        mGroupAccessCheck->setLabelArg("[GROUP]", group_name );
 
         // Allow list
         if (mListAccess)
@@ -2513,11 +2528,11 @@ void LLPanelLandAccess::refresh()
             mListAccess->clearSortOrder();
             mListAccess->deleteAllItems();
             auto count = parcel->mAccessList.size();
-            getChild<LLUICtrl>("AllowedText")->setTextArg("[COUNT]", llformat("%d",count));
-            getChild<LLUICtrl>("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
+            mAllowText->setTextArg("[COUNT]", llformat("%d", count));
+            mAllowText->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
-            getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
-            getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
+            mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
+            mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
             for (LLAccessEntry::map::const_iterator cit = parcel->mAccessList.begin();
                  cit != parcel->mAccessList.end(); ++cit)
@@ -2561,11 +2576,11 @@ void LLPanelLandAccess::refresh()
             mListBanned->clearSortOrder();
             mListBanned->deleteAllItems();
             auto count = parcel->mBanList.size();
-            getChild<LLUICtrl>("BanCheck")->setTextArg("[COUNT]", llformat("%d",count));
-            getChild<LLUICtrl>("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
+            mBanText->setTextArg("[COUNT]", llformat("%d",count));
+            mBanText->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
-            getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
-            getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
+            mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
+            mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
             for (LLAccessEntry::map::const_iterator cit = parcel->mBanList.begin();
                  cit != parcel->mBanList.end(); ++cit)
@@ -2622,75 +2637,74 @@ void LLPanelLandAccess::refresh()
 
         if(parcel->getRegionDenyAnonymousOverride())
         {
-            getChild<LLUICtrl>("limit_payment")->setValue(true);
-            getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
+            mPaymentInfoCheck->setValue(true);
+            mPaymentInfoCheck->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
         }
         else
         {
-            getChild<LLUICtrl>("limit_payment")->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
-            getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
+            mPaymentInfoCheck->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
+            mPaymentInfoCheck->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
         }
         if(parcel->getRegionDenyAgeUnverifiedOverride())
         {
-            getChild<LLUICtrl>("limit_age_verified")->setValue(true);
-            getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
+            mAgeVerifiedCheck->setValue(true);
+            mAgeVerifiedCheck->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
         }
         else
         {
-            getChild<LLUICtrl>("limit_age_verified")->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
-            getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
+            mAgeVerifiedCheck->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
+            mAgeVerifiedCheck->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
         }
 
         bool use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
-        getChild<LLUICtrl>("PassCheck")->setValue(use_pass);
-        LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo");
-        if (passcombo)
+        mTemporaryPassCheck->setValue(use_pass);
+        if (mTemporaryPassCombo)
         {
             if (public_access || !use_pass)
             {
-                passcombo->selectByValue("anyone");
+                mTemporaryPassCombo->selectByValue("anyone");
             }
         }
 
         S32 pass_price = parcel->getPassPrice();
-        getChild<LLUICtrl>("PriceSpin")->setValue((F32)pass_price );
+        mTemporaryPassPriceSpin->setValue((F32)pass_price);
 
         F32 pass_hours = parcel->getPassHours();
-        getChild<LLUICtrl>("HoursSpin")->setValue(pass_hours );
+        mTemporaryPassHourSpin->setValue(pass_hours);
     }
     else
     {
-        getChild<LLUICtrl>("public_access")->setValue(false);
-        getChild<LLUICtrl>("limit_payment")->setValue(false);
-        getChild<LLUICtrl>("limit_age_verified")->setValue(false);
-        getChild<LLUICtrl>("GroupCheck")->setValue(false);
-        getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", LLStringUtil::null );
-        getChild<LLUICtrl>("PassCheck")->setValue(false);
-        getChild<LLUICtrl>("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
-        getChild<LLUICtrl>("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT );
-        getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
-        getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
-        getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
-        getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
+        mPublicAccessCheck->setValue(false);
+        mPaymentInfoCheck->setValue(false);
+        mAgeVerifiedCheck->setValue(false);
+        mGroupAccessCheck->setValue(false);
+        mGroupAccessCheck->setLabelArg("[GROUP]", LLStringUtil::null );
+        mTemporaryPassCheck->setValue(false);
+        mTemporaryPassPriceSpin->setValue((F32)PARCEL_PASS_PRICE_DEFAULT);
+        mTemporaryPassHourSpin->setValue(PARCEL_PASS_HOURS_DEFAULT );
+        mListAccess->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
+        mListAccess->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
+        mListBanned->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0));
+        mListBanned->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",0));
     }
 }
 
 void LLPanelLandAccess::refresh_ui()
 {
-    getChildView("public_access")->setEnabled(false);
-    getChildView("limit_payment")->setEnabled(false);
-    getChildView("limit_age_verified")->setEnabled(false);
-    getChildView("GroupCheck")->setEnabled(false);
-    getChildView("PassCheck")->setEnabled(false);
-    getChildView("pass_combo")->setEnabled(false);
-    getChildView("PriceSpin")->setEnabled(false);
-    getChildView("HoursSpin")->setEnabled(false);
-    getChildView("AccessList")->setEnabled(false);
-    getChildView("BannedList")->setEnabled(false);
-    getChildView("add_allowed")->setEnabled(false);
-    getChildView("remove_allowed")->setEnabled(false);
-    getChildView("add_banned")->setEnabled(false);
-    getChildView("remove_banned")->setEnabled(false);
+    mPublicAccessCheck->setEnabled(false);
+    mPaymentInfoCheck->setEnabled(false);
+    mAgeVerifiedCheck->setEnabled(false);
+    mGroupAccessCheck->setEnabled(false);
+    mTemporaryPassCheck->setEnabled(false);
+    mTemporaryPassCombo->setEnabled(false);
+    mTemporaryPassPriceSpin->setEnabled(false);
+    mTemporaryPassHourSpin->setEnabled(false);
+    mListAccess->setEnabled(false);
+    mListBanned->setEnabled(false);
+    mBtnAddAllowed->setEnabled(false);
+    mBtnRemoveAllowed->setEnabled(false);
+    mBtnAddBanned->setEnabled(false);
+    mBtnRemoveBanned->setEnabled(false);
 
     LLParcel *parcel = mParcel->getParcel();
     if (parcel && !gDisconnected)
@@ -2703,73 +2717,64 @@ void LLPanelLandAccess::refresh_ui()
             can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
         }
 
-        getChildView("public_access")->setEnabled(can_manage_allowed);
-        bool public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean();
+        mPublicAccessCheck->setEnabled(can_manage_allowed);
+        bool public_access = mPublicAccessCheck->getValue().asBoolean();
         if (public_access)
         {
             bool override = false;
             if(parcel->getRegionDenyAnonymousOverride())
             {
                 override = true;
-                getChildView("limit_payment")->setEnabled(false);
+                mPaymentInfoCheck->setEnabled(false);
             }
             else
             {
-                getChildView("limit_payment")->setEnabled(can_manage_allowed);
+                mPaymentInfoCheck->setEnabled(can_manage_allowed);
             }
             if(parcel->getRegionDenyAgeUnverifiedOverride())
             {
                 override = true;
-                getChildView("limit_age_verified")->setEnabled(false);
+                mAgeVerifiedCheck->setEnabled(false);
             }
             else
             {
-                getChildView("limit_age_verified")->setEnabled(can_manage_allowed);
+                mAgeVerifiedCheck->setEnabled(can_manage_allowed);
             }
-            if (override)
-            {
-                getChildView("Only Allow")->setToolTip(getString("estate_override"));
-            }
-            else
-            {
-                getChildView("Only Allow")->setToolTip(std::string());
-            }
-            getChildView("PassCheck")->setEnabled(false);
-            getChildView("pass_combo")->setEnabled(false);
-            getChildView("AccessList")->setEnabled(false);
+            mTemporaryPassCheck->setEnabled(false);
+            mTemporaryPassCombo->setEnabled(false);
+            mListAccess->setEnabled(false);
         }
         else
         {
-            getChildView("limit_payment")->setEnabled(false);
-            getChildView("limit_age_verified")->setEnabled(false);
+            mPaymentInfoCheck->setEnabled(false);
+            mAgeVerifiedCheck->setEnabled(false);
 
-
-            bool sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
-            getChildView("PassCheck")->setEnabled(can_manage_allowed);
+            bool sell_passes = mTemporaryPassCheck->getValue().asBoolean();
+            mTemporaryPassCheck->setEnabled(can_manage_allowed);
             if (sell_passes)
             {
-                getChildView("pass_combo")->setEnabled(can_manage_allowed);
-                getChildView("PriceSpin")->setEnabled(can_manage_allowed);
-                getChildView("HoursSpin")->setEnabled(can_manage_allowed);
+                mTemporaryPassCombo->setEnabled(can_manage_allowed);
+                mTemporaryPassPriceSpin->setEnabled(can_manage_allowed);
+                mTemporaryPassHourSpin->setEnabled(can_manage_allowed);
             }
         }
         std::string group_name;
         if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
         {
-            bool can_allow_groups = !public_access || (public_access && (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean() ^ getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean()));
-            getChildView("GroupCheck")->setEnabled(can_manage_allowed && can_allow_groups);
+            bool can_allow_groups = !public_access || (public_access && (mPaymentInfoCheck->getValue().asBoolean() ^ mAgeVerifiedCheck->getValue().asBoolean()));
+            mGroupAccessCheck->setEnabled(can_manage_allowed && can_allow_groups);
         }
-        getChildView("AccessList")->setEnabled(can_manage_allowed);
+        mListAccess->setEnabled(can_manage_allowed);
         auto allowed_list_count = parcel->mAccessList.size();
-        getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
+        mBtnAddAllowed->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
         bool has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
-        getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
+        mBtnRemoveAllowed->setEnabled(can_manage_allowed && has_selected);
 
-        getChildView("BannedList")->setEnabled(can_manage_banned);
+        mListBanned->setEnabled(can_manage_banned);
         auto banned_list_count = parcel->mBanList.size();
-        getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
+        mBtnAddBanned->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
         has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0);
-        getChildView("remove_banned")->setEnabled(can_manage_banned && has_selected);
+        mBtnRemoveBanned->setEnabled(can_manage_banned && has_selected);
     }
 }
 
@@ -2783,7 +2788,7 @@ void LLPanelLandAccess::refreshNames()
     {
         gCacheName->getGroupName(parcel->getGroupID(), group_name);
     }
-    getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name);
+    mGroupAccessCheck->setLabelArg("[GROUP]", group_name);
 }
 
 
@@ -2817,9 +2822,9 @@ void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata)
         return;
     }
 
-    bool use_pass_list = !self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
-    bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
-    LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
+    bool use_pass_list = !self->mPublicAccessCheck->getValue().asBoolean();
+    bool use_access_group = self->mGroupAccessCheck->getValue().asBoolean();
+    LLCtrlSelectionInterface* passcombo = self->mTemporaryPassCombo;
     if (passcombo)
     {
         if (use_access_group && use_pass_list)
@@ -2846,8 +2851,8 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
     }
 
     // Extract data from UI
-    bool public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
-    bool use_access_group = self->getChild<LLUICtrl>("GroupCheck")->getValue().asBoolean();
+    bool public_access = self->mPublicAccessCheck->getValue().asBoolean();
+    bool use_access_group = self->mGroupAccessCheck->getValue().asBoolean();
     if (use_access_group)
     {
         std::string group_name;
@@ -2864,14 +2869,14 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
     if (public_access)
     {
         use_access_list = false;
-        limit_payment = self->getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
-        limit_age_verified = self->getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
+        limit_payment = self->mPaymentInfoCheck->getValue().asBoolean();
+        limit_age_verified = self->mAgeVerifiedCheck->getValue().asBoolean();
     }
     else
     {
         use_access_list = true;
-        use_pass_list = self->getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
-        LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo");
+        use_pass_list = self->mTemporaryPassCheck->getValue().asBoolean();
+        LLCtrlSelectionInterface* passcombo = self->mTemporaryPassCombo;
         if (passcombo)
         {
             if (use_access_group && use_pass_list)
@@ -2884,8 +2889,8 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
         }
     }
 
-    S32 pass_price = llfloor((F32)self->getChild<LLUICtrl>("PriceSpin")->getValue().asReal());
-    F32 pass_hours = (F32)self->getChild<LLUICtrl>("HoursSpin")->getValue().asReal();
+    S32 pass_price = llfloor((F32)self->mTemporaryPassPriceSpin->getValue().asReal());
+    F32 pass_hours = (F32)self->mTemporaryPassHourSpin->getValue().asReal();
 
     // Push data into current parcel
     parcel->setParcelFlag(PF_USE_ACCESS_GROUP,  use_access_group);
@@ -2907,10 +2912,9 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
 
 void LLPanelLandAccess::onClickAddAccess()
 {
-    LLView * button = findChild<LLButton>("add_allowed");
     LLFloater * root_floater = gFloaterView->getParentFloater(this);
     LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
-        boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), button);
+        boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), mBtnAddAllowed);
     if (picker)
     {
         root_floater->addDependentFloater(picker);
@@ -2938,16 +2942,14 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
     }
 }
 
-// static
-void LLPanelLandAccess::onClickRemoveAccess(void* data)
+void LLPanelLandAccess::onClickRemoveAccess()
 {
-    LLPanelLandAccess* panelp = (LLPanelLandAccess*)data;
-    if (panelp && panelp->mListAccess)
+    if (mListAccess)
     {
-        LLParcel* parcel = panelp->mParcel->getParcel();
+        LLParcel* parcel = mParcel->getParcel();
         if (parcel)
         {
-            std::vector<LLScrollListItem*> names = panelp->mListAccess->getAllSelected();
+            std::vector<LLScrollListItem*> names = mListAccess->getAllSelected();
             for (std::vector<LLScrollListItem*>::iterator iter = names.begin();
                  iter != names.end(); )
             {
@@ -2956,18 +2958,16 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data)
                 parcel->removeFromAccessList(agent_id);
             }
             LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
-            panelp->refresh();
+            refresh();
         }
     }
 }
 
-// static
 void LLPanelLandAccess::onClickAddBanned()
 {
-    LLView * button = findChild<LLButton>("add_banned");
     LLFloater * root_floater = gFloaterView->getParentFloater(this);
     LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
-        boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), button);
+        boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), mBtnAddBanned);
     if (picker)
     {
         root_floater->addDependentFloater(picker);
@@ -3014,16 +3014,14 @@ void LLPanelLandAccess::callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 durat
     }
 }
 
-// static
-void LLPanelLandAccess::onClickRemoveBanned(void* data)
+void LLPanelLandAccess::onClickRemoveBanned()
 {
-    LLPanelLandAccess* panelp = (LLPanelLandAccess*)data;
-    if (panelp && panelp->mListBanned)
+    if (mListBanned)
     {
-        LLParcel* parcel = panelp->mParcel->getParcel();
+        LLParcel* parcel = mParcel->getParcel();
         if (parcel)
         {
-            std::vector<LLScrollListItem*> names = panelp->mListBanned->getAllSelected();
+            std::vector<LLScrollListItem*> names = mListBanned->getAllSelected();
             for (std::vector<LLScrollListItem*>::iterator iter = names.begin();
                  iter != names.end(); )
             {
@@ -3032,7 +3030,7 @@ void LLPanelLandAccess::onClickRemoveBanned(void* data)
                 parcel->removeFromBanList(agent_id);
             }
             LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
-            panelp->refresh();
+            refresh();
         }
     }
 }
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 3560304566..95f6a44a94 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -375,13 +375,13 @@ public:
     static void onCommitPublicAccess(LLUICtrl* ctrl, void *userdata);
     static void onCommitAny(LLUICtrl* ctrl, void *userdata);
     static void onCommitGroupCheck(LLUICtrl* ctrl, void *userdata);
-    static void onClickRemoveAccess(void*);
-    static void onClickRemoveBanned(void*);
 
     virtual bool postBuild();
 
     void onClickAddAccess();
     void onClickAddBanned();
+    void onClickRemoveAccess();
+    void onClickRemoveBanned();
     void callbackAvatarCBBanned(const uuid_vec_t& ids);
     void callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration);
     void callbackAvatarCBAccess(const uuid_vec_t& ids);
@@ -389,6 +389,20 @@ public:
 protected:
     LLNameListCtrl*     mListAccess;
     LLNameListCtrl*     mListBanned;
+    LLUICtrl*           mAllowText = nullptr;
+    LLUICtrl*           mBanText = nullptr;
+    LLUICtrl*           mPublicAccessCheck = nullptr;
+    LLUICtrl*           mGroupAccessCheck = nullptr;
+    LLUICtrl*           mPaymentInfoCheck = nullptr;
+    LLUICtrl*           mAgeVerifiedCheck = nullptr;
+    LLUICtrl*           mTemporaryPassCheck = nullptr;
+    LLComboBox*         mTemporaryPassCombo = nullptr;
+    LLUICtrl*           mTemporaryPassPriceSpin = nullptr;
+    LLUICtrl*           mTemporaryPassHourSpin = nullptr;
+    LLButton*           mBtnAddAllowed = nullptr;
+    LLButton*           mBtnRemoveAllowed = nullptr;
+    LLButton*           mBtnAddBanned = nullptr;
+    LLButton*           mBtnRemoveBanned = nullptr;
 
     LLSafeHandle<LLParcelSelection>&    mParcel;
 };
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index fc6abf4bfe..cc9aca1338 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2331,7 +2331,6 @@ void LLPanelEstateInfo::refresh()
     // Disable access restriction controls if they make no sense.
     bool public_access = ("estate_public_access" == getChild<LLUICtrl>("externally_visible_radio")->getValue().asString());
 
-    getChildView("Only Allow")->setEnabled(public_access);
     getChildView("limit_payment")->setEnabled(public_access);
     getChildView("limit_age_verified")->setEnabled(public_access);
     getChildView("limit_bots")->setEnabled(public_access);
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index 3e22374294..07f4a710db 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -58,14 +58,26 @@ public:
 
 bool    LLPanelLandInfo::postBuild()
 {
-    childSetAction("button buy land",boost::bind(onClickClaim));
-    childSetAction("button abandon land", boost::bind(onClickRelease));
-    childSetAction("button subdivide land", boost::bind(onClickDivide));
-    childSetAction("button join land", boost::bind(onClickJoin));
-    childSetAction("button about land", boost::bind(onClickAbout));
+    mButtonBuyLand = getChild<LLButton>("button buy land");
+    mButtonBuyLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickClaim, this));
+
+    mButtonAbandonLand = getChild<LLButton>("button abandon land");
+    mButtonAbandonLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickRelease, this));
+
+    mButtonSubdivLand = getChild<LLButton>("button subdivide land");
+    mButtonSubdivLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickDivide, this));
+
+    mButtonJoinLand = getChild<LLButton>("button join land");
+    mButtonJoinLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickJoin, this));
+
+    mButtonAboutLand = getChild<LLButton>("button about land");
+    mButtonAboutLand->setCommitCallback(boost::bind(&LLPanelLandInfo::onClickAbout, this));
 
     mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners");
-    getChild<LLUICtrl>("checkbox show owners")->setValue(gSavedSettings.getBOOL("ShowParcelOwners"));
+    mCheckShowOwners->setValue(gSavedSettings.getBOOL("ShowParcelOwners"));
+
+    mTextArea = getChild<LLTextBox>("label_area");
+    mTextAreaPrice = getChild<LLTextBox>("label_area_price");
 
     return true;
 }
@@ -119,17 +131,14 @@ void LLPanelLandInfo::refresh()
     if (!parcel || !regionp)
     {
         // nothing selected, disable panel
-        getChildView("label_area_price")->setVisible(false);
-        getChildView("label_area")->setVisible(false);
-
-        //mTextPrice->setText(LLStringUtil::null);
-        getChild<LLUICtrl>("textbox price")->setValue(LLStringUtil::null);
-
-        getChildView("button buy land")->setEnabled(false);
-        getChildView("button abandon land")->setEnabled(false);
-        getChildView("button subdivide land")->setEnabled(false);
-        getChildView("button join land")->setEnabled(false);
-        getChildView("button about land")->setEnabled(false);
+        mTextAreaPrice->setVisible(false);
+        mTextArea->setVisible(false);
+
+        mButtonBuyLand->setEnabled(false);
+        mButtonAbandonLand->setEnabled(false);
+        mButtonSubdivLand->setEnabled(false);
+        mButtonJoinLand->setEnabled(false);
+        mButtonAboutLand->setEnabled(false);
     }
     else
     {
@@ -147,11 +156,11 @@ void LLPanelLandInfo::refresh()
 
         if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners())
         {
-            getChildView("button buy land")->setEnabled(true);
+            mButtonBuyLand->setEnabled(true);
         }
         else
         {
-            getChildView("button buy land")->setEnabled(can_buy);
+            mButtonBuyLand->setEnabled(can_buy);
         }
 
         bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE);
@@ -163,16 +172,16 @@ void LLPanelLandInfo::refresh()
         bool manager_divideable = ( gAgent.canManageEstate()
                                 && ((parcel->getOwnerID() == regionp->getOwner()) || owner_divide) );
 
-        getChildView("button abandon land")->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike());
+        mButtonAbandonLand->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike());
 
         // only mainland sims are subdividable by owner
         if (regionp->getRegionFlag(REGION_FLAGS_ALLOW_PARCEL_CHANGES))
         {
-            getChildView("button subdivide land")->setEnabled(owner_divide || manager_divideable || gAgent.isGodlike());
+            mButtonSubdivLand->setEnabled(owner_divide || manager_divideable || gAgent.isGodlike());
         }
         else
         {
-            getChildView("button subdivide land")->setEnabled(manager_divideable || gAgent.isGodlike());
+            mButtonSubdivLand->setEnabled(manager_divideable || gAgent.isGodlike());
         }
 
         // To join land, must have something selected,
@@ -183,15 +192,15 @@ void LLPanelLandInfo::refresh()
             //&& LLViewerParcelMgr::getInstance()->getSelfCount() > 1
             && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())
         {
-            getChildView("button join land")->setEnabled(true);
+            mButtonJoinLand->setEnabled(true);
         }
         else
         {
             LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL;
-            getChildView("button join land")->setEnabled(false);
+            mButtonJoinLand->setEnabled(false);
         }
 
-        getChildView("button about land")->setEnabled(true);
+        mButtonAboutLand->setEnabled(true);
 
         // show pricing information
         S32 area;
@@ -206,47 +215,42 @@ void LLPanelLandInfo::refresh()
                                    &dwell);
         if(is_public || (is_for_sale && LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected()))
         {
-            getChild<LLUICtrl>("label_area_price")->setTextArg("[PRICE]", llformat("%d",claim_price));
-            getChild<LLUICtrl>("label_area_price")->setTextArg("[AREA]", llformat("%d",area));
-            getChildView("label_area_price")->setVisible(true);
-            getChildView("label_area")->setVisible(false);
+            mTextAreaPrice->setTextArg("[PRICE]", llformat("%d",claim_price));
+            mTextAreaPrice->setTextArg("[AREA]", llformat("%d",area));
+            mTextAreaPrice->setVisible(true);
+            mTextArea->setVisible(false);
         }
         else
         {
-            getChildView("label_area_price")->setVisible(false);
-            getChild<LLUICtrl>("label_area")->setTextArg("[AREA]", llformat("%d",area));
-            getChildView("label_area")->setVisible(true);
+            mTextAreaPrice->setVisible(false);
+            mTextArea->setTextArg("[AREA]", llformat("%d",area));
+            mTextArea->setVisible(true);
         }
     }
 }
 
 
-//static
 void LLPanelLandInfo::onClickClaim()
 {
     LLViewerParcelMgr::getInstance()->startBuyLand();
 }
 
 
-//static
 void LLPanelLandInfo::onClickRelease()
 {
     LLViewerParcelMgr::getInstance()->startReleaseLand();
 }
 
-// static
 void LLPanelLandInfo::onClickDivide()
 {
     LLViewerParcelMgr::getInstance()->startDivideLand();
 }
 
-// static
 void LLPanelLandInfo::onClickJoin()
 {
     LLViewerParcelMgr::getInstance()->startJoinLand();
 }
 
-//static
 void LLPanelLandInfo::onClickAbout()
 {
     // Promote the rectangle selection to a parcel selection
diff --git a/indra/newview/llpanelland.h b/indra/newview/llpanelland.h
index 7d0c6936bd..aeadee4085 100644
--- a/indra/newview/llpanelland.h
+++ b/indra/newview/llpanelland.h
@@ -46,20 +46,27 @@ public:
     void refresh() override;
     static void refreshAll();
 
-    LLCheckBoxCtrl  *mCheckShowOwners;
-
 protected:
-    static void onClickClaim();
-    static void onClickRelease();
-    static void onClickDivide();
-    static void onClickJoin();
-    static void onClickAbout();
+    void onClickClaim();
+    void onClickRelease();
+    void onClickDivide();
+    void onClickJoin();
+    void onClickAbout();
 
 protected:
     bool postBuild() override;
 
     static LLPanelLandSelectObserver* sObserver;
     static LLPanelLandInfo* sInstance;
+private:
+    LLCheckBoxCtrl  *mCheckShowOwners = nullptr;
+    LLButton* mButtonBuyLand = nullptr;
+    LLButton* mButtonAbandonLand = nullptr;
+    LLButton* mButtonSubdivLand = nullptr;
+    LLButton* mButtonJoinLand = nullptr;
+    LLButton* mButtonAboutLand = nullptr;
+    LLTextBox* mTextArea = nullptr;
+    LLTextBox* mTextAreaPrice = nullptr;
 };
 
 #endif
-- 
cgit v1.2.3


From a067f935358098d57f472a5fb8d475e99dd5c510 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 19:34:35 -0400
Subject: Fix findChild calls during blocked list draw

---
 indra/newview/llpanelblockedlist.cpp | 18 ++++++++++++------
 indra/newview/llpanelblockedlist.h   |  7 ++++++-
 2 files changed, 18 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 0de22fce25..7d55ba3265 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -94,16 +94,21 @@ bool LLPanelBlockedList::postBuild()
         break;
     }
 
+    mBlockedGearBtn = getChild<LLMenuButton>("blocked_gear_btn");
+
     // Use the context menu of the Block list for the Block tab gear menu.
     LLToggleableMenu* blocked_gear_menu = mBlockedList->getContextMenu();
     if (blocked_gear_menu)
     {
-        getChild<LLMenuButton>("blocked_gear_btn")->setMenu(blocked_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
+        mBlockedGearBtn->setMenu(blocked_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
     }
+    mUnblockBtn = getChild<LLButton>("unblock_btn");
+    mUnblockBtn->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
 
-    getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&LLPanelBlockedList::unblockItem, this));
     getChild<LLFilterEditor>("blocked_filter_input")->setCommitCallback(boost::bind(&LLPanelBlockedList::onFilterEdit, this, _2));
 
+    mBlockLimitText = getChild<LLUICtrl>("block_limit");
+
     return LLPanel::postBuild();
 }
 
@@ -140,11 +145,12 @@ void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
 void LLPanelBlockedList::updateButtons()
 {
     bool hasSelected = NULL != mBlockedList->getSelectedItem();
-    getChildView("unblock_btn")->setEnabled(hasSelected);
-    getChildView("blocked_gear_btn")->setEnabled(hasSelected);
+    mUnblockBtn->setEnabled(hasSelected);
+    mBlockedGearBtn->setEnabled(hasSelected);
 
-    getChild<LLUICtrl>("block_limit")->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize()));
-    getChild<LLUICtrl>("block_limit")->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit")));
+    static LLCachedControl<S32> mute_list_limit(gSavedSettings, "MuteListLimit");
+    mBlockLimitText->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize()));
+    mBlockLimitText->setTextArg("[LIMIT]", llformat("%d", mute_list_limit()));
 }
 
 void LLPanelBlockedList::unblockItem()
diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h
index 446f3d4bad..1f470199ce 100644
--- a/indra/newview/llpanelblockedlist.h
+++ b/indra/newview/llpanelblockedlist.h
@@ -33,6 +33,8 @@
 
 class LLAvatarName;
 class LLBlockList;
+class LLMenuButton;
+class LLButton;
 
 class LLPanelBlockedList : public LLPanel
 {
@@ -78,7 +80,10 @@ private:
     static void callbackBlockByName(const std::string& text);
 
 private:
-    LLBlockList* mBlockedList;
+    LLBlockList* mBlockedList = nullptr;
+    LLUICtrl*    mBlockLimitText = nullptr;
+    LLMenuButton* mBlockedGearBtn = nullptr;
+    LLButton*    mUnblockBtn = nullptr;
     LLHandle<LLFloater> mPicker;
 };
 
-- 
cgit v1.2.3


From 66d2c846b180d58e4e90052d87e27505e2d22736 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 22:27:10 -0400
Subject: Fix further recursive findChild stalls from environment panel

---
 indra/newview/llpanelenvironment.cpp | 38 ++++++++++++++++++++----------------
 indra/newview/llpanelenvironment.h   |  8 ++++++--
 2 files changed, 27 insertions(+), 19 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 0c8bbbf308..51e2c05070 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -214,7 +214,10 @@ bool LLPanelEnvironmentInfo::postBuild()
 
     for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
     {
-        mAltitudePrefixers[idx] = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
+        mAltitudeDropTarget[idx] = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]);
+        mAltitudeLabels[idx] = findChild<LLTextBox>("txt_" + alt_prefixes[idx]);
+        mAltitudeEditor[idx] = findChild<LLLineEditor>("edt_invname_" + alt_prefixes[idx]);
+        mAltitudePanels[idx] = findChild<LLView>("pnl_" + alt_prefixes[idx]);
     }
 
     for (U32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; idx++)
@@ -224,11 +227,12 @@ bool LLPanelEnvironmentInfo::postBuild()
         {
             drop_target->setPanel(this, alt_sliders[idx]);
         }
+
         // set initial values to prevent [ALTITUDE] from displaying
-        updateAltLabel(alt_prefixes[idx], idx + 2, (F32)(idx * 1000));
+        updateAltLabel(idx, idx + 2, (F32)(idx * 1000));
     }
-    getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]);
-    getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]);
+    mAltitudeDropTarget[3]->setPanel(this, alt_prefixes[3]);
+    mAltitudeDropTarget[4]->setPanel(this, alt_prefixes[4]);
 
     return true;
 }
@@ -344,7 +348,7 @@ void LLPanelEnvironmentInfo::refresh()
                 // Something is very very wrong
                 LL_WARNS_ONCE("ENVPANEL") << "Failed to set up altitudes for parcel id " << getParcelId() << LL_ENDL;
             }
-            updateAltLabel(alt_prefixes[idx], idx + 2, altitude);
+            updateAltLabel(idx, idx + 2, altitude);
             mAltitudes[alt_sliders[idx]] = AltitudeData(idx + 2, idx, altitude);
         }
         if (mMultiSliderAltitudes->getCurNumSliders() != ALTITUDE_SLIDER_COUNT)
@@ -355,8 +359,8 @@ void LLPanelEnvironmentInfo::refresh()
         mMultiSliderAltitudes->resetCurSlider();
     }
 
-    updateAltLabel(alt_prefixes[3], 1, 0); // ground
-    updateAltLabel(alt_prefixes[4], 0, 0); // water
+    updateAltLabel(3, 1, 0); // ground
+    updateAltLabel(4, 0, 0); // water
 
 }
 
@@ -552,9 +556,9 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
 
     for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++)
     {
-        if (mAltitudePrefixers[idx])
+        if (mAltitudeDropTarget[idx])
         {
-            mAltitudePrefixers[idx]->setDndEnabled(can_enable);
+            mAltitudeDropTarget[idx]->setDndEnabled(can_enable);
         }
     }
 
@@ -571,7 +575,7 @@ void LLPanelEnvironmentInfo::clearDirtyFlag(U32 flag)
     mDirtyFlag &= ~flag;
 }
 
-void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_prefix, U32 sky_index, F32 alt_value)
+void LLPanelEnvironmentInfo::updateAltLabel(U32 alt_index, U32 sky_index, F32 alt_value)
 {
     LLRect sld_rect = mMultiSliderAltitudes->getRect();
     S32 sld_range = sld_rect.getHeight();
@@ -580,9 +584,9 @@ void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_prefix, U32 s
     S32 pos = (S32)((sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100)));
 
     // get related views
-    LLTextBox* text = findChild<LLTextBox>("txt_" + alt_prefix);
-    LLLineEditor *field = findChild<LLLineEditor>("edt_invname_" + alt_prefix);
-    LLView *alt_panel = findChild<LLView>("pnl_" + alt_prefix);
+    LLTextBox* text = mAltitudeLabels[alt_index];
+    LLLineEditor* field = mAltitudeEditor[alt_index];
+    LLView* alt_panel = mAltitudePanels[alt_index];
 
     if (text && (sky_index > 1))
     {
@@ -628,7 +632,7 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
     // Find the middle one
     for (U32 i = 0; i < ALTITUDE_SLIDER_COUNT; i++)
     {
-        LLView* cmp_view = findChild<LLView>(alt_panels[i], true);
+        LLView* cmp_view = mAltitudePanels[i];
         if (!cmp_view) return;
         LLRect cmp_rect = cmp_view->getRect();
         S32 pos = 0;
@@ -639,7 +643,7 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
         {
             if (i != j)
             {
-                LLView* intr_view = findChild<LLView>(alt_panels[j], true);
+                LLView* intr_view = mAltitudePanels[j];
                 if (!intr_view) return;
                 LLRect intr_rect = intr_view->getRect();
                 if (cmp_rect.mBottom >= intr_rect.mBottom)
@@ -687,7 +691,7 @@ void LLPanelEnvironmentInfo::readjustAltLabels()
     {
         if (i != midle_ind)
         {
-            LLView* trn_view = findChild<LLView>(alt_panels[i], true);
+            LLView* trn_view = mAltitudePanels[i];
             LLRect trn_rect = trn_view->getRect();
 
             if (trn_rect.mBottom <= midle_rect.mTop && trn_rect.mBottom >= midle_rect.mBottom)
@@ -807,7 +811,7 @@ void LLPanelEnvironmentInfo::onAltSliderCallback(LLUICtrl *cntrl, const LLSD &da
         }
         iter->second.mTrackIndex = new_index;
 
-        updateAltLabel(alt_prefixes[iter->second.mLabelIndex], iter->second.mTrackIndex, iter->second.mAltitude);
+        updateAltLabel(iter->second.mLabelIndex, iter->second.mTrackIndex, iter->second.mAltitude);
         iter++;
     }
 
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 0544524ece..8942e20119 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -113,7 +113,7 @@ protected:
     bool                        getIsDirty() const                  { return (mDirtyFlag != 0); }
     bool                        getIsDirtyFlag(U32 flag) const      { return ((mDirtyFlag & flag) != 0); }
     U32                         getDirtyFlag() const                { return mDirtyFlag; }
-    void                        updateAltLabel(const std::string &alt_prefix, U32 sky_index, F32 alt_value);
+    void                        updateAltLabel(U32 alt_index, U32 sky_index, F32 alt_value);
     void                        readjustAltLabels();
 
     void                        onSldDayLengthChanged(F32 value);
@@ -198,7 +198,11 @@ protected:
     LLIconCtrl* mIconWater = nullptr;
 
     std::array<LLUICtrl*, ALTITUDE_MARKERS_COUNT> mAltitudeMarkers;
-    std::array<LLSettingsDropTarget*, ALTITUDE_PREFIXERS_COUNT> mAltitudePrefixers;
+    std::array<LLSettingsDropTarget*, ALTITUDE_PREFIXERS_COUNT> mAltitudeDropTarget;
+
+    std::array<LLTextBox*, ALTITUDE_PREFIXERS_COUNT> mAltitudeLabels;
+    std::array<LLLineEditor*, ALTITUDE_PREFIXERS_COUNT> mAltitudeEditor;
+    std::array<LLView*, ALTITUDE_PREFIXERS_COUNT> mAltitudePanels;
 
 protected:
     typedef boost::signals2::connection connection_t;
-- 
cgit v1.2.3


From 6b20d98aaac093e043c6e23fbcf6d4e1f62d13ba Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 24 Jul 2024 23:12:44 -0400
Subject: Fix one more group findChild stall

---
 indra/newview/llpanelgroup.cpp | 16 ++++++++--------
 indra/newview/llpanelgroup.h   |  1 +
 2 files changed, 9 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 598df0135e..3db0f90df8 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -169,6 +169,8 @@ bool LLPanelGroup::postBuild()
 
     mButtonCancel = getChild<LLButton>("btn_cancel");
 
+    mGroupNameCtrl = getChild<LLUICtrl>("group_name");
+
     childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
 
     LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
@@ -311,9 +313,8 @@ void LLPanelGroup::update(LLGroupChange gc)
     if(gdatap)
     {
         std::string group_name =  gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
-        LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
-        group_name_ctrl->setValue(group_name);
-        group_name_ctrl->setToolTip(group_name);
+        mGroupNameCtrl->setValue(group_name);
+        mGroupNameCtrl->setToolTip(group_name);
 
         LLGroupData agent_gdatap;
         bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery();
@@ -365,9 +366,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
     if(gdatap)
     {
         std::string group_name =  gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName;
-        LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name");
-        group_name_ctrl->setValue(group_name);
-        group_name_ctrl->setToolTip(group_name);
+        mGroupNameCtrl->setValue(group_name);
+        mGroupNameCtrl->setToolTip(group_name);
     }
 
     bool is_null_group_id = group_id == LLUUID::null;
@@ -417,7 +417,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
         tab_land->setVisible(false);
         tab_experiences->setVisible(false);
 
-        getChild<LLUICtrl>("group_name")->setVisible(false);
+        mGroupNameCtrl->setVisible(false);
         getChild<LLUICtrl>("group_name_editor")->setVisible(true);
 
         if(mButtonCall)
@@ -449,7 +449,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
         tab_land->setVisible(is_member);
         tab_experiences->setVisible(is_member);
 
-        getChild<LLUICtrl>("group_name")->setVisible(true);
+        mGroupNameCtrl->setVisible(true);
         getChild<LLUICtrl>("group_name_editor")->setVisible(false);
 
         if(mButtonApply)
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 1dbc8c32ff..d7dec94c60 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -117,6 +117,7 @@ protected:
 
     LLAccordionCtrl* mGroupsAccordion = nullptr;
 
+    LLUICtrl*       mGroupNameCtrl = nullptr;
     LLButton*       mButtonJoin = nullptr;
     LLButton*       mButtonApply = nullptr;
     LLButton*       mButtonCall = nullptr;
-- 
cgit v1.2.3


From 7bb62fff08942db95805de454b43d006ca47428b Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 08:44:38 -0400
Subject: Fix precommit whitespace failure

---
 indra/newview/llviewermenu.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 888b607bfb..cd0b3dbd0c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -377,17 +377,17 @@ void LLMenuParcelObserver::changed()
     LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
     if (gMenuLand && parcel)
     {
-	    if (!mLandBuyPassHandle.isDead())
-	    {
-	        LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
-	        static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
-	    }
-
-	    if (!mLandBuyHandle.isDead())
-	    {
-	        bool buyable = enable_buy_land(NULL);
-	        static_cast<LLMenuItemCallGL*>(mLandBuyHandle.get())->setEnabled(buyable);
-	    }
+        if (!mLandBuyPassHandle.isDead())
+        {
+            LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
+            static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+        }
+
+        if (!mLandBuyHandle.isDead())
+        {
+            bool buyable = enable_buy_land(NULL);
+            static_cast<LLMenuItemCallGL*>(mLandBuyHandle.get())->setEnabled(buyable);
+        }
     }
 }
 
-- 
cgit v1.2.3


From 4d7f622a3c6a2fdec1c57ad4506ae49786b37dfc Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:02:03 +0300
Subject: viewer#2065 Region restart schedule floater

---
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/app_settings/settings.xml            |  11 +
 indra/newview/llfloaterregioninfo.cpp              |  23 ++
 indra/newview/llfloaterregioninfo.h                |   2 +
 indra/newview/llfloaterregionrestartschedule.cpp   | 386 +++++++++++++++++++++
 indra/newview/llfloaterregionrestartschedule.h     |  74 ++++
 indra/newview/llviewerregion.cpp                   |   1 +
 .../xui/en/floater_region_restart_schedule.xml     | 278 +++++++++++++++
 .../skins/default/xui/en/panel_region_general.xml  |  14 +-
 9 files changed, 790 insertions(+), 1 deletion(-)
 create mode 100644 indra/newview/llfloaterregionrestartschedule.cpp
 create mode 100644 indra/newview/llfloaterregionrestartschedule.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_region_restart_schedule.xml

(limited to 'indra')

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index d4c2875c6c..def2d8f0c0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -278,6 +278,7 @@ set(viewer_SOURCE_FILES
     llfloaterregioninfo.cpp
     llfloaterreporter.cpp
     llfloaterregionrestarting.cpp
+    llfloaterregionrestartschedule.cpp
     llfloatersavecamerapreset.cpp
     llfloatersaveprefpreset.cpp
     llfloatersceneloadstats.cpp
@@ -945,6 +946,7 @@ set(viewer_HEADER_FILES
     llfloaterregioninfo.h
     llfloaterreporter.h
     llfloaterregionrestarting.h
+    llfloaterregionrestartschedule.h
     llfloatersavecamerapreset.h
     llfloatersaveprefpreset.h
     llfloatersceneloadstats.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 235d294849..97cab58eb1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12682,6 +12682,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>Use24HourClock</key>
+    <map>
+        <key>Comment</key>
+        <string>12 vs 24. At the moment only for region restart schedule floater</string>
+        <key>Persist</key>
+        <integer>0</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>0</integer>
+    </map>
     <key>EnvironmentPersistAcrossLogin</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index cc9aca1338..02ef342c2a 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -61,6 +61,7 @@
 #include "llfloatergroups.h"
 #include "llfloaterreg.h"
 #include "llfloaterregiondebugconsole.h"
+#include "llfloaterregionrestartschedule.h"
 #include "llfloatertelehub.h"
 #include "llgltfmateriallist.h"
 #include "llinventorymodel.h"
@@ -259,6 +260,7 @@ bool LLFloaterRegionInfo::postBuild()
     panel = new LLPanelRegionGeneralInfo;
     mInfoPanels.push_back(panel);
     panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
+    panel->getCommitCallbackRegistrar().add("RegionInfo.ManageRestart", boost::bind(&LLPanelRegionInfo::onClickManageRestartSchedule, panel));
     panel->buildFromFile("panel_region_general.xml");
     mTab->addTabPanel(panel);
 
@@ -862,6 +864,25 @@ void LLPanelRegionInfo::onClickManageTelehub()
     LLFloaterReg::showInstance("telehubs");
 }
 
+void LLPanelRegionInfo::onClickManageRestartSchedule()
+{
+    LLFloater* floaterp = mFloaterRestartScheduleHandle.get();
+    // Show the dialog
+    if (!floaterp)
+    {
+        floaterp = new LLFloaterRegionRestartSchedule(this);
+    }
+
+    if (floaterp->getVisible())
+    {
+        floaterp->closeFloater();
+    }
+    else
+    {
+        floaterp->openFloater();
+    }
+}
+
 /////////////////////////////////////////////////////////////////////////////
 // LLPanelRegionGeneralInfo
 //
@@ -877,6 +898,8 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
     getChildView("kick_all_btn")->setEnabled(allow_modify);
     getChildView("im_btn")->setEnabled(allow_modify);
     getChildView("manage_telehub_btn")->setEnabled(allow_modify);
+    getChildView("manage_restart_btn")->setEnabled(allow_modify);
+    getChildView("manage_restart_btn")->setVisible(LLFloaterRegionRestartSchedule::canUse());
 
     // Data gets filled in by processRegionInfo
 
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 60564435d7..b604a28fc3 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -154,6 +154,7 @@ public:
     void disableButton(const std::string& btn_name);
 
     void onClickManageTelehub();
+    void onClickManageRestartSchedule();
 
 protected:
     void initCtrl(const std::string& name);
@@ -174,6 +175,7 @@ protected:
 
     // member data
     LLHost mHost;
+    LLHandle<LLFloater> mFloaterRestartScheduleHandle;
 };
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterregionrestartschedule.cpp b/indra/newview/llfloaterregionrestartschedule.cpp
new file mode 100644
index 0000000000..59bcb22dce
--- /dev/null
+++ b/indra/newview/llfloaterregionrestartschedule.cpp
@@ -0,0 +1,386 @@
+/**
+ * @file llfloaterregionrestartschedule.cpp
+ * @author Andrii Kleshchev
+ * @brief LLFloaterRegionRestartSchedule class
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterregionrestartschedule.h"
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "lllineeditor.h"
+#include "llviewercontrol.h"
+
+
+// match with values used by capability
+constexpr char CHECKBOX_PREFIXES[] =
+{
+    's',
+    'm',
+    't',
+    'w',
+    'r',
+    'f',
+    'a',
+};
+
+const std::string CHECKBOX_NAME = "_chk";
+
+LLFloaterRegionRestartSchedule::LLFloaterRegionRestartSchedule(
+    LLView* owner)
+    : LLFloater(LLSD())
+    , mOwnerHandle(owner->getHandle())
+{
+    buildFromFile("floater_region_restart_schedule.xml");
+}
+
+LLFloaterRegionRestartSchedule::~LLFloaterRegionRestartSchedule()
+{
+
+}
+
+bool LLFloaterRegionRestartSchedule::postBuild()
+{
+    mPMAMButton = getChild<LLButton>("am_pm_btn");
+    mPMAMButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { onPMAMButtonClicked(); });
+
+    // By default mPMAMButton is supposed to be visible.
+    // If localized xml set mPMAMButton to be invisible, assume
+    // 24h format and prealligned "UTC" label
+    if (mPMAMButton->getVisible())
+    {
+        bool use_24h_format = gSavedSettings.getBOOL("Use24HourClock");
+        if (use_24h_format)
+        {
+            mPMAMButton->setVisible(false);
+            LLUICtrl* lbl = getChild<LLUICtrl>("utc_label");
+            lbl->translate(-mPMAMButton->getRect().getWidth(), 0);
+        }
+    }
+
+    mSaveButton = getChild<LLButton>("save_btn");
+    mSaveButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { onSaveButtonClicked(); });
+
+    mCancelButton = getChild<LLButton>("cancel_btn");
+    mCancelButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { closeFloater(false); });
+
+
+    mHoursLineEditor = getChild<LLLineEditor>("hours_edt");
+    mHoursLineEditor->setPrevalidate(LLTextValidate::validateNonNegativeS32);
+    mHoursLineEditor->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { onCommitHours(value); });
+
+    mMinutesLineEditor = getChild<LLLineEditor>("minutes_edt");
+    mMinutesLineEditor->setPrevalidate(LLTextValidate::validateNonNegativeS32);
+    mMinutesLineEditor->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { onCommitMinutes(value); });
+
+    for (char c : CHECKBOX_PREFIXES)
+    {
+        std::string name = c + CHECKBOX_NAME;
+        LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
+        chk->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& value) { mSaveButton->setEnabled(true); });
+    }
+
+    resetUI(false);
+
+    return true;
+}
+
+void LLFloaterRegionRestartSchedule::onOpen(const LLSD& key)
+{
+    std::string url = gAgent.getRegionCapability("RegionSchedule");
+    if (!url.empty())
+    {
+        LLCoros::instance().launch("LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro",
+            boost::bind(&LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro, url, getHandle()));
+
+        mSaveButton->setEnabled(false);
+    }
+    else
+    {
+        LL_WARNS("Region") << "Started region schedule floater, but RegionSchedule capability is not available" << LL_ENDL;
+    }
+}
+
+void LLFloaterRegionRestartSchedule::draw()
+{
+    LLView* owner = mOwnerHandle.get();
+    if (owner)
+    {
+        static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f);
+        drawConeToOwner(mContextConeOpacity, max_opacity, owner);
+    }
+
+    LLFloater::draw();
+}
+
+void LLFloaterRegionRestartSchedule::onPMAMButtonClicked()
+{
+    mSaveButton->setEnabled(true);
+    mTimeAM = !mTimeAM;
+    updateAMPM();
+}
+
+void LLFloaterRegionRestartSchedule::onSaveButtonClicked()
+{
+    std::string url = gAgent.getRegionCapability("RegionSchedule");
+    if (!url.empty())
+    {
+        std::string days;
+        for (char c : CHECKBOX_PREFIXES)
+        {
+            std::string name = c + CHECKBOX_NAME;
+            LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
+            if (chk->getValue())
+            {
+                days += c;
+            }
+        }
+        LLSD restart;
+        if (days.size() < 7)
+        {
+            LLStringUtil::toUpper(days);
+            restart["type"] = "W";
+            // if days are empty, will reset schedule
+            restart["days"] = days;
+        }
+        else
+        {
+            restart["type"] = "D";
+        }
+        S32 hours = mHoursLineEditor->getValue().asInteger();
+        if (mPMAMButton->getVisible())
+        {
+            if (hours == 12)
+            {
+                hours = 0; // 12:00 AM equals 0:00, while 12:00 PM equals 12:00
+            }
+            if (!mTimeAM)
+            {
+                hours += 12;
+            }
+        }
+        restart["time"] = hours * 3600 + mMinutesLineEditor->getValue().asInteger() * 60;
+
+        LLSD body;
+        body["restart"] = restart; // event name, at the moment only "restart" is supported
+        LLCoros::instance().launch("LLFloaterRegionRestartSchedule::setRegionShcheduleCoro",
+            boost::bind(&LLFloaterRegionRestartSchedule::setRegionShcheduleCoro, url, body, getHandle()));
+
+        mSaveButton->setEnabled(false);
+    }
+    else
+    {
+        LL_WARNS("Region") << "Saving region schedule, but RegionSchedule capability is not available" << LL_ENDL;
+    }
+}
+
+void LLFloaterRegionRestartSchedule::onCommitHours(const LLSD& value)
+{
+    S32 hours = value.asInteger();
+    if (mPMAMButton->getVisible())
+    {
+        // 0:00 equals 12:00 AM 1:00 equals 1:00 AM, 12am < 1am < 2am < 3am...
+        if (hours == 0) hours = 12;
+        llclamp(hours, 1, 12);
+    }
+    else
+    {
+        llclamp(hours, 0, 23);
+    }
+    mHoursLineEditor->setText(llformat("%02d", hours));
+    mSaveButton->setEnabled(true);
+}
+
+void LLFloaterRegionRestartSchedule::onCommitMinutes(const LLSD& value)
+{
+    S32 minutes = value.asInteger();
+    llclamp(minutes, 0, 59);
+    mMinutesLineEditor->setText(llformat("%02d", minutes));
+    mSaveButton->setEnabled(true);
+}
+
+void LLFloaterRegionRestartSchedule::resetUI(bool enable_ui)
+{
+    for (char c : CHECKBOX_PREFIXES)
+    {
+        std::string name = c + CHECKBOX_NAME;
+        LLCheckBoxCtrl* chk = getChild<LLCheckBoxCtrl>(name);
+        chk->setValue(false);
+        chk->setEnabled(enable_ui);
+    }
+    if (mPMAMButton->getVisible())
+    {
+        mHoursLineEditor->setValue("12");
+        mPMAMButton->setEnabled(enable_ui);
+    }
+    else
+    {
+        mHoursLineEditor->setValue("00");
+    }
+    mMinutesLineEditor->setValue("00");
+    mMinutesLineEditor->setEnabled(enable_ui);
+    mHoursLineEditor->setEnabled(enable_ui);
+    mTimeAM = true;
+    updateAMPM();
+}
+
+void LLFloaterRegionRestartSchedule::updateAMPM()
+{
+    std::string value;
+    if (mTimeAM)
+    {
+        value = getString("am_string");
+    }
+    else
+    {
+        value = getString("pm_string");
+    }
+    mPMAMButton->setLabel(value);
+}
+
+bool LLFloaterRegionRestartSchedule::canUse()
+{
+    std::string url = gAgent.getRegionCapability("RegionSchedule");
+    return !url.empty();
+}
+
+void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url, LLHandle<LLFloater> handle)
+{
+    LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+    LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+        httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy));
+    LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+    LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+
+    httpOpts->setWantHeaders(true);
+
+    LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
+
+    LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+    LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+    LLFloaterRegionRestartSchedule* floater = dynamic_cast<LLFloaterRegionRestartSchedule*>(handle.get());
+    if (!floater)
+    {
+        LL_DEBUGS("Region") << "Region Restart Schedule floater is already dead" << LL_ENDL;
+    }
+    else if (!status)
+    {
+        LL_WARNS("Region") << "Failed to get region schedule: " << status.toString() << LL_ENDL;
+        floater->resetUI(false);
+    }
+    else if (!result.has("restart"))
+    {
+        floater->resetUI(true); // no restart schedule yet
+    }
+    else
+    {
+        // example: 'restart':{'days':'TR','time':i7200,'type':'W'}
+        LLSD &restart = result["restart"];
+        std::string type = restart["type"];
+        std::string days = restart["days"];
+        if (type == "W") // weekly || restart.has("days")
+        {
+            LLStringUtil::toLower(days);
+            for (char c : CHECKBOX_PREFIXES)
+            {
+                bool enabled = days.find(c) != std::string::npos;
+                std::string name = c + CHECKBOX_NAME;
+                LLCheckBoxCtrl *chk = floater->getChild<LLCheckBoxCtrl>(name);
+                chk->setValue(enabled);
+                chk->setEnabled(true);
+            }
+        }
+        else // dayly
+        {
+            for (char c : CHECKBOX_PREFIXES)
+            {
+                std::string name = c + CHECKBOX_NAME;
+                LLCheckBoxCtrl* chk = floater->getChild<LLCheckBoxCtrl>(name);
+                chk->setValue(true);
+                chk->setEnabled(true);
+            }
+        }
+
+        S32 seconds_after_midnight = restart["time"].asInteger();
+        S32 hours = seconds_after_midnight / 3600;
+        S32 minutes = (seconds_after_midnight % 3600) / 60;
+
+        if (floater->mPMAMButton->getVisible())
+        {
+            if (hours >= 12)
+            {
+                hours -= 12;
+                floater->mTimeAM = false;
+            }
+            else
+            {
+                floater->mTimeAM = true;
+            }
+            if (hours == 0)
+            {
+                hours = 12; // 0:00 equals 12:00 AM , 1:00 equals 1:00 AM
+            }
+            floater->mPMAMButton->setEnabled(true);
+        }
+        else
+        {
+            floater->mTimeAM = true;
+        }
+        floater->updateAMPM();
+        floater->mHoursLineEditor->setText(llformat("%02d", hours));
+        floater->mHoursLineEditor->setEnabled(true);
+        floater->mMinutesLineEditor->setText(llformat("%02d", minutes));
+        floater->mMinutesLineEditor->setEnabled(true);
+
+        LL_DEBUGS("Region") << "Region restart schedule type: " << type
+            << " Days: " << days
+            << " Time:" << hours << ":" << minutes << LL_ENDL;
+    }
+}
+
+void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLSD body, LLHandle<LLFloater> handle)
+{
+    LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+    LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+        httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy));
+    LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+    LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+
+    httpOpts->setWantHeaders(true);
+
+    LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
+
+    LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+    LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+    LLFloaterRegionRestartSchedule* floater = dynamic_cast<LLFloaterRegionRestartSchedule*>(handle.get());
+    if (floater)
+    {
+        floater->closeFloater();
+    }
+}
diff --git a/indra/newview/llfloaterregionrestartschedule.h b/indra/newview/llfloaterregionrestartschedule.h
new file mode 100644
index 0000000000..465ed538a5
--- /dev/null
+++ b/indra/newview/llfloaterregionrestartschedule.h
@@ -0,0 +1,74 @@
+/**
+ * @file llfloaterregionrestartschedule.h
+ * @author Andrii Kleshchev
+ * @brief LLFloaterRegionRestartSchedule class header file
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERREGIONRESTARTSCHEDULE_H
+#define LL_LLFLOATERREGIONRESTARTSCHEDULE_H
+
+#include "llfloater.h"
+
+class LLLineEditor;
+class LLButton;
+
+class LLFloaterRegionRestartSchedule : public LLFloater
+{
+public:
+    LLFloaterRegionRestartSchedule(LLView* owner);
+
+    virtual ~LLFloaterRegionRestartSchedule();
+
+    bool postBuild() override;
+    void onOpen(const LLSD& key) override;
+    void draw() override;
+
+    void onPMAMButtonClicked();
+    void onSaveButtonClicked();
+
+    void onCommitHours(const LLSD& value);
+    void onCommitMinutes(const LLSD& value);
+
+    void resetUI(bool enable_ui);
+    void updateAMPM();
+
+    static bool canUse();
+
+protected:
+    static void requestRegionShcheduleCoro(std::string url, LLHandle<LLFloater> handle);
+    static void setRegionShcheduleCoro(std::string url, LLSD body, LLHandle<LLFloater> handle);
+
+    LLHandle<LLView> mOwnerHandle;
+    F32 mContextConeOpacity{ 0.f };
+
+    LLLineEditor* mHoursLineEditor{nullptr};
+    LLLineEditor* mMinutesLineEditor{ nullptr };
+    LLButton* mPMAMButton{ nullptr };
+    LLButton* mSaveButton{ nullptr };
+    LLButton* mCancelButton{ nullptr };
+
+    bool mTimeAM{ true };
+};
+
+#endif  // LL_LLFLOATERREGIONRESTARTSCHEDULE_H
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 7623ab56a5..ac64c47abe 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3276,6 +3276,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
     capabilityNames.append("VoiceSignalingRequest");
     capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
     capabilityNames.append("RegionObjects");
+    capabilityNames.append("RegionSchedule");
     capabilityNames.append("RemoteParcelRequest");
     capabilityNames.append("RenderMaterials");
     capabilityNames.append("RequestTextureDownload");
diff --git a/indra/newview/skins/default/xui/en/floater_region_restart_schedule.xml b/indra/newview/skins/default/xui/en/floater_region_restart_schedule.xml
new file mode 100644
index 0000000000..fd04acde35
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_region_restart_schedule.xml
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+  height="180"
+  layout="topleft"
+  name="floater_region_restart_schedule"
+  help_topic="Preferences_Graphics_Advanced"
+  single_instance="true"
+  save_rect="true"
+  title="REGION RESTART SCHEDULE"
+  width="300">
+
+<!-- This block shows Advanced Settings -->
+  <floater.string name="am_string">am</floater.string>
+  <floater.string name="pm_string">pm</floater.string>
+
+  <text
+    name="days_general"
+    type="string"
+    follows="left|top"
+    layout="topleft"
+    height="16"
+    top="15"
+    left="20"
+    width="328">
+     Restart the region on following days:
+  </text>
+
+  <check_box
+   name="s_chk"
+   label=""
+   tool_tip="Sunday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left="60"
+   top_pad="5" />
+
+  <check_box
+   name="m_chk"
+   label=""
+   tool_tip="Monday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <check_box
+   name="t_chk"
+   label=""
+   tool_tip="Tuesday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <check_box
+   name="w_chk"
+   label=""
+   tool_tip="Wednesday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <check_box
+   name="r_chk"
+   label=""
+   tool_tip="Thursday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <check_box
+   name="f_chk"
+   label=""
+   tool_tip="Friday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <check_box
+   name="a_chk"
+   label=""
+   tool_tip="Saturday"
+   follows="left|top"
+   layout="topleft"
+   height="20"
+   width="20"
+   left_pad="5"
+   top_delta="0" />
+
+  <text
+   name="su_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_pad="5"
+   left="57"
+   width="25">
+     Su
+  </text>
+
+  <text
+   name="mo_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="0"
+   width="25">
+     Mo
+  </text>
+
+  <text
+   name="tu_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="0"
+   width="25">
+     Tu
+  </text>
+
+  <text
+   name="we_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="1"
+   width="25">
+     We
+  </text>
+
+  <text
+   name="th_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="0"
+   width="25">
+     Th
+  </text>
+
+  <text
+   name="fr_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="0"
+   width="25">
+     Fr
+  </text>
+
+  <text
+   name="sa_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="0"
+   left_pad="0"
+   width="25">
+     Sa
+  </text>
+
+  <text
+   name="at_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="right"
+   height="16"
+   top_pad="15"
+   left="30"
+   width="40">
+     at
+  </text>
+  <line_editor
+   name="hours_edt"
+   max_length_bytes="2"
+   follows="left|top"
+   layout="topleft"
+   commit_on_focus_lost="true"
+   height="23"
+   width="40"
+   left_pad="4"
+   top_delta="-5"/>
+  <text
+   name="separator_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   halign="center"
+   height="16"
+   top_delta="5"
+   left_pad="0"
+   width="12">
+     :
+  </text>
+  <line_editor
+   name="minutes_edt"
+   max_length_bytes="2"
+   follows="left|top"
+   layout="topleft"
+   commit_on_focus_lost="true"
+   height="23"
+   width="40"
+   left_pad="0"
+   top_delta="-5"/>
+  <button
+   name="am_pm_btn"
+   label="am"
+   follows="left|top"
+   layout="topleft"
+   height="23"
+   width="40"
+   left_pad="1"
+   top_delta="0"/>
+  <text
+   name="utc_label"
+   type="string"
+   follows="left|top"
+   layout="topleft"
+   height="16"
+   top_delta="5"
+   left_pad="5"
+   width="22">
+     UTC
+  </text>
+  <button
+   name="save_btn"
+   label="Save"
+   follows="top|left"
+   layout="topleft"
+   top="145"
+   left="25"
+   height="25"
+   width="110"/>
+  <button
+   name="cancel_btn"
+   label="Cancel"
+   follows="bottom|right"
+   layout="topleft"
+   left_pad="20"
+   top_delta="0"
+   height="25"
+   width="110"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml
index 74d21c436e..6ef1b6e44a 100644
--- a/indra/newview/skins/default/xui/en/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_general.xml
@@ -270,8 +270,20 @@
      left="250"
      name="manage_telehub_btn"
      top="70"
-     width="150">
+     width="160">
 		<button.commit_callback
          function="RegionInfo.ManageTelehub" />
     </button>
+    <button
+     follows="left|top"
+     height="20"
+     label="Manage Restart Schedule..."
+     layout="topleft"
+     name="manage_restart_btn"
+     top_pad="5"
+     left_delta="0"
+     width="160">
+        <button.commit_callback
+         function="RegionInfo.ManageRestart" />
+    </button>
 </panel>
-- 
cgit v1.2.3


From 3ca9af4d4ac035ed18fa747edd7e0a3bf49b7b32 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 25 Jul 2024 18:19:55 +0200
Subject: Fix commit 4b543b618b101aca9dee1f224d8dbd4fbf937d71

---
 indra/newview/llhudtext.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 78afe43ffe..35bcf65db6 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -392,7 +392,7 @@ void LLHUDText::updateVisibility()
 
     LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
     F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
-    static LLCachedControl<bool> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance");
+    static LLCachedControl<F32> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance");
     F32 max_draw_distance = prim_text_max_dist;
 
     if(max_draw_distance < 0)
-- 
cgit v1.2.3


From 4295a1f66033f9417c7668c54128515ee0a35558 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 25 Jul 2024 19:55:05 +0200
Subject: Fix commit 66d2c846b180d58e4e90052d87e27505e2d22736

---
 indra/newview/llpanelenvironment.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 8942e20119..c9b95cc348 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -40,6 +40,7 @@
 
 class LLViewerRegion;
 class LLIconCtrl;
+class LLSettingsDropTarget;
 
 class LLPanelEnvironmentInfo : public LLPanel
 {
-- 
cgit v1.2.3


From bc50d2c7d57618846a6cb318cd12e006270b64ae Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 25 Jul 2024 15:56:48 +0200
Subject: #1318 Pagination in the Group Interface (rework)

---
 indra/newview/llgroupmgr.cpp        | 55 +++++++++++++++++++++++++++++--------
 indra/newview/llgroupmgr.h          |  6 ++--
 indra/newview/llpanelgrouproles.cpp |  5 ++--
 3 files changed, 50 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index ec2002d8c5..76d3e3e049 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -2145,9 +2145,11 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content)
     LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST);
 }
 
-void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column)
+void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, U32 sort_column, bool sort_descending)
 {
-    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
+    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "'"
+        << ", page_size: " << page_size << ", page_start: " << page_start
+        << ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL;
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
         httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
@@ -2156,6 +2158,7 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p
 
     LLSD postData = LLSD::emptyMap();
     postData["group_id"] = group_id;
+
     if (page_size)
     {
         postData["page_size"] = LLSD::Integer(page_size);
@@ -2163,12 +2166,19 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p
         {
             postData["page_start"] = LLSD::Integer(page_start);
         }
-        if (!sort_column.empty())
+    }
+
+    if (sort_column)
+    {
+        postData["sort_column"] = LLSD::Integer(sort_column);
+        if (sort_descending)
         {
-            postData["sort_column"] = sort_column;
+            postData["sort_descending"] = 1;
         }
     }
 
+    mMemberRequestInFlight = true;
+
     LLSD response = httpAdapter->postAndSuspend(httpRequest, url, postData, httpOpts);
 
     mMemberRequestInFlight = false;
@@ -2183,10 +2193,10 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p
     }
 
     response.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
-    processCapGroupMembersResponse(response, page_size, page_start, sort_column);
+    processCapGroupMembersResponse(response, url, page_size, page_start, sort_column, sort_descending);
 }
 
-void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_size, U32 page_start, const std::string& sort_column)
+void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_size, U32 page_start, const std::string& sort_column_name, bool sort_descending)
 {
     static U32 lastGroupMemberRequestFrame = 0;
 
@@ -2195,6 +2205,10 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_siz
     if ((lastGroupMemberRequestFrame == gFrameCount) || mMemberRequestInFlight)
         return;
 
+    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "'"
+        << ", page_size: " << page_size << ", page_start: " << page_start
+        << ", sort_column_name: '" << sort_column_name << "', sort_descending: " << sort_descending << LL_ENDL;
+
     LLViewerRegion* currentRegion = gAgent.getRegion();
     // Thank you FS:Ansariel!
     if (!currentRegion)
@@ -2226,18 +2240,34 @@ void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id, U32 page_siz
 
     lastGroupMemberRequestFrame = gFrameCount;
 
-    mMemberRequestInFlight = true;
+    U32 sort_column = 0; // No sorting by default
+    if (!sort_column_name.empty())
+    {
+        static const std::vector<std::string> column_names = { "name", "donated", "online", "title" };
+        auto it = std::find(column_names.begin(), column_names.end(), sort_column_name);
+        if (it == column_names.end())
+        {
+            LL_WARNS("GrpMgr") << "Invalid column name: '" << sort_column_name << "'" << LL_ENDL;
+        }
+        else
+        {
+            // Use offset (1) because 0 means "no sorting"
+            sort_column = 1 + (U32)std::distance(column_names.begin(), it);
+        }
+    }
 
     LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro", [&]()
         {
-            groupMembersRequestCoro(cap_url, group_id, page_size, page_start, sort_column);
+            groupMembersRequestCoro(cap_url, group_id, page_size, page_start, sort_column, sort_descending);
         });
 }
 
-void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column)
+void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, const std::string& url, U32 page_size, U32 page_start, U32 sort_column, bool sort_descending)
 {
     LLUUID group_id = response["group_id"].asUUID();
-    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "', sort_column: '" << sort_column << "', page_size: " << page_size << ", page_start: " << page_start << LL_ENDL;
+    LL_INFOS("GrpMgr") << "group_id: '" << group_id << "'"
+        << ", page_size: " << page_size << ", page_start: " << page_start
+        << ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL;
 
     // Did we get anything in content?
     if (!response.size())
@@ -2357,7 +2387,10 @@ void LLGroupMgr::processCapGroupMembersResponse(const LLSD& response, U32 page_s
 
     if (page_size && members_loaded >= page_size && member_count > members_before)
     {
-        sendCapGroupMembersRequest(group_id, page_size, member_count, sort_column);
+        LLCoros::instance().launch("LLGroupMgr::groupMembersRequestCoro", [&]()
+            {
+                groupMembersRequestCoro(url, group_id, page_size, page_start, sort_column, sort_descending);
+            });
     }
 
     // Make the role-member data request
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index f96c5ccc14..21cf4a62b6 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -414,7 +414,7 @@ public:
 
 
     void sendCapGroupMembersRequest(const LLUUID& group_id,
-        U32 page_size = 0, U32 page_start = 0, const std::string& sort_column = LLStringUtil::null);
+        U32 page_size = 0, U32 page_start = 0, const std::string& sort_column_name = LLStringUtil::null, bool sort_descending = false);
 
     void cancelGroupRoleChanges(const LLUUID& group_id);
 
@@ -437,8 +437,8 @@ public:
     void clearGroupData(const LLUUID& group_id);
 
 private:
-    void groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, std::string sort_column);
-    void processCapGroupMembersResponse(const LLSD& response, U32 page_size, U32 page_start, const std::string& sort_column);
+    void groupMembersRequestCoro(std::string url, LLUUID group_id, U32 page_size, U32 page_start, U32 sort_column, bool sort_descending);
+    void processCapGroupMembersResponse(const LLSD& response, const std::string& url, U32 page_size, U32 page_start, U32 sort_column, bool sort_descending);
 
     void getGroupBanRequestCoro(std::string url, LLUUID group_id);
     void postGroupBanRequestCoro(std::string url, LLUUID group_id, U32 action, uuid_vec_t ban_list, bool update);
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 864d73683e..4404efff98 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1361,8 +1361,9 @@ void LLPanelGroupMembersSubTab::activate()
         if (!gdatap || !gdatap->isMemberDataComplete())
         {
             const U32 page_size = 50;
-            std::string sort_column = mMembersList->getSortColumnName();
-            LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID, page_size, 0, sort_column);
+            std::string sort_column_name = mMembersList->getSortColumnName();
+            bool sort_descending = !mMembersList->getSortAscending();
+            LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID, page_size, 0, sort_column_name, sort_descending);
         }
 
         if (!gdatap || !gdatap->isRoleMemberDataComplete())
-- 
cgit v1.2.3


From 005f3bd62a73040fe9a9c447f697e70a3d918bd4 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 09:50:07 -0400
Subject: Fix findChild stall during teleport in people panel

---
 indra/newview/llpanelpeople.cpp | 77 ++++++++++++++++++++++++-----------------
 indra/newview/llpanelpeople.h   | 13 ++++++-
 2 files changed, 58 insertions(+), 32 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 7f64cfca08..2f0a8f7656 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -153,8 +153,6 @@ public:
             id_it = uuids.begin(),
             id_end = uuids.end();
 
-        LLAvatarItemDistanceComparator::id_to_pos_map_t pos_map;
-
         mAvatarsPositions.clear();
 
         for (;pos_it != pos_end && id_it != id_end; ++pos_it, ++id_it )
@@ -618,15 +616,13 @@ bool LLPanelPeople::postBuild()
 {
     S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit();
 
-    mNearbyFilterCommitConnection = getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
-    mFriedsFilterCommitConnection = getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
-    mGroupsFilterCommitConnection = getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
-    mRecentFilterCommitConnection = getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
-
+    LLPanel* group_tab = getChild<LLPanel>(GROUP_TAB_NAME);
+    mGroupDelBtn = group_tab->getChild<LLButton>("minus_btn");
+    mGroupCountText = group_tab->getChild<LLTextBox>("groupcount");
     if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium)
     {
-        getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
-        getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
+        mGroupCountText->setText(getString("GroupCountWithInfo"));
+        mGroupCountText->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
     }
 
     mTabContainer = getChild<LLTabContainer>("tabs");
@@ -639,40 +635,56 @@ bool LLPanelPeople::postBuild()
     friends_tab->setVisibleCallback(boost::bind(&Updater::setActive, mFriendListUpdater, _2));
     friends_tab->setVisibleCallback(boost::bind(&LLPanelPeople::removePicker, this));
 
+    mFriendsGearBtn = friends_tab->getChild<LLButton>("gear_btn");
+    mFriendsDelFriendBtn = friends_tab->getChild<LLUICtrl>("friends_del_btn");
+
     mOnlineFriendList = friends_tab->getChild<LLAvatarList>("avatars_online");
     mAllFriendList = friends_tab->getChild<LLAvatarList>("avatars_all");
     mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online"));
     mOnlineFriendList->setShowIcons("FriendsListShowIcons");
-    mOnlineFriendList->showPermissions("FriendsListShowPermissions");
+    mOnlineFriendList->showPermissions(gSavedSettings.getBOOL("FriendsListShowPermissions"));
     mOnlineFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames"));
     mAllFriendList->setNoItemsCommentText(getString("no_friends"));
     mAllFriendList->setShowIcons("FriendsListShowIcons");
-    mAllFriendList->showPermissions("FriendsListShowPermissions");
+    mAllFriendList->showPermissions(gSavedSettings.getBOOL("FriendsListShowPermissions"));
     mAllFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames"));
 
     LLPanel* nearby_tab = getChild<LLPanel>(NEARBY_TAB_NAME);
     nearby_tab->setVisibleCallback(boost::bind(&Updater::setActive, mNearbyListUpdater, _2));
+
     mNearbyList = nearby_tab->getChild<LLAvatarList>("avatar_list");
     mNearbyList->setNoItemsCommentText(getString("no_one_near"));
     mNearbyList->setNoItemsMsg(getString("no_one_near"));
     mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near"));
     mNearbyList->setShowIcons("NearbyListShowIcons");
     mNearbyList->setShowCompleteName(!gSavedSettings.getBOOL("NearbyListHideUsernames"));
-    mMiniMap = (LLNetMap*)getChildView("Net Map",true);
+    mMiniMap = nearby_tab->getChild<LLNetMap>("Net Map", true);
     mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ?
         getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg"));
 
-    mRecentList = getChild<LLPanel>(RECENT_TAB_NAME)->getChild<LLAvatarList>("avatar_list");
+    mNearbyGearBtn = nearby_tab->getChild<LLButton>("gear_btn");
+    mNearbyAddFriendBtn = nearby_tab->getChild<LLButton>("add_friend_btn");
+
+    LLPanel* recent_tab = getChild<LLPanel>(RECENT_TAB_NAME);
+    mRecentList = recent_tab->getChild<LLAvatarList>("avatar_list");
     mRecentList->setNoItemsCommentText(getString("no_recent_people"));
     mRecentList->setNoItemsMsg(getString("no_recent_people"));
     mRecentList->setNoFilteredItemsMsg(getString("no_filtered_recent_people"));
     mRecentList->setShowIcons("RecentListShowIcons");
 
-    mGroupList = getChild<LLGroupList>("group_list");
+    mRecentGearBtn = recent_tab->getChild<LLButton>("gear_btn");
+    mRecentAddFriendBtn = recent_tab->getChild<LLButton>("add_friend_btn");
+
+    mGroupList = group_tab->getChild<LLGroupList>("group_list");
     mGroupList->setNoItemsCommentText(getString("no_groups_msg"));
     mGroupList->setNoItemsMsg(getString("no_groups_msg"));
     mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg"));
 
+    mNearbyFilterCommitConnection = nearby_tab->getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+    mFriedsFilterCommitConnection = friends_tab->getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+    mRecentFilterCommitConnection = recent_tab->getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+    mGroupsFilterCommitConnection = group_tab->getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
+
     mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyPeopleContextMenu);
     mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
     mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
@@ -850,10 +862,11 @@ void LLPanelPeople::updateRecentList()
 
 void LLPanelPeople::updateButtons()
 {
-    std::string cur_tab     = getActiveTabName();
+    const std::string& cur_tab     = getActiveTabName();
+    bool nearby_tab_active = (cur_tab == NEARBY_TAB_NAME);
     bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME);
     bool group_tab_active   = (cur_tab == GROUP_TAB_NAME);
-    //bool recent_tab_active    = (cur_tab == RECENT_TAB_NAME);
+    bool recent_tab_active  = (cur_tab == RECENT_TAB_NAME);
     LLUUID selected_id;
 
     uuid_vec_t selected_uuids;
@@ -868,14 +881,13 @@ void LLPanelPeople::updateButtons()
             selected_id = mGroupList->getSelectedUUID();
         }
 
-        LLPanel* groups_panel = mTabContainer->getCurrentPanel();
-        groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
+        mGroupDelBtn->setEnabled(item_selected && selected_id.notNull()); // a real group selected
 
         U32 groups_count = static_cast<U32>(gAgent.mGroups.size());
         U32 max_groups = LLAgentBenefitsMgr::current().getGroupMembershipLimit();
         U32 groups_remaining = max_groups > groups_count ? max_groups - groups_count : 0;
-        groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d", groups_count));
-        groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d", groups_remaining));
+        mGroupCountText->setTextArg("[COUNT]", llformat("%d", groups_count));
+        mGroupCountText->setTextArg("[REMAINING]", llformat("%d", groups_remaining));
     }
     else
     {
@@ -889,33 +901,36 @@ void LLPanelPeople::updateButtons()
             is_self = gAgent.getID() == selected_id;
         }
 
-        LLPanel* cur_panel = mTabContainer->getCurrentPanel();
-        if (cur_panel)
         {
-            if (cur_panel->hasChild("add_friend_btn", true))
-                cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self);
+            if(nearby_tab_active)
+            {
+                mNearbyAddFriendBtn->setEnabled(item_selected && !is_friend && !is_self);
+                mNearbyGearBtn->setEnabled(multiple_selected);
+            }
 
             if (friends_tab_active)
             {
-                cur_panel->getChildView("friends_del_btn")->setEnabled(multiple_selected);
+                mFriendsDelFriendBtn->setEnabled(multiple_selected);
+                mFriendsGearBtn->setEnabled(multiple_selected);
             }
 
-            if (!group_tab_active)
+            if (recent_tab_active)
             {
-                cur_panel->getChildView("gear_btn")->setEnabled(multiple_selected);
+                mRecentAddFriendBtn->setEnabled(item_selected && !is_friend && !is_self);
+                mRecentGearBtn->setEnabled(multiple_selected);
             }
         }
     }
 }
 
-std::string LLPanelPeople::getActiveTabName() const
+const std::string& LLPanelPeople::getActiveTabName() const
 {
     return mTabContainer->getCurrentPanel()->getName();
 }
 
 LLUUID LLPanelPeople::getCurrentItemID() const
 {
-    std::string cur_tab = getActiveTabName();
+    const std::string& cur_tab = getActiveTabName();
 
     if (cur_tab == FRIENDS_TAB_NAME) // this tab has two lists
     {
@@ -945,7 +960,7 @@ LLUUID LLPanelPeople::getCurrentItemID() const
 
 void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
 {
-    std::string cur_tab = getActiveTabName();
+    const std::string& cur_tab = getActiveTabName();
 
     if (cur_tab == FRIENDS_TAB_NAME)
     {
@@ -1033,7 +1048,7 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
     saved_filter = search_upper;
 
     // Apply new filter to the current tab.
-    const std::string cur_tab = getActiveTabName();
+    const std::string& cur_tab = getActiveTabName();
     if (cur_tab == NEARBY_TAB_NAME)
     {
         mNearbyList->setNameFilter(filter);
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 768ba1ef49..445bc4c081 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -84,7 +84,7 @@ private:
     bool                    isItemsFreeOfFriends(const uuid_vec_t& uuids);
 
     void                    updateButtons();
-    std::string             getActiveTabName() const;
+    const std::string&      getActiveTabName() const;
     LLUUID                  getCurrentItemID() const;
     void                    getCurrentItemIDs(uuid_vec_t& selected_uuids) const;
     void                    setSortOrder(LLAvatarList* list, ESortOrder order, bool save = true);
@@ -139,6 +139,17 @@ private:
     LLGroupList*            mGroupList;
     LLNetMap*               mMiniMap;
 
+    LLButton*               mNearbyGearBtn = nullptr;
+    LLButton*               mFriendsGearBtn = nullptr;
+    LLButton*               mRecentGearBtn = nullptr;
+    LLButton*               mGroupDelBtn = nullptr;
+
+    LLButton*               mNearbyAddFriendBtn = nullptr;
+    LLButton*               mRecentAddFriendBtn = nullptr;
+    LLUICtrl*               mFriendsDelFriendBtn = nullptr;
+
+    LLTextBox*              mGroupCountText = nullptr;
+
     std::vector<std::string> mSavedOriginalFilters;
     std::vector<std::string> mSavedFilters;
 
-- 
cgit v1.2.3


From 10e5e5694668a5376378dc487b54f1045080e47e Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 23:24:39 -0400
Subject: Reduce findChild stalls in appearance floater

---
 indra/newview/lloutfitgallery.cpp                  | 40 ++++++++++++++--------
 indra/newview/lloutfitgallery.h                    |  1 +
 indra/newview/llpaneloutfitedit.cpp                | 39 +++++++++++++--------
 indra/newview/llpaneloutfitedit.h                  |  8 +++++
 indra/newview/llpaneloutfitsinventory.cpp          | 12 +++----
 indra/newview/llpaneloutfitsinventory.h            |  1 +
 indra/newview/llscrollingpanelparambase.cpp        | 13 +++----
 indra/newview/llscrollingpanelparambase.h          |  1 +
 indra/newview/llsidepanelappearance.cpp            |  7 ++--
 indra/newview/llsidepanelappearance.h              |  4 +++
 indra/newview/llwearableitemslist.cpp              | 18 ++++++----
 indra/newview/llwearableitemslist.h                |  2 ++
 .../skins/default/xui/en/panel_edit_alpha.xml      |  5 ---
 13 files changed, 97 insertions(+), 54 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index b1b9f69f4f..7482890d1e 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -739,13 +739,16 @@ void LLOutfitGallery::onFilterSubStringChanged(const std::string& new_string, co
 
 void LLOutfitGallery::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id)
 {
-    if (mOutfitMap[base_id])
+    auto base_it = mOutfitMap.find(base_id);
+    if (base_it != mOutfitMap.end())
     {
-        mOutfitMap[base_id]->setOutfitWorn(true);
+        base_it->second->setOutfitWorn(true);
     }
-    if (mOutfitMap[prev_id])
+
+    auto prev_it = mOutfitMap.find(prev_id);
+    if (prev_it != mOutfitMap.end())
     {
-        mOutfitMap[prev_id]->setOutfitWorn(false);
+        prev_it->second->setOutfitWorn(false);
     }
 }
 
@@ -859,13 +862,16 @@ void LLOutfitGallery::onChangeOutfitSelection(LLWearableItemsList* list, const L
 {
     if (mSelectedOutfitUUID == category_id)
         return;
-    if (mOutfitMap[mSelectedOutfitUUID])
+
+    auto selected_it = mOutfitMap.find(mSelectedOutfitUUID);
+    if (selected_it != mOutfitMap.end())
     {
-        mOutfitMap[mSelectedOutfitUUID]->setSelected(false);
+        selected_it->second->setSelected(false);
     }
-    if (mOutfitMap[category_id])
+    auto category_it = mOutfitMap.find(category_id);
+    if (category_it != mOutfitMap.end())
     {
-        mOutfitMap[category_id]->setSelected(true);
+        category_it->second->setSelected(true);
     }
     // mSelectedOutfitUUID will be set in LLOutfitListBase::ChangeOutfitSelection
 }
@@ -887,9 +893,10 @@ bool LLOutfitGallery::canWearSelected()
 
 bool LLOutfitGallery::hasDefaultImage(const LLUUID& outfit_cat_id)
 {
-    if (mOutfitMap[outfit_cat_id])
+    auto outfit_it = mOutfitMap.find(outfit_cat_id);
+    if (outfit_it != mOutfitMap.end())
     {
-        return mOutfitMap[outfit_cat_id]->isDefaultImage();
+        return outfit_it->second->isDefaultImage();
     }
     return false;
 }
@@ -937,6 +944,7 @@ LLOutfitGalleryItem::~LLOutfitGalleryItem()
 
 bool LLOutfitGalleryItem::postBuild()
 {
+    mPreviewIcon = getChild<LLIconCtrl>("preview_outfit");
     setDefaultImage();
 
     mOutfitNameText = getChild<LLTextBox>("outfit_name");
@@ -952,10 +960,12 @@ void LLOutfitGalleryItem::draw()
     LLPanel::draw();
 
     // Draw border
-    LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white);
-    LLRect border = getChildView("preview_outfit")->getRect();
+    static LLUIColor selected_color = LLUIColorTable::instance().getColor("OutfitGalleryItemSelected", LLColor4::white);
+    static LLUIColor unselected_color = LLUIColorTable::instance().getColor("OutfitGalleryItemUnselected", LLColor4::white);
+    const LLColor4& border_color = mSelected ? selected_color : unselected_color;
+    LLRect border = mPreviewIcon->getRect();
     border.mRight = border.mRight + 1;
-    gl_rect_2d(border, border_color.get(), false);
+    gl_rect_2d(border, border_color, false);
 
     // If the floater is focused, don't apply its alpha to the texture (STORM-677).
     const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
@@ -1111,7 +1121,7 @@ bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id)
     {
         mImageAssetId = image_asset_id;
         mTexturep = texture;
-        getChildView("preview_outfit")->setVisible(false);
+        mPreviewIcon->setVisible(false);
         mDefaultImage = false;
         mImageUpdatePending = (texture->getDiscardLevel() == -1);
         return true;
@@ -1128,7 +1138,7 @@ void LLOutfitGalleryItem::setDefaultImage()
 {
     mTexturep = NULL;
     mImageAssetId.setNull();
-    getChildView("preview_outfit")->setVisible(true);
+    mPreviewIcon->setVisible(true);
     mDefaultImage = true;
     mImageUpdatePending = false;
 }
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index d921a7fe72..5b2a33d0ca 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -261,6 +261,7 @@ private:
     LLTextBox* mOutfitNameText;
     LLTextBox* mOutfitWornText;
     LLPanel* mTextBgPanel;
+    LLIconCtrl* mPreviewIcon = nullptr;
     bool     mSelected;
     bool     mWorn;
     bool     mDefaultImage;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ce545ae21d..fadf3633e8 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -434,6 +434,8 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
 
     delete mCOFDragAndDropObserver;
 
+    delete mWearableListViewItemsComparator;
+
     while (!mListViewItemTypes.empty()) {
         delete mListViewItemTypes.back();
         mListViewItemTypes.pop_back();
@@ -476,8 +478,11 @@ bool LLPanelOutfitEdit::postBuild()
 
     mFolderViewBtn = getChild<LLButton>("folder_view_btn");
     mListViewBtn = getChild<LLButton>("list_view_btn");
+    
+    mFilterPanel = getChild<LLView>("filter_panel");
+    mFilterBtn = getChild<LLButton>("filter_button");
+    mFilterBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this));
 
-    childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
     childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesFolderView, this), NULL);
     childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::saveListSelection, this), NULL);
     childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL);
@@ -530,13 +535,17 @@ bool LLPanelOutfitEdit::postBuild()
     mSearchFilter = getChild<LLFilterEditor>("look_item_filter");
     mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2));
 
-    childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this));
+    mShowAddWearablesBtn = getChild<LLButton>("show_add_wearables_btn");
+    mShowAddWearablesBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this));
 
     mPlusBtn = getChild<LLButton>("plus_btn");
     mPlusBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
 
     childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
 
+    mNoAddWearablesButtonBar = getChild<LLUICtrl>("no_add_wearables_button_bar");
+    mAddWearablesButtonBar = getChild<LLUICtrl>("add_wearables_button_bar");
+
     /*
      * By default AT_CLOTHING are sorted by (in in MY OUTFITS):
      *  - by type (types order determined in LLWearableType::EType)
@@ -567,7 +576,11 @@ bool LLPanelOutfitEdit::postBuild()
     getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
     getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
 
+    mLoadingIndicator = getChild<LLLoadingIndicator>("edit_outfit_loading_indicator");
+    mOutfitNameStatusPanel = getChild<LLPanel>("outfit_name_and_status");
+
     onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
+
     return true;
 }
 
@@ -603,15 +616,15 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
 {
     mAddWearablesPanel->setVisible(show_add_wearables);
 
-    getChild<LLUICtrl>("show_add_wearables_btn")->setValue(show_add_wearables);
+    mShowAddWearablesBtn->setValue(show_add_wearables);
 
     updateFiltersVisibility();
-    getChildView("filter_button")->setVisible( show_add_wearables);
+    mFilterBtn->setVisible( show_add_wearables);
 
     //search filter should be disabled
     if (!show_add_wearables)
     {
-        getChild<LLUICtrl>("filter_button")->setValue(false);
+        mFilterBtn->setValue(false);
 
         mFolderViewFilterCmbBox->setVisible(false);
         mListViewFilterCmbBox->setVisible(false);
@@ -638,15 +651,15 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
     }
 
     //switching button bars
-    getChildView("no_add_wearables_button_bar")->setVisible( !show_add_wearables);
-    getChildView("add_wearables_button_bar")->setVisible( show_add_wearables);
+    mNoAddWearablesButtonBar->setVisible( !show_add_wearables);
+    mAddWearablesButtonBar->setVisible( show_add_wearables);
 }
 
 void LLPanelOutfitEdit::showWearablesFilter()
 {
-    bool filter_visible = getChild<LLUICtrl>("filter_button")->getValue();
+    bool filter_visible = mFilterBtn->getValue();
 
-    getChildView("filter_panel")->setVisible( filter_visible);
+    mFilterPanel->setVisible(filter_visible);
 
     if(!filter_visible)
     {
@@ -1309,19 +1322,17 @@ static void update_status_widget_rect(LLView * widget, S32 right_border)
 
 void LLPanelOutfitEdit::onOutfitChanging(bool started)
 {
-    static LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("edit_outfit_loading_indicator");
-    static LLView* status_panel = getChild<LLView>("outfit_name_and_status");
-    static S32 indicator_delta = status_panel->getRect().getWidth() - indicator->getRect().mLeft;
+    S32 indicator_delta = mOutfitNameStatusPanel->getRect().getWidth() - mLoadingIndicator->getRect().mLeft;
 
     S32 delta = started ? indicator_delta : 0;
-    S32 right_border = status_panel->getRect().getWidth() - delta;
+    S32 right_border = mOutfitNameStatusPanel->getRect().getWidth() - delta;
 
     if (mCurrentOutfitName)
         update_status_widget_rect(mCurrentOutfitName, right_border);
     if (mStatus)
         update_status_widget_rect(mStatus, right_border);
 
-    indicator->setVisible(started);
+    mLoadingIndicator->setVisible(started);
 }
 
 void LLPanelOutfitEdit::getCurrentItemUUID(LLUUID& selected_id)
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 384b7faee4..a989d93d9e 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -59,6 +59,7 @@ class LLMenuGL;
 class LLFindNonLinksByMask;
 class LLFindWearablesOfType;
 class LLWearableItemTypeNameComparator;
+class LLLoadingIndicator;
 
 class LLPanelOutfitEdit : public LLPanel
 {
@@ -218,7 +219,14 @@ private:
     LLButton*           mFolderViewBtn;
     LLButton*           mListViewBtn;
     LLButton*           mPlusBtn;
+    LLButton*           mShowAddWearablesBtn = nullptr;
+    LLButton*           mFilterBtn = nullptr;
     LLPanel*            mAddWearablesPanel;
+    LLPanel*            mOutfitNameStatusPanel = nullptr;
+    LLLoadingIndicator* mLoadingIndicator = nullptr;
+    LLView*             mFilterPanel = nullptr;
+    LLUICtrl*           mNoAddWearablesButtonBar = nullptr;
+    LLUICtrl*           mAddWearablesButtonBar = nullptr;
 
     LLComboBox*         mFolderViewFilterCmbBox;
     LLComboBox*         mListViewFilterCmbBox;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 5b595a48b7..b226c2ca1a 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -252,7 +252,8 @@ void LLPanelOutfitsInventory::openApearanceTab(const std::string& tab_name)
 void LLPanelOutfitsInventory::initListCommandsHandlers()
 {
     mListCommands = getChild<LLPanel>("bottom_panel");
-    mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
+    mWearBtn = mListCommands->getChild<LLButton>("wear_btn");
+    mWearBtn->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
     mMyOutfitsPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
     mOutfitGalleryPanel->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
 }
@@ -263,14 +264,13 @@ void LLPanelOutfitsInventory::updateListCommands()
     bool wear_enabled =  isActionEnabled("wear");
     bool wear_visible = !isCOFPanelActive();
     bool make_outfit_enabled = isActionEnabled("save_outfit");
-
-    LLButton* wear_btn = mListCommands->getChild<LLButton>("wear_btn");
+    
     mMyOutfitsPanel->childSetEnabled("trash_btn", trash_enabled);
     mOutfitGalleryPanel->childSetEnabled("trash_btn", trash_enabled);
-    wear_btn->setEnabled(wear_enabled);
-    wear_btn->setVisible(wear_visible);
+    mWearBtn->setEnabled(wear_enabled);
+    mWearBtn->setVisible(wear_visible);
     getChild<LLButton>(SAVE_BTN)->setEnabled(make_outfit_enabled);
-    wear_btn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
+    mWearBtn->setToolTip(getString((!isOutfitsGalleryPanelActive() && mMyOutfitsPanel->hasItemSelected()) ? "wear_items_tooltip" : "wear_outfit_tooltip"));
 }
 
 void LLPanelOutfitsInventory::onTrashButtonClick()
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 0c501d5c71..e046681e95 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -101,6 +101,7 @@ protected:
 private:
     LLPanel*                    mListCommands;
     LLMenuGL*                   mMenuAdd;
+    LLButton*                   mWearBtn = nullptr;
     // List Commands                                                                //
     //////////////////////////////////////////////////////////////////////////////////
 
diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp
index 247639aa48..d6b5434fa4 100644
--- a/indra/newview/llscrollingpanelparambase.cpp
+++ b/indra/newview/llscrollingpanelparambase.cpp
@@ -51,12 +51,13 @@ LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& pan
     else
         buildFromFile( "panel_scrolling_param_base.xml");
 
-    getChild<LLUICtrl>("param slider")->setValue(weightToPercent(param->getWeight()));
+    mParamSlider = getChild<LLUICtrl>("param slider");
+    mParamSlider->setValue(weightToPercent(param->getWeight()));
 
     std::string display_name = LLTrans::getString(param->getDisplayName());
-    getChild<LLUICtrl>("param slider")->setLabelArg("[DESC]", display_name);
-    getChildView("param slider")->setEnabled(mAllowModify);
-    childSetCommitCallback("param slider", LLScrollingPanelParamBase::onSliderMoved, this);
+    mParamSlider->setLabelArg("[DESC]", display_name);
+    mParamSlider->setEnabled(mAllowModify);
+    mParamSlider->setCommitCallback(LLScrollingPanelParamBase::onSliderMoved, this);
 
     setVisible(false);
     setBorderVisible( false );
@@ -77,9 +78,9 @@ void LLScrollingPanelParamBase::updatePanel(bool allow_modify)
     }
 
     F32 current_weight = mWearable->getVisualParamWeight( param->getID() );
-    getChild<LLUICtrl>("param slider")->setValue(weightToPercent( current_weight ) );
+    mParamSlider->setValue(weightToPercent( current_weight ) );
     mAllowModify = allow_modify;
-    getChildView("param slider")->setEnabled(mAllowModify);
+    mParamSlider->setEnabled(mAllowModify);
 }
 
 // static
diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h
index 9deafcc81a..d5477a8397 100644
--- a/indra/newview/llscrollingpanelparambase.h
+++ b/indra/newview/llscrollingpanelparambase.h
@@ -55,6 +55,7 @@ public:
 public:
     LLViewerVisualParam* mParam;
 protected:
+    LLUICtrl* mParamSlider = nullptr;
     bool mAllowModify;
     LLWearable *mWearable;
 };
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 35d07d1ac8..c618483fc4 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -39,6 +39,7 @@
 #include "llfloaterreg.h"
 #include "llfloaterworldmap.h"
 #include "llfolderviewmodel.h"
+#include "llloadingindicator.h"
 #include "lloutfitobserver.h"
 #include "llpaneleditwearable.h"
 #include "llpaneloutfitsinventory.h"
@@ -137,6 +138,8 @@ bool LLSidepanelAppearance::postBuild()
 
     mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook");
 
+    mWearableLoadingIndicator = getChild<LLLoadingIndicator>("wearables_loading_indicator");
+    mEditOutfitBtn = getChild<LLButton>("edit_outfit_btn");
 
     setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChanged,this,_2));
 
@@ -541,8 +544,8 @@ void LLSidepanelAppearance::inventoryFetched()
 
 void LLSidepanelAppearance::setWearablesLoading(bool val)
 {
-    getChildView("wearables_loading_indicator")->setVisible( val);
-    getChildView("edit_outfit_btn")->setVisible( !val);
+    mWearableLoadingIndicator->setVisible(val);
+    mEditOutfitBtn->setVisible(!val);
 
     if (!val)
     {
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index f3d34a857c..1c1de99795 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -38,6 +38,7 @@ class LLCurrentlyWornFetchObserver;
 class LLPanelEditWearable;
 class LLViewerWearable;
 class LLPanelOutfitsInventory;
+class LLLoadingIndicator;
 
 class LLSidepanelAppearance : public LLPanel
 {
@@ -86,8 +87,11 @@ private:
 
     LLButton*                   mOpenOutfitBtn;
     LLButton*                   mEditAppearanceBtn;
+    LLButton*                   mEditOutfitBtn = nullptr;
     LLPanel*                    mCurrOutfitPanel;
 
+    LLLoadingIndicator*         mWearableLoadingIndicator = nullptr;
+
     LLTextBox*                  mCurrentLookName;
     LLTextBox*                  mOutfitStatus;
 
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 5ee6aec9f9..8ce1a745c3 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -102,15 +102,21 @@ LLPanelWearableOutfitItem::Params::Params()
 
 bool LLPanelWearableOutfitItem::postBuild()
 {
+    if (mShowWidgets)
+    {
+        mAddWearableBtn = getChild<LLButton>("add_wearable");
+        mRemoveWearableBtn = getChild<LLButton>("remove_wearable");
+    }
+
     LLPanelWearableListItem::postBuild();
 
     if(mShowWidgets)
     {
-        addWidgetToRightSide("add_wearable");
-        addWidgetToRightSide("remove_wearable");
+        addWidgetToRightSide(mAddWearableBtn);
+        addWidgetToRightSide(mRemoveWearableBtn);
 
-        childSetAction("add_wearable", boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
-        childSetAction("remove_wearable", boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));
+        mAddWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
+        mRemoveWearableBtn->setClickedCallback(boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));
 
         setWidgetsVisible(false);
         reshapeWidgets();
@@ -205,12 +211,12 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name,
     }
     if(mShowWidgets)
     {
-        setShowWidget("add_wearable", !is_worn);
+        setShowWidget(mAddWearableBtn, !is_worn);
 
         // Body parts can't be removed, only replaced
         LLViewerInventoryItem* inv_item = getItem();
         bool show_remove = is_worn && inv_item && (inv_item->getType() != LLAssetType::AT_BODYPART);
-        setShowWidget("remove_wearable", show_remove);
+        setShowWidget(mRemoveWearableBtn, show_remove);
 
         if(mHovered)
         {
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 7b69711154..3fe1059176 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -104,6 +104,8 @@ protected:
                               bool worn_indication_enabled, const Params& params, bool show_widgets = false);
 
 private:
+    LLButton* mAddWearableBtn = nullptr;
+    LLButton* mRemoveWearableBtn = nullptr;
     bool    mWornIndicationEnabled;
     bool mShowWidgets;
 };
diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
index 30fee7361f..ab0e447028 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
@@ -33,7 +33,6 @@
       top="0"
       width="313" >
        <check_box
-        control_name="LowerAlphaTextureInvisible"
         follows="left|top"
         height="16"
         layout="topleft"
@@ -58,7 +57,6 @@
        </texture_picker>
 
        <check_box
-        control_name="UpperAlphaTextureInvisible"
         follows="left|top"
         height="16"
         layout="topleft"
@@ -83,7 +81,6 @@
        </texture_picker>
 
        <check_box
-        control_name="HeadAlphaTextureInvisible"
         follows="left|top"
         height="16"
         layout="topleft"
@@ -108,7 +105,6 @@
        </texture_picker>
 
        <check_box
-        control_name="Eye AlphaTextureInvisible"
         follows="left|top"
         height="16"
         layout="topleft"
@@ -133,7 +129,6 @@
        </texture_picker>
 
        <check_box
-        control_name="HairAlphaTextureInvisible"
         follows="left|top"
         height="16"
         layout="topleft"
-- 
cgit v1.2.3


From 1b47f8266753bc1f2086fa1be1e15b14e8d2b8c4 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 23:26:16 -0400
Subject: Reduce findChild stalls during inventory construction

---
 indra/newview/llpanelmaininventory.cpp | 63 +++++++++++++++++-----------------
 indra/newview/llpanelmaininventory.h   |  4 ++-
 2 files changed, 34 insertions(+), 33 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index bbf533b694..fd7085c452 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -154,28 +154,30 @@ bool LLPanelMainInventory::postBuild()
     //panel->getFilter().markDefault();
 
     // Set up the default inv. panel/filter settings.
-    mActivePanel = getChild<LLInventoryPanel>(ALL_ITEMS);
-    if (mActivePanel)
+    mAllItemsPanel = getChild<LLInventoryPanel>(ALL_ITEMS);
+    if (mAllItemsPanel)
     {
         // "All Items" is the previous only view, so it gets the InventorySortOrder
-        mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
-        mActivePanel->getFilter().markDefault();
-        mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
-        mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2));
+        mAllItemsPanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
+        mAllItemsPanel->getFilter().markDefault();
+        mAllItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
+        mAllItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mAllItemsPanel, _1, _2));
         mResortActivePanel = true;
     }
-    LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>(RECENT_ITEMS);
-    if (recent_items_panel)
+    mActivePanel = mAllItemsPanel;
+
+    mRecentPanel = getChild<LLInventoryPanel>(RECENT_ITEMS);
+    if (mRecentPanel)
     {
         // assign default values until we will be sure that we have setting to restore
-        recent_items_panel->setSinceLogoff(true);
-        recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
-        recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-        LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
+        mRecentPanel->setSinceLogoff(true);
+        mRecentPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+        mRecentPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+        LLInventoryFilter& recent_filter = mRecentPanel->getFilter();
         recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY));
         recent_filter.setEmptyLookupMessage("InventoryNoMatchingRecentItems");
         recent_filter.markDefault();
-        recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
+        mRecentPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mRecentPanel, _1, _2));
     }
 
     mWornItemsPanel = getChild<LLInventoryPanel>(WORN_ITEMS);
@@ -211,17 +213,17 @@ bool LLPanelMainInventory::postBuild()
 
         // Load the persistent "Recent Items" settings.
         // Note that the "All Items" settings do not persist.
-        if(recent_items_panel)
+        if(mRecentPanel)
         {
-            if(savedFilterState.has(recent_items_panel->getFilter().getName()))
+            if(savedFilterState.has(mRecentPanel->getFilter().getName()))
             {
                 LLSD recent_items = savedFilterState.get(
-                    recent_items_panel->getFilter().getName());
+                    mRecentPanel->getFilter().getName());
                 LLInventoryFilter::Params p;
                 LLParamSDParser parser;
                 parser.readSD(recent_items, p);
-                recent_items_panel->getFilter().fromParams(p);
-                recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER));
+                mRecentPanel->getFilter().fromParams(p);
+                mRecentPanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER));
             }
         }
         if(mActivePanel)
@@ -362,7 +364,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
 
 LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
 {
-    return  getChild<LLInventoryPanel>(ALL_ITEMS);
+    return  mAllItemsPanel;
 }
 
 void LLPanelMainInventory::selectAllItemsPanel()
@@ -372,7 +374,7 @@ void LLPanelMainInventory::selectAllItemsPanel()
 
 bool LLPanelMainInventory::isRecentItemsPanelSelected()
 {
-    return (RECENT_ITEMS == getActivePanel()->getName());
+    return (mRecentPanel == getActivePanel());
 }
 
 void LLPanelMainInventory::startSearch()
@@ -1077,8 +1079,8 @@ void LLPanelMainInventory::toggleFindOptions()
 
 void LLPanelMainInventory::setSelectCallback(const LLFolderView::signal_t::slot_type& cb)
 {
-    getChild<LLInventoryPanel>(ALL_ITEMS)->setSelectCallback(cb);
-    getChild<LLInventoryPanel>(RECENT_ITEMS)->setSelectCallback(cb);
+    mAllItemsPanel->setSelectCallback(cb);
+    mRecentPanel->setSelectCallback(cb);
 }
 
 void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action)
@@ -1482,10 +1484,10 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
 void LLPanelMainInventory::initListCommandsHandlers()
 {
     childSetAction("add_btn", boost::bind(&LLPanelMainInventory::onAddButtonClick, this));
-    childSetAction("view_mode_btn", boost::bind(&LLPanelMainInventory::onViewModeClick, this));
-    childSetAction("up_btn", boost::bind(&LLPanelMainInventory::onUpFolderClicked, this));
-    childSetAction("back_btn", boost::bind(&LLPanelMainInventory::onBackFolderClicked, this));
-    childSetAction("forward_btn", boost::bind(&LLPanelMainInventory::onForwardFolderClicked, this));
+    mViewModeBtn->setCommitCallback(boost::bind(&LLPanelMainInventory::onViewModeClick, this));
+    mUpBtn->setCommitCallback(boost::bind(&LLPanelMainInventory::onUpFolderClicked, this));
+    mBackBtn->setCommitCallback(boost::bind(&LLPanelMainInventory::onBackFolderClicked, this));
+    mForwardBtn->setCommitCallback(boost::bind(&LLPanelMainInventory::onForwardFolderClicked, this));
 
     mCommitCallbackRegistrar.add("Inventory.GearDefault.Custom.Action", boost::bind(&LLPanelMainInventory::onCustomAction, this, _2));
     mEnableCallbackRegistrar.add("Inventory.GearDefault.Check", boost::bind(&LLPanelMainInventory::isActionChecked, this, _2));
@@ -1550,12 +1552,9 @@ void LLPanelMainInventory::initSingleFolderRoot(const LLUUID& start_folder_id)
 
 void LLPanelMainInventory::initInventoryViews()
 {
-    LLInventoryPanel* all_item = getChild<LLInventoryPanel>(ALL_ITEMS);
-    all_item->initializeViewBuilding();
-    LLInventoryPanel* recent_item = getChild<LLInventoryPanel>(RECENT_ITEMS);
-    recent_item->initializeViewBuilding();
-    LLInventoryPanel* worn_item = getChild<LLInventoryPanel>(WORN_ITEMS);
-    worn_item->initializeViewBuilding();
+    mAllItemsPanel->initializeViewBuilding();
+    mRecentPanel->initializeViewBuilding();
+    mWornItemsPanel->initializeViewBuilding();
 }
 
 void LLPanelMainInventory::toggleViewMode()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index cad2501645..68ac3410d8 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -184,7 +184,9 @@ private:
     LLUICtrl*                   mCounterCtrl;
     LLHandle<LLFloater>         mFinderHandle;
     LLInventoryPanel*           mActivePanel;
-    LLInventoryPanel*           mWornItemsPanel;
+    LLInventoryPanel*           mAllItemsPanel = nullptr;
+    LLInventoryPanel*           mRecentPanel = nullptr;
+    LLInventoryPanel*           mWornItemsPanel = nullptr;
     bool                        mResortActivePanel;
     LLSaveFolderState*          mSavedFolderState;
     std::string                 mFilterText;
-- 
cgit v1.2.3


From 543dbfee498b84e440ea75ae156d8d666ba1c1c9 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 23:26:52 -0400
Subject: Reduce findChild stalls in face panel

---
 indra/newview/llpanelface.cpp | 413 +++++++++++++++++-------------------------
 indra/newview/llpanelface.h   |  27 ++-
 2 files changed, 190 insertions(+), 250 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 00338d3125..0afe967839 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -201,13 +201,11 @@ LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit()
         U32 matmedia_selection = mComboMatMedia->getCurrentIndex();
         if (matmedia_selection == MATMEDIA_MATERIAL)
         {
-            LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-            channel_to_edit = (LLRender::eTexIndex)radio_mat_type->getSelectedIndex();
+            channel_to_edit = (LLRender::eTexIndex)mRadioMaterialType->getSelectedIndex();
         }
         if (matmedia_selection == MATMEDIA_PBR)
         {
-            LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_pbr_type");
-            channel_to_edit = (LLRender::eTexIndex)radio_mat_type->getSelectedIndex();
+            channel_to_edit = (LLRender::eTexIndex)mRadioPbrType->getSelectedIndex();
         }
     }
 
@@ -220,8 +218,7 @@ LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
 {
     if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)
     {
-        LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-        return LLRender::eTexIndex(radio_mat_type->getSelectedIndex());
+        return LLRender::eTexIndex(mRadioMaterialType->getSelectedIndex());
     }
 
     return LLRender::eTexIndex(MATTYPE_DIFFUSE);
@@ -231,8 +228,7 @@ LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
 {
     if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
     {
-        LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
-        return texture_info_from_pbrtype(radio_pbr_type->getSelectedIndex());
+        return texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
     }
 
     return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
@@ -240,8 +236,8 @@ LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
 
 // Things the UI provides...
 //
-LLUUID  LLPanelFace::getCurrentNormalMap()          { return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID();    }
-LLUUID  LLPanelFace::getCurrentSpecularMap()        { return getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID();    }
+LLUUID  LLPanelFace::getCurrentNormalMap()          { return mBumpyTextureCtrl->getImageAssetID();    }
+LLUUID  LLPanelFace::getCurrentSpecularMap()        { return mShinyTextureCtrl->getImageAssetID();    }
 U32     LLPanelFace::getCurrentShininess()          { return getChild<LLComboBox>("combobox shininess")->getCurrentIndex();         }
 U32     LLPanelFace::getCurrentBumpiness()          { return getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex();         }
 U8          LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
@@ -307,41 +303,26 @@ bool    LLPanelFace::postBuild()
     childSetAction("edit_selected_pbr", &LLPanelFace::onClickBtnEditPBR, this);
     childSetAction("save_selected_pbr", &LLPanelFace::onClickBtnSavePBR, this);
 
-    LLTextureCtrl*  mTextureCtrl;
-    LLTextureCtrl*  mShinyTextureCtrl;
-    LLTextureCtrl*  mBumpyTextureCtrl;
-    LLColorSwatchCtrl*  mColorSwatch;
-    LLColorSwatchCtrl*  mShinyColorSwatch;
-
-    LLComboBox*     mComboTexGen;
-
-    LLCheckBoxCtrl  *mCheckFullbright;
-
-    LLTextBox*      mLabelColorTransp;
-    LLSpinCtrl*     mCtrlColorTransp;       // transparency = 1 - alpha
-
-    LLSpinCtrl*     mCtrlGlow;
-
     setMouseOpaque(false);
 
-    LLTextureCtrl*  pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
-    if (pbr_ctrl)
+    mPBRTextureCtrl = getChild<LLTextureCtrl>("pbr_control");
+    if (mPBRTextureCtrl)
     {
-        pbr_ctrl->setDefaultImageAssetID(LLUUID::null);
-        pbr_ctrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
-        pbr_ctrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
-        pbr_ctrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
-        pbr_ctrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
-        pbr_ctrl->setDragCallback(boost::bind(&LLPanelFace::onDragPbr, this, _2));
-        pbr_ctrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onPbrSelectionChanged, this, _1));
-        pbr_ctrl->setOnCloseCallback(boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2));
+        mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
+        mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
+        mPBRTextureCtrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
+        mPBRTextureCtrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
+        mPBRTextureCtrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
+        mPBRTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragPbr, this, _2));
+        mPBRTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onPbrSelectionChanged, this, _1));
+        mPBRTextureCtrl->setOnCloseCallback(boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2));
 
-        pbr_ctrl->setFollowsTop();
-        pbr_ctrl->setFollowsLeft();
-        pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
-        pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
-        pbr_ctrl->setBakeTextureEnabled(false);
-        pbr_ctrl->setInventoryPickType(PICK_MATERIAL);
+        mPBRTextureCtrl->setFollowsTop();
+        mPBRTextureCtrl->setFollowsLeft();
+        mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+        mPBRTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
+        mPBRTextureCtrl->setBakeTextureEnabled(false);
+        mPBRTextureCtrl->setInventoryPickType(PICK_MATERIAL);
     }
 
     mTextureCtrl = getChild<LLTextureCtrl>("texture control");
@@ -454,18 +435,18 @@ bool    LLPanelFace::postBuild()
         mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
     }
 
-    LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type");
-    if(radio_mat_type)
+    mRadioMaterialType = getChild<LLRadioGroup>("radio_material_type");
+    if(mRadioMaterialType)
     {
-        radio_mat_type->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
-        radio_mat_type->selectNthItem(MATTYPE_DIFFUSE);
+        mRadioMaterialType->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
+        mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
     }
 
-    LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type");
-    if (radio_pbr_type)
+    mRadioPbrType = getChild<LLRadioGroup>("radio_pbr_type");
+    if (mRadioPbrType)
     {
-        radio_pbr_type->setCommitCallback(LLPanelFace::onCommitPbrType, this);
-        radio_pbr_type->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
+        mRadioPbrType->setCommitCallback(LLPanelFace::onCommitPbrType, this);
+        mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
     }
 
     mCtrlGlow = getChild<LLSpinCtrl>("glow");
@@ -532,7 +513,6 @@ void LLPanelFace::draw()
 
 void LLPanelFace::sendTexture()
 {
-    LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("texture control");
     if(!mTextureCtrl) return;
     if( !mTextureCtrl->getTentative() )
     {
@@ -553,17 +533,16 @@ void LLPanelFace::sendTexture()
 
 void LLPanelFace::sendBump(U32 bumpiness)
 {
-    LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
     if (bumpiness < BUMPY_TEXTURE)
 {
         LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL;
-        bumpytexture_ctrl->clear();
-        bumpytexture_ctrl->setImageAssetID(LLUUID());
+        mBumpyTextureCtrl->clear();
+        mBumpyTextureCtrl->setImageAssetID(LLUUID());
     }
 
     updateBumpyControls(bumpiness == BUMPY_TEXTURE, true);
 
-    LLUUID current_normal_map = bumpytexture_ctrl->getImageAssetID();
+    LLUUID current_normal_map = mBumpyTextureCtrl->getImageAssetID();
 
     U8 bump = (U8) bumpiness & TEM_BUMP_MASK;
 
@@ -576,25 +555,21 @@ void LLPanelFace::sendBump(U32 bumpiness)
     //
     LLSelectedTEMaterial::setNormalID(this, current_normal_map);
 
-    LLSelectMgr::getInstance()->selectionSetBumpmap( bump, bumpytexture_ctrl->getImageItemID() );
+    LLSelectMgr::getInstance()->selectionSetBumpmap( bump, mBumpyTextureCtrl->getImageItemID() );
 }
 
 void LLPanelFace::sendTexGen()
 {
-    LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
-    if(!mComboTexGen)return;
     U8 tex_gen = (U8) mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT;
     LLSelectMgr::getInstance()->selectionSetTexGen( tex_gen );
 }
 
 void LLPanelFace::sendShiny(U32 shininess)
 {
-    LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
-
     if (shininess < SHINY_TEXTURE)
 {
-        texture_ctrl->clear();
-        texture_ctrl->setImageAssetID(LLUUID());
+        mShinyTextureCtrl->clear();
+        mShinyTextureCtrl->setImageAssetID(LLUUID());
     }
 
     LLUUID specmap = getCurrentSpecularMap();
@@ -605,7 +580,7 @@ void LLPanelFace::sendShiny(U32 shininess)
 
     LLSelectedTEMaterial::setSpecularID(this, specmap);
 
-    LLSelectMgr::getInstance()->selectionSetShiny( shiny, texture_ctrl->getImageItemID() );
+    LLSelectMgr::getInstance()->selectionSetShiny( shiny, mShinyTextureCtrl->getImageItemID() );
 
     updateShinyControls(!specmap.isNull(), true);
 
@@ -613,7 +588,6 @@ void LLPanelFace::sendShiny(U32 shininess)
 
 void LLPanelFace::sendFullbright()
 {
-    LLCheckBoxCtrl* mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
     if(!mCheckFullbright)return;
     U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0;
     LLSelectMgr::getInstance()->selectionSetFullbright( fullbright );
@@ -621,8 +595,6 @@ void LLPanelFace::sendFullbright()
 
 void LLPanelFace::sendColor()
 {
-
-    LLColorSwatchCtrl*  mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
     if(!mColorSwatch)return;
     LLColor4 color = mColorSwatch->get();
 
@@ -631,7 +603,6 @@ void LLPanelFace::sendColor()
 
 void LLPanelFace::sendAlpha()
 {
-    LLSpinCtrl* mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
     if(!mCtrlColorTransp)return;
     F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f;
 
@@ -641,8 +612,6 @@ void LLPanelFace::sendAlpha()
 
 void LLPanelFace::sendGlow()
 {
-    LLSpinCtrl* mCtrlGlow = getChild<LLSpinCtrl>("glow");
-    llassert(mCtrlGlow);
     if (mCtrlGlow)
     {
         F32 glow = mCtrlGlow->get();
@@ -996,14 +965,13 @@ void LLPanelFace::sendTextureInfo()
     LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
 }
 
-void LLPanelFace::alignTestureLayer()
+void LLPanelFace::alignTextureLayer()
 {
     LLFace* last_face = NULL;
     bool identical_face = false;
     LLSelectedTE::getFace(last_face, identical_face);
 
-    LLRadioGroup * radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-    LLPanelFaceSetAlignedConcreteTEFunctor setfunc(this, last_face, static_cast<LLRender::eTexIndex>(radio_mat_type->getSelectedIndex()));
+    LLPanelFaceSetAlignedConcreteTEFunctor setfunc(this, last_face, static_cast<LLRender::eTexIndex>(mRadioMaterialType->getSelectedIndex()));
     LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
 }
 
@@ -1055,10 +1023,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         bool identical_norm    = false;
         bool identical_spec    = false;
 
-        LLTextureCtrl *texture_ctrl      = getChild<LLTextureCtrl>("texture control");
-        LLTextureCtrl *shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
-        LLTextureCtrl *bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
-
         LLUUID id;
         LLUUID normmap_id;
         LLUUID specmap_id;
@@ -1122,21 +1086,19 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         }
         mComboMatMedia->setEnabled(editable);
 
-        LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-        if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE)
+        if (mRadioMaterialType->getSelectedIndex() < MATTYPE_DIFFUSE)
         {
-            radio_mat_type->selectNthItem(MATTYPE_DIFFUSE);
+            mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
         }
-        radio_mat_type->setEnabled(editable);
+        mRadioMaterialType->setEnabled(editable);
 
-        LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
-        if (radio_pbr_type->getSelectedIndex() < PBRTYPE_RENDER_MATERIAL_ID)
+        if (mRadioPbrType->getSelectedIndex() < PBRTYPE_RENDER_MATERIAL_ID)
         {
-            radio_pbr_type->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
+            mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
         }
-        radio_pbr_type->setEnabled(editable);
+        mRadioPbrType->setEnabled(editable);
         const bool pbr_selected = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR;
-        const bool texture_info_selected = pbr_selected && radio_pbr_type->getSelectedIndex() != PBRTYPE_RENDER_MATERIAL_ID;
+        const bool texture_info_selected = pbr_selected && mRadioPbrType->getSelectedIndex() != PBRTYPE_RENDER_MATERIAL_ID;
 
         getChildView("checkbox_sync_settings")->setEnabled(editable);
         childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
@@ -1147,30 +1109,28 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         {
             getChildView("color label")->setEnabled(editable);
         }
-        LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("colorswatch");
 
         LLColor4 color = LLColor4::white;
         bool identical_color = false;
 
-        if (color_swatch)
         {
             LLSelectedTE::getColor(color, identical_color);
-            LLColor4 prev_color = color_swatch->get();
+            LLColor4 prev_color = mColorSwatch->get();
 
-            color_swatch->setOriginal(color);
-            color_swatch->set(color, force_set_values || (prev_color != color) || !editable);
+            mColorSwatch->setOriginal(color);
+            mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable);
 
-            color_swatch->setValid(editable && !has_pbr_material);
-            color_swatch->setEnabled( editable && !has_pbr_material);
-            color_swatch->setCanApplyImmediately( editable && !has_pbr_material);
+            mColorSwatch->setValid(editable && !has_pbr_material);
+            mColorSwatch->setEnabled( editable && !has_pbr_material);
+            mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material);
         }
 
         // Color transparency
-        getChildView("color trans")->setEnabled(editable);
+        mLabelColorTransp->setEnabled(editable);
 
         F32 transparency = (1.f - color.mV[VALPHA]) * 100.f;
-        getChild<LLUICtrl>("ColorTrans")->setValue(editable ? transparency : 0);
-        getChildView("ColorTrans")->setEnabled(editable && has_material);
+        mCtrlColorTransp->setValue(editable ? transparency : 0);
+        mCtrlColorTransp->setEnabled(editable && has_material);
 
         U8 shiny = 0;
         bool identical_shiny = false;
@@ -1200,10 +1160,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         getChild<LLUICtrl>("combobox shininess")->setTentative(!identical_spec);
         getChild<LLUICtrl>("glossiness")->setTentative(!identical_spec);
         getChild<LLUICtrl>("environment")->setTentative(!identical_spec);
-        getChild<LLUICtrl>("shinycolorswatch")->setTentative(!identical_spec);
+        mShinyColorSwatch->setTentative(!identical_spec);
 
-        LLColorSwatchCtrl*  mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
-        if (mShinyColorSwatch)
         {
             mShinyColorSwatch->setValid(editable);
             mShinyColorSwatch->setEnabled( editable );
@@ -1304,13 +1262,13 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             updateAlphaControls();
 
-            if (texture_ctrl)
+            if (mTextureCtrl)
             {
                 if (identical_diffuse)
                 {
-                    texture_ctrl->setTentative(false);
-                    texture_ctrl->setEnabled(editable && !has_pbr_material);
-                    texture_ctrl->setImageAssetID(id);
+                    mTextureCtrl->setTentative(false);
+                    mTextureCtrl->setEnabled(editable && !has_pbr_material);
+                    mTextureCtrl->setImageAssetID(id);
 
                     bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
                     getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
@@ -1318,27 +1276,27 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     getChildView("maskcutoff")->setEnabled(can_change_alpha);
                     getChildView("label maskcutoff")->setEnabled(can_change_alpha);
 
-                    texture_ctrl->setBakeTextureEnabled(true);
+                    mTextureCtrl->setBakeTextureEnabled(true);
                 }
                 else if (id.isNull())
                 {
                     // None selected
-                    texture_ctrl->setTentative(false);
-                    texture_ctrl->setEnabled(false);
-                    texture_ctrl->setImageAssetID(LLUUID::null);
+                    mTextureCtrl->setTentative(false);
+                    mTextureCtrl->setEnabled(false);
+                    mTextureCtrl->setImageAssetID(LLUUID::null);
                     getChildView("combobox alphamode")->setEnabled(false);
                     getChildView("label alphamode")->setEnabled(false);
                     getChildView("maskcutoff")->setEnabled(false);
                     getChildView("label maskcutoff")->setEnabled(false);
 
-                    texture_ctrl->setBakeTextureEnabled(false);
+                    mTextureCtrl->setBakeTextureEnabled(false);
                 }
                 else
                 {
                     // Tentative: multiple selected with different textures
-                    texture_ctrl->setTentative(true);
-                    texture_ctrl->setEnabled(editable && !has_pbr_material);
-                    texture_ctrl->setImageAssetID(id);
+                    mTextureCtrl->setTentative(true);
+                    mTextureCtrl->setEnabled(editable && !has_pbr_material);
+                    mTextureCtrl->setImageAssetID(id);
 
                     bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
                     getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
@@ -1346,7 +1304,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     getChildView("maskcutoff")->setEnabled(can_change_alpha);
                     getChildView("label maskcutoff")->setEnabled(can_change_alpha);
 
-                    texture_ctrl->setBakeTextureEnabled(true);
+                    mTextureCtrl->setBakeTextureEnabled(true);
                 }
 
                 if (attachment)
@@ -1354,43 +1312,43 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     // attachments are in world and in inventory,
                     // server doesn't support changing permissions
                     // in such case
-                    texture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
+                    mTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
                 }
                 else
                 {
-                    texture_ctrl->setImmediateFilterPermMask(PERM_NONE);
+                    mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
                 }
             }
 
-            if (shinytexture_ctrl)
+            if (mShinyTextureCtrl)
             {
-                shinytexture_ctrl->setTentative( !identical_spec );
-                shinytexture_ctrl->setEnabled( editable && !has_pbr_material);
-                shinytexture_ctrl->setImageAssetID( specmap_id );
+                mShinyTextureCtrl->setTentative( !identical_spec );
+                mShinyTextureCtrl->setEnabled( editable && !has_pbr_material);
+                mShinyTextureCtrl->setImageAssetID( specmap_id );
 
                 if (attachment)
                 {
-                    shinytexture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
+                    mShinyTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
                 }
                 else
                 {
-                    shinytexture_ctrl->setImmediateFilterPermMask(PERM_NONE);
+                    mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
                 }
             }
 
-            if (bumpytexture_ctrl)
+            if (mBumpyTextureCtrl)
             {
-                bumpytexture_ctrl->setTentative( !identical_norm );
-                bumpytexture_ctrl->setEnabled( editable && !has_pbr_material);
-                bumpytexture_ctrl->setImageAssetID( normmap_id );
+                mBumpyTextureCtrl->setTentative( !identical_norm );
+                mBumpyTextureCtrl->setEnabled( editable && !has_pbr_material);
+                mBumpyTextureCtrl->setImageAssetID( normmap_id );
 
                 if (attachment)
                 {
-                    bumpytexture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
+                    mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
                 }
                 else
                 {
-                    bumpytexture_ctrl->setImmediateFilterPermMask(PERM_NONE);
+                    mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
                 }
             }
         }
@@ -1621,26 +1579,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             F32 glow = 0.f;
             bool identical_glow = false;
             LLSelectedTE::getGlow(glow,identical_glow);
-            getChild<LLUICtrl>("glow")->setValue(glow);
-            getChild<LLUICtrl>("glow")->setTentative(!identical_glow);
-            getChildView("glow")->setEnabled(editable);
+            mCtrlGlow->setValue(glow);
+            mCtrlGlow->setTentative(!identical_glow);
+            mCtrlGlow->setEnabled(editable);
             getChildView("glow label")->setEnabled(editable);
         }
 
         {
-            LLCtrlSelectionInterface* combobox_texgen = childGetSelectionInterface("combobox texgen");
-            if (combobox_texgen)
-            {
-                // Maps from enum to combobox entry index
-                combobox_texgen->selectNthItem(((S32)selected_texgen) >> 1);
-            }
-            else
-            {
-                LL_WARNS() << "failed childGetSelectionInterface for 'combobox texgen'" << LL_ENDL;
-            }
+            // Maps from enum to combobox entry index
+            mComboTexGen->selectNthItem(((S32)selected_texgen) >> 1);
 
-            getChildView("combobox texgen")->setEnabled(editable);
-            getChild<LLUICtrl>("combobox texgen")->setTentative(!identical);
+            mComboTexGen->setEnabled(editable);
+            mComboTexGen->setTentative(!identical);
             getChildView("tex gen")->setEnabled(editable);
         }
 
@@ -1650,9 +1600,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             LLSelectedTE::getFullbright(fullbright_flag,identical_fullbright);
 
-            getChild<LLUICtrl>("checkbox fullbright")->setValue((S32)(fullbright_flag != 0));
-            getChildView("checkbox fullbright")->setEnabled(editable && !has_pbr_material);
-            getChild<LLUICtrl>("checkbox fullbright")->setTentative(!identical_fullbright);
+            mCheckFullbright->setValue((S32)(fullbright_flag != 0));
+            mCheckFullbright->setEnabled(editable && !has_pbr_material);
+            mCheckFullbright->setTentative(!identical_fullbright);
             mComboMatMedia->setEnabledByValue("Materials", !has_pbr_material);
         }
 
@@ -1670,8 +1620,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             LLSelectedTEMaterial::getMaxNormalRepeats(repeats_norm, identical_norm_repeats);
             LLSelectedTEMaterial::getMaxSpecularRepeats(repeats_spec, identical_spec_repeats);
 
-            LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
-            if (mComboTexGen)
             {
                 S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0;
                 bool enabled = editable && (index != 1);
@@ -1682,12 +1630,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 U32 material_type = MATTYPE_DIFFUSE;
                 if (material_selection == MATMEDIA_MATERIAL)
                 {
-                    material_type = radio_mat_type->getSelectedIndex();
+                    material_type = mRadioMaterialType->getSelectedIndex();
                 }
                 else if (material_selection == MATMEDIA_PBR)
                 {
                     enabled = editable && has_pbr_material;
-                    material_type = radio_pbr_type->getSelectedIndex();
+                    material_type = mRadioPbrType->getSelectedIndex();
                 }
 
                 switch (material_type)
@@ -1783,8 +1731,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
                 // Shiny (specular)
                 F32 offset_x, offset_y, repeat_x, repeat_y, rot;
-                LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
-                texture_ctrl->setImageAssetID(material->getSpecularID());
+                mShinyTextureCtrl->setImageAssetID(material->getSpecularID());
 
                 if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
                 {
@@ -1814,17 +1761,15 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 //
                 if (!material->getSpecularID().isNull())
                 {
-                    LLColorSwatchCtrl*  shiny_swatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
                     LLColor4 new_color = material->getSpecularLightColor();
-                    LLColor4 old_color = shiny_swatch->get();
+                    LLColor4 old_color = mShinyColorSwatch->get();
 
-                    shiny_swatch->setOriginal(new_color);
-                    shiny_swatch->set(new_color, force_set_values || old_color != new_color || !editable);
+                    mShinyColorSwatch->setOriginal(new_color);
+                    mShinyColorSwatch->set(new_color, force_set_values || old_color != new_color || !editable);
                 }
 
                 // Bumpy (normal)
-                texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
-                texture_ctrl->setImageAssetID(material->getNormalID());
+                mBumpyTextureCtrl->setImageAssetID(material->getNormalID());
 
                 if (!material->getNormalID().isNull())
                 {
@@ -1859,8 +1804,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)childGetValue("TexOffsetU").asReal());
         calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)childGetValue("TexOffsetV").asReal());
         calcp->setVar(LLCalc::TEX_ROTATION, (F32)childGetValue("TexRot").asReal());
-        calcp->setVar(LLCalc::TEX_TRANSPARENCY, (F32)childGetValue("ColorTrans").asReal());
-        calcp->setVar(LLCalc::TEX_GLOW, (F32)childGetValue("glow").asReal());
+        calcp->setVar(LLCalc::TEX_TRANSPARENCY, (F32)mCtrlColorTransp->getValue().asReal());
+        calcp->setVar(LLCalc::TEX_GLOW, (F32)mCtrlGlow->getValue().asReal());
     }
     else
     {
@@ -1868,32 +1813,31 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         clearCtrls();
 
         // Disable non-UICtrls
-        LLTextureCtrl*  pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
-        if (pbr_ctrl)
+        if (mPBRTextureCtrl)
         {
-            pbr_ctrl->setImageAssetID(LLUUID::null);
-            pbr_ctrl->setEnabled(false);
+            mPBRTextureCtrl->setImageAssetID(LLUUID::null);
+            mPBRTextureCtrl->setEnabled(false);
         }
-        LLTextureCtrl*  texture_ctrl = getChild<LLTextureCtrl>("texture control");
-        if (texture_ctrl)
+
+        if (mTextureCtrl)
         {
-            texture_ctrl->setImageAssetID( LLUUID::null );
-            texture_ctrl->setEnabled( false );  // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
-//          texture_ctrl->setValid(false);
+            mTextureCtrl->setImageAssetID( LLUUID::null );
+            mTextureCtrl->setEnabled( false );  // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl.
+//          mTextureCtrl->setValid(false);
         }
-        LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
+
         if (mColorSwatch)
         {
             mColorSwatch->setEnabled( false );
             mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") );
             mColorSwatch->setValid(false);
         }
-        LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-        if (radio_mat_type)
+
+        if (mRadioMaterialType)
         {
-            radio_mat_type->setSelectedIndex(0);
+            mRadioMaterialType->setSelectedIndex(0);
         }
-        getChildView("color trans")->setEnabled(false);
+        mLabelColorTransp->setEnabled(false);
         getChildView("rptctrl")->setEnabled(false);
         getChildView("tex gen")->setEnabled(false);
         getChildView("label shininess")->setEnabled(false);
@@ -2005,23 +1949,22 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
     const bool saveable = LLMaterialEditor::canSaveObjectsMaterial();
 
     // pbr material
-    LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
     LLUUID pbr_id;
-    if (pbr_ctrl)
+    if (mPBRTextureCtrl)
     {
         LLSelectedTE::getPbrMaterialId(pbr_id, identical_pbr, has_pbr_material, has_faces_without_pbr);
 
-        pbr_ctrl->setTentative(!identical_pbr);
-        pbr_ctrl->setEnabled(settable);
-        pbr_ctrl->setImageAssetID(pbr_id);
+        mPBRTextureCtrl->setTentative(!identical_pbr);
+        mPBRTextureCtrl->setEnabled(settable);
+        mPBRTextureCtrl->setImageAssetID(pbr_id);
 
         if (objectp->isAttachment())
         {
-            pbr_ctrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER | PERM_MODIFY);
+            mPBRTextureCtrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER | PERM_MODIFY);
         }
         else
         {
-            pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
+            mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
         }
     }
 
@@ -2080,13 +2023,12 @@ void LLPanelFace::updateVisibilityGLTF(LLViewerObject* objectp /*= nullptr */)
     const bool show_pbr = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR && mComboMatMedia->getEnabled();
     const bool inventory_pending = objectp && objectp->isInventoryPending();
 
-    LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type");
-    radio_pbr_type->setVisible(show_pbr);
+    mRadioPbrType->setVisible(show_pbr);
 
-    const U32 pbr_type = radio_pbr_type->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     const bool show_pbr_render_material_id = show_pbr && (pbr_type == PBRTYPE_RENDER_MATERIAL_ID);
 
-    getChildView("pbr_control")->setVisible(show_pbr_render_material_id);
+    mPBRTextureCtrl->setVisible(show_pbr_render_material_id);
 
     getChildView("pbr_from_inventory")->setVisible(show_pbr_render_material_id);
     getChildView("edit_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending);
@@ -2890,7 +2832,7 @@ void LLPanelFace::onCommitColor(const LLSD& data)
 
 void LLPanelFace::onCommitShinyColor(const LLSD& data)
 {
-    LLSelectedTEMaterial::setSpecularLightColor(this, getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+    LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
 }
 
 void LLPanelFace::onCommitAlpha(const LLSD& data)
@@ -2916,7 +2858,7 @@ void LLPanelFace::onSelectColor(const LLSD& data)
 
 void LLPanelFace::onSelectShinyColor(const LLSD& data)
 {
-    LLSelectedTEMaterial::setSpecularLightColor(this, getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+    LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
     LLSelectMgr::getInstance()->saveSelectedShinyColors();
 }
 
@@ -2935,33 +2877,31 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
 
 void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
 {
-    LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type");
-    LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type");
     LLComboBox* combo_shininess = findChild<LLComboBox>("combobox shininess");
     LLComboBox* combo_bumpiness = findChild<LLComboBox>("combobox bumpiness");
-    if (!radio_mat_type || !radio_pbr_type || !mComboMatMedia || !combo_shininess || !combo_bumpiness)
+    if (!mRadioMaterialType || !mRadioPbrType || !mComboMatMedia || !combo_shininess || !combo_bumpiness)
     {
         LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;
         return;
     }
     U32 materials_media = mComboMatMedia->getCurrentIndex();
-    U32 material_type = radio_mat_type->getSelectedIndex();
+    U32 material_type = mRadioMaterialType->getSelectedIndex();
     bool show_media = (materials_media == MATMEDIA_MEDIA) && mComboMatMedia->getEnabled();
     bool show_material = materials_media == MATMEDIA_MATERIAL;
     bool show_texture = (show_media || (show_material && (material_type == MATTYPE_DIFFUSE) && mComboMatMedia->getEnabled()));
     bool show_bumpiness = show_material && (material_type == MATTYPE_NORMAL) && mComboMatMedia->getEnabled();
     bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
     const bool show_pbr = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR && mComboMatMedia->getEnabled();
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
     const bool show_pbr_asset = show_pbr && texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
 
-    radio_mat_type->setVisible(show_material);
+    mRadioMaterialType->setVisible(show_material);
 
     // Shared material controls
     getChildView("checkbox_sync_settings")->setVisible(show_material || show_media);
     getChildView("tex gen")->setVisible(show_material || show_media || show_pbr_asset);
-    getChildView("combobox texgen")->setVisible(show_material || show_media || show_pbr_asset);
+    mComboTexGen->setVisible(show_material || show_media || show_pbr_asset);
     getChildView("button align textures")->setVisible(show_material || show_media);
 
     // Media controls
@@ -2971,7 +2911,7 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     getChildView("button align")->setVisible(show_media);
 
     // Diffuse texture controls
-    getChildView("texture control")->setVisible(show_texture && show_material);
+    mTextureCtrl->setVisible(show_texture && show_material);
     getChildView("label alphamode")->setVisible(show_texture && show_material);
     getChildView("combobox alphamode")->setVisible(show_texture && show_material);
     getChildView("label maskcutoff")->setVisible(false);
@@ -2988,7 +2928,7 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     getChildView("TexOffsetV")->setVisible(show_texture);
 
     // Specular map controls
-    getChildView("shinytexture control")->setVisible(show_shininess);
+    mShinyTextureCtrl->setVisible(show_shininess);
     getChildView("combobox shininess")->setVisible(show_shininess);
     getChildView("label shininess")->setVisible(show_shininess);
     getChildView("label glossiness")->setVisible(false);
@@ -2996,7 +2936,7 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     getChildView("label environment")->setVisible(false);
     getChildView("environment")->setVisible(false);
     getChildView("label shinycolor")->setVisible(false);
-    getChildView("shinycolorswatch")->setVisible(false);
+    mShinyColorSwatch->setVisible(false);
     if (show_shininess)
     {
         updateShinyControls();
@@ -3012,7 +2952,7 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     {
         updateBumpyControls();
     }
-    getChildView("bumpytexture control")->setVisible(show_bumpiness);
+    mBumpyTextureCtrl->setVisible(show_bumpiness);
     getChildView("combobox bumpiness")->setVisible(show_bumpiness);
     getChildView("label bumpiness")->setVisible(show_bumpiness);
     getChildView("bumpyScaleU")->setVisible(show_bumpiness);
@@ -3073,8 +3013,7 @@ void LLPanelFace::onCommitTexGen(LLUICtrl* ctrl, void* userdata)
 // static
 void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_shiny_combobox)
 {
-    LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
-    LLUUID shiny_texture_ID = texture_ctrl->getImageAssetID();
+    LLUUID shiny_texture_ID = mShinyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "Shiny texture selected: " << shiny_texture_ID << LL_ENDL;
     LLComboBox* comboShiny = getChild<LLComboBox>("combobox shininess");
 
@@ -3110,10 +3049,8 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
         }
     }
 
-
-    LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
     U32 materials_media = mComboMatMedia->getCurrentIndex();
-    U32 material_type = radio_mat_type->getSelectedIndex();
+    U32 material_type = mRadioMaterialType->getSelectedIndex();
     bool show_material = (materials_media == MATMEDIA_MATERIAL);
     bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
     U32 shiny_value = comboShiny->getCurrentIndex();
@@ -3123,14 +3060,13 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
     getChildView("label environment")->setVisible(show_shinyctrls);
     getChildView("environment")->setVisible(show_shinyctrls);
     getChildView("label shinycolor")->setVisible(show_shinyctrls);
-    getChildView("shinycolorswatch")->setVisible(show_shinyctrls);
+    mShinyColorSwatch->setVisible(show_shinyctrls);
 }
 
 // static
 void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_combobox)
 {
-    LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
-    LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID();
+    LLUUID bumpy_texture_ID = mBumpyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;
     LLComboBox* comboBumpy = getChild<LLComboBox>("combobox bumpiness");
     if (!comboBumpy)
@@ -3140,10 +3076,6 @@ void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_co
 
     if (mess_with_combobox)
     {
-        LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
-        LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID();
-        LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;
-
         if (!bumpy_texture_ID.isNull() && is_setting_texture)
         {
             if (!comboBumpy->itemExists(USE_TEXTURE))
@@ -3196,10 +3128,9 @@ void LLPanelFace::updateAlphaControls()
     }
 
     U32 mat_type = MATTYPE_DIFFUSE;
-    LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
-    if(radio_mat_type)
+    if(mRadioMaterialType)
     {
-        mat_type = radio_mat_type->getSelectedIndex();
+        mat_type = mRadioMaterialType->getSelectedIndex();
     }
 
     show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL);
@@ -3251,20 +3182,19 @@ bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
 
 void LLPanelFace::onCommitPbr(const LLSD& data)
 {
-    LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
-    if (!pbr_ctrl) return;
-    if (!pbr_ctrl->getTentative())
+    if (!mPBRTextureCtrl) return;
+    if (!mPBRTextureCtrl->getTentative())
     {
         // we grab the item id first, because we want to do a
         // permissions check in the selection manager. ARGH!
-        LLUUID id = pbr_ctrl->getImageItemID();
+        LLUUID id = mPBRTextureCtrl->getImageItemID();
         if (id.isNull())
         {
-            id = pbr_ctrl->getImageAssetID();
+            id = mPBRTextureCtrl->getImageAssetID();
         }
         if (!LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id))
         {
-            // If failed to set material, refresh pbr_ctrl's value
+            // If failed to set material, refresh mPBRTextureCtrl's value
             refresh();
         }
     }
@@ -3279,16 +3209,15 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
 {
     LLSelectMgr::getInstance()->saveSelectedObjectTextures();
 
-    LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
-    if (!pbr_ctrl) return;
-    if (!pbr_ctrl->getTentative())
+    if (!mPBRTextureCtrl) return;
+    if (!mPBRTextureCtrl->getTentative())
     {
         // we grab the item id first, because we want to do a
         // permissions check in the selection manager. ARGH!
-        LLUUID id = pbr_ctrl->getImageItemID();
+        LLUUID id = mPBRTextureCtrl->getImageItemID();
         if (id.isNull())
         {
-            id = pbr_ctrl->getImageAssetID();
+            id = mPBRTextureCtrl->getImageAssetID();
         }
         if (!LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id))
         {
@@ -3388,7 +3317,7 @@ void LLPanelFace::onCancelSpecularTexture(const LLSD& data)
     U8 shiny = 0;
     bool identical_shiny = false;
     LLSelectedTE::getShiny(shiny, identical_shiny);
-    LLUUID spec_map_id = getChild<LLTextureCtrl>("shinytexture control")->getImageAssetID();
+    LLUUID spec_map_id = mShinyTextureCtrl->getImageAssetID();
     shiny = spec_map_id.isNull() ? shiny : SHINY_TEXTURE;
     sendShiny(shiny);
 }
@@ -3398,7 +3327,7 @@ void LLPanelFace::onCancelNormalTexture(const LLSD& data)
     U8 bumpy = 0;
     bool identical_bumpy = false;
     LLSelectedTE::getBumpmap(bumpy, identical_bumpy);
-    LLUUID spec_map_id = getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID();
+    LLUUID spec_map_id = mBumpyTextureCtrl->getImageAssetID();
     bumpy = spec_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
     sendBump(bumpy);
 }
@@ -3869,13 +3798,11 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
     U32 material_type   = 0;
     if (materials_media == MATMEDIA_PBR)
     {
-        LLRadioGroup *radio_mat_type = self->getChild<LLRadioGroup>("radio_pbr_type");
-        material_type                = radio_mat_type->getSelectedIndex();
+        material_type = self->mRadioPbrType->getSelectedIndex();
     }
     if (materials_media == MATMEDIA_MATERIAL)
     {
-        LLRadioGroup *radio_mat_type = self->getChild<LLRadioGroup>("radio_material_type");
-        material_type                = radio_mat_type->getSelectedIndex();
+        material_type = self->mRadioMaterialType->getSelectedIndex();
     }
 
     F32 repeats_per_meter = (F32) repeats_ctrl->getValue().asReal();
@@ -4003,15 +3930,14 @@ void LLPanelFace::onClickAutoFix(void* userdata)
 void LLPanelFace::onAlignTexture(void* userdata)
 {
     LLPanelFace* self = (LLPanelFace*)userdata;
-    self->alignTestureLayer();
+    self->alignTextureLayer();
 }
 
 void LLPanelFace::onClickBtnLoadInvPBR(void* userdata)
 {
     // Shouldn't this be "save to inventory?"
     LLPanelFace* self = (LLPanelFace*)userdata;
-    LLTextureCtrl* pbr_ctrl = self->findChild<LLTextureCtrl>("pbr_control");
-    pbr_ctrl->showPicker(true);
+    self->mPBRTextureCtrl->showPicker(true);
 }
 
 void LLPanelFace::onClickBtnEditPBR(void* userdata)
@@ -4916,7 +4842,7 @@ void LLPanelFace::updateGLTFTextureTransform(float value, U32 pbr_type, std::fun
 
 void LLPanelFace::setMaterialOverridesFromSelection()
 {
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
     U32 texture_info_start;
     U32 texture_info_end;
@@ -5086,7 +5012,7 @@ bool LLPanelFace::Selection::compareSelection()
 void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
 {
     const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VX] = value;
@@ -5096,7 +5022,7 @@ void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
 void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
 {
     const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VY] = value;
@@ -5106,7 +5032,7 @@ void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
 void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
 {
     const float value = (F32)ctrl->getValue().asReal() * DEG_TO_RAD;
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mRotation = value;
@@ -5116,7 +5042,7 @@ void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
 void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
 {
     const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VX] = value;
@@ -5126,7 +5052,7 @@ void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
 void LLPanelFace::onCommitGLTFTextureOffsetV(LLUICtrl* ctrl)
 {
     const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = findChild<LLRadioGroup>("radio_pbr_type")->getSelectedIndex();
+    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
     updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VY] = value;
@@ -5136,12 +5062,8 @@ void LLPanelFace::onCommitGLTFTextureOffsetV(LLUICtrl* ctrl)
 void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
 {
     LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;
-    LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type");
-    if(!radio_mat_type)
-    {
-        return;
-    }
-    U32 mattype = radio_mat_type->getSelectedIndex();
+
+    U32 mattype = mRadioMaterialType->getSelectedIndex();
     std::string which_control="texture control";
     switch (mattype)
     {
@@ -5187,8 +5109,7 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
 
 void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
 {
-    LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control");
-    if (pbr_ctrl)
+    if (mPBRTextureCtrl)
     {
         LLUUID obj_owner_id;
         std::string obj_owner_name;
@@ -5206,12 +5127,12 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
 
         if ((can_copy && can_transfer && can_modify) || from_library)
         {
-            pbr_ctrl->setCanApply(true, true);
+            mPBRTextureCtrl->setCanApply(true, true);
             return;
         }
 
         // if material has (no-transfer) attribute it can be applied only for object which we own and is not for sale
-        pbr_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
+        mPBRTextureCtrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
 
         if (gSavedSettings.getBOOL("TextureLivePreview"))
         {
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 7e1553c80a..6e88116a2d 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -52,6 +52,7 @@ class LLFloater;
 class LLMaterialID;
 class LLMediaCtrl;
 class LLMenuButton;
+class LLRadioGroup;
 
 class PBRPickerAgentListener;
 class PBRPickerObjectListener;
@@ -147,7 +148,7 @@ protected:
     void            sendFullbright();       // applies and sends full bright
 
     void            sendGlow();
-    void            alignTestureLayer();
+    void            alignTextureLayer();
 
     void            updateCopyTexButton();
 
@@ -291,9 +292,27 @@ private:
     F32     getCurrentShinyOffsetU();
     F32     getCurrentShinyOffsetV();
 
-    LLComboBox *mComboMatMedia;
-    LLMediaCtrl *mTitleMedia;
-    LLTextBox *mTitleMediaText;
+    LLTextureCtrl* mPBRTextureCtrl = nullptr;
+    LLTextureCtrl* mTextureCtrl = nullptr;
+    LLTextureCtrl* mShinyTextureCtrl = nullptr;
+    LLTextureCtrl* mBumpyTextureCtrl = nullptr;
+    LLColorSwatchCtrl* mColorSwatch = nullptr;
+    LLColorSwatchCtrl* mShinyColorSwatch = nullptr;
+
+    LLComboBox* mComboTexGen = nullptr;
+
+    LLRadioGroup* mRadioMaterialType = nullptr;
+    LLRadioGroup* mRadioPbrType = nullptr;
+
+    LLCheckBoxCtrl* mCheckFullbright = nullptr;
+
+    LLTextBox* mLabelColorTransp = nullptr;
+    LLSpinCtrl* mCtrlColorTransp = nullptr;       // transparency = 1 - alpha
+
+    LLSpinCtrl* mCtrlGlow = nullptr;
+    LLComboBox *mComboMatMedia = nullptr;
+    LLMediaCtrl *mTitleMedia = nullptr;
+    LLTextBox *mTitleMediaText = nullptr;
 
     // Update visibility of controls to match current UI mode
     // (e.g. materials vs media editing)
-- 
cgit v1.2.3


From 99b4f1dd20c01d195e9de7c1ee23e28cc198ee04 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 25 Jul 2024 23:57:22 -0400
Subject: Fix some findChild stalls when swapping to/from wearable editors

---
 indra/newview/llpaneleditwearable.cpp | 76 ++++++++++++++++++++++-------------
 indra/newview/llpaneleditwearable.h   | 13 +++++-
 2 files changed, 59 insertions(+), 30 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index e88f6c0470..282b6d4a0a 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -48,6 +48,7 @@
 #include "llscrollingpanelparam.h"
 #include "llradiogroup.h"
 #include "llnotificationsutil.h"
+#include "lliconctrl.h"
 
 #include "llcolorswatch.h"
 #include "lltexturectrl.h"
@@ -307,8 +308,8 @@ LLEditWearableDictionary::Subparts::Subparts()
         addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN,    new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f), SEX_FEMALE));
         addEntry(SUBPART_PHYSICS_BREASTS_INOUT,     new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
         addEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, "mTorso", "physics_breasts_leftright", "physics_breasts_leftright_param_list", "physics_breasts_leftright_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
-        addEntry(SUBPART_PHYSICS_BELLY_UPDOWN,      new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
-        addEntry(SUBPART_PHYSICS_BUTT_UPDOWN,       new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_BELLY_UPDOWN,      new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_BUTT_UPDOWN,       new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
         addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT,    new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
         addEntry(SUBPART_PHYSICS_ADVANCED,          new SubpartEntry(SUBPART_PHYSICS_ADVANCED, "mTorso", "physics_advanced", "physics_advanced_param_list", "physics_advanced_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
 }
@@ -727,8 +728,14 @@ bool LLPanelEditWearable::postBuild()
         mPanelTitle = getChild<LLTextBox>("edit_wearable_title");
         mDescTitle = getChild<LLTextBox>("description_text");
 
-        getChild<LLRadioGroup>("sex_radio")->setCommitCallback(boost::bind(&LLPanelEditWearable::onCommitSexChange, this));
-        getChild<LLButton>("save_as_button")->setCommitCallback(boost::bind(&LLPanelEditWearable::onSaveAsButtonClicked, this));
+        mSexRadio = getChild<LLRadioGroup>("sex_radio");
+        mSexRadio->setCommitCallback(boost::bind(&LLPanelEditWearable::onCommitSexChange, this));
+
+        mMaleIcon = getChild<LLIconCtrl>("male_icon");
+        mFemaleIcon = getChild<LLIconCtrl>("female_icon");
+
+        mBtnSaveAs = getChild<LLButton>("save_as_button");
+        mBtnSaveAs->setCommitCallback(boost::bind(&LLPanelEditWearable::onSaveAsButtonClicked, this));
 
         // The following panels will be shown/hidden based on what wearable we're editing
         // body parts
@@ -806,8 +813,20 @@ bool LLPanelEditWearable::postBuild()
                                 continue;
                         }
 
+                        mAccordionTabs.emplace(accordion_tab, tab);
+
                         // initialize callback to ensure camera view changes appropriately.
                         tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index));
+
+                        const std::string& scrolling_panel = subpart_entry->mParamList;
+                        if (!scrolling_panel.empty())
+                        {
+                            LLScrollingPanelList* panel_list = tab->findChild<LLScrollingPanelList>(scrolling_panel);
+                            if (panel_list)
+                            {
+                                mParamPanels.emplace(scrolling_panel, panel_list);
+                            }
+                        }
                 }
 
                 // initialize texture and color picker controls
@@ -1211,19 +1230,21 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bo
                             continue;
                         }
 
-                        LLScrollingPanelList *panel_list = findChild<LLScrollingPanelList>(scrolling_panel);
-                        LLAccordionCtrlTab *tab = findChild<LLAccordionCtrlTab>(accordion_tab);
-                        if (!panel_list)
+                        auto accord_it = mAccordionTabs.find(accordion_tab);
+                        if (accord_it == mAccordionTabs.end())
                         {
-                                LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
-                                continue;
+                            LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
+                            continue;
                         }
+                        LLAccordionCtrlTab* tab = accord_it->second;
 
-                        if (!tab)
+                        auto panel_it = mParamPanels.find(scrolling_panel);
+                        if (panel_it == mParamPanels.end())
                         {
-                                LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
-                                continue;
+                            LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
+                            continue;
                         }
+                        LLScrollingPanelList *panel_list = panel_it->second;
 
                         // Don't show female subparts if you're not female, etc.
                         if (!(gAgentAvatarp->getSex() & subpart_entry->mSex))
@@ -1237,7 +1258,7 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bo
                         }
 
                         // what edit group do we want to extract params for?
-                        const std::string edit_group = subpart_entry->mEditGroup;
+                        const std::string& edit_group = subpart_entry->mEditGroup;
 
                         // storage for ordered list of visual params
                         value_map_t sorted_params;
@@ -1337,9 +1358,9 @@ void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type)
         // Toggle controls specific to shape editing panel.
         {
                 bool is_shape = (type == LLWearableType::WT_SHAPE);
-                getChildView("sex_radio")->setVisible( is_shape);
-                getChildView("female_icon")->setVisible( is_shape);
-                getChildView("male_icon")->setVisible( is_shape);
+                mSexRadio->setVisible(is_shape);
+                mFemaleIcon->setVisible(is_shape);
+                mMaleIcon->setVisible(is_shape);
         }
 }
 
@@ -1400,15 +1421,15 @@ void LLPanelEditWearable::updateScrollingPanelUI()
                         ESubpart subpart_e = wearable_entry->mSubparts[index];
                         const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e);
 
-                        const std::string scrolling_panel = subpart_entry->mParamList;
-
-                        LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel);
+                        const std::string& scrolling_panel = subpart_entry->mParamList;
 
-                        if (!panel_list)
+                        auto panel_it = mParamPanels.find(scrolling_panel);
+                        if (panel_it == mParamPanels.end())
                         {
-                                LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
-                                continue;
+                            LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
+                            continue;
                         }
+                        LLScrollingPanelList* panel_list = panel_it->second;
 
                         panel_list->updatePanels(true);
                 }
@@ -1542,7 +1563,7 @@ void LLPanelEditWearable::updateVerbs()
         bool is_dirty = isDirty();
 
         mBtnRevert->setEnabled(is_dirty);
-        getChildView("save_as_button")->setEnabled(is_dirty && can_copy);
+        mBtnSaveAs->setEnabled(is_dirty && can_copy);
 
         if (isAgentAvatarValid())
         {
@@ -1580,7 +1601,7 @@ void LLPanelEditWearable::configureAlphaCheckbox(LLAvatarAppearanceDefines::ETex
         LLCheckBoxCtrl* checkbox = mPanelAlpha->getChild<LLCheckBoxCtrl>(name);
         checkbox->setCommitCallback(boost::bind(&LLPanelEditWearable::onInvisibilityCommit, this, checkbox, te));
 
-        mAlphaCheckbox2Index[name] = te;
+        mAlphaCheckbox2Index.push_back(std::make_pair(checkbox,te));
 }
 
 void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te)
@@ -1637,11 +1658,10 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
 
 void LLPanelEditWearable::updateAlphaCheckboxes()
 {
-        for (string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin();
-                iter != mAlphaCheckbox2Index.end(); ++iter )
+        for (const auto& check_pair : mAlphaCheckbox2Index)
         {
-                LLAvatarAppearanceDefines::ETextureIndex te = (LLAvatarAppearanceDefines::ETextureIndex)iter->second;
-                LLCheckBoxCtrl* ctrl = mPanelAlpha->getChild<LLCheckBoxCtrl>(iter->first);
+                LLAvatarAppearanceDefines::ETextureIndex te = (LLAvatarAppearanceDefines::ETextureIndex)check_pair.second;
+                LLCheckBoxCtrl* ctrl = check_pair.first;
                 if (ctrl)
                 {
                         ctrl->set(!gAgentAvatarp->isTextureVisible(te, mWearablePtr));
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index aa4ac915c7..443b52b8fc 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -44,6 +44,8 @@ class LLViewerJointMesh;
 class LLAccordionCtrlTab;
 class LLJoint;
 class LLLineEditor;
+class LLRadioGroup;
+class LLIconCtrl;
 
 class LLPanelEditWearable : public LLPanel
 {
@@ -123,6 +125,7 @@ private:
     LLViewerInventoryItem* mWearableItem;
 
     // these are constant no matter what wearable we're editing
+    LLButton* mBtnSaveAs;
     LLButton *mBtnRevert;
     LLButton *mBtnBack;
     std::string mBackBtnLabel;
@@ -131,6 +134,9 @@ private:
     LLTextBox *mDescTitle;
     LLTextBox *mTxtAvatarHeight;
 
+    LLRadioGroup* mSexRadio = nullptr;
+    LLIconCtrl*   mMaleIcon = nullptr;
+    LLIconCtrl*   mFemaleIcon = nullptr;
 
     // localized and parameterized strings that used to build avatar_height_label
     std::string mMeters;
@@ -170,8 +176,11 @@ private:
     LLPanel *mPanelUniversal;
     LLPanel *mPanelPhysics;
 
-    typedef std::map<std::string, LLAvatarAppearanceDefines::ETextureIndex> string_texture_index_map_t;
-    string_texture_index_map_t mAlphaCheckbox2Index;
+    std::unordered_map<std::string, LLAccordionCtrlTab*> mAccordionTabs;
+    std::unordered_map<std::string, LLScrollingPanelList*> mParamPanels;
+
+    typedef std::vector<std::pair<LLCheckBoxCtrl*, LLAvatarAppearanceDefines::ETextureIndex>> checkbox_texture_index_vec_t;
+    checkbox_texture_index_vec_t mAlphaCheckbox2Index;
 
     typedef std::map<LLAvatarAppearanceDefines::ETextureIndex, LLUUID> s32_uuid_map_t;
     s32_uuid_map_t mPreviousAlphaTexture;
-- 
cgit v1.2.3


From dce1218b038f210fd6d4c19c84895fcf37e30c15 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 26 Jul 2024 00:31:51 -0400
Subject: Fix findChild during draw in conversation log floater

---
 indra/newview/llfloaterconversationlog.cpp | 5 +++--
 indra/newview/llfloaterconversationlog.h   | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp
index 648d3af5a5..97399c9cf7 100644
--- a/indra/newview/llfloaterconversationlog.cpp
+++ b/indra/newview/llfloaterconversationlog.cpp
@@ -55,10 +55,11 @@ bool LLFloaterConversationLog::postBuild()
     }
 
     // Use the context menu of the Conversation list for the Conversation tab gear menu.
+    mConversationsGearBtn = getChild<LLMenuButton>("conversations_gear_btn");
     LLToggleableMenu* conversations_gear_menu = mConversationLogList->getContextMenu();
     if (conversations_gear_menu)
     {
-        getChild<LLMenuButton>("conversations_gear_btn")->setMenu(conversations_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
+        mConversationsGearBtn->setMenu(conversations_gear_menu, LLMenuButton::MP_BOTTOM_LEFT);
     }
 
     getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterConversationLog::onFilterEdit, this, _2));
@@ -68,7 +69,7 @@ bool LLFloaterConversationLog::postBuild()
 
 void LLFloaterConversationLog::draw()
 {
-    getChild<LLMenuButton>("conversations_gear_btn")->setEnabled(mConversationLogList->getSelectedItem() != NULL);
+    mConversationsGearBtn->setEnabled(mConversationLogList->getSelectedItem() != NULL);
     LLFloater::draw();
 }
 
diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h
index 85ca37c530..c82237c108 100644
--- a/indra/newview/llfloaterconversationlog.h
+++ b/indra/newview/llfloaterconversationlog.h
@@ -29,6 +29,7 @@
 #include "llfloater.h"
 
 class LLConversationLogList;
+class LLMenuButton;
 
 class LLFloaterConversationLog : public LLFloater
 {
@@ -50,6 +51,7 @@ private:
     bool isActionChecked(const LLSD& userdata);
 
     LLConversationLogList* mConversationLogList;
+    LLMenuButton*          mConversationsGearBtn = nullptr;
 };
 
 
-- 
cgit v1.2.3


From 604cb4cb4dd71c0f90633e50d5b0108e3901c4ad Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 26 Jul 2024 06:19:34 -0400
Subject: Reduce utf8 to wstring conversion and llwstring temporaries during
 text draw (#2115)

---
 indra/llrender/llfontgl.cpp           |  3 ++-
 indra/llui/llbadge.cpp                |  6 ++---
 indra/llui/llbutton.cpp               | 10 ++++-----
 indra/llui/llbutton.h                 |  2 +-
 indra/llui/llconsole.cpp              |  2 +-
 indra/llui/llcontainerview.cpp        |  8 +++----
 indra/llui/llcontainerview.h          |  2 +-
 indra/llui/llfolderview.cpp           |  2 +-
 indra/llui/llfolderviewitem.cpp       | 42 +++++++++++++++++------------------
 indra/llui/llfolderviewitem.h         |  6 ++---
 indra/llui/llmenugl.cpp               | 10 ++++-----
 indra/llui/llmultisliderctrl.cpp      |  2 +-
 indra/llui/llscrolllistcell.cpp       | 24 ++++++++++----------
 indra/llui/llscrolllistctrl.cpp       |  2 +-
 indra/llui/llsliderctrl.cpp           |  2 +-
 indra/llui/llstatbar.cpp              | 10 ++++-----
 indra/llui/llstatgraph.cpp            |  9 +++-----
 indra/newview/llexpandabletextbox.cpp |  6 ++---
 indra/newview/llprogressview.cpp      |  2 +-
 indra/newview/llworldmapview.cpp      | 22 +++++++++---------
 20 files changed, 84 insertions(+), 88 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index b9a4235a4e..b6cdb81b33 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -406,7 +406,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         // recursively render ellipses at end of string
         // we've already reserved enough room
         gGL.pushUIMatrix();
-        renderUTF8(std::string("..."),
+        static LLWString elipses_wstr(utf8string_to_wstring(std::string("...")));
+        render(elipses_wstr,
                 0,
                 (cur_x - origin.mV[VX]) / sScaleX, (F32)y,
                 color,
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 3ff0617554..399f79ad2e 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -231,8 +231,6 @@ void LLBadge::draw()
             // Calculate badge size based on label text
             //
 
-            LLWString badge_label_wstring = mLabel;
-
             S32 badge_label_begin_offset = 0;
             S32 badge_char_length = S32_MAX;
             S32 badge_pixel_length = S32_MAX;
@@ -240,7 +238,7 @@ void LLBadge::draw()
             bool do_not_use_ellipses = false;
 
             F32 badge_width = (2.0f * mPaddingHoriz) +
-                mGLFont->getWidthF32(badge_label_wstring.c_str(), badge_label_begin_offset, badge_char_length);
+                mGLFont->getWidthF32(mLabel.getWString().c_str(), badge_label_begin_offset, badge_char_length);
 
             F32 badge_height = (2.0f * mPaddingVert) + mGLFont->getLineHeight();
 
@@ -354,7 +352,7 @@ void LLBadge::draw()
             // Draw the label
             //
 
-            mGLFont->render(badge_label_wstring,
+            mGLFont->render(mLabel.getWString(),
                             badge_label_begin_offset,
                             badge_center_x + mLabelOffsetHoriz,
                             badge_center_y + mLabelOffsetVert,
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 9e1e3ba120..7b612e445b 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -796,9 +796,6 @@ void LLButton::draw()
     if( ll::ui::SearchableControl::getHighlighted() )
         label_color = ll::ui::SearchableControl::getHighlightColor();
 
-    // Unselected label assignments
-    LLWString label = getCurrentLabel();
-
     // overlay with keyboard focus border
     if (hasFocus())
     {
@@ -927,8 +924,9 @@ void LLButton::draw()
     }
 
     // Draw label
-    if( !label.empty() )
+    if( !getCurrentLabel().empty() )    // Unselected label assignments
     {
+        LLWString label = getCurrentLabel();
         LLWStringUtil::trim(label);
 
         S32 x;
@@ -1082,10 +1080,10 @@ void LLButton::autoResize()
     resize(getCurrentLabel());
 }
 
-void LLButton::resize(LLUIString label)
+void LLButton::resize(const LLUIString& label)
 {
     // get label length
-    S32 label_width = mGLFont->getWidth(label.getString());
+    S32 label_width = mGLFont->getWidth(label.getWString().c_str());
     // get current btn length
     S32 btn_width =getRect().getWidth();
     // check if it need resize
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 80a876393e..a54a5b1a43 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -239,7 +239,7 @@ public:
     LLFontGL::HAlign getImageOverlayHAlign() const  { return mImageOverlayAlignment; }
 
     void            autoResize();   // resize with label of current btn state
-    void            resize(LLUIString label); // resize with label input
+    void            resize(const LLUIString& label); // resize with label input
     void            setLabel(const std::string& label);
     void            setLabel(const LLUIString& label);
     void            setLabel( const LLStringExplicit& label);
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index fe4f991921..4f52f5936d 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -183,7 +183,7 @@ void LLConsole::draw()
     static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
     F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f);
 
-    LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
+    static LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
     color.mV[VALPHA] *= console_opacity;
 
     F32 line_height = (F32)mFont->getLineHeight();
diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp
index 4c2912cde6..b414e4354d 100644
--- a/indra/llui/llcontainerview.cpp
+++ b/indra/llui/llcontainerview.cpp
@@ -46,7 +46,7 @@ static ContainerViewRegistry::Register<LLPanel> r3("panel", &LLPanel::fromXML);
 LLContainerView::LLContainerView(const LLContainerView::Params& p)
 :   LLView(p),
     mShowLabel(p.show_label),
-    mLabel(p.label),
+    mLabel(utf8str_to_wstring(p.label)),
     mDisplayChildren(p.display_children)
 {
     mScrollContainer = NULL;
@@ -120,8 +120,8 @@ void LLContainerView::draw()
     // Draw the label
     if (mShowLabel)
     {
-        LLFontGL::getFontMonospace()->renderUTF8(
-            mLabel, 0, 2, getRect().getHeight() - 2, LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP);
+        LLFontGL::getFontMonospace()->render(
+            mLabel, 0, 2.f, (F32)(getRect().getHeight() - 2), LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP);
     }
 
     LLView::draw();
@@ -285,7 +285,7 @@ LLRect LLContainerView::getRequiredRect()
 
 void LLContainerView::setLabel(const std::string& label)
 {
-    mLabel = label;
+    mLabel = utf8str_to_wstring(label);
 }
 
 void LLContainerView::setDisplayChildren(bool displayChildren)
diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h
index 319fb7d5e9..c6dd401e85 100644
--- a/indra/llui/llcontainerview.h
+++ b/indra/llui/llcontainerview.h
@@ -89,6 +89,6 @@ public:
 
 protected:
     bool mDisplayChildren;
-    std::string mLabel;
+    LLWString mLabel;
 };
 #endif // LL_CONTAINERVIEW_
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 1d4ecbe9c9..388dc5b1ac 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -211,7 +211,7 @@ LLFolderView::LLFolderView(const Params& p)
     //clear label
     // go ahead and render root folder as usual
     // just make sure the label ("Inventory Folder") never shows up
-    mLabel = LLStringUtil::null;
+    mLabel.clear();
 
     // Escape is handled by reverting the rename, not commiting it (default behavior)
     LLLineEditor::Params params;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 4c1733506c..63a600b15f 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -140,7 +140,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
     mItemHeight(p.item_height),
     mControlLabelRotation(0.f),
     mDragAndDropTarget(false),
-    mLabel(p.name),
+    mLabel(utf8str_to_wstring(p.name)),
     mRoot(p.root),
     mViewModelItem(p.listener),
     mIsMouseOverTitle(false),
@@ -193,7 +193,7 @@ bool LLFolderViewItem::postBuild()
     {
         // getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
         // it also sets search strings so it requires a filter reset
-        mLabel = vmi->getDisplayName();
+        mLabel = utf8str_to_wstring(vmi->getDisplayName());
         setToolTip(vmi->getName());
 
         // Dirty the filter flag of the model from the view (CHUI-849)
@@ -306,7 +306,7 @@ void LLFolderViewItem::refresh()
 {
     LLFolderViewModelItem& vmi = *getViewModelItem();
 
-    mLabel = vmi.getDisplayName();
+    mLabel = utf8str_to_wstring(vmi.getDisplayName());
     setToolTip(vmi.getName());
     // icons are slightly expensive to get, can be optimized
     // see LLInventoryIcon::getIcon()
@@ -319,7 +319,7 @@ void LLFolderViewItem::refresh()
         // Very Expensive!
         // Can do a number of expensive checks, like checking active motions, wearables or friend list
         mLabelStyle = vmi.getLabelStyle();
-        mLabelSuffix = vmi.getLabelSuffix();
+        mLabelSuffix = utf8str_to_wstring(vmi.getLabelSuffix());
     }
 
     // Dirty the filter flag of the model from the view (CHUI-849)
@@ -344,7 +344,7 @@ void LLFolderViewItem::refreshSuffix()
         // Very Expensive!
         // Can do a number of expensive checks, like checking active motions, wearables or friend list
         mLabelStyle = vmi->getLabelStyle();
-        mLabelSuffix = vmi->getLabelSuffix();
+        mLabelSuffix = utf8str_to_wstring(vmi->getLabelSuffix());
     }
 
     mLabelWidthDirty = true;
@@ -405,7 +405,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height )
             // it is purely visual, so it is fine to do at our laisure
             refreshSuffix();
         }
-        mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(LLFontGL::NORMAL)->getWidth(mLabelSuffix) + mLabelPaddingRight;
+        mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel.c_str()) + getLabelFontForStyle(LLFontGL::NORMAL)->getWidth(mLabelSuffix.c_str()) + mLabelPaddingRight;
         mLabelWidthDirty = false;
     }
 
@@ -890,7 +890,7 @@ void LLFolderViewItem::drawLabel(const LLFontGL * font, const F32 x, const F32 y
     //--------------------------------------------------------------------------------//
     // Draw the actual label text
     //
-    font->renderUTF8(mLabel, 0, x, y, color,
+    font->render(mLabel, 0, x, y, color,
         LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
         S32_MAX, getRect().getWidth() - (S32) x - mLabelPaddingRight, &right_x, /*use_ellipses*/true);
 }
@@ -944,7 +944,7 @@ void LLFolderViewItem::draw()
     F32 right_x  = 0;
     F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
     F32 text_left = (F32)getLabelXPos();
-    std::string combined_string = mLabel + mLabelSuffix;
+    LLWString combined_string = mLabel + mLabelSuffix;
 
     const LLFontGL* suffix_font = getLabelFontForStyle(LLFontGL::NORMAL);
     S32 filter_offset = static_cast<S32>(mViewModelItem->getFilterStringOffset());
@@ -954,8 +954,8 @@ void LLFolderViewItem::draw()
         S32 top = getRect().getHeight() - TOP_PAD;
         if(mLabelSuffix.empty() || (font == suffix_font))
         {
-        S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, static_cast<S32>(mViewModelItem->getFilterStringOffset())) - 2;
-        S32 right = left + font->getWidth(combined_string, static_cast<S32>(mViewModelItem->getFilterStringOffset()), filter_string_length) + 2;
+        S32 left = ll_round(text_left) + font->getWidth(combined_string.c_str(), 0, static_cast<S32>(mViewModelItem->getFilterStringOffset())) - 2;
+        S32 right = left + font->getWidth(combined_string.c_str(), static_cast<S32>(mViewModelItem->getFilterStringOffset()), filter_string_length) + 2;
 
         LLUIImage* box_image = default_params.selection_image;
         LLRect box_rect(left, top, right, bottom);
@@ -966,8 +966,8 @@ void LLFolderViewItem::draw()
             S32 label_filter_length = llmin((S32)mLabel.size() - filter_offset, (S32)filter_string_length);
             if(label_filter_length > 0)
             {
-                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, llmin(filter_offset, (S32)mLabel.size()))) - 2;
-                S32 right = left + (S32)font->getWidthF32(mLabel, filter_offset, label_filter_length) + 2;
+                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel.c_str(), 0, llmin(filter_offset, (S32)mLabel.size()))) - 2;
+                S32 right = left + (S32)font->getWidthF32(mLabel.c_str(), filter_offset, label_filter_length) + 2;
                 LLUIImage* box_image = default_params.selection_image;
                 LLRect box_rect(left, top, right, bottom);
                 box_image->draw(box_rect, sFilterBGColor);
@@ -976,8 +976,8 @@ void LLFolderViewItem::draw()
             if(suffix_filter_length > 0)
             {
                 S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
-                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset))- 2;
-                S32 right = left + (S32)suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length) + 2;
+                S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel.c_str(), 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix.c_str(), 0, suffix_offset)) - 2;
+                S32 right = left + (S32)suffix_font->getWidthF32(mLabelSuffix.c_str(), suffix_offset, suffix_filter_length) + 2;
                 LLUIImage* box_image = default_params.selection_image;
                 LLRect box_rect(left, top, right, bottom);
                 box_image->draw(box_rect, sFilterBGColor);
@@ -999,7 +999,7 @@ void LLFolderViewItem::draw()
     //
     if (!mLabelSuffix.empty())
     {
-        suffix_font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
+        suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
                           LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
                           S32_MAX, S32_MAX, &right_x);
     }
@@ -1011,9 +1011,9 @@ void LLFolderViewItem::draw()
     {
         if(mLabelSuffix.empty() || (font == suffix_font))
         {
-            F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string, filter_offset, filter_string_length);
+            F32 match_string_left = text_left + font->getWidthF32(combined_string.c_str(), 0, filter_offset + filter_string_length) - font->getWidthF32(combined_string.c_str(), filter_offset, filter_string_length);
             F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
-            font->renderUTF8(combined_string, filter_offset, match_string_left, yy,
+            font->render(combined_string, filter_offset, match_string_left, yy,
                 sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
                 filter_string_length, S32_MAX, &right_x);
         }
@@ -1022,9 +1022,9 @@ void LLFolderViewItem::draw()
             S32 label_filter_length = llmin((S32)mLabel.size() - filter_offset, (S32)filter_string_length);
             if(label_filter_length > 0)
             {
-                F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel, filter_offset, label_filter_length);
+                F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, filter_offset + label_filter_length) - font->getWidthF32(mLabel.c_str(), filter_offset, label_filter_length);
                 F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
-                font->renderUTF8(mLabel, filter_offset, match_string_left, yy,
+                font->render(mLabel, filter_offset, match_string_left, yy,
                     sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
                     label_filter_length, S32_MAX, &right_x);
             }
@@ -1033,9 +1033,9 @@ void LLFolderViewItem::draw()
             if(suffix_filter_length > 0)
             {
                 S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
-                F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length);
+                F32 match_string_left = text_left + font->getWidthF32(mLabel.c_str(), 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix.c_str(), 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix.c_str(), suffix_offset, suffix_filter_length);
                 F32 yy = (F32)getRect().getHeight() - suffix_font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
-                suffix_font->renderUTF8(mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor,
+                suffix_font->render(mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor,
                     LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
                     suffix_filter_length, S32_MAX, &right_x);
             }
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index f7ced81274..60cdac3ab9 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -89,14 +89,14 @@ protected:
 
     LLFolderViewItem(const Params& p);
 
-    std::string                 mLabel;
+    LLWString                   mLabel;
     S32                         mLabelWidth;
     bool                        mLabelWidthDirty;
     S32                         mLabelPaddingRight;
     LLFolderViewFolder*         mParentFolder;
     LLPointer<LLFolderViewModelItem> mViewModelItem;
     LLFontGL::StyleFlags        mLabelStyle;
-    std::string                 mLabelSuffix;
+    LLWString                   mLabelSuffix;
     bool                        mSuffixNeedsRefresh; //suffix and icons
     LLUIImagePtr                mIcon,
                                 mIconOpen,
@@ -242,7 +242,7 @@ public:
     // This method returns the label displayed on the view. This
     // method was primarily added to allow sorting on the folder
     // contents possible before the entire view has been constructed.
-    const std::string& getLabel() const { return mLabel; }
+    const LLWString& getLabel() const { return mLabel; }
 
     LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; }
     const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; }
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 0038a8ae18..69ffa9a94f 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -545,8 +545,8 @@ void LLMenuItemGL::draw( void )
         std::string::size_type offset = upper_case_label.find(mJumpKey);
         if (offset != std::string::npos)
         {
-            S32 x_begin = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, static_cast<S32>(offset));
-            S32 x_end = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, static_cast<S32>(offset) + 1);
+            S32 x_begin = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel.getWString().c_str(), 0, static_cast<S32>(offset));
+            S32 x_end = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel.getWString().c_str(), 0, static_cast<S32>(offset) + 1);
             gl_line_2d(x_begin, (MENU_ITEM_PADDING / 2) + 1, x_end, (MENU_ITEM_PADDING / 2) + 1);
         }
     }
@@ -1648,9 +1648,9 @@ void LLMenuItemBranchDownGL::draw( void )
         std::string::size_type offset = upper_case_label.find(getJumpKey());
         if (offset != std::string::npos)
         {
-            S32 x_offset = ll_round((F32)getRect().getWidth() / 2.f - getFont()->getWidthF32(mLabel.getString(), 0, S32_MAX) / 2.f);
-            S32 x_begin = x_offset + getFont()->getWidth(mLabel, 0, static_cast<S32>(offset));
-            S32 x_end = x_offset + getFont()->getWidth(mLabel, 0, static_cast<S32>(offset) + 1);
+            S32 x_offset = ll_round((F32)getRect().getWidth() / 2.f - getFont()->getWidthF32(mLabel.getWString().c_str(), 0, S32_MAX) / 2.f);
+            S32 x_begin = x_offset + getFont()->getWidth(mLabel.getWString().c_str(), 0, static_cast<S32>(offset));
+            S32 x_end = x_offset + getFont()->getWidth(mLabel.getWString().c_str(), 0, static_cast<S32>(offset) + 1);
             gl_line_2d(x_begin, LABEL_BOTTOM_PAD_PIXELS, x_end, LABEL_BOTTOM_PAD_PIXELS);
         }
     }
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 01e2fc6ac9..6b9a1b1c13 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -245,7 +245,7 @@ bool LLMultiSliderCtrl::setLabelArg( const std::string& key, const LLStringExpli
         res = mLabelBox->setTextArg(key, text);
         if (res && mLabelWidth == 0)
         {
-            S32 label_width = mFont->getWidth(mLabelBox->getText());
+            S32 label_width = mFont->getWidth(mLabelBox->getWText().c_str());
             LLRect rect = mLabelBox->getRect();
             S32 prev_right = rect.mRight;
             rect.mRight = rect.mLeft + label_width;
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 5dccf9a8ba..88ef4eb0c1 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -305,7 +305,7 @@ bool LLScrollListText::needsToolTip() const
         return LLScrollListCell::needsToolTip();
 
     // ...otherwise, show tooltips for truncated text
-    return mFont->getWidth(mText.getString()) > getWidth();
+    return mFont->getWidth(mText.getWString().c_str()) > getWidth();
 }
 
 //virtual
@@ -328,7 +328,7 @@ LLScrollListText::~LLScrollListText()
 
 S32 LLScrollListText::getContentWidth() const
 {
-    return mFont->getWidth(mText.getString());
+    return mFont->getWidth(mText.getWString().c_str());
 }
 
 
@@ -394,18 +394,18 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
         switch(mFontAlignment)
         {
         case LLFontGL::LEFT:
-            left = mFont->getWidth(mText.getString(), 1, mHighlightOffset);
+            left = mFont->getWidth(mText.getWString().c_str(), 1, mHighlightOffset);
             break;
         case LLFontGL::RIGHT:
-            left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX);
+            left = getWidth() - mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, S32_MAX);
             break;
         case LLFontGL::HCENTER:
-            left = (getWidth() - mFont->getWidth(mText.getString())) / 2;
+            left = (getWidth() - mFont->getWidth(mText.getWString().c_str())) / 2;
             break;
         }
         LLRect highlight_rect(left - 2,
                 mFont->getLineHeight() + 1,
-                left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1,
+                left + mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, mHighlightCount) + 1,
                 1);
         mRoundedRectImage->draw(highlight_rect, highlight_color);
     }
@@ -613,18 +613,18 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
         switch (mFontAlignment)
         {
         case LLFontGL::LEFT:
-            left = mFont->getWidth(mText.getString(), icon_space + 1, mHighlightOffset);
+            left = mFont->getWidth(mText.getWString().c_str(), icon_space + 1, mHighlightOffset);
             break;
         case LLFontGL::RIGHT:
-            left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX) - icon_space;
+            left = getWidth() - mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, S32_MAX) - icon_space;
             break;
         case LLFontGL::HCENTER:
-            left = (getWidth() - mFont->getWidth(mText.getString()) - icon_space) / 2;
+            left = (getWidth() - mFont->getWidth(mText.getWString().c_str()) - icon_space) / 2;
             break;
         }
         LLRect highlight_rect(left - 2,
             mFont->getLineHeight() + 1,
-            left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1,
+            left + mFont->getWidth(mText.getWString().c_str(), mHighlightOffset, mHighlightCount) + 1,
             1);
         mRoundedRectImage->draw(highlight_rect, highlight_color);
     }
@@ -642,12 +642,12 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
         break;
     case LLFontGL::RIGHT:
         start_text_x = (F32)getWidth();
-        start_icon_x = getWidth() - mFont->getWidth(mText.getString()) - icon_space;
+        start_icon_x = getWidth() - mFont->getWidth(mText.getWString().c_str()) - icon_space;
         break;
     case LLFontGL::HCENTER:
         F32 center = (F32)getWidth()* 0.5f;
         start_text_x = center + ((F32)icon_space * 0.5f);
-        start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f));
+        start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getWString().c_str())) * 0.5f));
         break;
     }
     mFont->render(mText.getWString(), 0,
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 10d0ae0678..e711a6ed1b 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -659,7 +659,7 @@ S32 LLScrollListCtrl::calcMaxContentWidth()
         if (mColumnWidthsDirty)
         {
             // update max content width for this column, by looking at all items
-            column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0;
+            column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel.getWString().c_str()) + mColumnPadding + HEADING_TEXT_PADDING : 0;
             item_list::iterator iter;
             for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
             {
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 22579205d8..0c3ab6bda0 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -225,7 +225,7 @@ bool LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit&
         res = mLabelBox->setTextArg(key, text);
         if (res && mLabelFont && mLabelWidth == 0)
         {
-            S32 label_width = mLabelFont->getWidth(mLabelBox->getText());
+            S32 label_width = mLabelFont->getWidth(mLabelBox->getWText().c_str());
             LLRect rect = mLabelBox->getRect();
             S32 prev_right = rect.mRight;
             rect.mRight = rect.mLeft + label_width;
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 4273fae71e..2693243eb1 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -598,7 +598,7 @@ LLRect LLStatBar::getRequiredRect()
 
 void LLStatBar::drawLabelAndValue( F32 value, std::string &label, LLRect &bar_rect, S32 decimal_digits )
 {
-    LLFontGL::getFontMonospace()->renderUTF8(mLabel, 0, 0, getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f),
+    LLFontGL::getFontMonospace()->render(mLabel.getWString(), 0, 0.F, (F32)getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f),
         LLFontGL::LEFT, LLFontGL::TOP);
 
     std::string value_str   = !llisnan(value)
@@ -673,14 +673,14 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect )
             {
                 decimal_digits = 0;
             }
-            std::string tick_label = llformat("%.*f", decimal_digits, tick_value);
-            S32 tick_label_width = LLFontGL::getFontMonospace()->getWidth(tick_label);
+            LLWString tick_label = utf8str_to_wstring(llformat("%.*f", decimal_digits, tick_value));
+            S32 tick_label_width = LLFontGL::getFontMonospace()->getWidth(tick_label.c_str());
             if (mOrientation == HORIZONTAL)
             {
                 if (tick_begin > last_label + MIN_LABEL_SPACING)
                 {
                     gl_rect_2d(bar_rect.mLeft, tick_end, bar_rect.mRight - TICK_LENGTH, tick_begin, LLColor4(1.f, 1.f, 1.f, 0.25f));
-                    LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, bar_rect.mRight, tick_begin,
+                    LLFontGL::getFontMonospace()->render(tick_label, 0, (F32)bar_rect.mRight, (F32)tick_begin,
                         LLColor4(1.f, 1.f, 1.f, 0.5f),
                         LLFontGL::LEFT, LLFontGL::VCENTER);
                     last_label = tick_begin;
@@ -696,7 +696,7 @@ void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect )
                 {
                     gl_rect_2d(tick_begin, bar_rect.mTop, tick_end, bar_rect.mBottom - TICK_LENGTH, LLColor4(1.f, 1.f, 1.f, 0.25f));
                     S32 label_pos = tick_begin - ll_round((F32)tick_label_width * ((F32)tick_begin / (F32)bar_rect.getWidth()));
-                    LLFontGL::getFontMonospace()->renderUTF8(tick_label, 0, label_pos, bar_rect.mBottom - TICK_LENGTH,
+                    LLFontGL::getFontMonospace()->render(tick_label, 0, (F32)label_pos, (F32)(bar_rect.mBottom - TICK_LENGTH),
                         LLColor4(1.f, 1.f, 1.f, 0.5f),
                         LLFontGL::LEFT, LLFontGL::TOP);
                     last_label = label_pos;
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index 95a9493323..28b4d387f1 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -93,8 +93,6 @@ void LLStatGraph::draw()
         mUpdateTimer.reset();
     }
 
-    LLColor4 color;
-
     threshold_vec_t::iterator it = std::lower_bound(mThresholds.begin(), mThresholds.end(), Threshold(mValue / mMax, LLUIColor()));
 
     if (it != mThresholds.begin())
@@ -102,15 +100,14 @@ void LLStatGraph::draw()
         it--;
     }
 
-    color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
-    gGL.color4fv(color.mV);
+    static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
+    gGL.color4fv(default_color.mV);
     gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
 
     gGL.color4fv(LLColor4::black.mV);
     gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, false);
 
-    color = it->mColor;
-    gGL.color4fv(color.mV);
+    gGL.color4fv(it->mColor().mV);
     gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, true);
 }
 
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 42fe8fc6e6..748e10160c 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -41,7 +41,7 @@ public:
     :   LLTextSegment(start, end),
         mEditor(editor),
         mStyle(style),
-        mExpanderLabel(more_text)
+        mExpanderLabel(utf8str_to_wstring(more_text))
     {}
 
     /*virtual*/ bool    getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
@@ -80,7 +80,7 @@ public:
     /*virtual*/ F32     draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect)
     {
         F32 right_x;
-        mStyle->getFont()->renderUTF8(mExpanderLabel, start,
+        mStyle->getFont()->render(mExpanderLabel, start,
                                     draw_rect.mRight, draw_rect.mTop,
                                     mStyle->getColor(),
                                     LLFontGL::RIGHT, LLFontGL::TOP,
@@ -103,7 +103,7 @@ public:
 private:
     LLTextBase& mEditor;
     LLStyleSP   mStyle;
-    std::string mExpanderLabel;
+    LLWString mExpanderLabel;
 };
 
 LLExpandableTextBox::LLTextBoxEx::Params::Params()
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 135e42437a..80e403dfde 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -391,7 +391,7 @@ void LLProgressView::initLogos()
     S32 icon_width, icon_height;
 
     // We don't know final screen rect yet, so we can't precalculate position fully
-    S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getText()) + default_pad;
+    S32 texture_start_x = (S32)mLogosLabel->getFont()->getWidthF32(mLogosLabel->getWText().c_str()) + default_pad;
     S32 texture_start_y = -7;
 
     // Normally we would just preload these textures from textures.xml,
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a0eec1e941..4757bd42e0 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1023,18 +1023,20 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
         drawImage(pos_global, sTrackCircleImage, color);
     }
 
-    // clamp text position to on-screen
-    const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2;
-    S32 half_text_width = llfloor(font->getWidthF32(label) * 0.5f);
-    text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING);
-    text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - font->getLineHeight() - TEXT_PADDING - vert_offset);
-
     if (label != "")
     {
-        font->renderUTF8(
-            label, 0,
-            text_x,
-            text_y,
+        // clamp text position to on-screen
+        const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2;
+
+        LLWString wlabel = utf8string_to_wstring(label);
+        S32 half_text_width = llfloor(font->getWidthF32(wlabel.c_str()) * 0.5f);
+        text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING);
+        text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - font->getLineHeight() - TEXT_PADDING - vert_offset);
+
+        font->render(
+            wlabel, 0,
+            (F32)text_x,
+            (F32)text_y,
             LLColor4::white, LLFontGL::HCENTER,
             LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW);
 
-- 
cgit v1.2.3


From a5d68b3801be0ea77259b387f3c86cca54fc59cc Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Fri, 26 Jul 2024 13:21:27 +0300
Subject: Fix trailing whitespaces to make pre-commit happy

---
 indra/newview/llpaneloutfitedit.cpp       | 1 -
 indra/newview/llpaneloutfitsinventory.cpp | 1 -
 2 files changed, 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index fadf3633e8..4cd4afaa5a 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -478,7 +478,6 @@ bool LLPanelOutfitEdit::postBuild()
 
     mFolderViewBtn = getChild<LLButton>("folder_view_btn");
     mListViewBtn = getChild<LLButton>("list_view_btn");
-    
     mFilterPanel = getChild<LLView>("filter_panel");
     mFilterBtn = getChild<LLButton>("filter_button");
     mFilterBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this));
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index b226c2ca1a..47c02793a3 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -264,7 +264,6 @@ void LLPanelOutfitsInventory::updateListCommands()
     bool wear_enabled =  isActionEnabled("wear");
     bool wear_visible = !isCOFPanelActive();
     bool make_outfit_enabled = isActionEnabled("save_outfit");
-    
     mMyOutfitsPanel->childSetEnabled("trash_btn", trash_enabled);
     mOutfitGalleryPanel->childSetEnabled("trash_btn", trash_enabled);
     mWearBtn->setEnabled(wear_enabled);
-- 
cgit v1.2.3


From 266553913f134755c021bf509cda55fb96a07e1a Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Sat, 27 Jul 2024 17:09:58 +0200
Subject: Fix running multiple viewer instances stealing sound from first
 instance (#2127)

---
 indra/llaudio/llaudiodecodemgr.cpp |  7 +++++--
 indra/llaudio/llaudioengine.cpp    | 12 +++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index a46f9acc63..d8a6fffea6 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -790,9 +790,12 @@ bool LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
 
     if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
     {
-        // Just put it on the decode queue.
+        // Just put it on the decode queue it if it's not already in the queue
         LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
-        mImpl->mDecodeQueue.push_back(uuid);
+        if (std::find(mImpl->mDecodeQueue.begin(), mImpl->mDecodeQueue.end(), uuid) == mImpl->mDecodeQueue.end())
+        {
+            mImpl->mDecodeQueue.emplace_back(uuid);
+        }
         return true;
     }
 
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 3697422ac8..613c408157 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -1827,7 +1827,17 @@ bool LLAudioData::load()
     {
         // Hrm.  Right now, let's unset the buffer, since it's empty.
         gAudiop->cleanupBuffer(mBufferp);
-        mBufferp = NULL;
+        mBufferp = nullptr;
+
+        if (!gDirUtilp->fileExists(wav_path))
+        {
+            mHasLocalData = false;
+            mHasDecodedData = false;
+            mHasCompletedDecode = false;
+            mHasDecodeFailed = false;
+            mHasWAVLoadFailed = false;
+            gAudiop->preloadSound(mID);
+        }
 
         return false;
     }
-- 
cgit v1.2.3


From a1bdef0c159ca2ebf5f2d985d56a541101e3bf6a Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Sat, 27 Jul 2024 17:10:08 +0200
Subject: Fix rapidly triggering gestures can make them get stuck (#2126)

---
 indra/newview/llgesturemgr.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 8ee11cdbd2..1bbeba43ec 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -536,7 +536,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture, bool fromKeyPress)
     if (!gesture) return;
 
     // Reset gesture to first step
-    gesture->mCurrentStep = 0;
+    gesture->reset();
     gesture->mTriggeredByKey = fromKeyPress;
 
     // Add to list of playing
-- 
cgit v1.2.3


From fceec45641cf6a4b7eecaf37ea080a184c279239 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Sat, 27 Jul 2024 17:10:17 +0200
Subject: Fix a bunch of XUI warnings (#2120)

---
 indra/newview/llfloaterregioninfo.cpp                     |  3 ++-
 indra/newview/llfloaterworldmap.cpp                       |  2 --
 indra/newview/llfloaterworldmap.h                         |  1 -
 indra/newview/llpanelgroup.cpp                            | 15 ---------------
 indra/newview/llpanelgroup.h                              |  1 -
 indra/newview/skins/default/xui/en/floater_im_session.xml |  1 -
 .../skins/default/xui/en/widgets/emoji_complete.xml       |  1 -
 7 files changed, 2 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 02ef342c2a..7869abf66d 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -854,8 +854,9 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
 template<typename CTRL>
 void LLPanelRegionInfo::initAndSetCtrl(CTRL*& ctrl, const std::string& name)
 {
-    initCtrl(name);
     ctrl = findChild<CTRL>(name);
+    if (ctrl)
+        ctrl->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
 }
 
 void LLPanelRegionInfo::onClickManageTelehub()
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d459716fc4..8d74a99539 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -326,7 +326,6 @@ bool LLFloaterWorldMap::postBuild()
 
     mPeopleCheck = getChild<LLCheckBoxCtrl>("people_chk");
     mInfohubCheck = getChild<LLCheckBoxCtrl>("infohub_chk");
-    mTelehubCheck = getChild<LLCheckBoxCtrl>("telehub_chk");
     mLandSaleCheck = getChild<LLCheckBoxCtrl>("land_for_sale_chk");
     mEventsCheck = getChild<LLCheckBoxCtrl>("event_chk");
     mEventsMatureCheck = getChild<LLCheckBoxCtrl>("events_mature_chk");
@@ -572,7 +571,6 @@ void LLFloaterWorldMap::draw()
     bool enable = mMapView->showRegionInfo();
     mPeopleCheck->setEnabled(enable);
     mInfohubCheck->setEnabled(enable);
-    mTelehubCheck->setEnabled(enable);
     mLandSaleCheck->setEnabled(enable);
     mEventsCheck->setEnabled(enable);
     mEventsMatureCheck->setEnabled(enable);
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 269b231e37..a99100f5bd 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -206,7 +206,6 @@ private:
 
     LLCheckBoxCtrl*         mPeopleCheck = nullptr;
     LLCheckBoxCtrl*         mInfohubCheck = nullptr;
-    LLCheckBoxCtrl*         mTelehubCheck = nullptr;
     LLCheckBoxCtrl*         mLandSaleCheck = nullptr;
     LLCheckBoxCtrl*         mEventsCheck = nullptr;
     LLCheckBoxCtrl*         mEventsMatureCheck = nullptr;
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 3db0f90df8..079a5583d4 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -167,8 +167,6 @@ bool LLPanelGroup::postBuild()
     mButtonRefresh = getChild<LLButton>("btn_refresh");
     mButtonRefresh->setClickedCallback(onBtnRefresh, this);
 
-    mButtonCancel = getChild<LLButton>("btn_cancel");
-
     mGroupNameCtrl = getChild<LLUICtrl>("group_name");
 
     childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
@@ -214,18 +212,8 @@ void LLPanelGroup::reposButton(LLButton* button)
 
 void LLPanelGroup::reposButtons()
 {
-    if(mButtonRefresh && mButtonCancel && mButtonRefresh->getVisible() && mButtonCancel->getVisible())
-    {
-        LLRect btn_refresh_rect = mButtonRefresh->getRect();
-        LLRect btn_cancel_rect = mButtonCancel->getRect();
-        btn_refresh_rect.setLeftTopAndSize( btn_cancel_rect.mLeft + btn_cancel_rect.getWidth() + 2,
-            btn_refresh_rect.getHeight() + 2, btn_refresh_rect.getWidth(), btn_refresh_rect.getHeight());
-        mButtonRefresh->setRect(btn_refresh_rect);
-    }
-
     reposButton(mButtonApply);
     reposButton(mButtonRefresh);
-    reposButton(mButtonCancel);
     reposButton(mButtonChat);
     reposButton(mButtonCall);
 }
@@ -376,9 +364,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
     if(mButtonRefresh)
         mButtonRefresh->setVisible(!is_null_group_id);
 
-    if(mButtonCancel)
-        mButtonCancel->setVisible(!is_null_group_id);
-
     if(mButtonCall)
             mButtonCall->setVisible(!is_null_group_id);
     if(mButtonChat)
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index d7dec94c60..fa0e1d4104 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -123,7 +123,6 @@ protected:
     LLButton*       mButtonCall = nullptr;
     LLButton*       mButtonChat = nullptr;
     LLButton*       mButtonRefresh = nullptr;
-    LLButton*       mButtonCancel = nullptr;
     LLUICtrl*       mJoinText;
 };
 
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 738d448f00..7b06bed0a3 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -341,7 +341,6 @@
                  name="emoji_recent_empty_text"
                  follows="top|left|right"
                  layout="topleft"
-                 auto_resize="false"
                  h_pad="20"
                  v_pad="10"
                  top="0"
diff --git a/indra/newview/skins/default/xui/en/widgets/emoji_complete.xml b/indra/newview/skins/default/xui/en/widgets/emoji_complete.xml
index 6cc8d7118f..4a1ba169ad 100644
--- a/indra/newview/skins/default/xui/en/widgets/emoji_complete.xml
+++ b/indra/newview/skins/default/xui/en/widgets/emoji_complete.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <emoji_complete
   autosize="false"
-  hover_image="ListItem_Over"
   selected_image="ListItem_Select"
   max_visible="7"
   padding="8"
-- 
cgit v1.2.3


From c98498e6ea04570a6234c13c543105df69b58f46 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 27 Jul 2024 11:15:00 -0400
Subject: Destroy stream process when stopping audio stream to allow restarting
 in the case of stuck or errored libvlc (#2124)

---
 indra/newview/llviewermedia_streamingaudio.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp
index af3a21c183..b68ffbe1a2 100644
--- a/indra/newview/llviewermedia_streamingaudio.cpp
+++ b/indra/newview/llviewermedia_streamingaudio.cpp
@@ -70,6 +70,8 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
         LL_INFOS() << "setting stream to NULL"<< LL_ENDL;
         mURL.clear();
         mMediaPlugin->stop();
+        delete mMediaPlugin;
+        mMediaPlugin = nullptr;
     }
 }
 
@@ -79,6 +81,8 @@ void LLStreamingAudio_MediaPlugins::stop()
     if(mMediaPlugin)
     {
         mMediaPlugin->stop();
+        delete mMediaPlugin;
+        mMediaPlugin = nullptr;
     }
 
     mURL.clear();
-- 
cgit v1.2.3


From 817bc25b2732dc23295e6a7ac0da5ad142e33434 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 27 Jul 2024 11:15:09 -0400
Subject: Fix warning for Type mismatch in LLMsgVarData::addData for SpaceIP
 (#2125)

---
 indra/newview/llcallingcard.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 214b5f5cde..8e9ab8f87f 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -451,7 +451,7 @@ void LLAvatarTracker::findAgent()
     msg->nextBlockFast(_PREHASH_AgentBlock);
     msg->addUUIDFast(_PREHASH_Hunter, gAgentID);
     msg->addUUIDFast(_PREHASH_Prey, mTrackingData->mAvatarID);
-    msg->addU32Fast(_PREHASH_SpaceIP, 0); // will get filled in by simulator
+    msg->addIPAddrFast(_PREHASH_SpaceIP, 0); // will get filled in by simulator
     msg->nextBlockFast(_PREHASH_LocationBlock);
     const F64 NO_LOCATION = 0.0;
     msg->addF64Fast(_PREHASH_GlobalX, NO_LOCATION);
-- 
cgit v1.2.3


From ed6148d6c6c554223dc4b2dab0c729d3b5698158 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 26 Jul 2024 21:49:36 +0300
Subject: viewer#2113 Optional disable eyes/head follow cursor/lookat

Intended for photography, but there is curently no nice way to present
it so it's in debug options until we get some critical mass of features
that can be collected into a single whole.
---
 indra/newview/app_settings/settings.xml            | 11 +++++++++++
 indra/newview/llhudeffectlookat.cpp                | 21 +++++++++++++++++++--
 indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 97cab58eb1..9e5d3f09bd 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14218,6 +14218,17 @@
       <string>Boolean</string>
       <key>Value</key>
       <integer>0</integer>
+    </map>
+    <key>DisableLookAtAnimation</key>
+    <map>
+        <key>Comment</key>
+        <string>Avatar follows cursor with avatars eyes, when disabled, avatar will look forward</string>
+        <key>Persist</key>
+        <integer>0</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>0</integer>
     </map>
      <key>WebProfileFloaterRect</key>
     <map>
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index c8b7e00776..d0d2ee191a 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -36,6 +36,7 @@
 #include "llvoavatar.h"
 #include "lldrawable.h"
 #include "llviewerobjectlist.h"
+#include "llviewercontrol.h"
 #include "llrendersphere.h"
 #include "llselectmgr.h"
 #include "llglheaders.h"
@@ -561,8 +562,16 @@ void LLHUDEffectLookAt::update()
     {
         if (calcTargetPosition())
         {
+            static LLCachedControl<bool> disable_look_at(gSavedSettings, "DisableLookAtAnimation", true);
             LLMotion* head_motion = ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->findMotion(ANIM_AGENT_HEAD_ROT);
-            if (!head_motion || head_motion->isStopped())
+            if (disable_look_at())
+            {
+                if (head_motion)
+                {
+                    ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->stopMotion(ANIM_AGENT_HEAD_ROT);
+                }
+            }
+            else if (!head_motion || head_motion->isStopped())
             {
                 ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->startMotion(ANIM_AGENT_HEAD_ROT);
             }
@@ -665,7 +674,15 @@ bool LLHUDEffectLookAt::calcTargetPosition()
     if (!mTargetPos.isFinite())
         return false;
 
-    source_avatar->setAnimationData("LookAtPoint", (void *)&mTargetPos);
+    static LLCachedControl<bool> disable_look_at(gSavedSettings, "DisableLookAtAnimation", true);
+    if (disable_look_at())
+    {
+        source_avatar->removeAnimationData("LookAtPoint");
+    }
+    else
+    {
+        source_avatar->setAnimationData("LookAtPoint", (void*)&mTargetPos);
+    }
 
     return true;
 }
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 347638249b..941f0c6bb7 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3966,6 +3966,16 @@ function="World.EnvPreset"
                      function="ToggleControl"
                      parameter="AllowSelectAvatar" />
                 </menu_item_check>
+                <menu_item_check
+                 label="Disable Look At Animation"
+                 name="Disable Look At Animation">
+                    <menu_item_check.on_check
+                     function="CheckControl"
+                     parameter="DisableLookAtAnimation" />
+                    <menu_item_check.on_click
+                     function="ToggleControl"
+                     parameter="DisableLookAtAnimation" />
+                </menu_item_check>
                 <menu_item_check
                  label="Render Only Friends"
                  name="Render Only Friends">
-- 
cgit v1.2.3


From 30a859de7e728afd2a93f76a8b5314ac90894ccc Mon Sep 17 00:00:00 2001
From: Zi Ree <81702435+zi-ree@users.noreply.github.com>
Date: Sun, 28 Jul 2024 03:03:31 +0200
Subject: Fix double variable name in initialization

is_asset_knowable variable name is duplicated, causing a compiler warning in gcc.
---
 indra/newview/llinventorygallerymenu.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 8e56ccc01d..dbf4821ca1 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -810,7 +810,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
             items.push_back(std::string("Copy Asset UUID"));
             items.push_back(std::string("Copy Separator"));
 
-            bool is_asset_knowable = is_asset_knowable = LLAssetType::lookupIsAssetIDKnowable(obj->getType());
+            bool is_asset_knowable = LLAssetType::lookupIsAssetIDKnowable(obj->getType());
             if ( !is_asset_knowable // disable menu item for Inventory items with unknown asset. EXT-5308
                  || (! ( is_full_perm_item || gAgent.isGodlike())))
             {
-- 
cgit v1.2.3


From c7c7342ed3bc17fcef5b5fe0970859ac753a6639 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 28 Jul 2024 13:03:25 -0400
Subject: Update boost to 1.85 and fix deprecation warnings

---
 indra/llmath/v3color.h             |  4 ----
 indra/llmessage/llcorehttputil.cpp |  4 ++--
 indra/llwebrtc/llwebrtc_impl.h     |  6 +++++-
 indra/newview/llappviewerwin32.cpp |  2 +-
 indra/newview/lltranslate.cpp      | 16 ++++++++--------
 indra/newview/llvoicewebrtc.cpp    |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index 821c17f03d..f7af469e66 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -209,10 +209,6 @@ inline LLColor3::LLColor3(const F32 *vec)
     mV[VBLUE] = vec[VBLUE];
 }
 
-#if LL_WINDOWS
-# pragma warning( disable : 4996 ) // strncpy teh sux0r
-#endif
-
 inline LLColor3::LLColor3(const char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF
 {
     if (strlen(color_string) <  6)      /* Flawfinder: ignore */
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index 3fdc691141..918a69be6f 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -585,7 +585,7 @@ LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:
 
     LLCore::BufferArrayStream bas(body);
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value jsonRoot = boost::json::parse(bas, ec);
     if(ec.failed())
     {   // deserialization failed.  Record the reason and pass back an empty map for markup.
@@ -610,7 +610,7 @@ LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &succes
 
     LLCore::BufferArrayStream bas(body);
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value jsonRoot = boost::json::parse(bas, ec);
     if (ec.failed())
     {
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index 2fb5525519..c1acd77275 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -41,6 +41,7 @@
 #include "llwebrtc.h"
 // WebRTC Includes
 #ifdef WEBRTC_WIN
+#pragma warning(push)
 #pragma warning(disable : 4996) // ignore 'deprecated.'  We don't use the functions marked
                                 // deprecated in the webrtc headers, but msvc complains anyway.
                                 // Clang doesn't, and that's generally what webrtc uses.
@@ -63,7 +64,6 @@
 #include "api/task_queue/default_task_queue_factory.h"
 #include "modules/audio_device/include/audio_device_defines.h"
 
-
 namespace llwebrtc
 {
 
@@ -379,4 +379,8 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnectionInterface,
 
 }
 
+#if WEBRTC_WIN
+#pragma warning(pop)
+#endif
+
 #endif // LLWEBRTC_IMPL_H
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index c4c6dd3327..c5686f160a 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -711,7 +711,7 @@ bool LLAppViewerWin32::init()
         }
         else
         {
-            boost::json::error_code ec;
+            boost::system::error_code ec;
             boost::json::value build_data = boost::json::parse(inf, ec);
             if(ec.failed())
             {
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index b6fbcaa330..72e30bd765 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -398,7 +398,7 @@ bool LLGoogleTranslationHandler::parseResponse(
 {
     const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef();
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(text, ec);
     if (ec.failed())
     {
@@ -431,7 +431,7 @@ void LLGoogleTranslationHandler::parseErrorResponse(
     int& status,
     std::string& err_msg)
 {
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     auto message = root.find_pointer("/data/message", ec);
     auto code = root.find_pointer("/data/code", ec);
     if (!message || !code)
@@ -456,7 +456,7 @@ bool LLGoogleTranslationHandler::parseTranslation(
     std::string& translation,
     std::string& detected_lang)
 {
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     auto translated_text = root.find_pointer("/data/translations/0/translatedText", ec);
     if (!translated_text) return false;
 
@@ -656,7 +656,7 @@ bool LLAzureTranslationHandler::checkVerificationResponse(
     // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
     // But for now just verify response is a valid json
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(response["error_body"].asString(), ec);
     if (ec.failed())
     {
@@ -686,7 +686,7 @@ bool LLAzureTranslationHandler::parseResponse(
     //Example:
     // "[{\"detectedLanguage\":{\"language\":\"en\",\"score\":1.0},\"translations\":[{\"text\":\"Hello, what is your name?\",\"to\":\"en\"}]}]"
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(body, ec);
     if (ec.failed())
     {
@@ -726,7 +726,7 @@ std::string LLAzureTranslationHandler::parseErrorResponse(
     // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}"
     // But for now just verify response is a valid json with an error
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(body, ec);
     if (ec.failed())
     {
@@ -956,7 +956,7 @@ bool LLDeepLTranslationHandler::parseResponse(
     //Example:
     // "{\"translations\":[{\"detected_source_language\":\"EN\",\"text\":\"test\"}]}"
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(body, ec);
     if (ec.failed())
     {
@@ -1004,7 +1004,7 @@ std::string LLDeepLTranslationHandler::parseErrorResponse(
     const std::string& body)
 {
     // Example: "{\"message\":\"One of the request inputs is not valid.\"}"
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value root = boost::json::parse(body, ec);
     if (ec.failed())
     {
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index d18a32cb05..4f08dde6e0 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -2789,7 +2789,7 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b
         return;
     }
 
-    boost::json::error_code ec;
+    boost::system::error_code ec;
     boost::json::value voice_data_parsed = boost::json::parse(data, ec);
     if (!ec)  // don't collect comments
     {
-- 
cgit v1.2.3


From cde858a65f63701b3808550305aebfbc8c58669f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 28 Jul 2024 13:55:42 -0400
Subject: Fix lltest failure by outputting to the sharedlibs dir like other
 tests on windows

---
 indra/cmake/00-Common.cmake | 5 -----
 indra/test/CMakeLists.txt   | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 5a1fb72eca..f1fa7761c3 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -108,11 +108,6 @@ if (WINDOWS)
     string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
   endif()
 
-  # workaround for github runner image breakage:
-  # https://github.com/actions/runner-images/issues/10004#issuecomment-2153445161
-  # can be removed after the above issue is resolved and deployed across GHA
-  add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
-
   # Allow use of sprintf etc
   add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
 endif (WINDOWS)
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 3dcddf9dc2..745c0eedf8 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -71,6 +71,7 @@ if (WINDOWS)
           PROPERTIES 
           LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
           LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
+          RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
           )
 elseif (DARWIN)
   # Support our "@executable_path/../Resources" load path for our test
-- 
cgit v1.2.3


From 1c50229e6e8ceff6ebddff72aa26f39eed3a561c Mon Sep 17 00:00:00 2001
From: Zi Ree <81702435+zi-ree@users.noreply.github.com>
Date: Sun, 28 Jul 2024 03:21:34 +0200
Subject: fix misleading indentation compiler warnings

Fix several indentation mistakes, some of them trip gcc's misleading indentation warning.
---
 indra/newview/llpanelprofile.cpp | 48 ++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index fcf0757073..8f44b28ebe 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1020,7 +1020,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
 
     setDescriptionText(avatar_data->about_text);
 
-        mSecondLifePic->setValue(avatar_data->image_id);
+    mSecondLifePic->setValue(avatar_data->image_id);
 
     if (getSelfProfile())
     {
@@ -1168,10 +1168,10 @@ void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)
     }
     else
     {
-    std::string register_date = getString("age_format");
-    LLSD args_age;
+        std::string register_date = getString("age_format");
+        LLSD args_age;
         args_age["[AGE]"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now());
-    LLStringUtil::format(register_date, args_age);
+        LLStringUtil::format(register_date, args_age);
         userAgeCtrl->setValue(register_date);
     }
 
@@ -1614,12 +1614,12 @@ void LLPanelProfileSecondLife::onShowInSearchCallback()
     if (value == mAllowPublish)
         return;
 
-        mAllowPublish = value;
+    mAllowPublish = value;
     saveAgentUserInfoCoro("allow_publish", value);
-    }
+}
 
 void LLPanelProfileSecondLife::onHideAgeCallback()
-    {
+{
     bool value = mHideAgeCombo->getValue().asInteger();
     if (value == mHideAge)
         return;
@@ -1768,35 +1768,35 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)
     if (mSecondLifePic->getImageAssetId() == id)
         return;
 
-        std::function<void(bool)> callback = [id](bool result)
+    std::function<void(bool)> callback = [id](bool result)
+    {
+        if (result)
         {
-            if (result)
-            {
-                LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
+            LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
             // Should trigger callbacks in icon controls (or request Legacy)
-                LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
-            }
-        };
+            LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
+        }
+    };
 
     if (!saveAgentUserInfoCoro("sl_image_id", id, callback))
         return;
 
     mSecondLifePic->setValue(id);
 
-        LLFloater *floater = mFloaterProfileTextureHandle.get();
-        if (floater)
-        {
-            LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
+    LLFloater *floater = mFloaterProfileTextureHandle.get();
+    if (floater)
+    {
+        LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
         if (id == LLUUID::null)
-            {
-                texture_view->resetAsset();
-            }
-            else
-            {
+        {
+            texture_view->resetAsset();
+        }
+        else
+        {
             texture_view->loadAsset(id);
-            }
         }
     }
+}
 
 //////////////////////////////////////////////////////////////////////////
 // LLPanelProfileWeb
-- 
cgit v1.2.3


From 3e322df4fb71cbeff27aab85bb48c7da595b548c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 28 Jul 2024 16:27:42 -0400
Subject: Replace liburiparser with boost::url

---
 indra/cmake/Boost.cmake            |   9 +-
 indra/cmake/CMakeLists.txt         |   1 -
 indra/cmake/Copy3rdPartyLibs.cmake |   4 -
 indra/cmake/URIPARSER.cmake        |  19 -----
 indra/llcommon/CMakeLists.txt      |   2 -
 indra/llcommon/lluriparser.cpp     | 168 +++++++++++--------------------------
 indra/llcommon/lluriparser.h       |  27 +++---
 indra/llcorehttp/CMakeLists.txt    |   1 -
 indra/llui/llurlentry.cpp          |   2 +-
 indra/llui/llurlregistry.cpp       |   2 +-
 indra/newview/CMakeLists.txt       |   2 -
 indra/newview/llweb.cpp            |   1 -
 indra/newview/viewer_manifest.py   |   4 -
 13 files changed, 68 insertions(+), 174 deletions(-)
 delete mode 100644 indra/cmake/URIPARSER.cmake

(limited to 'indra')

diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 601a23a86d..8c5b946753 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -24,7 +24,8 @@ if (WINDOWS)
           libboost_program_options-mt${addrsfx}
           libboost_regex-mt${addrsfx}
           libboost_system-mt${addrsfx}
-          libboost_thread-mt${addrsfx})
+          libboost_thread-mt${addrsfx}
+          libboost_url-mt${addrsfx})
 elseif (LINUX)
   target_link_libraries( ll::boost INTERFACE
           boost_context-mt${addrsfx}
@@ -34,7 +35,8 @@ elseif (LINUX)
           boost_regex-mt${addrsfx}
           boost_signals-mt${addrsfx}
           boost_system-mt${addrsfx}
-          boost_thread-mt${addrsfx})
+          boost_thread-mt${addrsfx}
+          boost_url-mt${addrsfx})
 elseif (DARWIN)
   target_link_libraries( ll::boost INTERFACE
           boost_context-mt${addrsfx}
@@ -43,7 +45,8 @@ elseif (DARWIN)
           boost_program_options-mt${addrsfx}
           boost_regex-mt${addrsfx}
           boost_system-mt${addrsfx}
-          boost_thread-mt${addrsfx})
+          boost_thread-mt${addrsfx}
+          boost_url-mt${addrsfx})
 endif (WINDOWS)
 
 if (LINUX)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index c067105f68..73b614e0af 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -57,7 +57,6 @@ set(cmake_SOURCE_FILES
         Tut.cmake
         UI.cmake
         UnixInstall.cmake
-        URIPARSER.cmake
         Variables.cmake
         ViewerMiscLibs.cmake
         VisualLeakDetector.cmake
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 3f43ec6729..c2ba9231cc 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -58,7 +58,6 @@ if(WINDOWS)
         libaprutil-1.dll
         nghttp2.dll
         libhunspell.dll
-        uriparser.dll
         )
 
     # OpenSSL
@@ -190,9 +189,6 @@ elseif(DARWIN)
         libndofdev.dylib
         libnghttp2.dylib
         libnghttp2.14.dylib
-        liburiparser.dylib
-        liburiparser.1.dylib
-        liburiparser.1.0.27.dylib
        )
 
     if (TARGET ll::openal)
diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake
deleted file mode 100644
index 6c33ff70e1..0000000000
--- a/indra/cmake/URIPARSER.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- cmake -*-
-
-include_guard()
-
-include(Prebuilt)
-
-add_library( ll::uriparser INTERFACE IMPORTED )
-
-use_system_binary( uriparser )
-
-use_prebuilt_binary(uriparser)
-if (WINDOWS)
-  target_link_libraries( ll::uriparser INTERFACE uriparser)
-elseif (LINUX)
-  target_link_libraries( ll::uriparser INTERFACE uriparser)
-elseif (DARWIN)
-  target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib)
-endif (WINDOWS)
-target_include_directories( ll::uriparser SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/uriparser)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 95e991c246..8e43627a5f 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -10,7 +10,6 @@ include(Boost)
 include(LLSharedLibs)
 include(Copy3rdPartyLibs)
 include(ZLIBNG)
-include(URIPARSER)
 include(Tracy)
 
 
@@ -278,7 +277,6 @@ target_link_libraries(
         ll::expat
         ll::zlib-ng
         ll::boost
-        ll::uriparser
         ll::oslibraries
         ll::tracy
     )
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 2ebb7fc742..33a48d970d 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -29,12 +29,7 @@
 #include "linden_common.h"
 #include "lluriparser.h"
 
-#if LL_DARWIN
-#include <signal.h>
-#include <setjmp.h>
-#endif
-
-LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedTmp(false), mRes(0)
+LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedTmp(false), mRes(false)
 {
     if (u.find("://") == std::string::npos)
     {
@@ -42,36 +37,52 @@ LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedT
         mTmpScheme = true;
     }
 
-    mNormalizedUri += u.c_str();
+    mNormalizedUri.append(u);
 
     mRes = parse();
 }
 
 LLUriParser::~LLUriParser()
 {
-    uriFreeUriMembersA(&mUri);
 }
 
-S32 LLUriParser::parse()
+bool LLUriParser::parse()
 {
-    mRes = uriParseSingleUriA(&mUri, mNormalizedUri.c_str(), NULL);
+    try
+    {
+        auto res = boost::urls::parse_uri(mNormalizedUri);
+        if (res)
+        {
+            mUri = *res;
+            mRes = true;
+        }
+        else
+        {
+            mRes = false;
+        }
+    }
+    catch (const std::length_error&)
+    {
+        LL_WARNS() << "Failed to parse uri due to exceeding uri_view max_size" << LL_ENDL;
+        mRes = false;
+    }
     return mRes;
 }
 
-const char * LLUriParser::scheme() const
+const std::string& LLUriParser::scheme() const
 {
-    return mScheme.c_str();
+    return mScheme;
 }
 
-void LLUriParser::sheme(const std::string& s)
+void LLUriParser::scheme(const std::string& s)
 {
     mTmpScheme = !s.size();
     mScheme = s;
 }
 
-const char * LLUriParser::port() const
+const std::string& LLUriParser::port() const
 {
-    return mPort.c_str();
+    return mPort;
 }
 
 void LLUriParser::port(const std::string& s)
@@ -79,9 +90,9 @@ void LLUriParser::port(const std::string& s)
     mPort = s;
 }
 
-const char * LLUriParser::host() const
+const std::string& LLUriParser::host() const
 {
-    return mHost.c_str();
+    return mHost;
 }
 
 void LLUriParser::host(const std::string& s)
@@ -89,9 +100,9 @@ void LLUriParser::host(const std::string& s)
     mHost = s;
 }
 
-const char * LLUriParser::path() const
+const std::string& LLUriParser::path() const
 {
-    return mPath.c_str();
+    return mPath;
 }
 
 void LLUriParser::path(const std::string& s)
@@ -99,9 +110,9 @@ void LLUriParser::path(const std::string& s)
     mPath = s;
 }
 
-const char * LLUriParser::query() const
+const std::string& LLUriParser::query() const
 {
-    return mQuery.c_str();
+    return mQuery;
 }
 
 void LLUriParser::query(const std::string& s)
@@ -109,9 +120,9 @@ void LLUriParser::query(const std::string& s)
     mQuery = s;
 }
 
-const char * LLUriParser::fragment() const
+const std::string& LLUriParser::fragment() const
 {
-    return mFragment.c_str();
+    return mFragment;
 }
 
 void LLUriParser::fragment(const std::string& s)
@@ -119,19 +130,6 @@ void LLUriParser::fragment(const std::string& s)
     mFragment = s;
 }
 
-void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
-{
-    if (textRange.first != NULL && textRange.afterLast != NULL && textRange.first < textRange.afterLast)
-    {
-        const ptrdiff_t len = textRange.afterLast - textRange.first;
-        str.assign(textRange.first, static_cast<std::string::size_type>(len));
-    }
-    else
-    {
-        str = LLStringUtil::null;
-    }
-}
-
 void LLUriParser::extractParts()
 {
     if (mTmpScheme || mNormalizedTmp)
@@ -140,96 +138,24 @@ void LLUriParser::extractParts()
     }
     else
     {
-        textRangeToString(mUri.scheme, mScheme);
+        mScheme = mUri.scheme();
     }
 
-    textRangeToString(mUri.hostText, mHost);
-    textRangeToString(mUri.portText, mPort);
-    textRangeToString(mUri.query, mQuery);
-    textRangeToString(mUri.fragment, mFragment);
-
-    UriPathSegmentA * pathHead = mUri.pathHead;
-    while (pathHead)
-    {
-        std::string partOfPath;
-        textRangeToString(pathHead->text, partOfPath);
-
-        mPath += '/';
-        mPath += partOfPath;
-
-        pathHead = pathHead->next;
-    }
+    mHost = mUri.host();
+    mPort = mUri.port();
+    mQuery = mUri.query();
+    mFragment = mUri.fragment();
+    mPath = mUri.path();
 }
 
-#if LL_DARWIN
-typedef void(*sighandler_t)(int);
-jmp_buf return_to_normalize;
-static int sLastSignal = 0;
-void uri_signal_handler(int signal)
-{
-    sLastSignal = signal;
-    // Apparently signal handler throwing an exception doesn't work.
-    // This is ugly and unsafe due to not unwinding content of uriparser library,
-    // but unless we have a way to catch this as NSexception, jump appears to be the only option.
-    longjmp(return_to_normalize, 1 /*setjmp will return this value*/);
-}
-#endif
-
-S32 LLUriParser::normalize()
+bool LLUriParser::normalize()
 {
     mNormalizedTmp = mTmpScheme;
-    if (!mRes)
+    if (mRes)
     {
-#if LL_DARWIN
-        sighandler_t last_sigill_handler, last_sigbus_handler;
-        last_sigill_handler = signal(SIGILL, &uri_signal_handler);      // illegal instruction
-        last_sigbus_handler = signal(SIGBUS, &uri_signal_handler);
-
-        if (setjmp(return_to_normalize))
-        {
-            // Issue: external library crashed via signal
-            // If you encountered this, please try to figure out what's wrong:
-            // 1. Verify that library's input is 'sane'
-            // 2. Check if we have an NSexception to work with (unlikely)
-            // 3. See if passing same string causes exception to repeat
-            //
-            // Crash happens at uriNormalizeSyntaxExA
-            // Warning!!! This does not properly unwind stack,
-            // if this can be handled by NSexception, it needs to be remade
-            llassert(0);
-
-            LL_WARNS() << "Uriparser crashed with " << sLastSignal << " , while processing: " << mNormalizedUri << LL_ENDL;
-            signal(SIGILL, last_sigill_handler);
-            signal(SIGBUS, last_sigbus_handler);
-            return 1;
-        }
-#endif
-
-        mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
-
-#if LL_DARWIN
-        signal(SIGILL, last_sigill_handler);
-        signal(SIGBUS, last_sigbus_handler);
-#endif
-
-        if (!mRes)
-        {
-            S32 chars_required;
-            mRes = uriToStringCharsRequiredA(&mUri, &chars_required);
-
-            if (!mRes)
-            {
-                chars_required++;
-                std::vector<char> label_buf(chars_required);
-                mRes = uriToStringA(&label_buf[0], &mUri, chars_required, NULL);
-
-                if (!mRes)
-                {
-                    mNormalizedUri = &label_buf[mTmpScheme ? 7 : 0];
-                    mTmpScheme = false;
-                }
-            }
-        }
+        mUri.normalize_scheme().normalize_authority();
+        mNormalizedUri = mUri.buffer().substr(mTmpScheme ? 7 : 0);
+        mTmpScheme = false;
     }
 
     if(mTmpScheme && mNormalizedUri.size() > 7)
@@ -302,7 +228,7 @@ bool LLUriParser::test() const
     return uri == mNormalizedUri;
 }
 
-const char * LLUriParser::normalizedUri() const
+const std::string& LLUriParser::normalizedUri() const
 {
-    return mNormalizedUri.c_str();
+    return mNormalizedUri;
 }
diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h
index 77eb4031d5..61d613f399 100644
--- a/indra/llcommon/lluriparser.h
+++ b/indra/llcommon/lluriparser.h
@@ -30,7 +30,7 @@
 #define LL_LLURIPARSER_H
 
 #include <string>
-#include "uriparser/Uri.h"
+#include "boost/url.hpp"
 
 class LL_COMMON_API LLUriParser
 {
@@ -38,36 +38,35 @@ public:
     LLUriParser(const std::string& u);
     ~LLUriParser();
 
-    const char * scheme() const;
-    void sheme (const std::string& s);
+    const std::string& scheme() const;
+    void scheme (const std::string& s);
 
-    const char * port() const;
+    const std::string& port() const;
     void port (const std::string& s);
 
-    const char * host() const;
+    const std::string& host() const;
     void host (const std::string& s);
 
-    const char * path() const;
+    const std::string& path() const;
     void path (const std::string& s);
 
-    const char * query() const;
+    const std::string& query() const;
     void query (const std::string& s);
 
-    const char * fragment() const;
+    const std::string& fragment() const;
     void fragment (const std::string& s);
 
-    const char * normalizedUri() const;
+    const std::string& normalizedUri() const;
 
     void extractParts();
     void glue(std::string& uri) const;
     void glueFirst(std::string& uri, bool use_scheme = true) const;
     void glueSecond(std::string& uri) const;
     bool test() const;
-    S32 normalize();
+    bool normalize();
 
 private:
-    S32 parse();
-    void textRangeToString(UriTextRangeA& textRange, std::string& str);
+    bool parse();
     std::string mScheme;
     std::string mHost;
     std::string mPort;
@@ -76,9 +75,9 @@ private:
     std::string mFragment;
     std::string mNormalizedUri;
 
-    UriUriA mUri;
+    boost::url mUri;
 
-    S32 mRes;
+    bool mRes;
     bool mTmpScheme;
     bool mNormalizedTmp;
 };
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index 5650c4c8ba..f7a6669825 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -158,7 +158,6 @@ if (DARWIN)
     libapr-1.0.dylib
     libaprutil-1.0.dylib
     libnghttp2*.dylib
-    liburiparser*.dylib
     ${EXPAT_COPY}
     )
 
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 198441804b..79d2fcd049 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -239,7 +239,7 @@ std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) cons
         return url;
     }
     LLUriParser up(escapeUrl(url));
-    if (up.normalize() == 0)
+    if (up.normalize())
     {
         std::string label;
         up.extractParts();
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 3a4ce6a72f..cec1ddfc57 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -221,7 +221,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
         if (match_entry == mUrlEntryTrusted)
         {
             LLUriParser up(url);
-            if (up.normalize() == 0)
+            if (up.normalize())
             {
                 url = up.normalizedUri();
             }
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index def2d8f0c0..a34354d287 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -44,7 +44,6 @@ include(ViewerManager)
 include(VisualLeakDetector)
 include(VulkanGltf)
 include(ZLIBNG)
-include(URIPARSER)
 include(LLPrimitive)
 
 if (NOT HAVOK_TPV)
@@ -1731,7 +1730,6 @@ if (WINDOWS)
       ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
       ${SHARED_LIB_STAGING_DIR}/openjp2.dll
       ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
-      ${SHARED_LIB_STAGING_DIR}/uriparser.dll
       ${SHARED_LIB_STAGING_DIR}/llwebrtc.dll
       #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
       #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index d8852de954..a319aa00bc 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -50,7 +50,6 @@
 #include "llviewerwindow.h"
 #include "llnotificationsutil.h"
 #include "lluriparser.h"
-#include "uriparser/Uri.h"
 
 bool on_load_url_external_response(const LLSD& notification, const LLSD& response, bool async );
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 5b6ac27575..a25efc5de4 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -561,9 +561,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
             # For textures
             self.path("openjp2.dll")
 
-            # Uriparser
-            self.path("uriparser.dll")
-
             # These need to be installed as a SxS assembly, currently a 'private' assembly.
             # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
             self.path("msvcp140.dll")
@@ -1022,7 +1019,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
                                 # libnghttp2.major.dylib, which is a symlink to
                                 # libnghttp2.version.dylib. Get all of them.
                                 "libnghttp2.*dylib",
-                                "liburiparser.*dylib",
                                 ):
                     dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
 
-- 
cgit v1.2.3


From 7a4249937db591d146d8c91f2a85c5c721543f19 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 24 Jul 2024 20:21:11 +0200
Subject: #2103 BugSplat Crash #1497033: LLViewerTextureList::getImage

---
 indra/newview/llvovolume.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2630aaf43e..9ebe648680 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5646,7 +5646,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
             }
 
             // HACK -- brute force this check every time a drawable gets rebuilt
-            for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
+            S32 num_tex = llmin(vobj->getNumTEs(), drawablep->getNumFaces());
+            for (S32 i = 0; i < num_tex; ++i)
             {
                 vobj->updateTEMaterialTextures(i);
             }
-- 
cgit v1.2.3


From 5d25504f8335132d0d222b266f8772062c88b335 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Fri, 26 Jul 2024 19:32:23 +0200
Subject: #2100 BugSplat Crash #1497210: LLVOAvatar::updateImpostors()(10616)

---
 indra/llcharacter/llcharacter.cpp              |  23 +--
 indra/llcharacter/llcharacter.h                |   2 +-
 indra/llcharacter/llkeyframemotion.cpp         |  11 +-
 indra/newview/llavatarrenderinfoaccountant.cpp |  15 +-
 indra/newview/llcontrolavatar.cpp              |  12 +-
 indra/newview/llfloater360capture.cpp          |   7 +-
 indra/newview/llfloaterperformance.cpp         |  10 +-
 indra/newview/llfloatersnapshot.cpp            |   9 +-
 indra/newview/llscenemonitor.cpp               |   7 +-
 indra/newview/llviewermenu.cpp                 |   5 +-
 indra/newview/llviewerwindow.cpp               |  16 +-
 indra/newview/llvoavatar.cpp                   | 217 +++++++++++--------------
 indra/newview/llworld.cpp                      |  53 +++---
 indra/newview/llworld.h                        |   2 +-
 indra/newview/pipeline.cpp                     |  14 +-
 15 files changed, 168 insertions(+), 235 deletions(-)

(limited to 'indra')

diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 264b9a0be1..ecbcdb3bf5 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -38,7 +38,7 @@
 
 LLStringTable LLCharacter::sVisualParamNames(1024);
 
-std::vector< LLCharacter* > LLCharacter::sInstances;
+std::list< LLCharacter* > LLCharacter::sInstances;
 bool LLCharacter::sAllowInstancesChange = true ;
 
 //-----------------------------------------------------------------------------
@@ -53,7 +53,6 @@ LLCharacter::LLCharacter()
     mSkeletonSerialNum( 0 )
 {
     llassert_always(sAllowInstancesChange) ;
-    sInstances.push_back(this);
 
     mMotionController.setCharacter( this );
     mPauseRequest = new LLPauseRequestHandle();
@@ -66,28 +65,12 @@ LLCharacter::LLCharacter()
 //-----------------------------------------------------------------------------
 LLCharacter::~LLCharacter()
 {
-    for (LLVisualParam *param = getFirstVisualParam();
-        param;
-        param = getNextVisualParam())
+    for (const auto& it : mVisualParamIndexMap)
     {
-        delete param;
+        delete it.second;
     }
 
-    size_t i ;
-    size_t size = sInstances.size() ;
-    for(i = 0 ; i < size ; i++)
-    {
-        if(sInstances[i] == this)
-        {
-            break ;
-        }
-    }
-
-    llassert_always(i < size) ;
-
     llassert_always(sAllowInstancesChange) ;
-    sInstances[i] = sInstances[size - 1] ;
-    sInstances.pop_back() ;
 }
 
 
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index b390960a75..6da28f0692 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -255,7 +255,7 @@ public:
     U32             getSkeletonSerialNum() const        { return mSkeletonSerialNum; }
     void            setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; }
 
-    static std::vector< LLCharacter* > sInstances;
+    static std::list< LLCharacter* > sInstances;
     static bool sAllowInstancesChange ; //debug use
 
     virtual void    setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 12212efb66..6c060d7980 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -2407,13 +2407,10 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid,
 {
     LLUUID* id = (LLUUID*)user_data;
 
-    std::vector<LLCharacter* >::iterator char_iter = LLCharacter::sInstances.begin();
-
-    while(char_iter != LLCharacter::sInstances.end() &&
-            (*char_iter)->getID() != *id)
-    {
-        ++char_iter;
-    }
+    auto char_iter = std::find_if(LLCharacter::sInstances.begin(), LLCharacter::sInstances.end(), [&](LLCharacter* c)
+        {
+            return c->getID() == *id;
+        });
 
     delete id;
 
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 3fd2b7fe5d..44f35981b0 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -226,14 +226,12 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
     // Build the render info to POST to the region
     LLSD agents = LLSD::emptyMap();
 
-    std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-    while( iter != LLCharacter::sInstances.end() )
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
-        if (avatar &&
-            avatar->getRezzedStatus() >= 2 &&                   // Mostly rezzed (maybe without baked textures downloaded)
-            !avatar->isDead() &&                                // Not dead yet
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead() &&                                // Not dead yet
             !avatar->isControlAvatar() &&                       // Not part of an animated object
+            avatar->getRezzedStatus() >= 2 &&                   // Mostly rezzed (maybe without baked textures downloaded)
             avatar->getObjectHost() == regionp->getHost())      // Ensure it's on the same region
         {
             LLSD info = LLSD::emptyMap();
@@ -243,15 +241,14 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
                 // the weight/complexity is unsigned, but LLSD only stores signed integers,
                 // so if it's over that (which would be ridiculously high), just store the maximum signed int value
                 info[KEY_WEIGHT] = (S32)(avatar_complexity < S32_MAX ? avatar_complexity : S32_MAX);
-                info[KEY_TOO_COMPLEX]  = LLSD::Boolean(avatar->isTooComplex());
+                info[KEY_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex());
                 agents[avatar->getID().asString()] = info;
 
                 LL_DEBUGS("AvatarRenderInfo") << "Sending avatar render info for " << avatar->getID()
-                                              << ": " << info << LL_ENDL;
+                    << ": " << info << LL_ENDL;
                 num_avs++;
             }
         }
-        iter++;
     }
 
     // Reset this regions timer, moving to longer intervals if there are lots of avatars around
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 2a52b7dde9..9201241856 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -699,14 +699,14 @@ bool LLControlAvatar::isImpostor()
     return LLVOAvatar::isImpostor();
 }
 
-//static
+// static
 void LLControlAvatar::onRegionChanged()
 {
-    std::vector<LLCharacter*>::iterator it = LLCharacter::sInstances.begin();
-    for ( ; it != LLCharacter::sInstances.end(); ++it)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLControlAvatar* cav = dynamic_cast<LLControlAvatar*>(*it);
-        if (!cav) continue;
-        cav->mRegionChanged = true;
+        if (LLControlAvatar* cav = dynamic_cast<LLControlAvatar*>(character))
+        {
+            cav->mRegionChanged = true;
+        }
     }
 }
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 01a0525d56..ff30c83f51 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -793,12 +793,9 @@ void LLFloater360Capture::freezeWorld(bool enable)
         LLEnvironment::instance().pauseCloudScroll();
 
         // freeze all avatars
-        LLCharacter* avatarp;
-        for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-                iter != LLCharacter::sInstances.end(); ++iter)
+        for (LLCharacter* character : LLCharacter::sInstances)
         {
-            avatarp = *iter;
-            mAvatarPauseHandles.push_back(avatarp->requestPause());
+            mAvatarPauseHandles.push_back(character->requestPause());
         }
 
         // freeze everything else
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index d5782accef..315508f22b 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -435,15 +435,12 @@ void LLFloaterPerformance::populateNearbyList()
     mNearbyList->updateColumns(true);
 
     static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
-    std::vector<LLCharacter*> valid_nearby_avs;
+    std::vector<LLVOAvatar*> valid_nearby_avs;
     mNearbyMaxGPUTime = LLWorld::getInstance()->getNearbyAvatarsAndMaxGPUTime(valid_nearby_avs);
 
-    std::vector<LLCharacter*>::iterator char_iter = valid_nearby_avs.begin();
-
-    while (char_iter != valid_nearby_avs.end())
+    for (LLVOAvatar* avatar : valid_nearby_avs)
     {
-        LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*char_iter);
-        if (avatar && (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance()))
+        if (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance())
         {
             F32 render_av_gpu_ms = avatar->getGPURenderTime();
 
@@ -508,7 +505,6 @@ void LLFloaterPerformance::populateNearbyList()
                 }
             }
         }
-        char_iter++;
     }
     mNearbyList->sortByColumnIndex(1, false);
     mNearbyList->setScrollPos(prev_pos);
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index ddc567c029..ddd55d0c17 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -210,13 +210,10 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate
             previewp->setEnabled(true);
         }
 
-        //RN: freeze all avatars
-        LLCharacter* avatarp;
-        for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-            iter != LLCharacter::sInstances.end(); ++iter)
+        // RN: freeze all avatars
+        for (LLCharacter* character : LLCharacter::sInstances)
         {
-            avatarp = *iter;
-            floaterp->impl->mAvatarPauseHandles.push_back(avatarp->requestPause());
+            floaterp->impl->mAvatarPauseHandles.push_back(character->requestPause());
         }
 
         // freeze everything else
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index cdccaf44e9..7498c2d524 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -225,11 +225,10 @@ void LLSceneMonitor::freezeScene()
         return;
     }
 
-    //freeze all avatars
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-        iter != LLCharacter::sInstances.end(); ++iter)
+    // freeze all avatars
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        freezeAvatar((LLCharacter*)(*iter));
+        freezeAvatar((LLCharacter*)character);
     }
 
     // freeze everything else
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index cd0b3dbd0c..0c8dd6dff9 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1892,10 +1892,9 @@ class LLAdvancedForceParamsToDefault : public view_listener_t
 static void set_all_animation_time_factors(F32  time_factor)
 {
     LLMotionController::setCurrentTimeFactor(time_factor);
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-        iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        (*iter)->setAnimTimeFactor(time_factor);
+        character->setAnimTimeFactor(time_factor);
     }
 }
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9dc12c4856..f6de8377f3 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -741,18 +741,16 @@ public:
         if (gSavedSettings.getBOOL("DebugShowAvatarRenderInfo"))
         {
             std::map<std::string, LLVOAvatar*> sorted_avs;
-
-            std::vector<LLCharacter*>::iterator sort_iter = LLCharacter::sInstances.begin();
-            while (sort_iter != LLCharacter::sInstances.end())
             {
-                LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*sort_iter);
-                if (avatar &&
-                    !avatar->isDead())                      // Not dead yet
+                for (LLCharacter* character : LLCharacter::sInstances)
                 {
-                    // Stuff into a sorted map so the display is ordered
-                    sorted_avs[avatar->getFullname()] = avatar;
+                    LLVOAvatar* avatar = (LLVOAvatar*)character;
+                    if (!avatar->isDead()) // Not dead yet
+                    {
+                        // Stuff into a sorted map so the display is ordered
+                        sorted_avs[avatar->getFullname()] = avatar;
+                    }
                 }
-                sort_iter++;
             }
 
             std::string trunc_name;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fcd2f74108..6e6ad485cf 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -768,6 +768,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
     }
 
     mVisuallyMuteSetting = LLVOAvatar::VisualMuteSettings(LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(getID()));
+
+    sInstances.push_back(this);
 }
 
 std::string LLVOAvatar::avString() const
@@ -815,6 +817,8 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
 //------------------------------------------------------------------------
 LLVOAvatar::~LLVOAvatar()
 {
+    sInstances.remove(this);
+
     if (!mFullyLoaded)
     {
         debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud");
@@ -957,26 +961,16 @@ void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
 // static
 bool LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
 {
-    bool res = true;
     grey_avatars = 0;
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
-        if( inst->isDead() )
+        LLVOAvatar* inst = (LLVOAvatar*)character;
+        if (!inst->isDead() && inst->mHasGrey && !inst->isFullyBaked())
         {
-            continue;
-        }
-        else if( !inst->isFullyBaked() )
-        {
-            res = false;
-            if (inst->mHasGrey)
-            {
-                ++grey_avatars;
-            }
+            ++grey_avatars;
         }
     }
-    return res;
+    return !grey_avatars;
 }
 
 // static
@@ -987,11 +981,10 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_t
     avg_cloud_time = 0;
     cloud_avatars = 0;
     S32 count_avg = 0;
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
-        if (inst)
+        if (LLVOAvatar* inst = (LLVOAvatar*)character)
         {
             S32 rez_status = inst->getRezzedStatus();
             counts[rez_status]++;
@@ -1008,6 +1001,7 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_t
             }
         }
     }
+
     if (count_avg > 0)
     {
         avg_cloud_time /= count_avg;
@@ -1017,11 +1011,19 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_t
 // static
 std::string LLVOAvatar::rezStatusToString(S32 rez_status)
 {
-    if (rez_status==0) return "cloud";
-    if (rez_status==1) return "gray";
-    if (rez_status==2) return "downloading baked";
-    if (rez_status==3) return "loading attachments";
-    if (rez_status==4) return "full";
+    switch (rez_status)
+    {
+    case 0:
+        return "cloud";
+    case 1:
+        return "gray";
+    case 2:
+        return "downloading baked";
+    case 3:
+        return "loading attachments";
+    case 4:
+        return "full";
+    }
     return "unknown";
 }
 
@@ -1030,10 +1032,9 @@ void LLVOAvatar::dumpBakedStatus()
 {
     LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal();
 
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
+        LLVOAvatar* inst = (LLVOAvatar*)character;
         LL_INFOS() << "Avatar ";
 
         LLNameValue* firstname = inst->getNVPair("FirstName");
@@ -1128,10 +1129,9 @@ void LLVOAvatar::destroyGL()
 //static
 void LLVOAvatar::resetImpostors()
 {
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* avatar = (LLVOAvatar*) *iter;
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
         avatar->mImpostor.release();
         avatar->mNeedsImpostorUpdate = true;
         avatar->mLastImpostorUpdateReason = 1;
@@ -1143,11 +1143,9 @@ void LLVOAvatar::deleteCachedImages(bool clearAll)
 {
     if (LLViewerTexLayerSet::sHasCaches)
     {
-        for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-             iter != LLCharacter::sInstances.end(); ++iter)
+        for (LLCharacter* character : LLCharacter::sInstances)
         {
-            LLVOAvatar* inst = (LLVOAvatar*) *iter;
-            inst->deleteLayerSetCaches(clearAll);
+            ((LLVOAvatar*)character)->deleteLayerSetCaches(clearAll);
         }
         LLViewerTexLayerSet::sHasCaches = false;
     }
@@ -1202,7 +1200,7 @@ void LLVOAvatar::initInstance()
     //-------------------------------------------------------------------------
     if (LLCharacter::sInstances.size() == 1)
     {
-        registerMotion( ANIM_AGENT_DO_NOT_DISTURB,                  LLNullMotion::create );
+        registerMotion( ANIM_AGENT_DO_NOT_DISTURB,          LLNullMotion::create );
         registerMotion( ANIM_AGENT_CROUCH,                  LLKeyframeStandMotion::create );
         registerMotion( ANIM_AGENT_CROUCHWALK,              LLKeyframeWalkMotion::create );
         registerMotion( ANIM_AGENT_EXPRESS_AFRAID,          LLEmote::create );
@@ -3628,29 +3626,28 @@ void LLVOAvatar::clearNameTag()
     mTimeVisible.reset();
 }
 
-//static
+// static
 void LLVOAvatar::invalidateNameTag(const LLUUID& agent_id)
 {
-    LLViewerObject* obj = gObjectList.findObject(agent_id);
-    if (!obj) return;
-
-    LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(obj);
-    if (!avatar) return;
-
-    avatar->clearNameTag();
+    if (LLViewerObject* obj = gObjectList.findObject(agent_id))
+    {
+        if (LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(obj))
+        {
+            avatar->clearNameTag();
+        }
+    }
 }
 
-//static
+// static
 void LLVOAvatar::invalidateNameTags()
 {
-    std::vector<LLCharacter*>::iterator it = LLCharacter::sInstances.begin();
-    for ( ; it != LLCharacter::sInstances.end(); ++it)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*it);
-        if (!avatar) continue;
-        if (avatar->isDead()) continue;
-
-        avatar->clearNameTag();
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead())
+        {
+            avatar->clearNameTag();
+        }
     }
 }
 
@@ -8261,15 +8258,13 @@ void LLVOAvatar::logPendingPhases()
 //static
 void LLVOAvatar::logPendingPhasesAllAvatars()
 {
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
-        if( inst->isDead() )
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead())
         {
-            continue;
+            avatar->logPendingPhases();
         }
-        inst->logPendingPhases();
     }
 }
 
@@ -10443,15 +10438,16 @@ void LLVOAvatar::setVisibilityRank(U32 rank)
 S32 LLVOAvatar::getUnbakedPixelAreaRank()
 {
     S32 rank = 1;
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
+
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
-        if (inst == this)
+        if (character == this)
         {
             return rank;
         }
-        else if (!inst->isDead() && !inst->isFullyBaked())
+
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead() && !avatar->isFullyBaked())
         {
             rank++;
         }
@@ -10461,49 +10457,37 @@ S32 LLVOAvatar::getUnbakedPixelAreaRank()
     return 0;
 }
 
-struct CompareScreenAreaGreater
-{
-    bool operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs)
-    {
-        return lhs->getPixelArea() > rhs->getPixelArea();
-    }
-};
-
 // static
 void LLVOAvatar::cullAvatarsByPixelArea()
 {
-    std::sort(LLCharacter::sInstances.begin(), LLCharacter::sInstances.end(), CompareScreenAreaGreater());
+    LLCharacter::sInstances.sort([](LLCharacter* lhs, LLCharacter* rhs)
+        {
+            return lhs->getPixelArea() > rhs->getPixelArea();
+        });
 
     // Update the avatars that have changed status
-    U32 rank = 2; //1 is reserved for self.
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-         iter != LLCharacter::sInstances.end(); ++iter)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) *iter;
-        bool culled;
-        if (inst->isSelf() || inst->isFullyBaked())
-        {
-            culled = false;
-        }
-        else
+        U32 rank = 2; //1 is reserved for self.
+        for (LLCharacter* character : LLCharacter::sInstances)
         {
-            culled = true;
-        }
+            LLVOAvatar* inst = (LLVOAvatar*)character;
+            bool culled = !inst->isSelf() && !inst->isFullyBaked();
 
-        if (inst->mCulled != culled)
-        {
-            inst->mCulled = culled;
-            LL_DEBUGS() << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << LL_ENDL;
-            inst->updateMeshTextures();
-        }
+            if (inst->mCulled != culled)
+            {
+                inst->mCulled = culled;
+                LL_DEBUGS() << "avatar " << inst->getID() << (culled ? " start culled" : " start not culled" ) << LL_ENDL;
+                inst->updateMeshTextures();
+            }
 
-        if (inst->isSelf())
-        {
-            inst->setVisibilityRank(1);
-        }
-        else if (inst->mDrawable.notNull() && inst->mDrawable->isVisible())
-        {
-            inst->setVisibilityRank(rank++);
+            if (inst->isSelf())
+            {
+                inst->setVisibilityRank(1);
+            }
+            else if (inst->mDrawable.notNull() && inst->mDrawable->isVisible())
+            {
+                inst->setVisibilityRank(rank++);
+            }
         }
     }
 
@@ -10762,11 +10746,9 @@ void LLVOAvatar::updateImpostors()
 {
     LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
 
-    std::vector<LLCharacter*> instances_copy = LLCharacter::sInstances;
-    for (std::vector<LLCharacter*>::iterator iter = instances_copy.begin();
-        iter != instances_copy.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* avatar = (LLVOAvatar*) *iter;
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
         if (!avatar->isDead()
             && avatar->isVisible()
             && avatar->isImpostor()
@@ -10923,21 +10905,17 @@ void LLVOAvatar::updateNearbyAvatarCount()
         S32 avs_nearby = 0;
         static LLCachedControl<F32> render_far_clip(gSavedSettings, "RenderFarClip", 64);
         F32 radius = render_far_clip * render_far_clip;
-        std::vector<LLCharacter *>::iterator char_iter = LLCharacter::sInstances.begin();
-        while (char_iter != LLCharacter::sInstances.end())
+        for (LLCharacter* character : LLCharacter::sInstances)
         {
-            LLVOAvatar *avatar = dynamic_cast<LLVOAvatar *>(*char_iter);
-            if (avatar && !avatar->isDead() && !avatar->isControlAvatar())
+            LLVOAvatar* avatar = (LLVOAvatar*)character;
+            if (!avatar->isDead() && !avatar->isControlAvatar())
             {
-                if ((dist_vec_squared(avatar->getPositionGlobal(), gAgent.getPositionGlobal()) > radius) &&
-                    (dist_vec_squared(avatar->getPositionGlobal(), gAgentCamera.getCameraPositionGlobal()) > radius))
+                if ((dist_vec_squared(avatar->getPositionGlobal(), gAgent.getPositionGlobal()) <= radius) ||
+                    (dist_vec_squared(avatar->getPositionGlobal(), gAgentCamera.getCameraPositionGlobal()) <= radius))
                 {
-                    char_iter++;
-                    continue;
+                    avs_nearby++;
                 }
-                avs_nearby++;
             }
-            char_iter++;
         }
         sAvatarsNearby = avs_nearby;
         agent_update_timer.reset();
@@ -11710,10 +11688,9 @@ F32 LLVOAvatar::getTotalGPURenderTime()
 
     F32 ret = 0.f;
 
-    for (LLCharacter* iter : LLCharacter::sInstances)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*) iter;
-        ret += inst->getGPURenderTime();
+        ret += ((LLVOAvatar*)character)->getGPURenderTime();
     }
 
     return ret;
@@ -11725,10 +11702,9 @@ F32 LLVOAvatar::getMaxGPURenderTime()
 
     F32 ret = 0.f;
 
-    for (LLCharacter* iter : LLCharacter::sInstances)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*)iter;
-        ret = llmax(inst->getGPURenderTime(), ret);
+        ret = llmax(((LLVOAvatar*)character)->getGPURenderTime(), ret);
     }
 
     return ret;
@@ -11742,12 +11718,12 @@ F32 LLVOAvatar::getAverageGPURenderTime()
 
     S32 count = 0;
 
-    for (LLCharacter* iter : LLCharacter::sInstances)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* inst = (LLVOAvatar*)iter;
-        if (!inst->isTooSlow())
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isTooSlow())
         {
-            ret += inst->getGPURenderTime();
+            ret += avatar->getGPURenderTime();
             ++count;
         }
     }
@@ -11759,6 +11735,7 @@ F32 LLVOAvatar::getAverageGPURenderTime()
 
     return ret;
 }
+
 bool LLVOAvatar::isBuddy() const
 {
     return LLAvatarTracker::instance().isBuddy(getID());
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 9508d33eb3..40bfa8ec83 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1320,35 +1320,32 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
     }
     // get the list of avatars from the character list first, so distances are correct
     // when agent is above 1020m and other avatars are nearby
-    for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
-        iter != LLCharacter::sInstances.end(); ++iter)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
-
-        if (!pVOAvatar->isDead() && !pVOAvatar->mIsDummy && !pVOAvatar->isOrphaned())
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead() && !avatar->mIsDummy && !avatar->isOrphaned())
         {
-            LLVector3d pos_global = pVOAvatar->getPositionGlobal();
-            LLUUID uuid = pVOAvatar->getID();
+            LLVector3d pos_global = avatar->getPositionGlobal();
+            LLUUID uuid = avatar->getID();
 
             if (!uuid.isNull()
                 && dist_vec_squared(pos_global, relative_to) <= radius_squared)
             {
-                if(positions != NULL)
+                if (positions != NULL)
                 {
                     positions->push_back(pos_global);
                 }
-                if(avatar_ids !=NULL)
+                if (avatar_ids != NULL)
                 {
                     avatar_ids->push_back(uuid);
                 }
             }
         }
     }
+
     // region avatars added for situations where radius is greater than RenderFarClip
-    for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
-        iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+    for (const LLViewerRegion* regionp : LLWorld::getInstance()->getRegionList())
     {
-        LLViewerRegion* regionp = *iter;
         const LLVector3d& origin_global = regionp->getOriginGlobal();
         auto count = regionp->mMapAvatars.size();
         for (size_t i = 0; i < count; i++)
@@ -1371,33 +1368,31 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
     }
 }
 
-F32 LLWorld::getNearbyAvatarsAndMaxGPUTime(std::vector<LLCharacter*> &valid_nearby_avs)
+F32 LLWorld::getNearbyAvatarsAndMaxGPUTime(std::vector<LLVOAvatar*> &valid_nearby_avs)
 {
     static LLCachedControl<F32> render_far_clip(gSavedSettings, "RenderFarClip", 64);
+
     F32 nearby_max_complexity = 0;
     F32 radius = render_far_clip * render_far_clip;
-    std::vector<LLCharacter*>::iterator char_iter = LLCharacter::sInstances.begin();
-    while (char_iter != LLCharacter::sInstances.end())
+
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*char_iter);
-        if (avatar && !avatar->isDead() && !avatar->isControlAvatar())
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (!avatar->isDead() && !avatar->isControlAvatar())
         {
-            if ((dist_vec_squared(avatar->getPositionGlobal(), gAgent.getPositionGlobal()) > radius) &&
-                (dist_vec_squared(avatar->getPositionGlobal(), gAgentCamera.getCameraPositionGlobal()) > radius))
+            if ((dist_vec_squared(avatar->getPositionGlobal(), gAgent.getPositionGlobal()) <= radius) ||
+                (dist_vec_squared(avatar->getPositionGlobal(), gAgentCamera.getCameraPositionGlobal()) <= radius))
             {
-                char_iter++;
-                continue;
-            }
-
-            if (!avatar->isTooSlow())
-            {
-                gPipeline.profileAvatar(avatar);
+                if (!avatar->isTooSlow())
+                {
+                    gPipeline.profileAvatar(avatar);
+                }
+                nearby_max_complexity = llmax(nearby_max_complexity, avatar->getGPURenderTime());
+                valid_nearby_avs.push_back(avatar);
             }
-            nearby_max_complexity = llmax(nearby_max_complexity, avatar->getGPURenderTime());
-            valid_nearby_avs.push_back(*char_iter);
         }
-        char_iter++;
     }
+
     return nearby_max_complexity;
 }
 
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 01f666d19a..dc95a4eff1 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -172,7 +172,7 @@ public:
 
     // profile nearby avatars using gPipeline.profileAvatar and update their render times
     // return max GPU time
-    F32 getNearbyAvatarsAndMaxGPUTime(std::vector<LLCharacter*> &valid_nearby_avs);
+    F32 getNearbyAvatarsAndMaxGPUTime(std::vector<LLVOAvatar*> &valid_nearby_avs);
 
 private:
     void clearHoleWaterObjects();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 056affb68e..2a461ca84b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6438,16 +6438,14 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
         }
     }
 
-    //check all avatar nametags (silly, isn't it?)
-    for (std::vector< LLCharacter* >::iterator iter = LLCharacter::sInstances.begin();
-        iter != LLCharacter::sInstances.end();
-        ++iter)
+    // check all avatar nametags (silly, isn't it?)
+    for (LLCharacter* character : LLCharacter::sInstances)
     {
-        LLVOAvatar* av = (LLVOAvatar*) *iter;
-        if (av->mNameText.notNull()
-            && av->mNameText->lineSegmentIntersect(start, local_end, position))
+        LLVOAvatar* avatar = (LLVOAvatar*)character;
+        if (avatar->mNameText.notNull() &&
+            avatar->mNameText->lineSegmentIntersect(start, local_end, position))
         {
-            drawable = av->mDrawable;
+            drawable = avatar->mDrawable;
             local_end = position;
         }
     }
-- 
cgit v1.2.3


From c4ff0b48898de86b9ee8e198395e16a8429c8aa4 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 19 Jul 2024 20:17:37 +0300
Subject: viewer#2071 Properly handle 'out of memory' for meshes

---
 indra/llcharacter/llkeyframemotion.cpp | 14 ++++++--
 indra/newview/llfloaterbvhpreview.cpp  | 14 ++++++--
 indra/newview/llmeshrepository.cpp     | 60 ++++++++++++++++++++++++++++++----
 indra/newview/llviewerassetupload.cpp  |  7 +++-
 indra/newview/llviewerobject.cpp       |  7 +++-
 5 files changed, 90 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 6c060d7980..6790f1ad56 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -2227,7 +2227,12 @@ bool LLKeyframeMotion::dumpToFile(const std::string& name)
         }
 
         S32 file_size = getFileSize();
-        U8* buffer = new U8[file_size];
+        U8* buffer = new(std::nothrow) U8[file_size];
+        if (!buffer)
+        {
+            LLError::LLUserWarningMsg::showOutOfMemory();
+            LL_ERRS() << "Bad memory allocation for buffer, file: " << name << " " << file_size << LL_ENDL;
+        }
 
         LL_DEBUGS("BVH") << "Dumping " << outfilename << LL_ENDL;
         LLDataPackerBinaryBuffer dp(buffer, file_size);
@@ -2435,7 +2440,12 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid,
             LLFileSystem file(asset_uuid, type, LLFileSystem::READ);
             S32 size = file.getSize();
 
-            U8* buffer = new U8[size];
+            U8* buffer = new(std::nothrow) U8[size];
+            if (!buffer)
+            {
+                LLError::LLUserWarningMsg::showOutOfMemory();
+                LL_ERRS() << "Bad memory allocation for buffer of size: " << size << LL_ENDL;
+            }
             file.read((U8*)buffer, size);   /*Flawfinder: ignore*/
 
             LL_DEBUGS("Animation") << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL;
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 2cb930922a..3d81d01e16 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -285,7 +285,12 @@ bool LLFloaterBvhPreview::postBuild()
 
         // create data buffer for keyframe initialization
         S32 buffer_size = loaderp->getOutputSize();
-        U8* buffer = new U8[buffer_size];
+        U8* buffer = new(std::nothrow) U8[buffer_size];
+        if (!buffer)
+        {
+            LLError::LLUserWarningMsg::showOutOfMemory();
+            LL_ERRS() << "Bad memory allocation for buffer, size: " << buffer_size << LL_ENDL;
+        }
 
         LLDataPackerBinaryBuffer dp(buffer, buffer_size);
 
@@ -992,7 +997,12 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
         LLKeyframeMotion* motionp = (LLKeyframeMotion*)floaterp->mAnimPreview->getDummyAvatar()->findMotion(floaterp->mMotionID);
 
         S32 file_size = motionp->getFileSize();
-        U8* buffer = new U8[file_size];
+        U8* buffer = new(std::nothrow) U8[file_size];
+        if (!buffer)
+        {
+            LLError::LLUserWarningMsg::showOutOfMemory();
+            LL_ERRS() << "Bad memory allocation for buffer, size: " << file_size << LL_ENDL;
+        }
 
         LLDataPackerBinaryBuffer dp(buffer, file_size);
         if (motionp->serialize(dp))
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 1c64ed6822..a1b2d502af 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1360,7 +1360,19 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
-                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
+                    // Not sure what size is reasonable for skin info,
+                    // but if 20MB allocation failed, we definetely have issues
+                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    if (size < MAX_SIZE)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Bad memory allocation for skin info, size: " << size << LL_ENDL;
+                    }
+                    else
+                    {
+                        // Ignore failures for anomalously large data
+                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
+                    }
                     return false;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
@@ -1473,7 +1485,19 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
-                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+                    // Not sure what size is reasonable for decomposition
+                    // but if 20MB allocation failed, we definetely have issues
+                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    if (size < MAX_SIZE)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+                    }
+                    else
+                    {
+                        // Ignore failures for anomalously large decompositiions
+                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+                    }
                     return false;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
@@ -1575,7 +1599,19 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
-                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
+                    // Not sure what size is reasonable for physcis
+                    // but if 20MB allocation failed, we definetely have issues
+                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    if (size < MAX_SIZE)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+                    }
+                    else
+                    {
+                        // Ignore failures for anomalously large meshes
+                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+                    }
                     return false;
                 }
                 file.read(buffer, size);
@@ -1766,9 +1802,21 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
-                    LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
-                    // todo: for now it will result in indefinite constant retries, should result in timeout
-                    // or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
+                    // Not sure what size is reasonable for a mesh,
+                    // but if 20MB allocation failed, we definetely have issues
+                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    if (size < MAX_SIZE)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
+                    }
+                    else
+                    {
+                        // Ignore failures for anomalously large data
+                        LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
+                        // todo: for now it will result in indefinite constant retries, should result in timeout
+                        // or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
+                    }
                     return false;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 50128d826a..b74b48b9f6 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -479,7 +479,12 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
         else
         {
             S32 size = LLAPRFile::size(getFileName());
-            U8* buffer = new U8[size];
+            U8* buffer = new(std::nothrow) U8[size];
+            if (!buffer)
+            {
+                LLError::LLUserWarningMsg::showOutOfMemory();
+                LL_ERRS() << "Bad memory allocation for buffer, size: " << size << LL_ENDL;
+            }
             S32 size_read = infile.read(buffer,size);
             if (size_read != size)
             {
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 094d866bc1..fd85d75d98 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1521,7 +1521,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
                 S32 size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ExtraParams);
                 if (size > 0)
                 {
-                    U8 *buffer = new U8[size];
+                    U8 *buffer = new(std::nothrow) U8[size];
+                    if (!buffer)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Bad memory allocation for buffer, size: " << size << LL_ENDL;
+                    }
                     mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ExtraParams, buffer, size, block_num);
                     LLDataPackerBinaryBuffer dp(buffer, size);
 
-- 
cgit v1.2.3


From c5d2e92089344b115d657eb23487144cb3d9842a Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 29 Jul 2024 11:00:05 +0300
Subject: viewer#2071 Soft quit on 'out of memory' for meshes #2

---
 indra/newview/llappviewer.cpp      | 35 +++++++++++++++++--
 indra/newview/llappviewer.h        |  7 ++++
 indra/newview/llmeshrepository.cpp | 70 +++++++++++++++-----------------------
 3 files changed, 67 insertions(+), 45 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b380b09129..d25762f561 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -646,6 +646,7 @@ LLAppViewer::LLAppViewer()
     mSavedFinalSnapshot(false),
     mSavePerAccountSettings(false),     // don't save settings on logout unless login succeeded.
     mQuitRequested(false),
+    mClosingFloaters(false),
     mLogoutRequestSent(false),
     mLastAgentControlFlags(0),
     mLastAgentForceUpdate(0),
@@ -4028,6 +4029,7 @@ void LLAppViewer::requestQuit()
     {
         // application is quitting
         gFloaterView->closeAllChildren(true);
+        mClosingFloaters = true;
     }
 
     // Send preferences once, when exiting
@@ -4091,6 +4093,7 @@ void LLAppViewer::abortQuit()
 {
     LL_INFOS() << "abortQuit()" << LL_ENDL;
     mQuitRequested = false;
+    mClosingFloaters = false;
 }
 
 void LLAppViewer::migrateCacheDirectory()
@@ -5040,10 +5043,19 @@ void LLAppViewer::idleShutdown()
     }
 
     // Wait for all floaters to get resolved
-    if (gFloaterView
-        && !gFloaterView->allChildrenClosed())
+    if (gFloaterView)
     {
-        return;
+        if (!mClosingFloaters)
+        {
+            // application is quitting
+            gFloaterView->closeAllChildren(true);
+            mClosingFloaters = true;
+            return;
+        }
+        if (!gFloaterView->allChildrenClosed())
+        {
+            return;
+        }
     }
 
     // ProductEngine: Try moving this code to where we shut down sTextureCache in cleanup()
@@ -5204,6 +5216,23 @@ void LLAppViewer::postToMainCoro(const LL::WorkQueue::Work& work)
     gMainloopWork.post(work);
 }
 
+void LLAppViewer::outOfMemorySoftQuit()
+{
+    if (!mQuitRequested)
+    {
+        // Todo:
+        // Find a way to free at least some memory to make it safer
+        // Pause decoding and mesh repositorie
+        getTextureCache()->pause();
+        getTextureFetch()->pause();
+        LLLFSThread::sLocal->pause();
+        gLogoutTimer.reset();
+        mQuitRequested = true;
+
+        LLError::LLUserWarningMsg::showOutOfMemory();
+    }
+}
+
 void LLAppViewer::idleNameCache()
 {
     // Neither old nor new name cache can function before agent has a region
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 417ab0fa00..cf5f1ab1e3 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -230,6 +230,12 @@ public:
     // post given work to the "mainloop" work queue for handling on the main thread
     void postToMainCoro(const LL::WorkQueue::Work& work);
 
+    // Attempt a 'soft' quit with disconnect and saving of settings/cache.
+    // Intended to be thread safe.
+    // Good chance of viewer crashing either way, but better than alternatives.
+    // Note: mQuitRequested can be aborted by user.
+    void outOfMemorySoftQuit();
+
 protected:
     virtual bool initWindow(); // Initialize the viewer's window.
     virtual void initLoggingAndGetLastDuration(); // Initialize log files, logging system
@@ -317,6 +323,7 @@ private:
     boost::optional<U32> mForceGraphicsLevel;
 
     bool mQuitRequested;                // User wants to quit, may have modified documents open.
+    bool mClosingFloaters;
     bool mLogoutRequestSent;            // Disconnect message sent to simulator, no longer safe to send messages to the sim.
     U32 mLastAgentControlFlags;
     F32 mLastAgentForceUpdate;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index a1b2d502af..4c5cc37766 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1360,20 +1360,18 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
+                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
+
                     // Not sure what size is reasonable for skin info,
                     // but if 20MB allocation failed, we definetely have issues
-                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    const S32 MAX_SIZE = 30 * 1024 * 1024; //30MB
                     if (size < MAX_SIZE)
                     {
-                        LLError::LLUserWarningMsg::showOutOfMemory();
-                        LL_ERRS() << "Bad memory allocation for skin info, size: " << size << LL_ENDL;
-                    }
-                    else
-                    {
-                        // Ignore failures for anomalously large data
-                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
-                    }
-                    return false;
+                        LLAppViewer::instance()->outOfMemorySoftQuit();
+                    } // else ignore failures for anomalously large data
+                    LLMutexLock locker(mMutex);
+                    mSkinUnavailableQ.emplace_back(mesh_id);
+                    return true;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
                 ++LLMeshRepository::sCacheReads;
@@ -1485,20 +1483,16 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
+                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+
                     // Not sure what size is reasonable for decomposition
                     // but if 20MB allocation failed, we definetely have issues
-                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    const S32 MAX_SIZE = 30 * 1024 * 1024; //30MB
                     if (size < MAX_SIZE)
                     {
-                        LLError::LLUserWarningMsg::showOutOfMemory();
-                        LL_ERRS() << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
-                    }
-                    else
-                    {
-                        // Ignore failures for anomalously large decompositiions
-                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
-                    }
-                    return false;
+                        LLAppViewer::instance()->outOfMemorySoftQuit();
+                    } // else ignore failures for anomalously large decompositiions
+                    return true;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
                 ++LLMeshRepository::sCacheReads;
@@ -1599,20 +1593,16 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
+                    LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+
                     // Not sure what size is reasonable for physcis
                     // but if 20MB allocation failed, we definetely have issues
-                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    const S32 MAX_SIZE = 30 * 1024 * 1024; //30MB
                     if (size < MAX_SIZE)
                     {
-                        LLError::LLUserWarningMsg::showOutOfMemory();
-                        LL_ERRS() << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
-                    }
-                    else
-                    {
-                        // Ignore failures for anomalously large meshes
-                        LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
-                    }
-                    return false;
+                        LLAppViewer::instance()->outOfMemorySoftQuit();
+                    } // else ignore failures for anomalously large data
+                    return true;
                 }
                 file.read(buffer, size);
 
@@ -1802,22 +1792,18 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
                 U8* buffer = new(std::nothrow) U8[size];
                 if (!buffer)
                 {
+                    LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
+
                     // Not sure what size is reasonable for a mesh,
                     // but if 20MB allocation failed, we definetely have issues
-                    const S32 MAX_SIZE = 20 * 1024 * 1024; //20MB
+                    const S32 MAX_SIZE = 30 * 1024 * 1024; //30MB
                     if (size < MAX_SIZE)
                     {
-                        LLError::LLUserWarningMsg::showOutOfMemory();
-                        LL_ERRS() << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
-                    }
-                    else
-                    {
-                        // Ignore failures for anomalously large data
-                        LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
-                        // todo: for now it will result in indefinite constant retries, should result in timeout
-                        // or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
-                    }
-                    return false;
+                        LLAppViewer::instance()->outOfMemorySoftQuit();
+                    } // else ignore failures for anomalously large data
+                    LLMutexLock lock(mMutex);
+                    mUnavailableQ.push_back(LODRequest(mesh_params, lod));
+                    return true;
                 }
                 LLMeshRepository::sCacheBytesRead += size;
                 ++LLMeshRepository::sCacheReads;
-- 
cgit v1.2.3


From b6e90adb5624558ebc04543042f053dc32e79ff3 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 29 Jul 2024 18:50:30 +0300
Subject: small adjustment to reduce confusion

---
 indra/newview/llappviewer.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d25762f561..f2023565fc 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2249,7 +2249,9 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
     if (level == LLError::LEVEL_ERROR)
     {
 #ifndef LL_RELEASE_FOR_DOWNLOAD
-        OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
+        std::string message = error_string +
+            "\n\n\nThis is a developer-only notification!\nThis notification won't be present in Release for download build";
+        OSMessageBox(message, LLTrans::getString("MBFatalError"), OSMB_OK);
 #endif
 
         gDebugInfo["FatalMessage"] = error_string;
-- 
cgit v1.2.3


From 9e4cc30b298c32b0a90fa311560c2b43c9648bb1 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 29 Jul 2024 21:19:57 +0300
Subject: viewer#2142 Crash at LLOutfitGalleryItem::setDefaultImage

---
 indra/newview/llinventorygallery.cpp | 104 ++++++++++++++++++++---------------
 indra/newview/llinventorygallery.h   |   1 +
 indra/newview/lloutfitgallery.cpp    |  44 ++++++++++++---
 indra/newview/lloutfitgallery.h      |   3 +-
 4 files changed, 101 insertions(+), 51 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 98b3707457..2ca122c955 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -221,9 +221,10 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id)
 
     for (const LLUUID& id : mSelectedItemIDs)
     {
-        if (mItemMap[id])
+        LLInventoryGalleryItem* item = getItem(id);
+        if (item)
         {
-            mItemMap[id]->setSelected(false);
+            item->setSelected(false);
         }
     }
 
@@ -348,7 +349,7 @@ void LLInventoryGallery::initGallery()
         mScrollPanel->addChild(mGalleryPanel);
         for (int i = 0; i < n; i++)
         {
-            addToGallery(mItemMap[cats[i]]);
+            addToGallery(getItem(cats[i]));
         }
         reArrangeRows();
         mGalleryCreated = true;
@@ -656,6 +657,16 @@ LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, L
     return gitem;
 }
 
+LLInventoryGalleryItem* LLInventoryGallery::getItem(const LLUUID& id) const
+{
+    auto it = mItemMap.find(id);
+    if (it != mItemMap.end())
+    {
+        return it->second;
+    }
+    return nullptr;
+}
+
 void LLInventoryGallery::buildGalleryPanel(int row_count)
 {
     LLPanel::Params params;
@@ -1006,14 +1017,15 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id)
         thumbnail_id = getOutfitImageID(item_id);
     }
 
-    if (mItemMap[item_id])
+    LLInventoryGalleryItem* item = getItem(item_id);
+    if (item)
     {
-        mItemMap[item_id]->setLoadImmediately(mLoadThumbnailsImmediately);
-        mItemMap[item_id]->setThumbnail(thumbnail_id);
+        item->setLoadImmediately(mLoadThumbnailsImmediately);
+        item->setThumbnail(thumbnail_id);
 
-        bool passes_filter = checkAgainstFilters(mItemMap[item_id], mFilterSubString);
-        if((mItemMap[item_id]->isHidden() && passes_filter)
-           || (!mItemMap[item_id]->isHidden() && !passes_filter))
+        bool passes_filter = checkAgainstFilters(item, mFilterSubString);
+        if((item->isHidden() && passes_filter)
+           || (!item->isHidden() && !passes_filter))
         {
             reArrangeRows();
         }
@@ -1169,7 +1181,7 @@ void LLInventoryGallery::moveUp(MASK mask)
 
     if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
     {
-        LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+        LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
         if (item)
         {
             if (mask == MASK_NONE || mask == MASK_CONTROL)
@@ -1214,7 +1226,7 @@ void LLInventoryGallery::moveDown(MASK mask)
 
     if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
     {
-        LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+        LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
         if (item)
         {
             if (mask == MASK_NONE || mask == MASK_CONTROL)
@@ -1259,11 +1271,7 @@ void LLInventoryGallery::moveLeft(MASK mask)
 
     if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
     {
-        LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
-        if (mask == MASK_SHIFT)
-        {
-            item = mItemMap[mLastInteractedUUID];
-        }
+        LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
         if (item)
         {
             // Might be better to get item from panel
@@ -1307,7 +1315,7 @@ void LLInventoryGallery::moveRight(MASK mask)
 
     if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
     {
-        LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+        LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
         if (item)
         {
             S32 n = mItemIndexMap[item];
@@ -1373,8 +1381,8 @@ void LLInventoryGallery::toggleSelectionRangeFromLast(const LLUUID target)
     {
         return;
     }
-    LLInventoryGalleryItem* last_item = mItemMap[mLastInteractedUUID];
-    LLInventoryGalleryItem* next_item = mItemMap[target];
+    LLInventoryGalleryItem* last_item = getItem(mLastInteractedUUID);
+    LLInventoryGalleryItem* next_item = getItem(target);
     if (last_item && next_item)
     {
         S32 last_idx = mItemIndexMap[last_item];
@@ -1417,9 +1425,10 @@ void LLInventoryGallery::onFocusLost()
 
     for (const LLUUID& id : mSelectedItemIDs)
     {
-        if (mItemMap[id])
+        LLInventoryGalleryItem* item = getItem(id);
+        if (item)
         {
-            mItemMap[id]->setSelected(false);
+            item->setSelected(false);
         }
     }
 }
@@ -1435,9 +1444,10 @@ void LLInventoryGallery::onFocusReceived()
         LLInventoryGalleryItem* focus_item = NULL;
         for (const LLUUID& id : mSelectedItemIDs)
         {
-            if (mItemMap[id] && !mItemMap[id]->isHidden())
+            LLInventoryGalleryItem* item = getItem(id);
+            if (item && !item->isHidden())
             {
-                focus_item = mItemMap[id];
+                focus_item = item;
                 focus_item->setSelected(true);
             }
         }
@@ -1478,9 +1488,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
 {
     for (const LLUUID& id : mSelectedItemIDs)
     {
-        if (mItemMap[id])
+        LLInventoryGalleryItem* item = getItem(id);
+        if (item)
         {
-            mItemMap[id]->setSelected(false);
+            item->setSelected(false);
         }
     }
     mSelectedItemIDs.clear();
@@ -1499,9 +1510,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
         return;
     }
 
-    if (mItemMap[item_id])
+    LLInventoryGalleryItem* item = getItem(item_id);
+    if (item)
     {
-        mItemMap[item_id]->setSelected(true);
+        item->setSelected(true);
     }
     mSelectedItemIDs.push_back(item_id);
     signalSelectionItemID(item_id);
@@ -1527,9 +1539,10 @@ void LLInventoryGallery::addItemSelection(const LLUUID& item_id, bool scroll_to_
         return;
     }
 
-    if (mItemMap[item_id])
+    LLInventoryGalleryItem* item = getItem(item_id);
+    if (item)
     {
-        mItemMap[item_id]->setSelected(true);
+        item->setSelected(true);
     }
     mSelectedItemIDs.push_back(item_id);
     signalSelectionItemID(item_id);
@@ -1552,18 +1565,20 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
     selection_deque::iterator found = std::find(mSelectedItemIDs.begin(), mSelectedItemIDs.end(), item_id);
     if (found != mSelectedItemIDs.end())
     {
-        if (mItemMap[item_id])
+        LLInventoryGalleryItem* item = getItem(item_id);
+        if (item)
         {
-            mItemMap[item_id]->setSelected(false);
+            item->setSelected(false);
         }
         mSelectedItemIDs.erase(found);
         result = false;
     }
     else
     {
-        if (mItemMap[item_id])
+        LLInventoryGalleryItem* item = getItem(item_id);
+        if (item)
         {
-            mItemMap[item_id]->setSelected(true);
+            item->setSelected(true);
         }
         mSelectedItemIDs.push_back(item_id);
         signalSelectionItemID(item_id);
@@ -1580,7 +1595,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
 
 void LLInventoryGallery::scrollToShowItem(const LLUUID& item_id)
 {
-    LLInventoryGalleryItem* item = mItemMap[item_id];
+    LLInventoryGalleryItem* item = getItem(item_id);
     if(item)
     {
         const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect();
@@ -1610,7 +1625,7 @@ LLInventoryGalleryItem* LLInventoryGallery::getFirstSelectedItem()
     if (mSelectedItemIDs.size() > 0)
     {
         selection_deque::iterator iter = mSelectedItemIDs.begin();
-        return mItemMap[*iter];
+        return getItem(*iter);
     }
     return NULL;
 }
@@ -1768,9 +1783,10 @@ void LLInventoryGallery::paste()
     {
         for (const LLUUID& id : mSelectedItemIDs)
         {
-            if (mItemMap[id])
+            LLInventoryGalleryItem* item = getItem(id);
+            if (item)
             {
-                mItemMap[id]->setSelected(false);
+                item->setSelected(false);
             }
         }
         mSelectedItemIDs.clear();
@@ -2108,9 +2124,10 @@ void LLInventoryGallery::pasteAsLink()
     {
         for (const LLUUID& id : mSelectedItemIDs)
         {
-            if (mItemMap[id])
+            LLInventoryGalleryItem* item = getItem(id);
+            if (item)
             {
-                mItemMap[id]->setSelected(false);
+                item->setSelected(false);
             }
         }
         mSelectedItemIDs.clear();
@@ -2433,10 +2450,10 @@ void LLInventoryGallery::onGesturesChanged()
 void LLInventoryGallery::deselectItem(const LLUUID& category_id)
 {
     // Reset selection if the item is selected.
-    LLInventoryGalleryItem* item = mItemMap[category_id];
+    LLInventoryGalleryItem* item = getItem(category_id);
     if (item && item->isSelected())
     {
-        mItemMap[category_id]->setSelected(false);
+        item->setSelected(false);
         setFocus(true);
         // Todo: support multiselect
         // signalSelectionItemID(LLUUID::null);
@@ -2453,9 +2470,10 @@ void LLInventoryGallery::clearSelection()
 {
     for (const LLUUID& id: mSelectedItemIDs)
     {
-        if (mItemMap[id])
+        LLInventoryGalleryItem* item = getItem(id);
+        if (item)
         {
-            mItemMap[id]->setSelected(false);
+            item->setSelected(false);
         }
     }
     if (!mSelectedItemIDs.empty())
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index afc7bdc9f8..59d08d19ed 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -228,6 +228,7 @@ private:
     void updateGalleryWidth();
 
     LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn);
+    LLInventoryGalleryItem* getItem(const LLUUID& id) const;
 
     void buildGalleryPanel(int row_count);
     void reshapeGalleryPanel(int row_count);
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 7482890d1e..f889a4439e 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -128,7 +128,7 @@ void LLOutfitGallery::onOpen(const LLSD& info)
         mScrollPanel->addChild(mGalleryPanel);
         for (int i = 0; i < n; i++)
         {
-            addToGallery(mOutfitMap[cats[i]]);
+            addToGallery(getItem(cats[i]));
         }
         reArrangeRows();
         mGalleryCreated = true;
@@ -377,7 +377,7 @@ void LLOutfitGallery::onOutfitsRemovalConfirmation(const LLSD& notification, con
 
 void LLOutfitGallery::scrollToShowItem(const LLUUID& item_id)
 {
-    LLOutfitGalleryItem* item = mOutfitMap[item_id];
+    LLOutfitGalleryItem* item = getItem(item_id);
     if (item)
     {
         const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect();
@@ -525,6 +525,10 @@ LLPanel* LLOutfitGallery::addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item
 
 void LLOutfitGallery::addToGallery(LLOutfitGalleryItem* item)
 {
+    if (!item)
+    {
+        return;
+    }
     if(item->isHidden())
     {
         mHiddenItems.push_back(item);
@@ -632,9 +636,19 @@ LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name, LLUUID
     return gitem;
 }
 
-LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem()
+LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem() const
+{
+    return getItem(mSelectedOutfitUUID);
+}
+
+LLOutfitGalleryItem* LLOutfitGallery::getItem(const LLUUID& id) const
 {
-    return mOutfitMap[mSelectedOutfitUUID];
+    auto it = mOutfitMap.find(id);
+    if (it != mOutfitMap.end())
+    {
+        return it->second;
+    }
+    return nullptr;
 }
 
 void LLOutfitGallery::buildGalleryPanel(int row_count)
@@ -1275,7 +1289,15 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
                 }
                 if (asset_id.notNull())
                 {
-                    photo_loaded |= mOutfitMap[category_id]->setImageAssetId(asset_id);
+                    LLOutfitGalleryItem* item = getItem(category_id);
+                    if (item)
+                    {
+                        photo_loaded |= item->setImageAssetId(asset_id);
+                    }
+                    else
+                    {
+                        photo_loaded = true;
+                    }
                     // Rename links
                     if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == item_name)
                     {
@@ -1301,13 +1323,21 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
                 }
                 if (!photo_loaded)
                 {
-                    mOutfitMap[category_id]->setDefaultImage();
+                    LLOutfitGalleryItem* item = getItem(category_id);
+                    if (item)
+                    {
+                        item->setDefaultImage();
+                    }
                 }
             }
         }
         else
         {
-            mOutfitMap[category_id]->setImageAssetId(asset_id);
+            LLOutfitGalleryItem* item = getItem(category_id);
+            if (item)
+            {
+                item->setImageAssetId(asset_id);
+            }
         }
     }
 
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 5b2a33d0ca..fa441ff209 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -135,7 +135,8 @@ private:
     void updateGalleryWidth();
 
     LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id);
-    LLOutfitGalleryItem* getSelectedItem();
+    LLOutfitGalleryItem* getSelectedItem() const;
+    LLOutfitGalleryItem* getItem(const LLUUID& id) const;
 
     void onTextureSelectionChanged(LLInventoryItem* itemp);
 
-- 
cgit v1.2.3


From 34cc2de079db3a267e0880c04b6b4c14611a5403 Mon Sep 17 00:00:00 2001
From: Zi Ree <81702435+zi-ree@users.noreply.github.com>
Date: Mon, 29 Jul 2024 18:20:25 +0200
Subject: fix another misleading indentation compiler warning

Fix indentation mistake that trips gcc's misleading indentation warning.
---
 indra/llxml/llxmltree.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index 0ace1baf2a..164b3156e1 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -111,11 +111,11 @@ LLXmlTreeNode::~LLXmlTreeNode()
     attribute_map_t::iterator iter;
     for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++)
         delete iter->second;
-        for(LLXmlTreeNode* node : mChildren)
-        {
-            delete node;
-        }
-        mChildren.clear();
+    for(LLXmlTreeNode* node : mChildren)
+    {
+        delete node;
+    }
+    mChildren.clear();
 }
 
 void LLXmlTreeNode::dump( const std::string& prefix )
-- 
cgit v1.2.3


From 0c70d3c616320ae6e3f22935b0fd997133b0e0ec Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 30 Jul 2024 10:53:38 -0400
Subject: Cache LLVOAvatar::isBuddy check to reduce repeated calls to
 LLAvatarTracker::isBuddy during draw (#2149)

---
 indra/newview/llvoavatar.cpp | 26 ++++++++++++++++++++------
 indra/newview/llvoavatar.h   |  2 ++
 2 files changed, 22 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6e6ad485cf..0fd8f8a98b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3395,7 +3395,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
     {
         is_muted = isInMuteList();
     }
-    bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
+    bool is_friend = isBuddy();
     bool is_cloud = getIsCloud();
 
     if (is_appearance != mNameAppearance)
@@ -8452,7 +8452,7 @@ bool LLVOAvatar::isTooComplex() const
 {
     bool too_complex;
     static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
-    bool render_friend =  (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
+    bool render_friend =  (isBuddy() && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
 
     if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
     {
@@ -8488,7 +8488,7 @@ bool LLVOAvatar::isTooSlow() const
 
     static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
     static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);
-    bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
+    bool is_friend = isBuddy();
     bool render_friend = is_friend && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
 
     if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
@@ -8545,7 +8545,7 @@ void LLVOAvatar::updateTooSlow()
         if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap
         {
             bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
-            bool render_friend_or_exception =   (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) ||
+            bool render_friend_or_exception =   (always_render_friends && isBuddy()) ||
                 ( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER );
             if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception)
             {
@@ -11489,7 +11489,7 @@ void LLVOAvatar::calcMutedAVColor()
         new_color = LLColor4::grey4;
         change_msg = " not rendered: color is grey4";
     }
-    else if (LLMuteList::getInstance()->isMuted(av_id)) // the user blocked them
+    else if (isInMuteList()) // the user blocked them
     {
         // blocked avatars are dark grey
         new_color = LLColor4::grey4;
@@ -11738,6 +11738,20 @@ F32 LLVOAvatar::getAverageGPURenderTime()
 
 bool LLVOAvatar::isBuddy() const
 {
-    return LLAvatarTracker::instance().isBuddy(getID());
+    bool is_friend = false;
+    F64 now = LLFrameTimer::getTotalSeconds();
+    if (now < mCachedBuddyListUpdateTime)
+    {
+        is_friend = mCachedInBuddyList;
+    }
+    else
+    {
+        is_friend = LLAvatarTracker::instance().isBuddy(getID());
+
+        const F64 SECONDS_BETWEEN_BUDDY_UPDATES = 1;
+        mCachedBuddyListUpdateTime = now + SECONDS_BETWEEN_BUDDY_UPDATES;
+        mCachedInBuddyList = is_friend;
+    }
+    return is_friend;
 }
 
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 1ca8b81553..2144be1ba5 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -587,6 +587,8 @@ private:
 
     mutable bool        mCachedInMuteList;
     mutable F64         mCachedMuteListUpdateTime;
+    mutable bool        mCachedInBuddyList = false;
+    mutable F64         mCachedBuddyListUpdateTime = 0.0;
 
     VisualMuteSettings      mVisuallyMuteSetting;           // Always or never visually mute this AV
 
-- 
cgit v1.2.3


From c3b678276dadb7aded8e8aeb3742524766f5ad8a Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 30 Jul 2024 18:57:46 +0300
Subject: viewer#2144 Correct unclear terminilogy in region's debug panel

---
 indra/newview/skins/default/xui/en/panel_region_debug.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index 04a510d4e8..be8468a15c 100644
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -140,7 +140,7 @@
      layout="topleft"
      left_delta="0"
      name="return_other_land"
-     tool_tip="Return only objects which are on land belonging to someone else"
+     tool_tip="Return only objects which are on land that isn't owned by selected user"
      top_delta="20"
      width="80" />
     <check_box
-- 
cgit v1.2.3


From beb177bb23af4885b2a6f16798a62d1ca9ac0a02 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 31 Jul 2024 17:26:27 +0300
Subject: viewer#2153 Crash at LLViewerTextureList::updateImageDecodePriority

Crash at getTextureEntry which calls getTE(mTEOffset)
---
 indra/newview/llviewertexturelist.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d31c53d000..115934282f 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -948,7 +948,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                 // shows one letter at a time
                 //
                 // Maximum usage examples: huge chunk of terrain repeats texture
-                const LLTextureEntry* te = face->getTextureEntry();
+                S32 te_offset = face->getTEOffset();  // offset is -1 if not inited
+                LLViewerObject* objp = face->getViewerObject();
+                const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
                 F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
                 min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
                 vsize /= min_scale;
-- 
cgit v1.2.3


From 06ce9ac80217623beae8498bb93bd73def7008aa Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 31 Jul 2024 20:14:24 +0300
Subject: viewer#2157 Toolbar's drop position indicator does not appear

---
 indra/llui/lltoolbar.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index aa48ae048f..5955a28fa3 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -1073,7 +1073,7 @@ bool LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
             int orig_rank = getRankFromPosition(dragged_command);
             mDragRank = getRankFromPosition(x, y);
             // Don't DaD if we're dragging a command on itself
-            mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank - 1) == orig_rank)));
+            mDragAndDropTarget = (orig_rank == RANK_NONE) || ((mDragRank != orig_rank) && ((mDragRank - 1) != orig_rank));
             //LL_INFOS() << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << LL_ENDL;
             /* Do the following if you want to animate the button itself
             LLCommandId dragged_command(inv_item->getUUID());
-- 
cgit v1.2.3


From 8f6e623a5fa7df3195da5ecd0ee32867185120c8 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 1 Aug 2024 12:40:10 +0300
Subject: viewer#2163 Crash at getReflectionProbeIsDynamic

---
 indra/newview/llreflectionmap.cpp | 4 ++--
 indra/newview/llviewerobject.h    | 4 ++++
 indra/newview/llvovolume.h        | 8 ++++----
 3 files changed, 10 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 31fd6f3f07..8d164b6883 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -220,7 +220,7 @@ F32 LLReflectionMap::getNearClip()
 
     if (mViewerObject && mViewerObject->getVolume())
     {
-        ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip();
+        ret = mViewerObject->getReflectionProbeNearClip();
     }
     else if (mGroup)
     {
@@ -240,7 +240,7 @@ bool LLReflectionMap::getIsDynamic()
         mViewerObject &&
         mViewerObject->getVolume())
     {
-        return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic();
+        return mViewerObject->getReflectionProbeIsDynamic();
     }
 
     return false;
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 09584d22a8..b6846c6716 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -266,7 +266,11 @@ public:
     virtual bool isRiggedMesh() const               { return false; }
     virtual bool hasLightTexture() const            { return false; }
     virtual bool isReflectionProbe() const          { return false; }
+    virtual F32 getReflectionProbeAmbiance() const  { return 0.f; }
+    virtual F32 getReflectionProbeNearClip() const  { return 0.f; }
     virtual bool getReflectionProbeIsBox() const    { return false; }
+    virtual bool getReflectionProbeIsDynamic() const { return false; };
+    virtual bool getReflectionProbeIsMirror() const { return false; };
 
     // This method returns true if the object is over land owned by
     // the agent, one of its groups, or it encroaches and
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 07e02e042c..6241bf42d6 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -304,11 +304,11 @@ public:
     bool setReflectionProbeIsMirror(bool is_mirror);
 
     bool isReflectionProbe() const override;
-    F32 getReflectionProbeAmbiance() const;
-    F32 getReflectionProbeNearClip() const;
+    F32 getReflectionProbeAmbiance() const override;
+    F32 getReflectionProbeNearClip() const override;
     bool getReflectionProbeIsBox() const override;
-    bool getReflectionProbeIsDynamic() const;
-    bool getReflectionProbeIsMirror() const;
+    bool getReflectionProbeIsDynamic() const override;
+    bool getReflectionProbeIsMirror() const override;
 
     // Flexible Objects
     U32 getVolumeInterfaceID() const;
-- 
cgit v1.2.3


From 86668633c30c711b44dd5a16f98b9ac056f706b5 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 21 Jul 2024 19:18:13 -0400
Subject: Fix failure to join or detach threads causing rare shutdown
 termination

---
 indra/llcommon/llthread.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra')

diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 9eb92ca6a1..e5d25b52f0 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -269,6 +269,7 @@ void LLThread::shutdown()
             mStatus = STOPPED;
             return;
         }
+        delete mThreadp;
         mThreadp = NULL;
     }
 
@@ -299,6 +300,7 @@ void LLThread::start()
     {
         mThreadp = new std::thread(std::bind(&LLThread::threadRun, this));
         mNativeHandle = mThreadp->native_handle();
+        mThreadp->detach();
     }
     catch (std::system_error& ex)
     {
-- 
cgit v1.2.3


From 0723308c9c041533953b45fe62686e9f483ce360 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 31 Jul 2024 23:54:45 -0400
Subject: Fix emojipicker floater group buttons leaking and xui warning

---
 indra/newview/llfloateremojipicker.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 30f58aaeec..0830860633 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -429,6 +429,7 @@ void LLFloaterEmojiPicker::fillGroups()
     for (LLButton* button : mGroupButtons)
     {
         mGroups->removeChild(button);
+        button->die();
     }
     mFilteredEmojiGroups.clear();
     mFilteredEmojis.clear();
@@ -442,6 +443,7 @@ void LLFloaterEmojiPicker::fillGroups()
     rect.mBottom = mBadge->getRect().getHeight();
 
     // Create button for "All categories"
+    params.name = "all_categories";
     createGroupButton(params, rect, ALL_EMOJIS_IMAGE_INDEX);
 
     // Create group and button for "Recently used" and/or "Frequently used"
@@ -455,6 +457,7 @@ void LLFloaterEmojiPicker::fillGroups()
         {
             mFilteredEmojiGroups.push_back(USED_EMOJIS_GROUP_INDEX);
             mFilteredEmojis.emplace_back(cats);
+            params.name = "used_categories";
             createGroupButton(params, rect, USED_EMOJIS_IMAGE_INDEX);
         }
     }
@@ -472,6 +475,7 @@ void LLFloaterEmojiPicker::fillGroups()
         {
             mFilteredEmojiGroups.push_back(i);
             mFilteredEmojis.emplace_back(cats);
+            params.name = "group_" + std::to_string(i);
             createGroupButton(params, rect, groups[i].Character);
         }
     }
-- 
cgit v1.2.3


From 4217a778d68722735975f360c9be25655cf0e696 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 1 Aug 2024 00:38:58 -0400
Subject: Fix excessive wstring conversions during emojipicker draw

---
 indra/newview/llfloateremojipicker.cpp | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 0830860633..50f71c9c0b 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -186,7 +186,7 @@ public:
     {
         mWStr = LLWString(1, emoji);
         mEmoji = emoji;
-        mTitle = title;
+        mTitle = utf8str_to_wstring(title);
         mBegin = begin;
         mEnd = end;
     }
@@ -204,9 +204,9 @@ public:
         drawIcon(centerX, centerY - 1, iconWidth);
 
         static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
-        LLColor4 textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
+        static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
         S32 max_pixels = clientWidth - iconWidth;
-        drawName((F32)iconWidth, centerY, max_pixels, textColor);
+        drawName((F32)iconWidth, centerY, max_pixels, textColor.get());
     }
 
 protected:
@@ -226,16 +226,16 @@ protected:
             max_pixels);                // max_pixels
     }
 
-    void drawName(F32 x, F32 y, S32 max_pixels, LLColor4& color)
+    void drawName(F32 x, F32 y, S32 max_pixels, const LLColor4& color)
     {
         F32 x0 = x;
         F32 x1 = (F32)max_pixels;
         LLFontGL* font = LLFontGL::getFontEmojiLarge();
         if (mBegin)
         {
-            std::string text = mTitle.substr(0, mBegin);
-            font->renderUTF8(
-                text,                          // text
+            LLWString text = mTitle.substr(0, mBegin);
+            font->render(
+                text.c_str(),                          // text
                 0,                             // begin_offset
                 x0,                            // x
                 y,                             // y
@@ -246,14 +246,14 @@ protected:
                 LLFontGL::DROP_SHADOW_SOFT,    // shadow
                 static_cast<S32>(text.size()), // max_chars
                 (S32)x1);                      // max_pixels
-            F32 dx = font->getWidthF32(text);
+            F32 dx = font->getWidthF32(text.c_str());
             x0 += dx;
             x1 -= dx;
         }
         if (x1 > 0 && mEnd > mBegin)
         {
-            std::string text = mTitle.substr(mBegin, mEnd - mBegin);
-            font->renderUTF8(
+            LLWString text = mTitle.substr(mBegin, mEnd - mBegin);
+            font->render(
                 text,                          // text
                 0,                             // begin_offset
                 x0,                            // x
@@ -265,14 +265,14 @@ protected:
                 LLFontGL::DROP_SHADOW_SOFT,    // shadow
                 static_cast<S32>(text.size()), // max_chars
                 (S32)x1);                      // max_pixels
-            F32 dx = font->getWidthF32(text);
+            F32 dx = font->getWidthF32(text.c_str());
             x0 += dx;
             x1 -= dx;
         }
         if (x1 > 0 && mEnd < mTitle.size())
         {
-            std::string text = mEnd ? mTitle.substr(mEnd) : mTitle;
-            font->renderUTF8(
+            LLWString text = mEnd ? mTitle.substr(mEnd) : mTitle;
+            font->render(
                 text,                          // text
                 0,                             // begin_offset
                 x0,                            // x
@@ -290,7 +290,7 @@ protected:
 private:
     llwchar mEmoji;
     LLWString mWStr;
-    std::string mTitle;
+    LLWString mTitle;
     size_t mBegin;
     size_t mEnd;
 };
-- 
cgit v1.2.3


From 212b1edd2d4d8ce570331ec6e8e4f87e4f162e34 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 1 Aug 2024 15:50:23 -0400
Subject: Fix trying to bind to non-existent texunit sampler during water draw
 (#2128)

---
 indra/newview/lldrawpoolwater.cpp | 5 -----
 1 file changed, 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 0d4eaab488..53d6e528b6 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -241,8 +241,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
 
         F32 screenRes[] = { 1.f / gGLViewport[2], 1.f / gGLViewport[3] };
 
-        S32 diffTex = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP);
-
         shader->uniform2fv(LLShaderMgr::DEFERRED_SCREEN_RES, 1, screenRes);
         shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
 
@@ -316,8 +314,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
             water = static_cast<LLVOWater*>(face->getViewerObject());
             if (!water) continue;
 
-            gGL.getTexUnit(diffTex)->bind(face->getTexture());
-
             if ((bool)edge == (bool)water->getIsEdgePatch())
             {
                 face->renderIndexed();
@@ -334,7 +330,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
         shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
         shader->disableTexture(LLShaderMgr::WATER_SCREENTEX);
         shader->disableTexture(LLShaderMgr::BUMP_MAP);
-        shader->disableTexture(LLShaderMgr::DIFFUSE_MAP);
         shader->disableTexture(LLShaderMgr::WATER_REFTEX);
 
         // clean up
-- 
cgit v1.2.3


From 793f5ac3411882a53a49916f031090d1b6c72335 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 1 Aug 2024 19:55:16 +0300
Subject: Crash at LLViewerTexture::updateClass()

---
 indra/newview/llviewertexture.cpp     | 4 ++--
 indra/newview/llviewertexturelist.cpp | 4 ++--
 indra/newview/llviewertexturelist.h   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9648a9af18..8faa86876f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -539,9 +539,9 @@ void LLViewerTexture::updateClass()
         LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
         sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
 
-        for (auto image : gTextureList)
+        for (auto& image : gTextureList)
         {
-            gTextureList.updateImageDecodePriority(image);
+            gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/);
         }
     }
 
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 115934282f..865805f9bf 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -904,7 +904,7 @@ void LLViewerTextureList::clearFetchingRequests()
 
 extern bool gCubeSnapshot;
 
-void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep)
+void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images)
 {
     if (imagep->isInDebug() || imagep->isUnremovable())
     {
@@ -993,7 +993,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     // Flush formatted images using a lazy flush
     //
     S32 num_refs = imagep->getNumRefs();
-    if (num_refs == min_refs)
+    if (num_refs == min_refs && flush_images)
     {
         if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
         {
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 075f6ae915..b614753b4f 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -148,7 +148,7 @@ public:
     // - updates decode priority
     // - updates desired discard level
     // - cleans up textures that haven't been referenced in awhile
-    void updateImageDecodePriority(LLViewerFetchedTexture* imagep);
+    void updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images = true);
 
 private:
     F32  updateImagesCreateTextures(F32 max_time);
-- 
cgit v1.2.3


From 68ad61f6f5b6d7e980dd257102e66b7e010604fa Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 2 Aug 2024 06:25:39 -0400
Subject: Update from jpeglib to libjpeg-turbo 3.0.3 (#2161, #2173)

---
 indra/cmake/JPEG.cmake | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index 252d7852d4..ade5a070cc 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -7,12 +7,14 @@ include_guard()
 add_library( ll::libjpeg INTERFACE IMPORTED )
 
 use_system_binary(libjpeg)
-use_prebuilt_binary(jpeglib)
+use_prebuilt_binary(libjpeg-turbo)
 if (LINUX)
-  target_link_libraries( ll::libjpeg INTERFACE jpeg)
+  target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
 elseif (DARWIN)
-  target_link_libraries( ll::libjpeg INTERFACE jpeg)
+  target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
 elseif (WINDOWS)
-  target_link_libraries( ll::libjpeg INTERFACE jpeglib)
+    target_link_libraries( ll::libjpeg INTERFACE
+      debug ${ARCH_PREBUILT_DIRS_DEBUG}/jpeg.lib
+      optimized ${ARCH_PREBUILT_DIRS_RELEASE}/jpeg.lib)
 endif (LINUX)
 target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
-- 
cgit v1.2.3


From 05fd13f89635e02745f96416bc44785863c19dde Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 2 Aug 2024 06:29:28 -0400
Subject: Remove dead pcre library dependency (#2177)

---
 indra/cmake/LLPrimitive.cmake    | 4 ----
 indra/llprimitive/CMakeLists.txt | 1 -
 2 files changed, 5 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 735f5e8052..1e81532551 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -6,7 +6,6 @@ include(Boost)
 
 include_guard()
 
-add_library( ll::pcre INTERFACE IMPORTED )
 add_library( ll::minizip-ng INTERFACE IMPORTED )
 add_library( ll::libxml INTERFACE IMPORTED )
 add_library( ll::colladadom INTERFACE IMPORTED )
@@ -22,11 +21,8 @@ use_system_binary( colladadom )
 
 use_prebuilt_binary(colladadom)
 use_prebuilt_binary(minizip-ng) # needed for colladadom
-use_prebuilt_binary(pcre)
 use_prebuilt_binary(libxml2)
 
-target_link_libraries( ll::pcre INTERFACE pcrecpp pcre )
-
 if (WINDOWS)
     target_link_libraries( ll::minizip-ng INTERFACE libminizip )
 else()
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 972f502aa9..19a43839af 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -70,7 +70,6 @@ target_link_libraries(llprimitive
         llrender
         llphysicsextensions_impl
         ll::colladadom
-        ll::pcre
         ll::glh_linear
         )
 
-- 
cgit v1.2.3


From f08b3f2046e9f72369c36fe39e71ced5d1943e8c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 2 Aug 2024 06:31:11 -0400
Subject: Update to libhunspell 1.7.2-r1 (#2175)

---
 indra/cmake/Copy3rdPartyLibs.cmake |  3 ---
 indra/cmake/Hunspell.cmake         | 13 ++++++++++---
 indra/llui/llspellcheck.cpp        | 26 +++++++-------------------
 indra/newview/CMakeLists.txt       |  1 -
 indra/newview/viewer_manifest.py   |  5 -----
 5 files changed, 17 insertions(+), 31 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c2ba9231cc..2dc9d6080a 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -57,7 +57,6 @@ if(WINDOWS)
         libapr-1.dll
         libaprutil-1.dll
         nghttp2.dll
-        libhunspell.dll
         )
 
     # OpenSSL
@@ -185,7 +184,6 @@ elseif(DARWIN)
         libaprutil-1.0.dylib
         libaprutil-1.dylib
         ${EXPAT_COPY}
-        libhunspell-1.3.0.dylib
         libndofdev.dylib
         libnghttp2.dylib
         libnghttp2.14.dylib
@@ -231,7 +229,6 @@ elseif(LINUX)
                  libatk-1.0.so
                  libfreetype.so.6.6.2
                  libfreetype.so.6
-                 libhunspell-1.3.so.0.0.0
                  libopenjp2.so
                  libuuid.so.16
                  libuuid.so.16.0.22
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index bb037c0237..129679febd 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,4 +1,5 @@
 # -*- cmake -*-
+include(Linking)
 include(Prebuilt)
 
 include_guard()
@@ -8,10 +9,16 @@ add_library( ll::hunspell INTERFACE IMPORTED )
 use_system_binary(hunspell)
 use_prebuilt_binary(libhunspell)
 if (WINDOWS)
-  target_link_libraries( ll::hunspell INTERFACE libhunspell)
+    target_compile_definitions( ll::hunspell INTERFACE HUNSPELL_STATIC=1)
+    target_link_libraries( ll::hunspell INTERFACE
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libhunspell.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell.lib
+        )
 elseif(DARWIN)
-  target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+    target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+        )
 elseif(LINUX)
-  target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+    target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+        )
 endif()
 target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 9d8eadfd3f..16ffd352cf 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -30,12 +30,7 @@
 #include "llsdserialize.h"
 
 #include "llspellcheck.h"
-#if LL_WINDOWS
-    #include <hunspell/hunspelldll.h>
-    #pragma comment(lib, "libhunspell.lib")
-#else
-    #include <hunspell/hunspell.hxx>
-#endif
+#include <hunspell/hunspell.hxx>
 
 static const std::string DICT_DIR = "dictionaries";
 static const std::string DICT_FILE_CUSTOM = "user_custom.dic";
@@ -64,11 +59,11 @@ void LLSpellChecker::initSingleton()
 
 bool LLSpellChecker::checkSpelling(const std::string& word) const
 {
-    if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) )
+    if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word)) )
     {
         return true;
     }
-    if (mIgnoreList.size() > 0)
+    if (!mIgnoreList.empty())
     {
         std::string word_lower(word);
         LLStringUtil::toLower(word_lower);
@@ -85,15 +80,8 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
         return 0;
     }
 
-    char** suggestion_list; int suggestion_cnt = 0;
-    if ( (suggestion_cnt = mHunspell->suggest(&suggestion_list, word.c_str())) != 0 )
-    {
-        for (int suggestion_index = 0; suggestion_index < suggestion_cnt; suggestion_index++)
-        {
-            suggestions.push_back(suggestion_list[suggestion_index]);
-        }
-        mHunspell->free_list(&suggestion_list, suggestion_cnt);
-    }
+    suggestions = mHunspell->suggest(word);
+
     return static_cast<S32>(suggestions.size());
 }
 
@@ -194,7 +182,7 @@ void LLSpellChecker::addToCustomDictionary(const std::string& word)
 {
     if (mHunspell)
     {
-        mHunspell->add(word.c_str());
+        mHunspell->add(word);
     }
     addToDictFile(getDictionaryUserPath() + DICT_FILE_CUSTOM, word);
     sSettingsChangeSignal();
@@ -422,7 +410,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language)
     const LLSD dict_info = getDictionaryData(dict_language);
     return
         (dict_info["user_installed"].asBoolean()) &&
-        ( (!getUseSpellCheck()) || (!LLSpellChecker::instance().isActiveDictionary(dict_language)) );
+        ( (!getUseSpellCheck()) || (!isActiveDictionary(dict_language)) );
 }
 
 void LLSpellChecker::removeDictionary(const std::string& dict_language)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a34354d287..4c5deb4974 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1729,7 +1729,6 @@ if (WINDOWS)
       ${CMAKE_SOURCE_DIR}/../etc/message.xml
       ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
       ${SHARED_LIB_STAGING_DIR}/openjp2.dll
-      ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
       ${SHARED_LIB_STAGING_DIR}/llwebrtc.dll
       #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
       #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a25efc5de4..09397a0989 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -587,9 +587,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
             # HTTP/2
             self.path("nghttp2.dll")
 
-            # Hunspell
-            self.path("libhunspell.dll")
-
             # BugSplat
             if self.args.get('bugsplat'):
                 self.path("BsSndRpt64.exe")
@@ -930,7 +927,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
 
                 with self.prefix(src=relpkgdir, dst=""):
                     self.path("libndofdev.dylib")
-                    self.path("libhunspell-*.dylib")
 
                 with self.prefix(src_dst="cursors_mac"):
                     self.path("*.tif")
@@ -1336,7 +1332,6 @@ class Linux_i686_Manifest(LinuxManifest):
             self.path("libdirectfb-1.4.so.5")
             self.path("libfusion-1.4.so.5")
             self.path("libdirect-1.4.so.5*")
-            self.path("libhunspell-1.3.so*")
             self.path("libalut.so*")
             self.path("libopenal.so*")
             self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
-- 
cgit v1.2.3


From a134e850c1800a0dd5a40ddf714bce94ed0dc7d8 Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Fri, 2 Aug 2024 06:33:00 -0400
Subject: Disable EmojiHelper if Digit before Colon (#2178)

* Disable EmojiHelper if Digit before Colon

Typing in times with the new emoji helper pop-up can be frustrating, so I would like to propose disabling it when there is a number before the colon.

* Remove trailing space in indra/llui/llemojihelper.cpp

---------

Co-authored-by: Andrey Lihatskiy <alihatskiy@productengine.com>
---
 indra/llui/llemojihelper.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp
index fbe313924c..b9441a9c91 100644
--- a/indra/llui/llemojihelper.cpp
+++ b/indra/llui/llemojihelper.cpp
@@ -76,7 +76,9 @@ bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S
         shortCodePos--;
     }
 
-    bool isShortCode = (L':' == wtext[shortCodePos - 1]) && (cursorPos - shortCodePos >= 2);
+    bool isShortCode = (cursorPos - shortCodePos >= 2) && (L':' == wtext[shortCodePos - 1]);
+    if(isShortCode && (shortCodePos >= 2) && isdigit(wtext[shortCodePos - 2])) // <TS:3T> Add qualifier to avoid emoji pop-up when typing times.
+        isShortCode = false;
     if (pShortCodePos)
         *pShortCodePos = (isShortCode) ? shortCodePos - 1 : -1;
     return isShortCode;
-- 
cgit v1.2.3


From a37590b45220cc21f038e715527c35e2b74b5a15 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 2 Aug 2024 14:33:22 +0300
Subject: viewer#853 Fix upload losing face data.

Multiple faces can share same mMaterial
---
 indra/newview/llmeshrepository.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 4c5cc37766..349df11f35 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2363,10 +2363,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
 
             // We want to be able to allow more than 8 materials...
             //
-            S32 end = llmin((S32)instance.mMaterial.size(), instance.mModel->getNumVolumeFaces()) ;
+            S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), instance.mModel->getNumVolumeFaces()) ;
 
             for (S32 face_num = 0; face_num < end; face_num++)
             {
+                // multiple faces can reuse the same material
                 LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]];
                 LLSD face_entry = LLSD::emptyMap();
 
-- 
cgit v1.2.3


From 593479f33cecd81148a861c93c3f889e1ee5dc20 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Sat, 3 Aug 2024 00:24:41 +0200
Subject: Display parcel name when clicking on a parcel on the world map
 (#2131)

---
 indra/newview/llfloaterworldmap.cpp                | 135 +++++++++++++++++++--
 indra/newview/llfloaterworldmap.h                  |  29 ++++-
 indra/newview/llworldmap.h                         |   8 +-
 .../skins/default/xui/en/floater_world_map.xml     |   3 +
 4 files changed, 161 insertions(+), 14 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 8d74a99539..fc2cfbcf2b 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -261,6 +261,48 @@ void LLMapFriendObserver::changed(U32 mask)
     }
 }
 
+LLWorldMapParcelInfoObserver::LLWorldMapParcelInfoObserver(const LLVector3d& pos_global)
+    : LLRemoteParcelInfoObserver(),
+    mPosGlobal(pos_global),
+    mParcelID(LLUUID::null)
+{ }
+
+LLWorldMapParcelInfoObserver::~LLWorldMapParcelInfoObserver()
+{
+    if (mParcelID.notNull())
+    {
+        LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelID, this);
+    }
+}
+
+void LLWorldMapParcelInfoObserver::processParcelInfo(const LLParcelData& parcel_data)
+{
+    if (parcel_data.parcel_id == mParcelID)
+    {
+        LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelID, this);
+
+        if (gFloaterWorldMap)
+        {
+            gFloaterWorldMap->processParcelInfo(parcel_data, mPosGlobal);
+        }
+    }
+}
+
+// virtual
+void LLWorldMapParcelInfoObserver::setParcelID(const LLUUID& parcel_id)
+{
+    mParcelID = parcel_id;
+    auto instance = LLRemoteParcelInfoProcessor::getInstance();
+    instance->addObserver(mParcelID, this);
+    instance->sendParcelInfoRequest(mParcelID);
+}
+
+// virtual
+void LLWorldMapParcelInfoObserver::setErrorStatus(S32 status, const std::string& reason)
+{
+    LL_WARNS("LLWorldMapParcelInfoObserver") << "Can't handle remote parcel request." << " Http Status: " << status << ". Reason : " << reason << LL_ENDL;
+}
+
 //---------------------------------------------------------------------------
 // Statics
 //---------------------------------------------------------------------------
@@ -275,23 +317,25 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
 
 LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
 :   LLFloater(key),
-    mInventory(NULL),
-    mInventoryObserver(NULL),
-    mFriendObserver(NULL),
+    mInventory(nullptr),
+    mInventoryObserver(nullptr),
+    mFriendObserver(nullptr),
     mCompletingRegionName(),
     mCompletingRegionPos(),
     mWaitingForTracker(false),
     mIsClosing(false),
     mSetToUserPosition(true),
-    mTrackedLocation(0,0,0),
+    mTrackedLocation(0.0,0.0,0.0),
     mTrackedStatus(LLTracker::TRACKING_NOTHING),
-    mListFriendCombo(NULL),
-    mListLandmarkCombo(NULL),
-    mListSearchResults(NULL)
+    mListFriendCombo(nullptr),
+    mListLandmarkCombo(nullptr),
+    mListSearchResults(nullptr),
+    mParcelInfoObserver(nullptr),
+    mShowParcelInfo(false)
 {
     gFloaterWorldMap = this;
 
-    mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL);
+    mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, nullptr);
 
     mCommitCallbackRegistrar.add("WMap.Coordinates",    boost::bind(&LLFloaterWorldMap::onCoordinatesCommit, this));
     mCommitCallbackRegistrar.add("WMap.Location",       boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
@@ -374,6 +418,11 @@ bool LLFloaterWorldMap::postBuild()
 // virtual
 LLFloaterWorldMap::~LLFloaterWorldMap()
 {
+    if (mParcelInfoObserver)
+    {
+        delete mParcelInfoObserver;
+    }
+
     // All cleaned up by LLView destructor
     mMapView = NULL;
 
@@ -584,9 +633,73 @@ void LLFloaterWorldMap::draw()
 // Internal utility functions
 //-------------------------------------------------------------------------
 
+void LLFloaterWorldMap::processParcelInfo(const LLParcelData& parcel_data, const LLVector3d& pos_global) const
+{
+    LLVector3d tracker_pos = LLTracker::getTrackedPositionGlobal();
+    if (!mShowParcelInfo ||
+        (tracker_pos.mdV[VX] != pos_global.mdV[VX] && tracker_pos.mdV[VY] != pos_global.mdV[VY]) ||
+        LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING ||
+        LLTracker::getTrackingStatus() != LLTracker::TRACKING_LOCATION)
+    {
+        return;
+    }
+
+    LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
+    if (!sim_info)
+    {
+        return;
+    }
+
+    std::string sim_name = sim_info->getName();
+    U32 locX, locY;
+    from_region_handle(sim_info->getHandle(), &locX, &locY);
+    F32 region_x = (F32)(pos_global.mdV[VX] - locX);
+    F32 region_y = (F32)(pos_global.mdV[VY] - locY);
+    std::string full_name = llformat("%s (%d, %d, %d)",
+        sim_name.c_str(),
+        ll_round(region_x),
+        ll_round(region_y),
+        ll_round((F32)pos_global.mdV[VZ]));
+
+    LLTracker::trackLocation(pos_global, parcel_data.name.empty() ? getString("UnnamedParcel") : parcel_data.name, full_name);
+}
+
+void LLFloaterWorldMap::requestParcelInfo(const LLVector3d& pos_global, const LLVector3d& region_origin)
+{
+    if (pos_global == mRequestedGlobalPos)
+    {
+        return;
+    }
+
+    LLViewerRegion* region = gAgent.getRegion();
+    if (!region)
+    {
+        return;
+    }
+
+    if (std::string url = region->getCapability("RemoteParcelRequest"); !url.empty())
+    {
+        mRequestedGlobalPos = pos_global;
+        if (mParcelInfoObserver)
+        {
+            delete mParcelInfoObserver;
+        }
+        mParcelInfoObserver = new LLWorldMapParcelInfoObserver(pos_global);
+
+        auto pos_region = LLVector3(pos_global - region_origin);
+        LLRemoteParcelInfoProcessor::instance().requestRegionParcelInfo(url,
+            region->getRegionID(), pos_region, pos_global,
+            mParcelInfoObserver->getObserverHandle());
+    }
+    else
+    {
+        LL_WARNS() << "Cannot request parcel details: Cap not found" << LL_ENDL;
+    }
+}
 
 void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& name )
 {
+    mShowParcelInfo = false;
     LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo");
     if (!iface) return;
 
@@ -617,6 +730,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
 
 void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
 {
+    mShowParcelInfo = false;
     LLCtrlSelectionInterface *iface = childGetSelectionInterface("landmark combo");
     if (!iface) return;
 
@@ -662,6 +776,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
 
 void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
 {
+    mShowParcelInfo = false;
     mTrackedStatus = LLTracker::TRACKING_LOCATION;
     LLTracker::trackLocation(event_info.getGlobalPosition(), event_info.getName(), event_info.getToolTip(), LLTracker::LOCATION_EVENT);
     setDefaultBtn("Teleport");
@@ -669,6 +784,7 @@ void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
 
 void LLFloaterWorldMap::trackGenericItem(const LLItemInfo &item)
 {
+    mShowParcelInfo = false;
     mTrackedStatus = LLTracker::TRACKING_LOCATION;
     LLTracker::trackLocation(item.getGlobalPosition(), item.getName(), item.getToolTip(), LLTracker::LOCATION_ITEM);
     setDefaultBtn("Teleport");
@@ -721,6 +837,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
     LLWorldMap::getInstance()->cancelTracking();        // The floater is taking over the tracking
     LLTracker::trackLocation(pos_global, full_name, tooltip);
 
+    mShowParcelInfo = true;
+    requestParcelInfo(pos_global, sim_info->getGlobalOrigin());
+
     LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
     updateTeleportCoordsDisplay( coord_pos );
 
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index a99100f5bd..2f2b2b7a0d 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -34,8 +34,9 @@
 
 #include "llfloater.h"
 #include "llmapimagetype.h"
-#include "lltracker.h"
+#include "llremoteparcelrequest.h"
 #include "llslurl.h"
+#include "lltracker.h"
 
 class LLCtrlListInterface;
 class LLFriendObserver;
@@ -51,6 +52,21 @@ class LLSliderCtrl;
 class LLSpinCtrl;
 class LLSearchEditor;
 
+class LLWorldMapParcelInfoObserver : public LLRemoteParcelInfoObserver
+{
+public:
+    LLWorldMapParcelInfoObserver(const LLVector3d& pos_global);
+    ~LLWorldMapParcelInfoObserver();
+
+    void processParcelInfo(const LLParcelData& parcel_data);
+    void setParcelID(const LLUUID& parcel_id);
+    void setErrorStatus(S32 status, const std::string& reason);
+
+protected:
+    LLVector3d  mPosGlobal;
+    LLUUID      mParcelID;
+};
+
 class LLFloaterWorldMap : public LLFloater
 {
 public:
@@ -119,6 +135,8 @@ public:
     //Slapp instigated avatar tracking
     void            avatarTrackFromSlapp( const LLUUID& id );
 
+    void            processParcelInfo(const LLParcelData& parcel_data, const LLVector3d& pos_global) const;
+
 protected:
     void            onGoHome();
 
@@ -169,8 +187,13 @@ private:
     // enable/disable teleport destination coordinates
     void enableTeleportCoordsDisplay( bool enabled );
 
-    std::vector<LLUUID> mLandmarkAssetIDList;
-    std::vector<LLUUID> mLandmarkItemIDList;
+    void            requestParcelInfo(const LLVector3d& pos_global, const LLVector3d& region_origin);
+    LLVector3d      mRequestedGlobalPos;
+    bool            mShowParcelInfo;
+    LLWorldMapParcelInfoObserver* mParcelInfoObserver;
+
+    uuid_vec_t      mLandmarkAssetIDList;
+    uuid_vec_t      mLandmarkItemIDList;
 
     static const LLUUID sHomeID;
 
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index fb9d140851..aab19a4d5f 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -128,9 +128,9 @@ public:
     LLPointer<LLViewerFetchedTexture> getLandForSaleImage();    // Get the overlay image, fetch it if necessary
 
     bool isName(const std::string& name) const;
-    bool isDown() { return (mAccess == SIM_ACCESS_DOWN); }
-    bool isPG() { return (mAccess <= SIM_ACCESS_PG); }
-    bool isAdult() { return (mAccess == SIM_ACCESS_ADULT); }
+    bool isDown() const { return (mAccess == SIM_ACCESS_DOWN); }
+    bool isPG() const { return (mAccess <= SIM_ACCESS_PG); }
+    bool isAdult() const { return (mAccess == SIM_ACCESS_ADULT); }
 
     // Debug only
     void dump() const;  // Print the region info to the standard output
@@ -157,6 +157,8 @@ public:
     const LLSimInfo::item_info_list_t& getLandForSaleAdult() const { return mLandForSaleAdult; }
     const LLSimInfo::item_info_list_t& getAgentLocation() const { return mAgentLocations; }
 
+    const U64& getHandle() const { return mHandle; }
+
 private:
     U64 mHandle;                // This is a hash of the X and Y world coordinates of the SW corner of the sim
     std::string mName;          // Region name
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 7efa81d263..b0b818cde5 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -14,6 +14,9 @@
  single_instance="true"
  title="WORLD MAP"
  width="650">
+  <string name="UnnamedParcel">
+    (Unnamed Parcel)
+  </string>
   <string
    name="collapse_icon"
    value="map_ui_collapse_icon.png"/>
-- 
cgit v1.2.3


From adf2d91fb9032ab70b61269d49bacec6aac22ab1 Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Sun, 4 Aug 2024 19:58:54 -0400
Subject: Reduce Avatar Loading Checks (#2187)

This simple trick stops checking if the avatar is loaded if the avatar is loaded, decreasing calculation times and increasing FPS.
---
 indra/newview/llvoavatar.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8581a96c06..83df39d606 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3145,7 +3145,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
 void LLVOAvatar::idleUpdateLoadingEffect()
 {
     // update visibility when avatar is partially loaded
-    if (updateIsFullyLoaded()) // changed?
+    if (!mFullyLoaded && updateIsFullyLoaded()) // Avoid repeat calculations by checking if mFullyLoaded is true first.
     {
         if (isFullyLoaded())
         {
-- 
cgit v1.2.3


From 4a702182daf872e77797a1ff7e6e3040c3c5806d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 4 Aug 2024 20:03:01 -0400
Subject: Update ogg_vorbis to 1.3.5-1.3.7 (#2186)

---
 indra/cmake/Audio.cmake | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index 38547bb017..8c82749cab 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,4 +1,5 @@
 # -*- cmake -*-
+include(Linking)
 include(Prebuilt)
 
 include_guard()
@@ -9,8 +10,22 @@ use_prebuilt_binary(ogg_vorbis)
 target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
 
 if (WINDOWS)
-  target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
+  target_link_libraries(ll::vorbis INTERFACE
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
+        optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
+        debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
+    )
 else (WINDOWS)
-  target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile )
+  target_link_libraries(ll::vorbis INTERFACE
+        ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.a
+        ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.a
+        ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.a
+        ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.a
+        )
 endif (WINDOWS)
 
-- 
cgit v1.2.3


From 874794ea584588457dfde7ef17c447e2a0eb46bb Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 4 Aug 2024 21:00:10 -0400
Subject: Add LLUIColorTable debug-settings-like floater for easing skin design

---
 indra/llui/llconsole.cpp                           |   3 +-
 indra/llui/llstatgraph.cpp                         |   4 +-
 indra/llui/lluicolortable.cpp                      |  68 ++++-
 indra/llui/lluicolortable.h                        |   7 +
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/app_settings/settings.xml            |  11 +
 indra/newview/llfloatersettingscolor.cpp           | 334 +++++++++++++++++++++
 indra/newview/llfloatersettingscolor.h             |  81 +++++
 indra/newview/llmanip.cpp                          |   6 +-
 indra/newview/llselectmgr.cpp                      |  25 +-
 indra/newview/llselectmgr.h                        |  13 +-
 indra/newview/llviewerfloaterreg.cpp               |   2 +
 .../default/xui/en/floater_settings_color.xml      | 117 ++++++++
 indra/newview/skins/default/xui/en/menu_login.xml  |   7 +
 indra/newview/skins/default/xui/en/menu_viewer.xml |   7 +
 15 files changed, 654 insertions(+), 33 deletions(-)
 create mode 100644 indra/newview/llfloatersettingscolor.cpp
 create mode 100644 indra/newview/llfloatersettingscolor.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_settings_color.xml

(limited to 'indra')

diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 4f52f5936d..91e6f281da 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -183,7 +183,8 @@ void LLConsole::draw()
     static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
     F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f);
 
-    static LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
+    static LLUIColor console_color = LLUIColorTable::instance().getColor("ConsoleBackground");
+    LLColor4 color = console_color;
     color.mV[VALPHA] *= console_opacity;
 
     F32 line_height = (F32)mFont->getLineHeight();
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index 28b4d387f1..d97051247e 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -100,8 +100,8 @@ void LLStatGraph::draw()
         it--;
     }
 
-    static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
-    gGL.color4fv(default_color.mV);
+    static LLUIColor default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
+    gGL.color4fv(default_color.get().mV);
     gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
 
     gGL.color4fv(LLColor4::black.mV);
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 3279926786..a792cb8103 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -198,7 +198,61 @@ LLUIColor LLUIColorTable::getColor(std::string_view name, const LLColor4& defaul
 // update user color, loaded colors are parsed on initialization
 void LLUIColorTable::setColor(std::string_view name, const LLColor4& color)
 {
-    setColor(name, color, mUserSetColors);
+    auto it = mUserSetColors.lower_bound(name);
+    if(it != mUserSetColors.end() && !(mUserSetColors.key_comp()(name, it->first)))
+    {
+        it->second = color;
+    }
+    else
+    {
+        string_color_map_t::iterator base_iter = mLoadedColors.find(name);
+        if (base_iter != mLoadedColors.end())
+        {
+            LLColor4 original_color = base_iter->second.get();
+            auto color_handle = mLoadedColors.extract(base_iter);
+            auto new_color_pair = mUserSetColors.insert(std::move(color_handle));
+            new_color_pair.position->second = color;
+            mLoadedColors.emplace(name, LLUIColor(original_color));
+        }
+        else
+        {
+            mUserSetColors.insert(it, std::make_pair(name, color));
+        }
+    }
+}
+
+bool LLUIColorTable::isDefault(std::string_view name) const
+{
+    string_color_map_t::const_iterator base_iter = mLoadedColors.find(name);
+    string_color_map_t::const_iterator user_iter = mUserSetColors.find(name);
+    if (base_iter != mLoadedColors.end())
+    {
+        if(user_iter != mUserSetColors.end())
+            return user_iter->second == base_iter->second;
+
+        return true;
+    }
+    else if (user_iter != mUserSetColors.end()) // user only color ???
+    {
+        return true;
+    }
+
+    return false;
+}
+
+void LLUIColorTable::resetToDefault(std::string_view name)
+{
+    string_color_map_t::iterator iter = mUserSetColors.find(name);
+
+    if (iter != mUserSetColors.end())
+    {
+        auto default_iter = mLoadedColors.find(name);
+
+        if (default_iter != mLoadedColors.end())
+        {
+            iter->second = default_iter->second.get();
+        }
+    }
 }
 
 bool LLUIColorTable::loadFromSettings()
@@ -223,18 +277,16 @@ void LLUIColorTable::saveUserSettings() const
 {
     Params params;
 
-    for(string_color_map_t::const_iterator it = mUserSetColors.begin();
-        it != mUserSetColors.end();
-        ++it)
+    for (const auto& color_pair : mUserSetColors)
     {
         // Compare user color value with the default value, skip if equal
-        string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
-        if(itd != mLoadedColors.end() && itd->second == it->second)
+        string_color_map_t::const_iterator itd = mLoadedColors.find(color_pair.first);
+        if(itd != mLoadedColors.end() && itd->second == color_pair.second)
             continue;
 
         ColorEntryParams color_entry;
-        color_entry.name = it->first;
-        color_entry.color.value = it->second;
+        color_entry.name = color_pair.first;
+        color_entry.color.value = color_pair.second;
 
         params.color_entries.add(color_entry);
     }
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index ca1ca9eaa7..0c6286e5eb 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -83,12 +83,19 @@ public:
     // returns true if color_name exists in the table
     bool colorExists(std::string_view color_name) const;
 
+    bool isDefault(std::string_view color_name) const;
+
+    void resetToDefault(std::string_view color_name);
+
     // loads colors from settings files
     bool loadFromSettings();
 
     // saves colors specified by the user to the users skin directory
     void saveUserSettings() const;
 
+    const auto& getLoadedColors() { return mLoadedColors; }
+    const auto& getUserColors() { return mUserSetColors; }
+
 private:
     bool loadFromFilename(const std::string& filename, string_color_map_t& table);
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 4c5deb4974..8df9c41219 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -286,6 +286,7 @@ set(viewer_SOURCE_FILES
     llfloaterscriptlimits.cpp
     llfloatersearch.cpp
     llfloatersellland.cpp
+    llfloatersettingscolor.cpp
     llfloatersettingsdebug.cpp
     llfloatersidepanelcontainer.cpp
     llfloatersnapshot.cpp
@@ -954,6 +955,7 @@ set(viewer_HEADER_FILES
     llfloaterscriptlimits.h
     llfloatersearch.h
     llfloatersellland.h
+    llfloatersettingscolor.h
     llfloatersettingsdebug.h
     llfloatersidepanelcontainer.h
     llfloatersnapshot.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9e5d3f09bd..eb053ebaa0 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -15773,6 +15773,17 @@
     <key>Value</key>
     <integer>0</integer>
   </map>
+  <key>ColorSettingsHideDefault</key>
+  <map>
+    <key>Comment</key>
+    <string>Show non-default settings only in Color Settings list</string>
+    <key>Persist</key>
+    <integer>0</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
   <key>DebugSettingsHideDefault</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/llfloatersettingscolor.cpp b/indra/newview/llfloatersettingscolor.cpp
new file mode 100644
index 0000000000..d9c382a1dc
--- /dev/null
+++ b/indra/newview/llfloatersettingscolor.cpp
@@ -0,0 +1,334 @@
+/**
+* @file llfloatersettingscolor.cpp
+* @brief Implementation of LLFloaterSettingsColor
+* @author Rye Cogtail<rye@alchemyviewer.org>
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+* $/LicenseInfo$
+*/
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatersettingscolor.h"
+
+#include "llfloater.h"
+#include "llfiltereditor.h"
+#include "lluictrlfactory.h"
+#include "llcombobox.h"
+#include "llspinctrl.h"
+#include "llcolorswatch.h"
+#include "llviewercontrol.h"
+#include "lltexteditor.h"
+
+
+LLFloaterSettingsColor::LLFloaterSettingsColor(const LLSD& key)
+:   LLFloater(key),
+    mSettingList(NULL)
+{
+    mCommitCallbackRegistrar.add("CommitSettings",  boost::bind(&LLFloaterSettingsColor::onCommitSettings, this));
+    mCommitCallbackRegistrar.add("ClickDefault",    boost::bind(&LLFloaterSettingsColor::onClickDefault, this));
+}
+
+LLFloaterSettingsColor::~LLFloaterSettingsColor()
+{}
+
+bool LLFloaterSettingsColor::postBuild()
+{
+    enableResizeCtrls(true, false, true);
+
+    mAlphaSpinner = getChild<LLSpinCtrl>("alpha_spinner");
+    mColorSwatch = getChild<LLColorSwatchCtrl>("color_swatch");
+
+    mDefaultButton = getChild<LLUICtrl>("default_btn");
+    mSettingNameText = getChild<LLTextBox>("color_name_txt");
+
+    getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsColor::setSearchFilter, this, _2));
+
+    mSettingList = getChild<LLScrollListCtrl>("setting_list");
+    mSettingList->setCommitOnSelectionChange(true);
+    mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsColor::onSettingSelect, this));
+
+    updateList();
+
+    gSavedSettings.getControl("ColorSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsColor::updateList, this, false));
+
+    return LLFloater::postBuild();
+}
+
+void LLFloaterSettingsColor::draw()
+{
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        if(auto cell = first_selected->getColumn(1))
+        {
+            updateControl(cell->getValue().asString());
+        }
+    }
+
+    LLFloater::draw();
+}
+
+void LLFloaterSettingsColor::onCommitSettings()
+{
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (!first_selected)
+    {
+        return;
+    }
+    auto cell = first_selected->getColumn(1);
+
+    if (!cell)
+    {
+        return;
+    }
+
+    auto color_name = cell->getValue().asString();
+    if (color_name.empty())
+    {
+        return;
+    }
+
+    LLColor4 col4;
+    LLColor3 col3;
+    col3.setValue(mColorSwatch->getValue());
+    col4 = LLColor4(col3, (F32)mAlphaSpinner->getValue().asReal());
+    LLUIColorTable::instance().setColor(color_name, col4);
+
+    updateDefaultColumn(color_name);
+}
+
+// static
+void LLFloaterSettingsColor::onClickDefault()
+{
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        auto cell = first_selected->getColumn(1);
+        if (cell)
+        {
+            auto name = cell->getValue().asString();
+            LLUIColorTable::instance().resetToDefault(name);
+            updateDefaultColumn(name);
+            updateControl(name);
+        }
+    }
+}
+
+// we've switched controls, or doing per-frame update, so update spinners, etc.
+void LLFloaterSettingsColor::updateControl(const std::string& color_name)
+{
+    hideUIControls();
+
+    if (!isSettingHidden(color_name))
+    {
+        mDefaultButton->setVisible(true);
+        mSettingNameText->setVisible(true);
+        mSettingNameText->setText(color_name);
+        mSettingNameText->setToolTip(color_name);
+
+        LLColor4 clr = LLUIColorTable::instance().getColor(color_name);
+        mColorSwatch->setVisible(true);
+        // only set if changed so color picker doesn't update
+        if (clr != LLColor4(mColorSwatch->getValue()))
+        {
+            mColorSwatch->setOriginal(clr);
+        }
+        mAlphaSpinner->setVisible(true);
+        mAlphaSpinner->setLabel(std::string("Alpha"));
+        if (!mAlphaSpinner->hasFocus())
+        {
+            mAlphaSpinner->setPrecision(3);
+            mAlphaSpinner->setMinValue(0.0);
+            mAlphaSpinner->setMaxValue(1.f);
+            mAlphaSpinner->setValue(clr.mV[VALPHA]);
+        }
+    }
+
+}
+
+void LLFloaterSettingsColor::updateList(bool skip_selection)
+{
+    std::string last_selected;
+    LLScrollListItem* item = mSettingList->getFirstSelected();
+    if (item)
+    {
+        LLScrollListCell* cell = item->getColumn(1);
+        if (cell)
+        {
+            last_selected = cell->getValue().asString();
+         }
+    }
+
+    mSettingList->deleteAllItems();
+
+    const auto& base_colors = LLUIColorTable::instance().getLoadedColors();
+    for (const auto& pair : base_colors)
+    {
+        const auto& name = pair.first;
+        if (matchesSearchFilter(name) && !isSettingHidden(name))
+        {
+            LLSD row;
+
+            row["columns"][0]["column"] = "changed_color";
+            row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
+
+            row["columns"][1]["column"] = "color";
+            row["columns"][1]["value"] = name;
+
+            LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
+            if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
+            {
+                std::string lower_name(name);
+                LLStringUtil::toLower(lower_name);
+                if (LLStringUtil::startsWith(lower_name, mSearchFilter))
+                {
+                    item->setSelected(true);
+                }
+            }
+        }
+    }
+
+    for (const auto& pair : LLUIColorTable::instance().getUserColors())
+    {
+        const auto& name = pair.first;
+        if (base_colors.find(name) == base_colors.end() && matchesSearchFilter(name) && !isSettingHidden(name))
+        {
+            LLSD row;
+
+            row["columns"][0]["column"] = "changed_color";
+            row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
+
+            row["columns"][1]["column"] = "color";
+            row["columns"][1]["value"] = name;
+
+            LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
+            if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
+            {
+                std::string lower_name(name);
+                LLStringUtil::toLower(lower_name);
+                if (LLStringUtil::startsWith(lower_name, mSearchFilter))
+                {
+                    item->setSelected(true);
+                }
+            }
+        }
+    }
+
+    mSettingList->updateSort();
+
+    if (!mSettingList->isEmpty())
+    {
+        if (mSettingList->hasSelectedItem())
+        {
+            mSettingList->scrollToShowSelected();
+        }
+        else if (!mSettingList->hasSelectedItem() && !mSearchFilter.empty() && !skip_selection)
+        {
+            if (!mSettingList->selectItemByPrefix(mSearchFilter, false, 1))
+            {
+                mSettingList->selectFirstItem();
+            }
+            mSettingList->scrollToShowSelected();
+        }
+    }
+    else
+    {
+        LLSD row;
+
+        row["columns"][0]["column"] = "changed_color";
+        row["columns"][0]["value"] = "";
+        row["columns"][1]["column"] = "color";
+        row["columns"][1]["value"] = "No matching colors.";
+
+        mSettingList->addElement(row);
+        hideUIControls();
+    }
+}
+
+void LLFloaterSettingsColor::onSettingSelect()
+{
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        auto cell = first_selected->getColumn(1);
+        if (cell)
+        {
+            updateControl(cell->getValue().asString());
+        }
+    }
+}
+
+void LLFloaterSettingsColor::setSearchFilter(const std::string& filter)
+{
+    if(mSearchFilter == filter)
+        return;
+    mSearchFilter = filter;
+    LLStringUtil::toLower(mSearchFilter);
+    updateList();
+}
+
+bool LLFloaterSettingsColor::matchesSearchFilter(std::string setting_name)
+{
+    // If the search filter is empty, everything passes.
+    if (mSearchFilter.empty()) return true;
+
+    LLStringUtil::toLower(setting_name);
+    std::string::size_type match_name = setting_name.find(mSearchFilter);
+
+    return (std::string::npos != match_name);
+}
+
+bool LLFloaterSettingsColor::isSettingHidden(const std::string& color_name)
+{
+    static LLCachedControl<bool> hide_default(gSavedSettings, "ColorSettingsHideDefault", false);
+    return hide_default && LLUIColorTable::instance().isDefault(color_name);
+}
+
+void LLFloaterSettingsColor::updateDefaultColumn(const std::string& color_name)
+{
+    if (isSettingHidden(color_name))
+    {
+        hideUIControls();
+        updateList(true);
+        return;
+    }
+
+    LLScrollListItem* item = mSettingList->getFirstSelected();
+    if (item)
+    {
+        LLScrollListCell* cell = item->getColumn(0);
+        if (cell)
+        {
+            std::string is_default = LLUIColorTable::instance().isDefault(color_name) ? "" : "*";
+            cell->setValue(is_default);
+        }
+    }
+}
+
+void LLFloaterSettingsColor::hideUIControls()
+{
+    mColorSwatch->setVisible(false);
+    mAlphaSpinner->setVisible(false);
+    mDefaultButton->setVisible(false);
+    mSettingNameText->setVisible(false);
+}
+
diff --git a/indra/newview/llfloatersettingscolor.h b/indra/newview/llfloatersettingscolor.h
new file mode 100644
index 0000000000..42eb85cd60
--- /dev/null
+++ b/indra/newview/llfloatersettingscolor.h
@@ -0,0 +1,81 @@
+/**
+* @file llfloatersettingscolor.h
+* @brief Header file for LLFloaterSettingsColor
+* @author Rye Cogtail<rye@alchemyviewer.org>
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+* $/LicenseInfo$
+*/
+
+#ifndef LLFLOATERCOLORSETTINGS_H
+#define LLFLOATERCOLORSETTINGS_H
+
+#include "llcontrol.h"
+#include "llfloater.h"
+
+class LLColorSwatchCtrl;
+class LLScrollListCtrl;
+class LLSpinCtrl;
+class LLTextBox;
+
+class LLFloaterSettingsColor final
+:   public LLFloater
+{
+    friend class LLFloaterReg;
+
+public:
+
+    bool postBuild() override;
+    void draw() override;
+
+    void updateControl(const std::string& color_name);
+
+    void onCommitSettings();
+    void onClickDefault();
+
+    bool matchesSearchFilter(std::string setting_name);
+    bool isSettingHidden(const std::string& color_name);
+
+private:
+    LLFloaterSettingsColor(const LLSD& key);
+    virtual ~LLFloaterSettingsColor();
+
+    void updateList(bool skip_selection = false);
+    void onSettingSelect();
+    void setSearchFilter(const std::string& filter);
+
+    void updateDefaultColumn(const std::string& color_name);
+    void hideUIControls();
+
+    LLScrollListCtrl* mSettingList;
+
+protected:
+    LLUICtrl*           mDefaultButton = nullptr;
+    LLTextBox*          mSettingNameText = nullptr;
+
+    LLSpinCtrl* mAlphaSpinner = nullptr;
+    LLColorSwatchCtrl* mColorSwatch = nullptr;
+
+    std::string mSearchFilter;
+};
+
+#endif //LLFLOATERCOLORSETTINGS_H
+
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 0c82db1011..0d617753c8 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -594,9 +594,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
 
 LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
 {
-    static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
-    static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
-    static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
+    static LLUIColor grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
+    static LLUIColor grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
+    static LLUIColor grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
 
     LLColor4 line_color;
     F32 line_alpha = gSavedSettings.getF32("GridOpacity");
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index fcd1c84ba4..342048252f 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -128,12 +128,12 @@ F32 LLSelectMgr::sHighlightAlpha = 0.f;
 F32 LLSelectMgr::sHighlightAlphaTest = 0.f;
 F32 LLSelectMgr::sHighlightUAnim = 0.f;
 F32 LLSelectMgr::sHighlightVAnim = 0.f;
-LLColor4 LLSelectMgr::sSilhouetteParentColor;
-LLColor4 LLSelectMgr::sSilhouetteChildColor;
-LLColor4 LLSelectMgr::sHighlightInspectColor;
-LLColor4 LLSelectMgr::sHighlightParentColor;
-LLColor4 LLSelectMgr::sHighlightChildColor;
-LLColor4 LLSelectMgr::sContextSilhouetteColor;
+LLUIColor LLSelectMgr::sSilhouetteParentColor;
+LLUIColor LLSelectMgr::sSilhouetteChildColor;
+LLUIColor LLSelectMgr::sHighlightInspectColor;
+LLUIColor LLSelectMgr::sHighlightParentColor;
+LLUIColor LLSelectMgr::sHighlightChildColor;
+LLUIColor LLSelectMgr::sContextSilhouetteColor;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // struct LLDeRezInfo
@@ -6437,8 +6437,10 @@ void LLSelectMgr::renderSilhouettes(bool for_hud)
     bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
     F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0);
 
-    static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha);
-    static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha);
+    LLColor4 sParentColor = sSilhouetteParentColor;
+    sParentColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
+    LLColor4 sChildColor = sSilhouetteChildColor;
+    sChildColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
 
     auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
     {
@@ -8006,12 +8008,9 @@ S32 LLObjectSelection::getSelectedObjectRenderCost()
                    cost += object->getRenderCost(textures);
                    computed_objects.insert(object->getID());
 
-                   const_child_list_t children = object->getChildren();
-                   for (const_child_list_t::const_iterator child_iter = children.begin();
-                         child_iter != children.end();
-                         ++child_iter)
+                   const const_child_list_t& children = object->getChildren();
+                   for (LLViewerObject* child_obj : children)
                    {
-                       LLViewerObject* child_obj = *child_iter;
                        LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
                        if (child)
                        {
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 355e28595b..2764b0179c 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -44,6 +44,7 @@
 #include "llcontrol.h"
 #include "llviewerobject.h" // LLObjectSelection::getSelectedTEValue template
 #include "llmaterial.h"
+#include "lluicolor.h"
 
 #include <deque>
 #include <boost/iterator/filter_iterator.hpp>
@@ -450,12 +451,12 @@ public:
     static F32                  sHighlightAlphaTest;
     static F32                  sHighlightUAnim;
     static F32                  sHighlightVAnim;
-    static LLColor4             sSilhouetteParentColor;
-    static LLColor4             sSilhouetteChildColor;
-    static LLColor4             sHighlightParentColor;
-    static LLColor4             sHighlightChildColor;
-    static LLColor4             sHighlightInspectColor;
-    static LLColor4             sContextSilhouetteColor;
+    static LLUIColor            sSilhouetteParentColor;
+    static LLUIColor            sSilhouetteChildColor;
+    static LLUIColor            sHighlightParentColor;
+    static LLUIColor            sHighlightChildColor;
+    static LLUIColor            sHighlightInspectColor;
+    static LLUIColor            sContextSilhouetteColor;
 
     LLCachedControl<bool>                   mHideSelectedObjects;
     LLCachedControl<bool>                   mRenderHighlightSelections;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index c97a512a57..9bdd246129 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -134,6 +134,7 @@
 #include "llfloaterscriptlimits.h"
 #include "llfloatersearch.h"
 #include "llfloatersellland.h"
+#include "llfloatersettingscolor.h"
 #include "llfloatersettingsdebug.h"
 #include "llfloatersidepanelcontainer.h"
 #include "llfloatersnapshot.h"
@@ -486,6 +487,7 @@ void LLViewerFloaterReg::registerFloaters()
     LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>);
     LLFloaterReg::add("my_scripts", "floater_my_scripts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyScripts>);
     LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
+    LLFloaterReg::add("settings_color", "floater_settings_color.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsColor>);
     LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
     LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
     LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
diff --git a/indra/newview/skins/default/xui/en/floater_settings_color.xml b/indra/newview/skins/default/xui/en/floater_settings_color.xml
new file mode 100644
index 0000000000..0722677f1d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_settings_color.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+    legacy_header_height="18"
+    can_minimize="false"
+    height="360"
+    min_height="367"
+    layout="topleft"
+    name="settings_color"
+    help_topic="settings_color"
+    title="COLOR SETTINGS"
+    reuse_instance="true"
+    can_resize="true"
+    min_width="550"
+    width="570">
+    <filter_editor
+        follows="left|top|right"
+        height="23"
+        layout="topleft"
+        left="10"
+        right="-10"
+        label="Enter search text"
+        max_length_chars="300"
+        name="filter_input"
+        text_pad_left="10"
+        top="30" />
+    <scroll_list
+        column_padding="0"
+        draw_heading="true"
+        draw_stripes="false"
+        heading_height="23"
+        height="266"
+        layout="topleft"
+        search_column="1"
+        sort_column="1"
+        left="10"
+        follows="left|top|bottom"
+        name="setting_list"
+        top_pad="2"
+        width="300">
+        <scroll_list.columns
+            name="changed_color"
+            relative_width="0.05" />
+        <scroll_list.columns
+            label="Color"
+            name="color" />
+    </scroll_list>
+    <text
+        type="string"
+        length="1"
+        follows="left|top"
+        height="16"
+        layout="topleft"
+        name="color_name_txt"
+        font="SansSerifSmallBold"
+        top_delta="8"
+        left_pad="10"
+        visible="true"
+        use_ellipses="true"
+        text_color="White"
+        width="240">
+        Color name
+    </text>
+    <color_swatch
+        top_pad="0"
+        left_delta="0"
+        follows="top|left"
+        can_apply_immediately="true"
+        height="180"
+        name="color_swatch"
+        visible="true"
+        layout="topleft"
+        width="240">
+        <color_swatch.commit_callback
+            function="CommitSettings" />
+    </color_swatch>
+    <spinner
+        height="20"
+        label="Alpha"
+        layout="topleft"
+        follows="top|left"
+        left_delta="0"
+        min_val="0"
+        max_val="1"
+        decimal_digits="3"
+        name="alpha_spinner"
+        top_pad="5"
+        visible="true"
+        width="120">
+        <spinner.commit_callback
+            function="CommitSettings" />
+    </spinner>
+    <button
+        height="22"
+        label="Reset to default"
+        follows="left|top"
+        layout="topleft"
+        left_delta="0"
+        name="default_btn"
+        visible="true"
+        top_pad="15"
+        width="150">
+        <button.commit_callback
+            function="ClickDefault" />
+    </button>
+    <check_box
+        control_name="ColorSettingsHideDefault"
+        height="16"
+        initial_value="true"
+        label="Show changed colors only"
+        layout="topleft"
+        top_pad="10"
+        left="10"
+        follows="left|bottom"
+        name="hide_default"
+        width="330">
+    </check_box>
+</floater>
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index a71cbde21b..1d1b81e31a 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -149,6 +149,13 @@
              function="Advanced.ShowDebugSettings"
              parameter="all" />
         </menu_item_call>
+        <menu_item_call
+         label="Show Color settings"
+         name="Color Settings">
+            <menu_item_call.on_click
+             function="Floater.Toggle"
+             parameter="settings_color" />
+        </menu_item_call>
         <menu_item_separator />
         <menu_item_call
          label="XUI Preview Tool"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 941f0c6bb7..f7b10a376e 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3829,6 +3829,13 @@ function="World.EnvPreset"
          label="XUI"
          name="XUI"
          tear_off="true">
+            <menu_item_call
+             label="Show Color settings"
+             name="Color Settings">
+                <menu_item_call.on_click
+                 function="Floater.Toggle"
+                 parameter="settings_color" />
+            </menu_item_call>
             <menu_item_call
                label="Reload Color Settings"
                name="Reload Color Settings">
-- 
cgit v1.2.3


From c4e921828a41c0e759ee103c6cfdb2cc40c1a581 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 3 Aug 2024 10:10:17 -0400
Subject: Optimization and cleanup of various color finds during draw

---
 indra/llui/llsearchablecontrol.h        |  2 +-
 indra/llui/lltextbase.cpp               |  7 +++---
 indra/newview/llchathistory.cpp         | 14 +++++------
 indra/newview/llconversationview.cpp    | 11 +++++----
 indra/newview/llfloateremojipicker.cpp  |  6 ++---
 indra/newview/llhudnametag.cpp          |  9 ++++---
 indra/newview/llhudtext.cpp             |  6 +++--
 indra/newview/llinventorygallery.cpp    |  6 +++--
 indra/newview/llscripteditor.cpp        |  2 +-
 indra/newview/llspeakers.cpp            |  4 +--
 indra/newview/lltoolbarview.cpp         |  2 +-
 indra/newview/llviewermenu.cpp          |  6 ++---
 indra/newview/llviewerobjectlist.cpp    | 24 +++++++++---------
 indra/newview/llviewerparceloverlay.cpp | 43 ++++++++++++++++++++++++---------
 indra/newview/llviewerparceloverlay.h   |  9 +++++++
 indra/newview/llviewertexteditor.cpp    | 12 +++------
 indra/newview/llvoavatar.cpp            |  4 ++-
 17 files changed, 96 insertions(+), 71 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llsearchablecontrol.h b/indra/llui/llsearchablecontrol.h
index bccb4858e1..119852b763 100644
--- a/indra/llui/llsearchablecontrol.h
+++ b/indra/llui/llsearchablecontrol.h
@@ -43,7 +43,7 @@ namespace ll
             virtual ~SearchableControl()
             { }
 
-            LLColor4 getHighlightColor( ) const
+            const LLColor4& getHighlightColor( ) const
             {
                 static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red);
                 return highlight_color.get();
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 8c3b317838..b7af5d2b1b 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -584,9 +584,8 @@ void LLTextBase::drawCursor()
 
             if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection() && text[mCursorPos] != '\n')
             {
-                LLColor4 text_color;
                 const LLFontGL* fontp;
-                text_color = segmentp->getColor();
+                const LLColor4& text_color = segmentp->getColor();
                 fontp = segmentp->getStyle()->getFont();
                 fontp->render(text, mCursorPos, cursor_rect,
                     LLColor4(1.f - text_color.mV[VRED], 1.f - text_color.mV[VGREEN], 1.f - text_color.mV[VBLUE], alpha),
@@ -1368,7 +1367,7 @@ void LLTextBase::draw()
         {
             bg_rect.intersectWith(text_rect);
         }
-        LLColor4 bg_color = mReadOnly
+        const LLColor4& bg_color = mReadOnly
                             ? mReadOnlyBgColor.get()
                             : hasFocus()
                                 ? mFocusBgColor.get()
@@ -1379,7 +1378,7 @@ void LLTextBase::draw()
     // Draw highlighted if needed
     if( ll::ui::SearchableControl::getHighlighted() )
     {
-        LLColor4 bg_color = ll::ui::SearchableControl::getHighlightColor();
+        const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor();
         LLRect bg_rect = mVisibleTextRect;
         if( mScroller )
             bg_rect.intersectWith( text_rect );
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 2b02aabc31..8eba9aee37 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -693,7 +693,7 @@ public:
             mNeedsTimeBox = false;
             user_name->setValue(mFrom);
             updateMinUserNameWidth();
-            LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
+            LLUIColor sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
             setTransparentColor(sep_color);
             mTimeBoxTextBox->setVisible(false);
         }
@@ -739,7 +739,7 @@ public:
                     std::string username = chat.mFromName.substr(username_start + 2);
                     username = username.substr(0, username.length() - 1);
                     LLStyle::Params style_params_name;
-                    LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
+                    LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
                     style_params_name.color(userNameColor);
                     style_params_name.font.name("SansSerifSmall");
                     style_params_name.font.style("NORMAL");
@@ -1037,7 +1037,7 @@ private:
             !av_name.isDisplayNameDefault())
         {
             LLStyle::Params style_params_name;
-            LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
+            LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
             style_params_name.color(userNameColor);
             style_params_name.font.name("SansSerifSmall");
             style_params_name.font.style("NORMAL");
@@ -1239,8 +1239,8 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
         mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height);
     }
 
-    LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
-    LLColor4 name_color(txt_color);
+    LLUIColor txt_color = LLUIColorTable::instance().getColor("White");
+    LLUIColor name_color(txt_color);
 
     LLViewerChat::getChatColor(chat,txt_color);
     LLFontGL* fontp = LLViewerChat::getChatFont();
@@ -1317,7 +1317,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
         {
             if (!message_from_log)
             {
-                LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
+                LLUIColor timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
                 timestamp_style.color(timestamp_color);
                 timestamp_style.readonly_color(timestamp_color);
             }
@@ -1344,7 +1344,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
                 // set the link for the object name to be the objectim SLapp
                 // (don't let object names with hyperlinks override our objectim Url)
                 LLStyle::Params link_params(body_message_params);
-                LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+                LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
                 link_params.color = link_color;
                 link_params.readonly_color = link_color;
                 link_params.is_link = true;
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index eac1ee2a3c..72d08428d3 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -652,6 +652,7 @@ void LLConversationViewParticipant::draw()
     static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);
     static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
     static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
+    static LLUIColor sFriendColor = LLUIColorTable::instance().getColor("ConversationFriendColor");;
 
     const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
 
@@ -661,23 +662,23 @@ void LLConversationViewParticipant::draw()
     F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
     F32 text_left = (F32)getLabelXPos();
 
-    LLColor4 color;
+    LLUIColor* color;
 
     LLLocalSpeakerMgr *speakerMgr = LLLocalSpeakerMgr::getInstance();
 
     if (speakerMgr && speakerMgr->isSpeakerToBeRemoved(mUUID))
     {
-        color = sFgDisabledColor;
+        color = &sFgDisabledColor;
     }
     else
     {
         if (LLAvatarActions::isFriend(mUUID))
         {
-            color = LLUIColorTable::instance().getColor("ConversationFriendColor");
+            color = &sFriendColor;
         }
         else
         {
-            color = mIsSelected ? sHighlightFgColor : sFgColor;
+            color = mIsSelected ? &sHighlightFgColor : &sFgColor;
         }
     }
 
@@ -688,7 +689,7 @@ void LLConversationViewParticipant::draw()
     }
 
     drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor);
-    drawLabel(font, text_left, y, color, right_x);
+    drawLabel(font, text_left, y, color->get(), right_x);
 
     LLView::draw();
 }
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 50f71c9c0b..cc13e5d059 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -203,8 +203,7 @@ public:
         F32 centerY = 0.5f * clientHeight;
         drawIcon(centerX, centerY - 1, iconWidth);
 
-        static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
-        static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
+        static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
         S32 max_pixels = clientWidth - iconWidth;
         drawName((F32)iconWidth, centerY, max_pixels, textColor.get());
     }
@@ -704,8 +703,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize)
     LLPanel::Params icon_params;
     LLRect icon_rect(0, icon_size, icon_size, 0);
 
-    static LLColor4 default_color(0.75f, 0.75f, 0.75f, 1.0f);
-    LLColor4 bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", default_color);
+    static LLUIColor bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
 
     if (!mSelectedGroupIndex)
     {
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 4011a857e5..205089c662 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -279,8 +279,10 @@ void LLHUDNameTag::renderText(bool for_select)
     mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
 
     // *TODO: make this a per-text setting
-    LLColor4 bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
-    bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
+    static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
+    static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
+    LLColor4 bg_color = nametag_bg_color;
+    bg_color.setAlpha(bubble_opacity * alpha_factor);
 
     // scale screen size of borders down
     //RN: for now, text on hud objects is never occluded
@@ -340,8 +342,7 @@ void LLHUDNameTag::renderText(bool for_select)
                 x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f);
             }
 
-            LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
-            label_color.mV[VALPHA] = alpha_factor;
+            LLColor4 label_color(0.f, 0.f, 0.f, alpha_factor);
             hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
         }
     }
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 35bcf65db6..fd0d8b696f 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -138,8 +138,10 @@ void LLHUDText::renderText()
     mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
 
     // *TODO: make this a per-text setting
-    LLColor4 bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
-    bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
+    static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
+    static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
+    LLColor4 bg_color = nametag_bg_color;
+    bg_color.setAlpha(bubble_opacity * alpha_factor);
 
     const S32 border_height = 16;
     const S32 border_width = 16;
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 2ca122c955..9e6cf7ac73 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2881,11 +2881,13 @@ void LLInventoryGalleryItem::draw()
         LLPanel::draw();
 
         // Draw border
-        LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "MenuItemHighlightBgColor" : "TextFgTentativeColor", LLColor4::white);
+        static LLUIColor menu_highlighted_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4::white);;
+        static LLUIColor text_fg_tentative_color = LLUIColorTable::instance().getColor("TextFgTentativeColor", LLColor4::white);;
+        const LLColor4& border_color = mSelected ? menu_highlighted_color : text_fg_tentative_color;
         LLRect border = mThumbnailCtrl->getRect();
         border.mRight = border.mRight + 1;
         border.mTop = border.mTop + 1;
-        gl_rect_2d(border, border_color.get(), false);
+        gl_rect_2d(border, border_color, false);
     }
 }
 
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 6f23477415..59cf3ac02b 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -122,7 +122,7 @@ void LLScriptEditor::drawLineNumbers()
                 const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum ));
                 bool is_cur_line = cursor_line == line.mLineNum;
                 const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
-                const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
+                const LLColor4& fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
                 getScriptFont()->render(
                                  ltext, // string to draw
                                  0, // begin offset
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 81002139be..7480a18d9f 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -368,8 +368,8 @@ void LLSpeakerMgr::update(bool resort_ok)
         return;
     }
 
-    LLColor4 speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
-    LLColor4 overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
+    static const LLUIColor speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
+    static const LLUIColor overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
 
     if(resort_ok) // only allow list changes when user is not interacting with it
     {
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 5180b1808c..0063e0b7fd 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -566,7 +566,7 @@ void LLToolBarView::draw()
     // Draw drop zones if drop of a tool is active
     if (isToolDragged())
     {
-        LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
+        static const LLUIColor drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
 
         for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++)
         {
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0c8dd6dff9..e3b92598f7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -536,9 +536,7 @@ void init_menus()
     ///
     /// set up the colors
     ///
-    LLColor4 color;
-
-    LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
+    LLUIColor context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
 
     gMenuAvatarSelf->setBackgroundColor( context_menu_color );
     gMenuAvatarOther->setBackgroundColor( context_menu_color );
@@ -548,7 +546,7 @@ void init_menus()
 
     gMenuLand->setBackgroundColor( context_menu_color );
 
-    color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
+    LLUIColor color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
     gPopupMenuView->setBackgroundColor( color );
 
     // If we are not in production, use a different color to make it apparent.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index cda8c99594..ae64ee7b92 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1715,15 +1715,15 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
 
 void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
 {
-    LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
-    LLColor4 below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
-    LLColor4 you_own_above_water_color =
+    static const LLUIColor above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
+    static const LLUIColor below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
+    static const LLUIColor you_own_above_water_color =
                         LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" );
-    LLColor4 you_own_below_water_color =
+    static const LLUIColor you_own_below_water_color =
                         LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" );
-    LLColor4 group_own_above_water_color =
+    static const LLUIColor group_own_above_water_color =
                         LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" );
-    LLColor4 group_own_below_water_color =
+    static const LLUIColor group_own_below_water_color =
                         LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" );
 
     F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
@@ -1753,7 +1753,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
         // See DEV-17370 and DEV-29869/SNOW-79 for details.
         approx_radius = llmin(approx_radius, max_radius);
 
-        LLColor4U color = above_water_color;
+        LLColor4U color = above_water_color.get();
         if( objectp->permYouOwner() )
         {
             const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
@@ -1766,29 +1766,29 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
             {
                 if ( objectp->permGroupOwner() )
                 {
-                    color = group_own_above_water_color;
+                    color = group_own_above_water_color.get();
                 }
                 else
                 {
-                color = you_own_above_water_color;
+                color = you_own_above_water_color.get();
             }
             }
             else
             {
                 if ( objectp->permGroupOwner() )
                 {
-                    color = group_own_below_water_color;
+                    color = group_own_below_water_color.get();
                 }
             else
             {
-                color = you_own_below_water_color;
+                color = you_own_below_water_color.get();
             }
         }
         }
         else
         if( pos.mdV[VZ] < water_height )
         {
-            color = below_water_color;
+            color = below_water_color.get();
         }
 
         netmap.renderScaledPointGlobal(
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 58b8a5b677..2e9b5de72b 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -53,6 +53,14 @@
 static const U8  OVERLAY_IMG_COMPONENTS = 4;
 static const F32 LINE_WIDTH = 0.0625f;
 
+bool LLViewerParcelOverlay::sColorSetInitialized = false;
+LLUIColor LLViewerParcelOverlay::sAvailColor;
+LLUIColor LLViewerParcelOverlay::sOwnedColor;
+LLUIColor LLViewerParcelOverlay::sGroupColor;
+LLUIColor LLViewerParcelOverlay::sSelfColor;
+LLUIColor LLViewerParcelOverlay::sForSaleColor;
+LLUIColor LLViewerParcelOverlay::sAuctionColor;
+
 LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
 :   mRegion( region ),
     mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
@@ -60,6 +68,17 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
     mTimeSinceLastUpdate(),
     mOverlayTextureIdx(-1)
 {
+    if (!sColorSetInitialized)
+    {
+        sColorSetInitialized = true;
+        sAvailColor = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
+        sOwnedColor = LLUIColorTable::instance().getColor("PropertyColorOther").get();
+        sGroupColor = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
+        sSelfColor = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
+        sForSaleColor = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
+        sAuctionColor = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+    }
+
     // Create a texture to hold color information.
     // 4 components
     // Use mipmaps = false, clamped, NEAREST filter, for sharp edges
@@ -321,12 +340,12 @@ void LLViewerParcelOverlay::updateOverlayTexture()
         mOverlayTextureIdx = 0;
     }
 
-    const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
-    const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get();
-    const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
-    const LLColor4U self  = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
-    const LLColor4U for_sale  = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
-    const LLColor4U auction  = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+    const LLColor4U avail = sAvailColor.get();
+    const LLColor4U owned = sOwnedColor.get();
+    const LLColor4U group = sGroupColor.get();
+    const LLColor4U self  = sSelfColor.get();
+    const LLColor4U for_sale = sForSaleColor.get();
+    const LLColor4U auction = sAuctionColor.get();
 
     // Create the base texture.
     U8 *raw = mImageRaw->getData();
@@ -339,7 +358,7 @@ void LLViewerParcelOverlay::updateOverlayTexture()
     {
         U8 ownership = mOwnership[i];
 
-        F32 r,g,b,a;
+        U8 r,g,b,a;
 
         // Color stored in low three bits
         switch( ownership & 0x7 )
@@ -433,11 +452,11 @@ void LLViewerParcelOverlay::updatePropertyLines()
         return;
 
     LLColor4U colors[PARCEL_COLOR_MASK + 1];
-    colors[PARCEL_SELF] = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
-    colors[PARCEL_OWNED] = LLUIColorTable::instance().getColor("PropertyColorOther").get();
-    colors[PARCEL_GROUP] = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
-    colors[PARCEL_FOR_SALE] = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
-    colors[PARCEL_AUCTION] = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+    colors[PARCEL_SELF] = sSelfColor.get();
+    colors[PARCEL_OWNED] = sOwnedColor.get();
+    colors[PARCEL_GROUP] = sGroupColor.get();
+    colors[PARCEL_FOR_SALE] = sForSaleColor.get();
+    colors[PARCEL_AUCTION] = sAuctionColor.get();
 
     mEdges.clear();
 
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index d78005e376..03ae464cb8 100644
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -35,6 +35,7 @@
 #include "lluuid.h"
 #include "llviewertexture.h"
 #include "llgl.h"
+#include "lluicolor.h"
 
 class LLViewerRegion;
 class LLVector3;
@@ -123,6 +124,14 @@ private:
     };
 
     std::vector<Edge> mEdges;
+
+    static bool sColorSetInitialized;
+    static LLUIColor sAvailColor;
+    static LLUIColor sOwnedColor;
+    static LLUIColor sGroupColor;
+    static LLUIColor sSelfColor;
+    static LLUIColor sForSaleColor;
+    static LLUIColor sAuctionColor;
 };
 
 #endif
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 15902e8a87..14228b469f 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -222,15 +222,9 @@ public:
         image_rect.mTop = image_rect.mBottom + mImage->getHeight();
         mImage->draw(LLRect((S32)image_rect.mLeft, (S32)image_rect.mTop, (S32)image_rect.mRight, (S32)image_rect.mBottom));
 
-        LLColor4 color;
-        if (mEditor.getReadOnly())
-        {
-            color = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
-        }
-        else
-        {
-            color = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
-        }
+        static const LLUIColor embedded_item_readonly_col = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
+        static const LLUIColor embedded_item_col = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
+        const LLColor4& color = mEditor.getReadOnly() ? embedded_item_readonly_col : embedded_item_col;
 
         F32 right_x;
         mStyle->getFont()->render(mLabel, 0, image_rect.mRight + EMBEDDED_ITEM_LABEL_PADDING, draw_rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::UNDERLINE, LLFontGL::NO_SHADOW, static_cast<S32>(mLabel.length()), S32_MAX, &right_x);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 83df39d606..d5a8ee6cf8 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3531,7 +3531,9 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
         std::deque<LLChat>::iterator chat_iter = mChats.begin();
         mNameText->clearString();
 
-        LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" );
+        static const LLUIColor user_chat_color = LLUIColorTable::instance().getColor("UserChatColor");
+        static const LLUIColor agent_chat_color = LLUIColorTable::instance().getColor("AgentChatColor");
+        const LLColor4& new_chat = isSelf() ? user_chat_color : agent_chat_color;
         LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
         LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
         if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES)
-- 
cgit v1.2.3


From 456d013ba80566bd3c142f03b1754de47c940baf Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 4 Aug 2024 15:51:21 -0400
Subject: Fix various issues with ui elements not updating colors dynamically

---
 indra/llui/llbutton.cpp           |  4 ++--
 indra/llui/llbutton.h             | 14 +++++++-------
 indra/llui/llcheckboxctrl.cpp     |  4 ++--
 indra/llui/llcheckboxctrl.h       |  4 ++--
 indra/llui/llfolderviewitem.cpp   |  4 ++--
 indra/llui/lliconctrl.h           |  2 +-
 indra/llui/llkeywords.cpp         | 14 +++++++-------
 indra/llui/llkeywords.h           | 16 ++++++++--------
 indra/llui/lllineeditor.h         |  8 ++++----
 indra/llui/llmultisliderctrl.cpp  |  4 ++--
 indra/llui/llmultisliderctrl.h    |  4 ++--
 indra/llui/llpanel.cpp            |  6 +++---
 indra/llui/llpanel.h              | 10 +++++-----
 indra/llui/llscrolllistcell.cpp   |  2 +-
 indra/llui/llsliderctrl.cpp       |  4 ++--
 indra/llui/llsliderctrl.h         |  4 ++--
 indra/llui/llspinctrl.cpp         |  2 +-
 indra/llui/llspinctrl.h           |  4 ++--
 indra/llui/lltextbase.cpp         |  4 ++--
 indra/llui/lltextbase.h           |  4 ++--
 indra/llui/lluictrl.cpp           |  2 +-
 indra/llui/lluictrl.h             |  2 +-
 indra/llui/llviewborder.cpp       |  6 +++---
 indra/llui/llviewborder.h         |  6 +++---
 indra/newview/lloutfitgallery.cpp |  4 ++--
 indra/newview/llviewerwindow.cpp  |  4 ++--
 26 files changed, 71 insertions(+), 71 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7b612e445b..30968225a8 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1127,12 +1127,12 @@ void LLButton::setImageSelected(LLPointer<LLUIImage> image)
     mImageSelected = image;
 }
 
-void LLButton::setImageColor(const LLColor4& c)
+void LLButton::setImageColor(const LLUIColor& c)
 {
     mImageColor = c;
 }
 
-void LLButton::setColor(const LLColor4& color)
+void LLButton::setColor(const LLUIColor& color)
 {
     setImageColor(color);
 }
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index a54a5b1a43..4ecea6d473 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -172,8 +172,8 @@ public:
 
     virtual void    onCommit();
 
-    void            setUnselectedLabelColor( const LLColor4& c )        { mUnselectedLabelColor = c; }
-    void            setSelectedLabelColor( const LLColor4& c )          { mSelectedLabelColor = c; }
+    void            setUnselectedLabelColor( const LLUIColor& c )        { mUnselectedLabelColor = c; }
+    void            setSelectedLabelColor( const LLUIColor& c )          { mSelectedLabelColor = c; }
     void            setUseEllipses( bool use_ellipses )                 { mUseEllipses = use_ellipses; }
     void            setUseFontColor( bool use_font_color)               { mUseFontColor = use_font_color; }
 
@@ -224,14 +224,14 @@ public:
     const std::string   getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
 
     void            setImageColor(const std::string& color_control);
-    void            setImageColor(const LLColor4& c);
-    /*virtual*/ void    setColor(const LLColor4& c);
+    void            setImageColor(const LLUIColor& c);
+    /*virtual*/ void    setColor(const LLUIColor& c);
 
     void            setImages(const std::string &image_name, const std::string &selected_name);
 
-    void            setDisabledImageColor(const LLColor4& c)        { mDisabledImageColor = c; }
+    void            setDisabledImageColor(const LLUIColor& c)        { mDisabledImageColor = c; }
 
-    void            setDisabledSelectedLabelColor( const LLColor4& c )  { mDisabledSelectedLabelColor = c; }
+    void            setDisabledSelectedLabelColor( const LLUIColor& c )  { mDisabledSelectedLabelColor = c; }
 
     void            setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
     void            setImageOverlay(const LLUUID& image_id, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
@@ -246,7 +246,7 @@ public:
     virtual bool    setLabelArg( const std::string& key, const LLStringExplicit& text );
     void            setLabelUnselected(const LLStringExplicit& label);
     void            setLabelSelected(const LLStringExplicit& label);
-    void            setDisabledLabelColor( const LLColor4& c )      { mDisabledLabelColor = c; }
+    void            setDisabledLabelColor( const LLUIColor& c )      { mDisabledLabelColor = c; }
 
     void            setFont(const LLFontGL *font)
         { mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); }
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index dea262942b..fc751cfc7f 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -172,11 +172,11 @@ void LLCheckBoxCtrl::setEnabled(bool b)
 
     if (b)
     {
-        mLabel->setColor( mTextEnabledColor.get() );
+        mLabel->setColor( mTextEnabledColor );
     }
     else
     {
-        mLabel->setColor( mTextDisabledColor.get() );
+        mLabel->setColor( mTextDisabledColor );
     }
 }
 
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index fc04a8a781..135f128692 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -110,8 +110,8 @@ public:
 
     void                setBtnFocus() { mButton->setFocus(true); }
 
-    void                setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; }
-    void                setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; }
+    void                setEnabledColor( const LLUIColor&color ) { mTextEnabledColor = color; }
+    void                setDisabledColor( const LLUIColor&color ) { mTextDisabledColor = color; }
 
     void                setLabel( const LLStringExplicit& label );
     std::string         getLabel() const;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 63a600b15f..e4f5664908 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -784,7 +784,7 @@ void LLFolderViewItem::drawHighlight(const bool showContent, const bool hasKeybo
     const S32 FOCUS_LEFT = 1;
 
     // Determine which background color to use for highlighting
-    LLUIColor bgColor = (isFlashing() ? flashColor : selectColor);
+    const LLUIColor& bgColor = (isFlashing() ? flashColor : selectColor);
 
     //--------------------------------------------------------------------------------//
     // Draw highlight for selected items
@@ -999,7 +999,7 @@ void LLFolderViewItem::draw()
     //
     if (!mLabelSuffix.empty())
     {
-        suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
+        suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor.get(),
                           LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
                           S32_MAX, S32_MAX, &right_x);
     }
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index aae1d1d572..29d3f0c3d4 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -79,7 +79,7 @@ public:
 
     std::string getImageName() const;
 
-    void            setColor(const LLColor4& color) { mColor = color; }
+    void            setColor(const LLUIColor& color) { mColor = color; }
     void            setImage(LLPointer<LLUIImage> image) { mImagep = image; }
     const LLPointer<LLUIImage> getImage() { return mImagep; }
 
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index cc567adb75..6eeb96e8ae 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -85,7 +85,7 @@ LLKeywords::~LLKeywords()
 // Add the token as described
 void LLKeywords::addToken(LLKeywordToken::ETokenType type,
                           const std::string& key_in,
-                          const LLColor4& color,
+                          const LLUIColor& color,
                           const std::string& tool_tip_in,
                           const std::string& delimiter_in)
 {
@@ -170,7 +170,7 @@ std::string LLKeywords::getAttribute(std::string_view key)
     return (it != mAttributes.end()) ? it->second : "";
 }
 
-LLColor4 LLKeywords::getColorGroup(std::string_view key_in)
+LLUIColor LLKeywords::getColorGroup(std::string_view key_in)
 {
     std::string color_group = "ScriptText";
     if (key_in == "functions")
@@ -263,10 +263,10 @@ void LLKeywords::processTokens()
 
 void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
 {
-    LLColor4 color;
-    LLColor4 color_group;
-    LLColor4 color_deprecated = getColorGroup("deprecated");
-    LLColor4 color_god_mode = getColorGroup("god-mode");
+    LLUIColor color;
+    LLUIColor color_group;
+    LLUIColor color_deprecated = getColorGroup("deprecated");
+    LLUIColor color_god_mode = getColorGroup("god-mode");
 
     LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN;
     // If a new token type is added here, it must also be added to the 'addToken' method
@@ -725,7 +725,7 @@ void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmen
     insertSegment( seg_list, text_segment, text_len, style, editor);
 }
 
-void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor )
+void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLUIColor& defaultColor, LLTextEditor& editor )
 {
     LLTextSegmentPtr last = seg_list.back();
     S32 new_seg_end = new_segment->getEnd();
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index 6df2da7cd3..328561c92a 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -72,7 +72,7 @@ public:
         TT_TYPE                             // WORD
     } ETokenType;
 
-    LLKeywordToken( ETokenType type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter  )
+    LLKeywordToken( ETokenType type, const LLUIColor& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter  )
         :
         mType( type ),
         mToken( token ),
@@ -87,7 +87,7 @@ public:
     bool                isHead(const llwchar* s) const;
     bool                isTail(const llwchar* s) const;
     const LLWString&    getToken() const        { return mToken; }
-    const LLColor4&     getColor() const        { return mColor; }
+    const LLUIColor&     getColor() const        { return mColor; }
     ETokenType          getType()  const        { return mType; }
     const LLWString&    getToolTip() const      { return mToolTip; }
     const LLWString&    getDelimiter() const    { return mDelimiter; }
@@ -99,7 +99,7 @@ public:
 private:
     ETokenType  mType;
     LLWString   mToken;
-    LLColor4    mColor;
+    LLUIColor    mColor;
     LLWString   mToolTip;
     LLWString   mDelimiter;
 };
@@ -111,7 +111,7 @@ public:
     ~LLKeywords();
 
     void        clearLoaded() { mLoaded = false; }
-    LLColor4    getColorGroup(std::string_view key_in);
+    LLUIColor    getColorGroup(std::string_view key_in);
     bool        isLoaded() const    { return mLoaded; }
 
     void        findSegments(std::vector<LLTextSegmentPtr> *seg_list,
@@ -124,7 +124,7 @@ public:
     // Add the token as described
     void addToken(LLKeywordToken::ETokenType type,
                     const std::string& key,
-                    const LLColor4& color,
+                    const LLUIColor& color,
                     const std::string& tool_tip = LLStringUtil::null,
                     const std::string& delimiter = LLStringUtil::null);
 
@@ -153,7 +153,7 @@ public:
         bool mOwner;
 
 
-        LLColor4            mColor;
+        LLUIColor            mColor;
     };
 
     typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t;
@@ -161,7 +161,7 @@ public:
     keyword_iterator_t begin() const { return mWordTokenMap.begin(); }
     keyword_iterator_t end() const { return mWordTokenMap.end(); }
 
-    typedef std::map<WStringMapIndex, LLColor4> group_color_map_t;
+    typedef std::map<WStringMapIndex, LLUIColor> group_color_map_t;
     typedef group_color_map_t::const_iterator color_iterator_t;
     group_color_map_t   mColorGroupMap;
 
@@ -174,7 +174,7 @@ protected:
     void        insertSegment(std::vector<LLTextSegmentPtr>& seg_list,
                               LLTextSegmentPtr new_segment,
                               S32 text_len,
-                              const LLColor4 &defaultColor,
+                              const LLUIColor &defaultColor,
                               class LLTextEditor& editor);
     void        insertSegments(const LLWString& wtext,
                                std::vector<LLTextSegmentPtr>& seg_list,
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 1cb7cac854..22ec9ecc8a 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -224,12 +224,12 @@ public:
     void            setRevertOnEsc( bool b )        { mRevertOnEsc = b; }
     void            setKeystrokeOnEsc(bool b)       { mKeystrokeOnEsc = b; }
 
-    void setCursorColor(const LLColor4& c)          { mCursorColor = c; }
+    void setCursorColor(const LLUIColor& c)          { mCursorColor = c; }
     const LLColor4& getCursorColor() const          { return mCursorColor.get(); }
 
-    void setFgColor( const LLColor4& c )            { mFgColor = c; }
-    void setReadOnlyFgColor( const LLColor4& c )    { mReadOnlyFgColor = c; }
-    void setTentativeFgColor(const LLColor4& c)     { mTentativeFgColor = c; }
+    void setFgColor( const LLUIColor& c )            { mFgColor = c; }
+    void setReadOnlyFgColor( const LLUIColor& c )    { mReadOnlyFgColor = c; }
+    void setTentativeFgColor(const LLUIColor& c)     { mTentativeFgColor = c; }
 
     const LLColor4& getFgColor() const          { return mFgColor.get(); }
     const LLColor4& getReadOnlyFgColor() const  { return mReadOnlyFgColor.get(); }
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 6b9a1b1c13..3235110662 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -440,7 +440,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
 
     if( mLabelBox )
     {
-        mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+        mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
     }
 
     mMultiSlider->setEnabled( b );
@@ -452,7 +452,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
 
     if( mTextBox )
     {
-        mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+        mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
     }
 }
 
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index fee05c92fd..dec6cb48b9 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -130,8 +130,8 @@ public:
     bool            canAddSliders() { return mMultiSlider->canAddSliders(); }
 
     void            setLabel(const std::string& label)              { if (mLabelBox) mLabelBox->setText(label); }
-    void            setLabelColor(const LLColor4& c)            { mTextEnabledColor = c; }
-    void            setDisabledLabelColor(const LLColor4& c)    { mTextDisabledColor = c; }
+    void            setLabelColor(const LLUIColor& c)            { mTextEnabledColor = c; }
+    void            setDisabledLabelColor(const LLUIColor& c)    { mTextDisabledColor = c; }
 
     boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
     boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index ab3433af98..8e96bdde80 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -490,8 +490,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
 
     setBackgroundVisible(p.background_visible);
     setBackgroundOpaque(p.background_opaque);
-    setBackgroundColor(p.bg_opaque_color().get());
-    setTransparentColor(p.bg_alpha_color().get());
+    setBackgroundColor(p.bg_opaque_color);
+    setTransparentColor(p.bg_alpha_color);
     mBgOpaqueImage = p.bg_opaque_image();
     mBgAlphaImage = p.bg_alpha_image();
     mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
@@ -693,7 +693,7 @@ void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (
     }
 }
 
-void LLPanel::childSetColor(std::string_view id, const LLColor4& color)
+void LLPanel::childSetColor(std::string_view id, const LLUIColor& color)
 {
     LLUICtrl* child = findChild<LLUICtrl>(id);
     if (child)
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index f6aa91fb30..f085c123c1 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -134,16 +134,16 @@ public:
     bool            hasBorder() const { return mBorder != NULL; }
     void            setBorderVisible( bool b );
 
-    void            setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; }
+    void            setBackgroundColor( const LLUIColor& color ) { mBgOpaqueColor = color; }
     const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; }
-    void            setTransparentColor(const LLColor4& color) { mBgAlphaColor = color; }
+    void            setTransparentColor(const LLUIColor& color) { mBgAlphaColor = color; }
     const LLColor4& getTransparentColor() const { return mBgAlphaColor; }
     void            setBackgroundImage(LLUIImage* image) { mBgOpaqueImage = image; }
     void            setTransparentImage(LLUIImage* image) { mBgAlphaImage = image; }
     LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; }
     LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; }
-    LLColor4        getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
-    LLColor4        getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
+    const LLColor4&        getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
+    const LLColor4&        getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
     void            setBackgroundVisible( bool b )  { mBgVisible = b; }
     bool            isBackgroundVisible() const { return mBgVisible; }
     void            setBackgroundOpaque(bool b)     { mBgOpaque = b; }
@@ -192,7 +192,7 @@ public:
     // which takes a generic slot.  Or use mCommitCallbackRegistrar.add() with
     // a named callback and reference it in XML.
     void childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
-    void childSetColor(std::string_view id, const LLColor4& color);
+    void childSetColor(std::string_view id, const LLUIColor& color);
 
     LLCtrlSelectionInterface* childGetSelectionInterface(std::string_view id) const;
     LLCtrlListInterface* childGetListInterface(std::string_view id) const;
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 88ef4eb0c1..7ef2e54429 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -465,7 +465,7 @@ LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p)
         setWidth(rect.getWidth()); //check_box->getWidth();
     }
 
-    mCheckBox->setColor(p.color);
+    mCheckBox->setColor(p.color());
 }
 
 
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 0c3ab6bda0..66e97f093f 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -393,7 +393,7 @@ void LLSliderCtrl::setEnabled(bool b)
 
     if( mLabelBox )
     {
-        mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+        mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
     }
 
     mSlider->setEnabled( b );
@@ -405,7 +405,7 @@ void LLSliderCtrl::setEnabled(bool b)
 
     if( mTextBox )
     {
-        mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+        mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
     }
 }
 
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index a55e3bf6e9..311377a61f 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -107,8 +107,8 @@ public:
     F32             getMaxValue() const { return mSlider->getMaxValue(); }
 
     void            setLabel(const LLStringExplicit& label)     { if (mLabelBox) mLabelBox->setText(label); }
-    void            setLabelColor(const LLColor4& c)            { mTextEnabledColor = c; }
-    void            setDisabledLabelColor(const LLColor4& c)    { mTextDisabledColor = c; }
+    void            setLabelColor(const LLUIColor& c)            { mTextEnabledColor = c; }
+    void            setDisabledLabelColor(const LLUIColor& c)    { mTextDisabledColor = c; }
 
     boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
     boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 7d41d80334..8cd3e6419a 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -310,7 +310,7 @@ void LLSpinCtrl::updateLabelColor()
 {
     if( mLabelBox )
     {
-        mLabelBox->setColor( getEnabled() ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+        mLabelBox->setColor( getEnabled() ? mTextEnabledColor : mTextDisabledColor );
     }
 }
 
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index 75f1830d80..58b38dc630 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -77,8 +77,8 @@ public:
     virtual void    setPrecision(S32 precision);
 
     void            setLabel(const LLStringExplicit& label);
-    void            setLabelColor(const LLColor4& c)            { mTextEnabledColor = c; updateLabelColor(); }
-    void            setDisabledLabelColor(const LLColor4& c)    { mTextDisabledColor = c; updateLabelColor();}
+    void            setLabelColor(const LLUIColor& c)            { mTextEnabledColor = c; updateLabelColor(); }
+    void            setDisabledLabelColor(const LLUIColor& c)    { mTextDisabledColor = c; updateLabelColor();}
     void            setAllowEdit(bool allow_edit);
 
     virtual void    onTabInto();
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index b7af5d2b1b..9e165026ac 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1411,14 +1411,14 @@ void LLTextBase::draw()
 
 
 //virtual
-void LLTextBase::setColor( const LLColor4& c )
+void LLTextBase::setColor( const LLUIColor& c )
 {
     mFgColor = c;
     mStyleDirty = true;
 }
 
 //virtual
-void LLTextBase::setReadOnlyColor(const LLColor4 &c)
+void LLTextBase::setReadOnlyColor(const LLUIColor &c)
 {
     mReadOnlyFgColor = c;
     mStyleDirty = true;
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 4120d9ea32..0c8e398fc5 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -372,8 +372,8 @@ public:
 
     // LLUICtrl interface
     /*virtual*/ bool        acceptsTextInput() const override { return !mReadOnly; }
-    /*virtual*/ void        setColor(const LLColor4& c) override;
-    virtual     void        setReadOnlyColor(const LLColor4 &c);
+    /*virtual*/ void        setColor(const LLUIColor& c) override;
+    virtual     void        setReadOnlyColor(const LLUIColor& c);
     /*virtual*/ void        onVisibilityChange(bool new_visibility) override;
 
     /*virtual*/ void        setValue(const LLSD& value) override;
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index cb86a79407..cbabb5a933 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -1023,7 +1023,7 @@ bool LLUICtrl::getTentative() const
 }
 
 // virtual
-void LLUICtrl::setColor(const LLColor4& color)
+void LLUICtrl::setColor(const LLUIColor& color)
 { }
 
 F32 LLUICtrl::getCurrentTransparency()
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index fb8fc0c5ea..8cd9950917 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -216,7 +216,7 @@ public:
     // selected radio button, etc.).  Defaults to no-op.
     virtual void    clear();
 
-    virtual void    setColor(const LLColor4& color);
+    virtual void    setColor(const LLUIColor& color);
 
     // Ansariel: Changed to virtual. We might want to change the transparency ourself!
     virtual F32 getCurrentTransparency();
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index c1777c972c..d53fd6eb91 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -73,14 +73,14 @@ LLViewBorder::LLViewBorder(const LLViewBorder::Params& p)
     mStyle(p.render_style)
 {}
 
-void LLViewBorder::setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light )
+void LLViewBorder::setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light )
 {
     mShadowDark = shadow_dark;
     mHighlightLight = highlight_light;
 }
 
-void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
-                               const LLColor4& highlight_light, const LLColor4& highlight_dark )
+void LLViewBorder::setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
+                               const LLUIColor& highlight_light, const LLUIColor& highlight_dark )
 {
     mShadowDark = shadow_dark;
     mShadowLight = shadow_light;
diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h
index be499bb534..1f118a0d20 100644
--- a/indra/llui/llviewborder.h
+++ b/indra/llui/llviewborder.h
@@ -77,9 +77,9 @@ public:
     S32         getBorderWidth() const              { return mBorderWidth; }
     void        setBevel(EBevel bevel)              { mBevel = bevel; }
     EBevel      getBevel() const                    { return mBevel; }
-    void        setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light );
-    void        setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
-                                   const LLColor4& highlight_light, const LLColor4& highlight_dark );
+    void        setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light );
+    void        setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
+                                   const LLUIColor& highlight_light, const LLUIColor& highlight_dark );
     void        setTexture( const class LLUUID &image_id );
 
     LLColor4    getHighlightLight() {return mHighlightLight.get();}
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index f889a4439e..d7df9ceadc 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1020,8 +1020,8 @@ void LLOutfitGalleryItem::setOutfitWorn(bool value)
     LLStringUtil::format_map_t worn_string_args;
     std::string worn_string = getString("worn_string", worn_string_args);
     LLUIColor text_color = LLUIColorTable::instance().getColor("White", LLColor4::white);
-    mOutfitWornText->setReadOnlyColor(text_color.get());
-    mOutfitNameText->setReadOnlyColor(text_color.get());
+    mOutfitWornText->setReadOnlyColor(text_color);
+    mOutfitNameText->setReadOnlyColor(text_color);
     mOutfitWornText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
     mOutfitNameText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
     mOutfitWornText->setValue(value ? worn_string : "");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f6de8377f3..f51850a644 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2190,7 +2190,7 @@ void LLViewerWindow::initWorldUI()
         gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
         gStatusBar->setShape(status_bar_container->getLocalRect());
         // sync bg color with menu bar
-        gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+        gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor());
         // add InBack so that gStatusBar won't be drawn over menu
         status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
         status_bar_container->setVisible(true);
@@ -2199,7 +2199,7 @@ void LLViewerWindow::initWorldUI()
         LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
 
         navbar->setShape(nav_bar_container->getLocalRect());
-        navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+        navbar->setBackgroundColor(gMenuBarView->getBackgroundColor());
         nav_bar_container->addChild(navbar);
         nav_bar_container->setVisible(true);
     }
-- 
cgit v1.2.3


From 9e777e1109035b40989ac13eb3a73323307ff151 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 4 Aug 2024 15:55:50 -0400
Subject: Fix various issues with text segments not updating UI color

---
 indra/llui/lltextbase.cpp                  | 14 +++++++-------
 indra/llui/lltextbase.h                    | 12 ++++++------
 indra/newview/llchatitemscontainerctrl.cpp | 11 +++--------
 indra/newview/llpanelpermissions.cpp       |  2 +-
 indra/newview/llsidepaneliteminfo.cpp      |  2 +-
 5 files changed, 18 insertions(+), 23 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 9e165026ac..e09fef40df 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2202,8 +2202,8 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
 void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
-    LLStyle::Params style_params(input_params);
-    style_params.fillFrom(getStyleParams());
+    LLStyle::Params style_params(getStyleParams());
+    style_params.overwriteFrom(input_params);
 
     S32 part = (S32)LLTextParser::WHOLE;
     if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
@@ -3246,8 +3246,8 @@ F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_e
 bool LLTextSegment::canEdit() const { return false; }
 void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
 void LLTextSegment::linkToDocument(LLTextBase*) {}
-const LLColor4& LLTextSegment::getColor() const { return LLColor4::white; }
-//void LLTextSegment::setColor(const LLColor4 &color) {}
+const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; }
+//void LLTextSegment::setColor(const LLUIColor &color) {}
 LLStyleConstSP LLTextSegment::getStyle() const {static LLStyleConstSP sp(new LLStyle()); return sp; }
 void LLTextSegment::setStyle(LLStyleConstSP style) {}
 void LLTextSegment::setToken( LLKeywordToken* token ) {}
@@ -3293,7 +3293,7 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e
     }
 }
 
-LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLNormalTextSegment::LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
 :   LLTextSegment(start, end),
     mToken(NULL),
     mEditor(editor)
@@ -3603,7 +3603,7 @@ LLLabelTextSegment::LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end
 {
 }
 
-LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLLabelTextSegment::LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
 :   LLNormalTextSegment(color, start, end, editor, is_visible)
 {
 }
@@ -3627,7 +3627,7 @@ LLEmojiTextSegment::LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end,
 {
 }
 
-LLEmojiTextSegment::LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLEmojiTextSegment::LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
     : LLNormalTextSegment(color, start, end, editor, is_visible)
 {
 }
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 0c8e398fc5..00cf66b134 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -84,8 +84,8 @@ public:
     virtual void                unlinkFromDocument(class LLTextBase* editor);
     virtual void                linkToDocument(class LLTextBase* editor);
 
-    virtual const LLColor4&     getColor() const;
-    //virtual void              setColor(const LLColor4 &color);
+    virtual const LLUIColor&     getColor() const;
+    //virtual void              setColor(const LLUIColor &color);
     virtual LLStyleConstSP      getStyle() const;
     virtual void                setStyle(LLStyleConstSP style);
     virtual void                setToken( LLKeywordToken* token );
@@ -125,7 +125,7 @@ class LLNormalTextSegment : public LLTextSegment
 {
 public:
     LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
-    LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+    LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
     virtual ~LLNormalTextSegment();
 
     /*virtual*/ bool                getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
@@ -133,7 +133,7 @@ public:
     /*virtual*/ S32                 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
     /*virtual*/ F32                 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
     /*virtual*/ bool                canEdit() const { return true; }
-    /*virtual*/ const LLColor4&     getColor() const                    { return mStyle->getColor(); }
+    /*virtual*/ const LLUIColor&     getColor() const                    { return mStyle->getColor(); }
     /*virtual*/ LLStyleConstSP      getStyle() const                    { return mStyle; }
     /*virtual*/ void                setStyle(LLStyleConstSP style)  { mStyle = style; }
     /*virtual*/ void                setToken( LLKeywordToken* token )   { mToken = token; }
@@ -170,7 +170,7 @@ class LLLabelTextSegment : public LLNormalTextSegment
 {
 public:
     LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
-    LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+    LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
 
 protected:
 
@@ -184,7 +184,7 @@ class LLEmojiTextSegment : public LLNormalTextSegment
 {
 public:
     LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor);
-    LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+    LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
 
     bool canEdit() const override { return false; }
     bool handleToolTip(S32 x, S32 y, MASK mask) override;
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index a5c26eff9c..f5519a8c88 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -222,14 +222,9 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
         if (mSourceType == CHAT_SOURCE_AGENT || mSourceType == CHAT_SOURCE_OBJECT)
         {
             LLStyle::Params style_params_name;
-
-            LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
-            style_params_name.color(user_name_color);
-
-            std::string font_name = LLFontGL::nameFromFont(messageFont);
-            std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
-            style_params_name.font.name(font_name);
-            style_params_name.font.size(font_style_size);
+            style_params_name.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+            style_params_name.font.name = LLFontGL::nameFromFont(messageFont);
+            style_params_name.font.size = LLFontGL::sizeFromFont(messageFont);
 
             style_params_name.link_href = notification["sender_slurl"].asString();
             style_params_name.is_link = true;
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index aa35335ad9..0ce1f0f9d3 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -399,7 +399,7 @@ void LLPanelPermissions::refresh()
 
     // Style for creator and owner links (both group and agent)
     LLStyle::Params style_params;
-    LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+    LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
     style_params.color = link_color;
     style_params.readonly_color = link_color;
     style_params.is_link = true; // link will be added later
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 7775e3d9f6..fccf745a74 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -351,7 +351,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
 
     // Style for creator and owner links
     LLStyle::Params style_params;
-    LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+    LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
     style_params.color = link_color;
     style_params.readonly_color = link_color;
     style_params.is_link = true; // link will be added later
-- 
cgit v1.2.3


From 409b9eebe12b864280ead8e3c537a73e40548b97 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 4 Aug 2024 20:02:53 -0400
Subject: Fix chat text segments not dynamically updating when colors changed
 in preferences

---
 indra/llui/lllineeditor.h                      |  2 +-
 indra/llui/llstyle.cpp                         |  6 +-
 indra/llui/llstyle.h                           | 18 ++++--
 indra/llui/lltextbase.cpp                      | 12 ++--
 indra/llui/lltextparser.cpp                    | 78 +++++++++++++-------------
 indra/llui/lltextparser.h                      |  5 +-
 indra/newview/llchathistory.cpp                |  4 +-
 indra/newview/llchatitemscontainerctrl.cpp     | 10 ++--
 indra/newview/llconversationview.cpp           |  2 +-
 indra/newview/llfloatercolorpicker.cpp         | 12 ++--
 indra/newview/llfloaterimnearbychathandler.cpp |  9 ++-
 indra/newview/llfloaterscriptedprefs.cpp       |  2 -
 indra/newview/llviewerchat.cpp                 | 10 +++-
 indra/newview/llviewerchat.h                   |  5 +-
 indra/newview/llviewerwindow.cpp               |  2 +-
 15 files changed, 94 insertions(+), 83 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 22ec9ecc8a..cdd22413e7 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -204,7 +204,7 @@ public:
     void            setText(const LLStringExplicit &new_text);
 
     const std::string& getText() const override { return mText.getString(); }
-    LLWString       getWText() const    { return mText.getWString(); }
+    const LLWString&   getWText() const    { return mText.getWString(); }
     LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines
 
     S32             getLength() const   { return mText.length(); }
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index abf6e1284b..df4b0ef6a0 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -33,11 +33,12 @@
 #include "llui.h"
 
 LLStyle::Params::Params()
-:   visible("visible", true),
+    : visible("visible", true),
     drop_shadow("drop_shadow", LLFontGL::NO_SHADOW),
     color("color", LLColor4::black),
     readonly_color("readonly_color", LLColor4::black),
     selected_color("selected_color", LLColor4::black),
+    alpha("alpha", 1.f),
     font("font", LLFontGL::getFontMonospace()),
     image("image"),
     link_href("href"),
@@ -54,7 +55,8 @@ LLStyle::LLStyle(const LLStyle::Params& p)
     mLink(p.link_href),
     mIsLink(p.is_link.isProvided() ? p.is_link : !p.link_href().empty()),
     mDropShadow(p.drop_shadow),
-    mImagep(p.image())
+    mImagep(p.image()),
+    mAlpha(p.alpha)
 {}
 
 void LLStyle::setFont(const LLFontGL* font)
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index 7dbccfff87..e506895de5 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -44,6 +44,7 @@ public:
         Optional<LLUIColor>             color,
                                         readonly_color,
                                         selected_color;
+        Optional<F32>                   alpha;
         Optional<const LLFontGL*>       font;
         Optional<LLUIImage*>            image;
         Optional<std::string>           link_href;
@@ -61,6 +62,9 @@ public:
     const LLUIColor& getSelectedColor() const { return mSelectedColor; }
     void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; }
 
+    F32 getAlpha() const { return mAlpha; }
+    void setAlpha(F32 alpha) { mAlpha = alpha; }
+
     bool isVisible() const;
     void setVisible(bool is_visible);
 
@@ -89,7 +93,8 @@ public:
             && mFont == rhs.mFont
             && mLink == rhs.mLink
             && mImagep == rhs.mImagep
-            && mDropShadow == rhs.mDropShadow;
+            && mDropShadow == rhs.mDropShadow
+            && mAlpha == rhs.mAlpha;
     }
 
     bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); }
@@ -98,18 +103,19 @@ public:
     LLFontGL::ShadowType        mDropShadow;
 
 protected:
-    ~LLStyle() { }
+    ~LLStyle() = default;
 
 private:
-    bool                mVisible;
+    std::string         mFontName;
+    std::string         mLink;
     LLUIColor           mColor;
     LLUIColor           mReadOnlyColor;
     LLUIColor           mSelectedColor;
-    std::string         mFontName;
     const LLFontGL*     mFont;
-    std::string         mLink;
-    bool                mIsLink;
     LLPointer<LLUIImage> mImagep;
+    F32                 mAlpha;
+    bool                mVisible;
+    bool                mIsLink;
 };
 
 typedef LLPointer<LLStyle> LLStyleSP;
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index e09fef40df..0aebf7543c 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2417,16 +2417,14 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
     {
         LLStyle::Params highlight_params(style_params);
 
-        LLSD pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color(), (LLTextParser::EHighlightPosition)highlight_part);
+        auto pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color, (LLTextParser::EHighlightPosition)highlight_part);
         for (S32 i = 0; i < pieces.size(); i++)
         {
-            LLSD color_llsd = pieces[i]["color"];
-            LLColor4 lcolor;
-            lcolor.setValue(color_llsd);
-            highlight_params.color = lcolor;
+            const auto& piece_pair = pieces[i];
+            highlight_params.color = piece_pair.second;
 
             LLWString wide_text;
-            wide_text = utf8str_to_wstring(pieces[i]["text"].asString());
+            wide_text = utf8str_to_wstring(piece_pair.first);
 
             S32 cur_length = getLength();
             LLStyleConstSP sp(new LLStyle(highlight_params));
@@ -3333,7 +3331,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
 
     const LLFontGL* font = mStyle->getFont();
 
-    LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor())  % alpha;
+    LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor())  % (alpha * mStyle->getAlpha());
 
     if( selection_start > seg_start )
     {
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 097b168106..d4ef77664e 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -36,6 +36,7 @@
 #include "llmath.h"
 #include "v4color.h"
 #include "lldir.h"
+#include "lluicolor.h"
 
 //
 // Member Functions
@@ -80,14 +81,14 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
     return static_cast<S32>(found);
 }
 
-LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLColor4 &color, EHighlightPosition part, S32 index)
+LLTextParser::parser_out_vec_t LLTextParser::parsePartialLineHighlights(const std::string &text, const LLUIColor& color, EHighlightPosition part, S32 index)
 {
     loadKeywords();
 
     //evil recursive string atomizer.
-    LLSD ret_llsd, start_llsd, middle_llsd, end_llsd;
+    parser_out_vec_t ret_vec, start_vec, middle_vec, end_vec;
 
-    for (S32 i=index;i<mHighlights.size();i++)
+    for (S32 i=index, size = (S32)mHighlights.size();i< size;i++)
     {
         S32 condition = mHighlights[i]["condition"];
         if ((S32)mHighlights[i]["highlight"]==PART && condition!=MATCHES)
@@ -104,72 +105,69 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
                     EHighlightPosition newpart;
                     if (start==0)
                     {
-                        start_llsd[0]["text"] =text.substr(0,end);
-                        start_llsd[0]["color"]=mHighlights[i]["color"];
+                        if (start_vec.empty())
+                        {
+                            start_vec.push_back(std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"])));
+                        }
+                        else
+                        {
+                            start_vec[0] = std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"]));
+                        }
 
                         if (end < len)
                         {
                             if (part==END   || part==WHOLE) newpart=END; else newpart=MIDDLE;
-                            end_llsd=parsePartialLineHighlights(text.substr( end ),color,newpart,i);
+                            end_vec = parsePartialLineHighlights(text.substr( end ),color,newpart,i);
                         }
                     }
                     else
                     {
                         if (part==START || part==WHOLE) newpart=START; else newpart=MIDDLE;
 
-                        start_llsd=parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
+                        start_vec = parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
 
                         if (end < len)
                         {
-                            middle_llsd[0]["text"] =text.substr(start,end);
-                            middle_llsd[0]["color"]=mHighlights[i]["color"];
+                            if (middle_vec.empty())
+                            {
+                                middle_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
+                            }
+                            else
+                            {
+                                middle_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
+                            }
 
                             if (part==END   || part==WHOLE) newpart=END; else newpart=MIDDLE;
 
-                            end_llsd=parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
+                            end_vec = parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
                         }
                         else
                         {
-                            end_llsd[0]["text"] =text.substr(start,end);
-                            end_llsd[0]["color"]=mHighlights[i]["color"];
+                            if (end_vec.empty())
+                            {
+                                end_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
+                            }
+                            else
+                            {
+                                end_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
+                            }
                         }
                     }
 
-                    S32 retcount=0;
-
-                    //FIXME These loops should be wrapped into a subroutine.
-                    for (LLSD::array_iterator iter = start_llsd.beginArray();
-                         iter != start_llsd.endArray();++iter)
-                    {
-                        LLSD highlight = *iter;
-                        ret_llsd[retcount++]=highlight;
-                    }
-
-                    for (LLSD::array_iterator iter = middle_llsd.beginArray();
-                         iter != middle_llsd.endArray();++iter)
-                    {
-                        LLSD highlight = *iter;
-                        ret_llsd[retcount++]=highlight;
-                    }
-
-                    for (LLSD::array_iterator iter = end_llsd.beginArray();
-                         iter != end_llsd.endArray();++iter)
-                    {
-                        LLSD highlight = *iter;
-                        ret_llsd[retcount++]=highlight;
-                    }
+                    ret_vec.reserve(start_vec.size() + middle_vec.size() + end_vec.size());
+                    ret_vec.insert(ret_vec.end(), start_vec.begin(), start_vec.end());
+                    ret_vec.insert(ret_vec.end(), middle_vec.begin(), middle_vec.end());
+                    ret_vec.insert(ret_vec.end(), end_vec.begin(), end_vec.end());
 
-                    return ret_llsd;
+                    return ret_vec;
                 }
             }
         }
     }
 
     //No patterns found.  Just send back what was passed in.
-    ret_llsd[0]["text"] =text;
-    LLSD color_sd = color.getValue();
-    ret_llsd[0]["color"]=color_sd;
-    return ret_llsd;
+    ret_vec.push_back(std::make_pair(text, color));
+    return ret_vec;
 }
 
 bool LLTextParser::parseFullLineHighlights(const std::string &text, LLColor4 *color)
diff --git a/indra/llui/lltextparser.h b/indra/llui/lltextparser.h
index 20fcc07e4c..c5756f9b4c 100644
--- a/indra/llui/lltextparser.h
+++ b/indra/llui/lltextparser.h
@@ -30,6 +30,7 @@
 
 #include "llsd.h"
 #include "llsingleton.h"
+#include "lluicolor.h"
 
 class LLUUID;
 class LLVector3d;
@@ -45,7 +46,9 @@ public:
     typedef enum e_highlight_position { WHOLE, START, MIDDLE, END } EHighlightPosition;
     typedef enum e_dialog_action { ACTION_NONE, ACTION_CLOSE, ACTION_ADD, ACTION_COPY, ACTION_UPDATE } EDialogAction;
 
-    LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color, EHighlightPosition part=WHOLE, S32 index=0);
+    using parser_out_vec_t = std::vector<std::pair<std::string, LLUIColor>>;
+
+    parser_out_vec_t parsePartialLineHighlights(const std::string &text,const LLUIColor &color, EHighlightPosition part=WHOLE, S32 index=0);
     bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
 
 private:
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 8eba9aee37..a48e22bc73 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -1239,10 +1239,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
         mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height);
     }
 
+    F32 alpha = 1.f;
     LLUIColor txt_color = LLUIColorTable::instance().getColor("White");
     LLUIColor name_color(txt_color);
+    LLViewerChat::getChatColor(chat, txt_color, alpha);
 
-    LLViewerChat::getChatColor(chat,txt_color);
     LLFontGL* fontp = LLViewerChat::getChatFont();
     std::string font_name = LLFontGL::nameFromFont(fontp);
     std::string font_size = LLFontGL::sizeFromFont(fontp);
@@ -1250,6 +1251,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
     LLStyle::Params body_message_params;
     body_message_params.color(txt_color);
     body_message_params.readonly_color(txt_color);
+    body_message_params.alpha(alpha);
     body_message_params.font.name(font_name);
     body_message_params.font.size(font_size);
     body_message_params.font.style(input_append_params.font.style);
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index f5519a8c88..550dfeb802 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -134,8 +134,8 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
 
     std::string color_name = notification["text_color"].asString();
 
-    LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
-    textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
+    LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
+    F32 textAlpha = (F32)notification["color_alpha"].asReal();
 
     S32 font_size = notification["font_size"].asInteger();
 
@@ -152,6 +152,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
     {
         LLStyle::Params style_params;
         style_params.color(textColor);
+        style_params.alpha(textAlpha);
         std::string font_name = LLFontGL::nameFromFont(messageFont);
         std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
         style_params.font.name(font_name);
@@ -190,8 +191,8 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
 
     std::string color_name = notification["text_color"].asString();
 
-    LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
-    textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
+    LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
+    F32 textAlpha = (F32)notification["color_alpha"].asReal();
 
     S32 font_size = notification["font_size"].asInteger();
 
@@ -269,6 +270,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
     {
         LLStyle::Params style_params;
         style_params.color(textColor);
+        style_params.alpha(textAlpha);
         std::string font_name = LLFontGL::nameFromFont(messageFont);
         std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
         style_params.font.name(font_name);
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 72d08428d3..cb2370f413 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -652,7 +652,7 @@ void LLConversationViewParticipant::draw()
     static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);
     static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
     static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
-    static LLUIColor sFriendColor = LLUIColorTable::instance().getColor("ConversationFriendColor");;
+    static LLUIColor sFriendColor = LLUIColorTable::instance().getColor("ConversationFriendColor");
 
     const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
 
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 603f54fb49..cd45093856 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -110,12 +110,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show
 
     // create user interface for this picker
     createUI ();
-
-    if (!mCanApplyImmediately)
-    {
-        mApplyImmediateCheck->setEnabled(false);
-        mApplyImmediateCheck->set(false);
-    }
 }
 
 LLFloaterColorPicker::~LLFloaterColorPicker()
@@ -226,6 +220,12 @@ bool LLFloaterColorPicker::postBuild()
     mApplyImmediateCheck->set(gSavedSettings.getBOOL("ApplyColorImmediately"));
     mApplyImmediateCheck->setCommitCallback(onImmediateCheck, this);
 
+    if (!mCanApplyImmediately)
+    {
+        mApplyImmediateCheck->setEnabled(false);
+        mApplyImmediateCheck->set(false);
+    }
+
     childSetCommitCallback("rspin", onTextCommit, (void*)this );
     childSetCommitCallback("gspin", onTextCommit, (void*)this );
     childSetCommitCallback("bspin", onTextCommit, (void*)this );
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 5cf02d1ec0..a614299e03 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -535,14 +535,13 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
 
         if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat"))
         {
-
-            LLColor4 txt_color;
-
-            LLViewerChat::getChatColor(chat_msg,txt_color);
+            LLUIColor txt_color;
+            F32 alpha = 1.f;
+            LLViewerChat::getChatColor(chat_msg, txt_color, alpha);
 
             LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
                                                 chat_msg.mFromName,
-                                                txt_color,
+                                                txt_color % alpha,
                                                 chat_msg.mFromID);
             return;
         }
diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp
index a38c4b51f2..fa31cd72c1 100644
--- a/indra/newview/llfloaterscriptedprefs.cpp
+++ b/indra/newview/llfloaterscriptedprefs.cpp
@@ -54,8 +54,6 @@ bool LLFloaterScriptEdPrefs::postBuild()
 void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
 {
     LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));
-    mEditor->initKeywords();
-    mEditor->loadKeywords();
 }
 
 void LLFloaterScriptEdPrefs::getUIColor(LLUICtrl* ctrl, const LLSD& param)
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 597cf3c98c..8b01c4ef88 100644
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -41,7 +41,7 @@
 LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal;
 
 //static
-void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
+void LLViewerChat::getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha)
 {
     if(chat.mMuted)
     {
@@ -90,7 +90,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
                 }
                 break;
             default:
-                r_color.setToWhite();
+                r_color = LLUIColorTable::instance().getColor("White");
         }
 
         if (!chat.mPosAgent.isExactlyZero())
@@ -101,7 +101,11 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
             if (distance_squared > dist_near_chat * dist_near_chat)
             {
                 // diminish far-off chat
-                r_color.mV[VALPHA] = 0.8f;
+                r_color_alpha = 0.8f;
+            }
+            else
+            {
+                r_color_alpha = 1.0f;
             }
         }
     }
diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h
index a84d7dbc5d..6138358caf 100644
--- a/indra/newview/llviewerchat.h
+++ b/indra/newview/llviewerchat.h
@@ -29,15 +29,14 @@
 
 #include "llchat.h"
 #include "llfontgl.h"
-#include "v4color.h"
-
+#include "lluicolor.h"
 
 class LLViewerChat
 {
 public:
     typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
 
-    static void getChatColor(const LLChat& chat, LLColor4& r_color);
+    static void getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha);
     static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
     static LLFontGL* getChatFont();
     static S32 getChatFontSize();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f51850a644..417cece8eb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2583,7 +2583,7 @@ void LLViewerWindow::setNormalControlsVisible( bool visible )
 void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
 {
     LLSD args;
-    LLColor4 new_bg_color;
+    LLUIColor new_bg_color;
 
     // god more important than project, proj more important than grid
     if ( god_mode )
-- 
cgit v1.2.3


From f63a371f92c90e73fd6e0bc42d33b75500a7e1c0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 5 Aug 2024 06:47:06 -0400
Subject: macOS build fix attempt

---
 indra/llui/llkeywords.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 6eeb96e8ae..7bf43c22c1 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -296,7 +296,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
     }
 
     color_group = getColorGroup(group);
-    LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL;
+    LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group.get() << "'" << LL_ENDL;
 
     if (tokens.isMap())
     {
@@ -378,7 +378,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
     }
     else if (tokens.isArray())  // Currently nothing should need this, but it's here for completeness
     {
-        LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL;
+        LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color.get() << LL_ENDL;
         for (S32 count = 0; count < tokens.size(); ++count)
         {
             addToken(token_type, tokens[count], color, "");
-- 
cgit v1.2.3


From 7144fb2359fa0ac64ca7dc8c61bceb0a52015a10 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 5 Aug 2024 09:26:04 +0300
Subject: Remove remainder of unused packet data code from LLTextureFetch

Downloading packets from server was removed in favor of HTTP
---
 indra/newview/lltexturefetch.cpp | 77 ----------------------------------------
 indra/newview/lltexturefetch.h   |  2 --
 indra/newview/lltextureview.cpp  | 10 +-----
 3 files changed, 1 insertion(+), 88 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 689c555998..69c40066b4 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -467,14 +467,6 @@ private:
     // Locks:  Mw (ctor invokes without lock)
     void setDesiredDiscard(S32 discard, S32 size);
 
-    // Threads:  T*
-    // Locks:  Mw
-    bool insertPacket(S32 index, U8* data, S32 size);
-
-    // Locks:  Mw
-    void clearPackets();
-
-
     // Locks:  Mw
     void removeFromCache();
 
@@ -592,21 +584,6 @@ private:
 
     // Work Data
     LLMutex mWorkMutex;
-    struct PacketData
-    {
-        PacketData(U8* data, S32 size)
-        :   mData(data), mSize(size)
-        {}
-        ~PacketData() { clearData(); }
-        void clearData() { delete[] mData; mData = NULL; }
-
-        U8* mData;
-        U32 mSize;
-    };
-    std::vector<PacketData*> mPackets;
-    S32 mFirstPacket;
-    S32 mLastPacket;
-    U16 mTotalPackets;
     U8 mImageCodec;
 
     LLViewerAssetStats::duration_t mMetricsStartTime;
@@ -922,9 +899,6 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
       mRetryAttempt(0),
       mActiveCount(0),
       mWorkMutex(),
-      mFirstPacket(0),
-      mLastPacket(-1),
-      mTotalPackets(0),
       mImageCodec(IMG_CODEC_INVALID),
       mMetricsStartTime(0),
       mHttpHandle(LLCORE_HTTP_HANDLE_INVALID),
@@ -980,7 +954,6 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
         mFetcher->mTextureCache->writeComplete(mCacheWriteHandle, true);
     }
     mFormattedImage = NULL;
-    clearPackets();
     if (mHttpBufferArray)
     {
         mHttpBufferArray->release();
@@ -992,16 +965,6 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
     mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount);
 }
 
-// Locks:  Mw
-void LLTextureFetchWorker::clearPackets()
-{
-    for_each(mPackets.begin(), mPackets.end(), DeletePointer());
-    mPackets.clear();
-    mTotalPackets = 0;
-    mLastPacket = -1;
-    mFirstPacket = 0;
-}
-
 // Locks:  Mw (ctor invokes without lock)
 void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
 {
@@ -1164,7 +1127,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
         mHttpReplySize = 0;
         mHttpReplyOffset = 0;
         mHaveAllData = false;
-        clearPackets(); // TODO: Shouldn't be necessary
         mCacheReadHandle = LLTextureCache::nullHandle();
         mCacheWriteHandle = LLTextureCache::nullHandle();
         setState(LOAD_FROM_TEXTURE_CACHE);
@@ -2441,8 +2403,6 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod
     : LLWorkerThread("TextureFetch", threaded, true),
       mDebugCount(0),
       mDebugPause(false),
-      mPacketCount(0),
-      mBadPacketCount(0),
       mQueueMutex(),
       mNetworkQueueMutex(),
       mTextureCache(cache),
@@ -3066,43 +3026,6 @@ void LLTextureFetch::threadedUpdate()
 #endif
 }
 
-//////////////////////////////////////////////////////////////////////////////
-
-// Threads:  T*
-// Locks:  Mw
-bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
-{
-    LL_PROFILE_ZONE_SCOPED;
-    mRequestedDeltaTimer.reset();
-    if (index >= mTotalPackets)
-    {
-//      LL_WARNS(LOG_TXT) << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << LL_ENDL;
-        return false;
-    }
-    if (index > 0 && index < mTotalPackets-1 && size != MAX_IMG_PACKET_SIZE)
-    {
-//      LL_WARNS(LOG_TXT) << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << LL_ENDL;
-        return false;
-    }
-
-    if (index >= (S32)mPackets.size())
-    {
-        mPackets.resize(index+1, (PacketData*)NULL); // initializes v to NULL pointers
-    }
-    else if (mPackets[index] != NULL)
-    {
-//      LL_WARNS(LOG_TXT) << "Received duplicate packet: " << index << " for image: " << mID << LL_ENDL;
-        return false;
-    }
-
-    mPackets[index] = new PacketData(data, size);
-    while (mLastPacket+1 < (S32)mPackets.size() && mPackets[mLastPacket+1] != NULL)
-    {
-        ++mLastPacket;
-    }
-    return true;
-}
-
 void LLTextureFetchWorker::setState(e_state new_state)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index aebd2f8f95..3405f76e37 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -293,8 +293,6 @@ public:
     LLUUID mDebugID;
     S32 mDebugCount;
     bool mDebugPause;
-    S32 mPacketCount;
-    S32 mBadPacketCount;
 
     static LLTrace::CountStatHandle<F64>        sCacheHit;
     static LLTrace::CountStatHandle<F64>        sCacheAttempt;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 92527fc3a9..e5a61b359d 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -323,13 +323,6 @@ void LLTextureBar::draw()
 
     {
         LLGLSUIDefault gls_ui;
-        // draw the packet data
-//      {
-//          std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets);
-//          LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color,
-//                                           LLFontGL::LEFT, LLFontGL::TOP);
-//      }
-
         // draw the image size at the end
         {
             std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(),
@@ -620,10 +613,9 @@ void LLGLTexMemBar::draw()
 
     //----------------------------------------------------------------------------
 
-    text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
+    text = llformat("Textures: %d Fetch: %d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
                     gTextureList.getNumImages(),
                     LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
-                    LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
                     LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
                     LLLFSThread::sLocal->getPending(),
                     LLImageRaw::sRawImageCount,
-- 
cgit v1.2.3


From db376f2ace28b199749796520966b6e9884985d6 Mon Sep 17 00:00:00 2001
From: TJ <tj8@live.com.au>
Date: Tue, 6 Aug 2024 00:05:10 +1000
Subject: Fixed unwanted implicit cast from U32 to U16 causing possible crash
 (#2193, #2194)

---
 indra/newview/llvosurfacepatch.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 471174cf5d..d7fe17c3ce 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -987,7 +987,7 @@ LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
 }
 
 // Do not add vertices; honor strict vertex count specified by strider_vertex_count
-void gen_terrain_tangents(U16                    strider_vertex_count,
+void gen_terrain_tangents(U32                    strider_vertex_count,
                           U32                    strider_index_count,
                           LLStrider<LLVector3>  &verticesp,
                           LLStrider<LLVector3>  &normalsp,
@@ -1003,7 +1003,7 @@ void gen_terrain_tangents(U16                    strider_vertex_count,
     std::vector<LLVector2> texcoords(strider_vertex_count);
     std::vector<U16>       indices(strider_index_count);
 
-    for (U16 v = 0; v < strider_vertex_count; ++v)
+    for (U32 v = 0; v < strider_vertex_count; ++v)
     {
         F32 *vert    = verticesp[v].mV;
         vertices[v]  = LLVector4a(vert[0], vert[1], vert[2], 1.f);
@@ -1019,7 +1019,7 @@ void gen_terrain_tangents(U16                    strider_vertex_count,
 
     LLCalculateTangentArray(strider_vertex_count, vertices, normals, texcoords.data(), strider_index_count / 3, indices.data(), tangents);
 
-    for (U16 v = 0; v < strider_vertex_count; ++v)
+    for (U32 v = 0; v < strider_vertex_count; ++v)
     {
         tangentsp[v] = tangents[v];
     }
-- 
cgit v1.2.3


From 75455d101c9535d0d45aa0f505f888f4ba3de64d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 6 Aug 2024 09:21:19 -0400
Subject: Convert LLUI and LLRender2D to LLSimpleton to reduce overhead during
 ui draw (#2202)

---
 indra/llrender/llrender2dutils.cpp |  2 +-
 indra/llrender/llrender2dutils.h   |  7 ++++---
 indra/llrender/lluiimage.cpp       |  6 +++---
 indra/llui/llfocusmgr.cpp          |  4 ++--
 indra/llui/llui.cpp                |  7 ++++++-
 indra/llui/llui.h                  | 10 +++++-----
 indra/newview/llappviewer.cpp      |  3 ++-
 7 files changed, 23 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 176c7a5d2c..428370057e 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -726,7 +726,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
     }
     gGL.end();
 
-    LLRender2D::getInstance()->setLineWidth(1.f);
+    LLRender2D::setLineWidth(1.f);
 }
 
 void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle)
diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h
index 0d3efc38d6..096e7584f1 100644
--- a/indra/llrender/llrender2dutils.h
+++ b/indra/llrender/llrender2dutils.h
@@ -122,12 +122,13 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, bool
 
 class LLImageProviderInterface;
 
-class LLRender2D : public LLParamSingleton<LLRender2D>
+class LLRender2D : public LLSimpleton<LLRender2D>
 {
-    LLSINGLETON(LLRender2D, LLImageProviderInterface* image_provider);
     LOG_CLASS(LLRender2D);
-    ~LLRender2D();
 public:
+    LLRender2D(LLImageProviderInterface* image_provider);
+    ~LLRender2D();
+
     static void pushMatrix();
     static void popMatrix();
     static void loadIdentity();
diff --git a/indra/llrender/lluiimage.cpp b/indra/llrender/lluiimage.cpp
index d31a91e2af..dc18bf16bf 100644
--- a/indra/llrender/lluiimage.cpp
+++ b/indra/llrender/lluiimage.cpp
@@ -81,10 +81,10 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
          }
     }
 
-    LLRender2D::getInstance()->pushMatrix();
+    LLRender2D::pushMatrix();
     {
         LLVector3 rect_origin = origin_agent + ((F32)rect.mLeft * x_axis) + ((F32)rect.mBottom * y_axis);
-        LLRender2D::getInstance()->translate(rect_origin.mV[VX],
+        LLRender2D::translate(rect_origin.mV[VX],
                                             rect_origin.mV[VY],
                                             rect_origin.mV[VZ]);
         gGL.getTexUnit(0)->bind(getImage());
@@ -103,7 +103,7 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
                                 (F32)rect.getWidth() * x_axis,
                                 (F32)rect.getHeight() * y_axis);
 
-    } LLRender2D::getInstance()->popMatrix();
+    } LLRender2D::popMatrix();
 }
 
 //#include "lluiimage.inl"
diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp
index 937dde4def..c635d24f51 100644
--- a/indra/llui/llfocusmgr.cpp
+++ b/indra/llui/llfocusmgr.cpp
@@ -183,7 +183,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view )
         }
     }
 
-    LLUI::getInstance()->removePopup(view);
+    if(LLUI::instanceExists()) LLUI::getInstance()->removePopup(view);
 }
 
 void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, bool lock, bool keystrokes_only)
@@ -481,7 +481,7 @@ void LLFocusMgr::setAppHasFocus(bool focus)
     // release focus from "top ctrl"s, which generally hides them
     if (!focus)
     {
-        LLUI::getInstance()->clearPopups();
+        if(LLUI::instanceExists()) LLUI::getInstance()->clearPopups();
     }
     mAppHasFocus = focus;
 }
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index e3ddd66b58..8d46422c09 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -156,7 +156,7 @@ mWindow(NULL), // set later in startup
 mRootView(NULL),
 mHelpImpl(NULL)
 {
-    LLRender2D::initParamSingleton(image_provider);
+    LLRender2D::createInstance(image_provider);
 
     if ((get_ptr_in_map(mSettingGroups, std::string("config")) == NULL) ||
         (get_ptr_in_map(mSettingGroups, std::string("floater")) == NULL) ||
@@ -196,6 +196,11 @@ mHelpImpl(NULL)
     LLCommandManager::load();
 }
 
+LLUI::~LLUI()
+{
+    LLRender2D::deleteSingleton();
+}
+
 void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup,  const clear_popups_t& clear_popups)
 {
     mAddPopupFunc = add_popup;
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index f33b43f599..375cd539b7 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -112,18 +112,18 @@ class LLImageProviderInterface;
 
 typedef void (*LLUIAudioCallback)(const LLUUID& uuid);
 
-class LLUI : public LLParamSingleton<LLUI>
+class LLUI : public LLSimpleton<LLUI>
 {
+    LOG_CLASS(LLUI);
 public:
     typedef std::map<std::string, LLControlGroup*, std::less<> > settings_map_t;
 
-private:
-    LLSINGLETON(LLUI , const settings_map_t &settings,
+    LLUI(const settings_map_t &settings,
                            LLImageProviderInterface* image_provider,
                            LLUIAudioCallback audio_callback,
                            LLUIAudioCallback deferred_audio_callback);
-    LOG_CLASS(LLUI);
-public:
+    ~LLUI();
+
     //
     // Classes
     //
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f2023565fc..262ab439b4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -802,7 +802,7 @@ bool LLAppViewer::init()
     settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
     settings_map["account"] = &gSavedPerAccountSettings;
 
-    LLUI::initParamSingleton(settings_map,
+    LLUI::createInstance(settings_map,
         LLUIImageList::getInstance(),
         ui_audio_callback,
         deferred_ui_audio_callback);
@@ -2155,6 +2155,7 @@ bool LLAppViewer::cleanup()
     LLViewerEventRecorder::deleteSingleton();
     LLWorld::deleteSingleton();
     LLVoiceClient::deleteSingleton();
+    LLUI::deleteSingleton();
 
     // It's not at first obvious where, in this long sequence, a generic cleanup
     // call OUGHT to go. So let's say this: as we migrate cleanup from
-- 
cgit v1.2.3


From ae2ff22542a5882616778ffab50612f8ad41b71e Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Thu, 18 Jul 2024 15:24:11 -0700
Subject: NOISSUE: Prevent potential bad matrix state in HUD render

---
 indra/newview/llviewerwindow.cpp | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f6de8377f3..4bd1b98569 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4185,15 +4185,17 @@ void LLViewerWindow::renderSelections( bool for_gl_pick, bool pick_parcel_walls,
                     }
                 }
             }
-            if (selection->getSelectType() == SELECT_TYPE_HUD && selection->getObjectCount())
-            {
-                gGL.matrixMode(LLRender::MM_PROJECTION);
-                gGL.popMatrix();
+        }
 
-                gGL.matrixMode(LLRender::MM_MODELVIEW);
-                gGL.popMatrix();
-                stop_glerror();
-            }
+        // un-setup HUD render
+        if (selection->getSelectType() == SELECT_TYPE_HUD && selection->getObjectCount())
+        {
+            gGL.matrixMode(LLRender::MM_PROJECTION);
+            gGL.popMatrix();
+
+            gGL.matrixMode(LLRender::MM_MODELVIEW);
+            gGL.popMatrix();
+            stop_glerror();
         }
     }
 }
-- 
cgit v1.2.3


From 6aa9110b2ae346da1a396500cae1b41e8e2d5b75 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Thu, 11 Jul 2024 15:54:24 -0700
Subject: secondlife/viewer#1883: Local-only PBR terrain paintmap with
 developer tools

---
 indra/llrender/llshadermgr.cpp                     |   3 +
 indra/llrender/llshadermgr.h                       |   3 +
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/app_settings/settings.xml            |  33 +++
 .../shaders/class1/deferred/pbrterrainF.glsl       |  31 ++-
 .../shaders/class1/deferred/pbrterrainUtilF.glsl   |  46 ++++
 .../shaders/class1/deferred/pbrterrainV.glsl       |  38 ++-
 .../shaders/class1/interface/pbrTerrainBakeF.glsl  |  62 +++++
 .../shaders/class1/interface/pbrTerrainBakeV.glsl  |  42 +++
 indra/newview/lldrawpoolterrain.cpp                |  58 ++++-
 indra/newview/lldrawpoolterrain.h                  |   3 +-
 indra/newview/llsurface.h                          |   3 +-
 indra/newview/llsurfacepatch.cpp                   |  10 +-
 indra/newview/llsurfacepatch.h                     |   4 +-
 indra/newview/llterrainpaintmap.cpp                | 285 +++++++++++++++++++++
 indra/newview/llterrainpaintmap.h                  |  42 +++
 indra/newview/llviewercontrol.cpp                  |   4 +
 indra/newview/llviewermenu.cpp                     |  82 ++++--
 indra/newview/llviewershadermgr.cpp                |  74 ++++--
 indra/newview/llviewershadermgr.h                  |  11 +-
 indra/newview/llviewertexture.cpp                  |   1 +
 indra/newview/llvlcomposition.cpp                  |  11 +
 indra/newview/llvlcomposition.h                    |  12 +
 indra/newview/llvosurfacepatch.cpp                 |  74 +++---
 indra/newview/llvosurfacepatch.h                   |  12 -
 indra/newview/skins/default/xui/en/menu_viewer.xml |  38 ++-
 26 files changed, 848 insertions(+), 136 deletions(-)
 create mode 100644 indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeF.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeV.glsl
 create mode 100644 indra/newview/llterrainpaintmap.cpp
 create mode 100644 indra/newview/llterrainpaintmap.h

(limited to 'indra')

diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index bc542d325e..512ef340f9 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1409,6 +1409,7 @@ void LLShaderMgr::initAttribsAndUniforms()
     mReservedUniforms.push_back("detail_3");
 
     mReservedUniforms.push_back("alpha_ramp");
+    mReservedUniforms.push_back("paint_map");
 
     mReservedUniforms.push_back("detail_0_base_color");
     mReservedUniforms.push_back("detail_1_base_color");
@@ -1433,6 +1434,8 @@ void LLShaderMgr::initAttribsAndUniforms()
     mReservedUniforms.push_back("emissiveColors");
     mReservedUniforms.push_back("minimum_alphas");
 
+    mReservedUniforms.push_back("region_scale");
+
     mReservedUniforms.push_back("origin");
     mReservedUniforms.push_back("display_gamma");
 
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 921ef20997..2b76ef664b 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -267,6 +267,7 @@ public:
         TERRAIN_DETAIL3,                    //  "detail_3"
 
         TERRAIN_ALPHARAMP,                  //  "alpha_ramp"
+        TERRAIN_PAINTMAP,                   //  "paint_map"
 
         TERRAIN_DETAIL0_BASE_COLOR,                //  "detail_0_base_color" (GLTF)
         TERRAIN_DETAIL1_BASE_COLOR,                //  "detail_1_base_color" (GLTF)
@@ -291,6 +292,8 @@ public:
         TERRAIN_EMISSIVE_COLORS,                   //  "emissiveColors" (GLTF)
         TERRAIN_MINIMUM_ALPHAS,                    //  "minimum_alphas" (GLTF)
 
+        REGION_SCALE,                              //  "region_scale" (GLTF)
+
         SHINY_ORIGIN,                       //  "origin"
         DISPLAY_GAMMA,                      //  "display_gamma"
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a34354d287..e7857ff09f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -578,6 +578,7 @@ set(viewer_SOURCE_FILES
     llsyswellwindow.cpp
     llteleporthistory.cpp
     llteleporthistorystorage.cpp
+    llterrainpaintmap.cpp
     lltexturecache.cpp
     lltexturectrl.cpp
     lltexturefetch.cpp
@@ -1235,6 +1236,7 @@ set(viewer_HEADER_FILES
     lltable.h
     llteleporthistory.h
     llteleporthistorystorage.h
+    llterrainpaintmap.h
     lltexturecache.h
     lltexturectrl.h
     lltexturefetch.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9e5d3f09bd..5c3706bb6c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14965,6 +14965,39 @@
       <string>F32</string>
       <key>Value</key>
       <real>0.0</real>
+    </map>
+    <key>LocalTerrainPaintEnabled</key>
+    <map>
+      <key>Comment</key>
+      <string>Enables local paintmap if LocalTerrainAsset1, etc are set</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>TerrainPaintBitDepth</key>
+    <map>
+      <key>Comment</key>
+      <string>Bit depth for future terrain paint map operations. Min: 1. Max: 8. Takes effect when the paint map is created or modified. Modifications to an existing paintmap of different bit depth will have lower precision.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>5</integer>
+    </map>
+    <key>TerrainPaintResolution</key>
+    <map>
+      <key>Comment</key>
+      <string>Resolution of the terrain paint map in pixels. Rounded to a power of two. Min: 16. Max: RenderMaxTextureResolution. Takes effect when the paint map is created.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>2048</integer>
     </map>
 	<key>PathfindingRetrieveNeighboringRegion</key>
     <map>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
index 6ca35419f2..410c447c64 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl
@@ -30,6 +30,9 @@
 #define TERRAIN_PBR_DETAIL_NORMAL -2
 #define TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS -3
 
+#define TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE 0
+#define TERRAIN_PAINT_TYPE_PBR_PAINTMAP 1
+
 #if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
 #define TerrainCoord vec4[3]
 #elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
@@ -48,6 +51,7 @@ struct TerrainMix
 };
 
 TerrainMix get_terrain_mix_weights(float alpha1, float alpha2, float alphaFinal);
+TerrainMix get_terrain_usage_from_weight3(vec3 weight3);
 
 struct PBRMix
 {
@@ -97,7 +101,11 @@ PBRMix mix_pbr(PBRMix mix1, PBRMix mix2, float mix2_weight);
 
 out vec4 frag_data[4];
 
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
 uniform sampler2D alpha_ramp;
+#elif TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+uniform sampler2D paint_map;
+#endif
 
 // https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
 uniform sampler2D detail_0_base_color;
@@ -133,19 +141,25 @@ uniform vec3[4] emissiveColors;
 #endif
 uniform vec4 minimum_alphas; // PBR alphaMode: MASK, See: mAlphaCutoff, setAlphaCutoff()
 
-#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
-in vec4[10] vary_coords;
-#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
-in vec4[2] vary_coords;
-#endif
 in vec3 vary_position;
 in vec3 vary_normal;
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
 in vec3 vary_tangents[4];
 flat in float vary_signs[4];
 #endif
+
+// vary_texcoord* are used for terrain composition, vary_coords are used for terrain UVs
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
 in vec4 vary_texcoord0;
 in vec4 vary_texcoord1;
+#elif TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+in vec2 vary_texcoord;
+#endif
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+in vec4[10] vary_coords;
+#elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
+in vec4[2] vary_coords;
+#endif
 
 void mirrorClip(vec3 position);
 
@@ -171,11 +185,16 @@ void main()
     // Make sure we clip the terrain if we're in a mirror.
     mirrorClip(vary_position);
 
+    TerrainMix tm;
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
     float alpha1 = texture(alpha_ramp, vary_texcoord0.zw).a;
     float alpha2 = texture(alpha_ramp,vary_texcoord1.xy).a;
     float alphaFinal = texture(alpha_ramp, vary_texcoord1.zw).a;
 
-    TerrainMix tm = get_terrain_mix_weights(alpha1, alpha2, alphaFinal);
+    tm = get_terrain_mix_weights(alpha1, alpha2, alphaFinal);
+#elif TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+    tm = get_terrain_usage_from_weight3(texture(paint_map, vary_texcoord).xyz);
+#endif
 
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_OCCLUSION)
     // RGB = Occlusion, Roughness, Metal
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
index 5098de717e..dc43007dca 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl
@@ -51,7 +51,12 @@
 #define TERRAIN_PBR_DETAIL_NORMAL -2
 #define TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS -3
 
+#define TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE 0
+#define TERRAIN_PAINT_TYPE_PBR_PAINTMAP 1
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
 in vec3 vary_vertex_normal;
+#endif
 
 vec3 srgb_to_linear(vec3 c);
 
@@ -202,6 +207,45 @@ TerrainMix get_terrain_mix_weights(float alpha1, float alpha2, float alphaFinal)
     return tm;
 }
 
+// A paintmap weight applier for 4 swatches. The input saves a channel by not
+// storing swatch 1, and assuming the weights of the 4 swatches add to 1.
+// The components of weight3 should be between 0 and 1
+// The sum of the components of weight3 should be between 0 and 1
+TerrainMix get_terrain_usage_from_weight3(vec3 weight3)
+{
+    // These steps ensure the output weights add to between 0 and 1
+    weight3.xyz = max(vec3(0.0), weight3.xyz);
+    weight3.xyz /= max(1.0, weight3.x + weight3.y + weight3.z);
+
+    TerrainMix tm;
+
+    // Extract the first weight from the other weights
+    tm.weight.x = 1.0 - (weight3.x + weight3.y + weight3.z);
+    tm.weight.yzw = weight3.xyz;
+    ivec4 usage = max(ivec4(0), ivec4(ceil(tm.weight)));
+
+    tm.type = (usage.x * MIX_X) |
+              (usage.y * MIX_Y) |
+              (usage.z * MIX_Z) |
+              (usage.w * MIX_W);
+    return tm;
+}
+
+// Inverse of get_terrain_usage_from_weight3, excluding usage flags
+// The components of weight should be between 0 and 1
+// The sum of the components of weight should be 1
+vec3 get_weight3_from_terrain_weight(vec4 weight)
+{
+    // These steps ensure the input weights add to 1
+    weight = max(vec4(0.0), weight);
+    weight.x += 1.0 - sign(weight.x + weight.y + weight.z + weight.w);
+    weight /= weight.x + weight.y + weight.z + weight.w;
+
+    // Then return the input weights with the first weight truncated
+    return weight.yzw;
+}
+
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
 TerrainTriplanar _t_triplanar()
 {
     float sharpness = TERRAIN_TRIPLANAR_BLEND_FACTOR;
@@ -219,6 +263,8 @@ TerrainTriplanar _t_triplanar()
               ((usage.z) * SAMPLE_Z);
     return tw;
 }
+#endif
+
 
 // Assume weights add to 1
 float terrain_mix(TerrainMix tm, vec4 tms4)
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
index c90b2b5926..6791a22a76 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainV.glsl
@@ -28,31 +28,47 @@
 #define TERRAIN_PBR_DETAIL_NORMAL -2
 #define TERRAIN_PBR_DETAIL_METALLIC_ROUGHNESS -3
 
+#define TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE 0
+#define TERRAIN_PAINT_TYPE_PBR_PAINTMAP 1
+
 uniform mat3 normal_matrix;
 uniform mat4 texture_matrix0;
 uniform mat4 modelview_matrix;
 uniform mat4 modelview_projection_matrix;
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+uniform float region_scale;
+#endif
 
 in vec3 position;
 in vec3 normal;
 in vec4 tangent;
 in vec4 diffuse_color;
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
 in vec2 texcoord1;
+#endif
 
-out vec3 vary_vertex_normal; // Used by pbrterrainUtilF.glsl
+out vec3 vary_position;
 out vec3 vary_normal;
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
+out vec3 vary_vertex_normal; // Used by pbrterrainUtilF.glsl
+#endif
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
 out vec3 vary_tangents[4];
 flat out float vary_signs[4];
 #endif
+
+// vary_texcoord* are used for terrain composition, vary_coords are used for terrain UVs
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
 out vec4 vary_texcoord0;
 out vec4 vary_texcoord1;
+#elif TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+out vec2 vary_texcoord;
+#endif
 #if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
 out vec4[10] vary_coords;
 #elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1
 out vec4[2] vary_coords;
 #endif
-out vec3 vary_position;
 
 // *HACK: Each material uses only one texture transform, but the KHR texture
 // transform spec allows handling texture transforms separately for each
@@ -69,7 +85,9 @@ void main()
     vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
 
     vec3 n = normal_matrix * normal;
+#if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
     vary_vertex_normal = normal;
+#endif
     vec3 t = normal_matrix * tangent.xyz;
 
 #if (TERRAIN_PBR_DETAIL >= TERRAIN_PBR_DETAIL_NORMAL)
@@ -110,9 +128,9 @@ void main()
     // Transform and pass tex coords
     {
         vec4[2] ttt;
+#define transform_xy()             terrain_texture_transform(position.xy,               ttt)
 #if TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 3
 // Don't care about upside-down (transform_xy_flipped())
-#define transform_xy()             terrain_texture_transform(position.xy,               ttt)
 #define transform_yz()             terrain_texture_transform(position.yz,               ttt)
 #define transform_negx_z()         terrain_texture_transform(position.xz * vec2(-1, 1), ttt)
 #define transform_yz_flipped()     terrain_texture_transform(position.yz * vec2(-1, 1), ttt)
@@ -157,26 +175,30 @@ void main()
         ttt[0].xyz = terrain_texture_transforms[0].xyz;
         ttt[1].x = terrain_texture_transforms[0].w;
         ttt[1].y = terrain_texture_transforms[1].x;
-        vary_coords[0].xy = terrain_texture_transform(position.xy, ttt);
+        vary_coords[0].xy = transform_xy();
         // material 2
         ttt[0].xyz = terrain_texture_transforms[1].yzw;
         ttt[1].xy = terrain_texture_transforms[2].xy;
-        vary_coords[0].zw = terrain_texture_transform(position.xy, ttt);
+        vary_coords[0].zw = transform_xy();
         // material 3
         ttt[0].xy = terrain_texture_transforms[2].zw;
         ttt[0].z = terrain_texture_transforms[3].x;
         ttt[1].xy = terrain_texture_transforms[3].yz;
-        vary_coords[1].xy = terrain_texture_transform(position.xy, ttt);
+        vary_coords[1].xy = transform_xy();
         // material 4
         ttt[0].x = terrain_texture_transforms[3].w;
         ttt[0].yz = terrain_texture_transforms[4].xy;
         ttt[1].xy = terrain_texture_transforms[4].zw;
-        vary_coords[1].zw = terrain_texture_transform(position.xy, ttt);
+        vary_coords[1].zw = transform_xy();
 #endif
     }
 
-    vec4 tc = vec4(texcoord1,0,1);
+#if TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
+    vec2 tc = texcoord1.xy;
     vary_texcoord0.zw = tc.xy;
     vary_texcoord1.xy = tc.xy-vec2(2.0, 0.0);
     vary_texcoord1.zw = tc.xy-vec2(1.0, 0.0);
+#elif TERRAIN_PAINT_TYPE == TERRAIN_PAINT_TYPE_PBR_PAINTMAP
+    vary_texcoord = position.xy / region_scale;
+#endif
 }
diff --git a/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeF.glsl b/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeF.glsl
new file mode 100644
index 0000000000..cf20653a0f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeF.glsl
@@ -0,0 +1,62 @@
+/**
+ * @file terrainBakeF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+out vec4 frag_color;
+
+struct TerrainMix
+{
+    vec4 weight;
+    int type;
+};
+
+TerrainMix get_terrain_mix_weights(float alpha1, float alpha2, float alphaFinal);
+
+uniform sampler2D alpha_ramp;
+
+// vary_texcoord* are used for terrain composition
+in vec4 vary_texcoord0;
+in vec4 vary_texcoord1;
+
+void main()
+{
+    TerrainMix tm;
+    float alpha1 = texture(alpha_ramp, vary_texcoord0.zw).a;
+    float alpha2 = texture(alpha_ramp,vary_texcoord1.xy).a;
+    float alphaFinal = texture(alpha_ramp, vary_texcoord1.zw).a;
+
+    tm = get_terrain_mix_weights(alpha1, alpha2, alphaFinal);
+
+    // tm.weight.x can be ignored. The paintmap saves a channel by not storing
+    // swatch 1, and assuming the weights of the 4 swatches add to 1.
+    // TERRAIN_PAINT_PRECISION emulates loss of precision at lower bit depth
+    // when a corresponding low-bit image format is not available. Because
+    // integral values at one depth cannot be precisely represented at another
+    // bit depth, rounding is required. To maximize numerical stability for
+    // future conversions, bit depth conversions should round to the nearest
+    // integer, not floor or ceil.
+    frag_color = max(vec4(round(tm.weight.yzw * TERRAIN_PAINT_PRECISION) / TERRAIN_PAINT_PRECISION, 1.0), vec4(0));
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeV.glsl b/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeV.glsl
new file mode 100644
index 0000000000..fd150b54ad
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/pbrTerrainBakeV.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file pbrTerrainBakeV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+in vec3 position;
+in vec2 texcoord1;
+
+out vec4 vary_texcoord0;
+out vec4 vary_texcoord1;
+
+void main()
+{
+    gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+    vec2 tc = texcoord1.xy;
+    vary_texcoord0.zw = tc.xy;
+    vary_texcoord1.xy = tc.xy-vec2(2.0, 0.0);
+    vary_texcoord1.zw = tc.xy-vec2(1.0, 0.0);
+}
+
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 7d2912d81f..5e676bc5b3 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -219,7 +219,9 @@ void LLDrawPoolTerrain::renderFullShader()
     else
     {
         // Use materials
-        sShader = &gDeferredPBRTerrainProgram;
+        U32 paint_type = use_local_materials ? gLocalTerrainMaterials.getPaintType() : compp->getPaintType();
+        paint_type = llclamp(paint_type, 0, TERRAIN_PAINT_TYPE_COUNT);
+        sShader = &gDeferredPBRTerrainProgram[paint_type];
         sShader->bind();
         renderFullShaderPBR(use_local_materials);
     }
@@ -326,7 +328,7 @@ void LLDrawPoolTerrain::renderFullShaderTextures()
 }
 
 // *TODO: Investigate use of bindFast for PBR terrain textures
-void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials)
+void LLDrawPoolTerrain::renderFullShaderPBR(bool use_local_materials)
 {
     // Hack! Get the region that this draw pool is rendering from!
     LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
@@ -339,7 +341,7 @@ void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials)
     llassert(shader_material_count == terrain_material_count);
 #endif
 
-    if (local_materials)
+    if (use_local_materials)
     {
         // Override region terrain with the global local override terrain
         fetched_materials = &gLocalTerrainMaterials.mDetailRenderMaterials;
@@ -351,6 +353,9 @@ void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials)
         if (!materials[i]) { materials[i] = &LLGLTFMaterial::sDefault; }
     }
 
+    U32 paint_type = use_local_materials ? gLocalTerrainMaterials.getPaintType() : compp->getPaintType();
+    paint_type = llclamp(paint_type, 0, TERRAIN_PAINT_TYPE_COUNT);
+
     S32 detail_basecolor[terrain_material_count];
     S32 detail_normal[terrain_material_count];
     S32 detail_metalrough[terrain_material_count];
@@ -481,11 +486,31 @@ void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials)
     LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater();
 
     //
-    // Alpha Ramp
+    // Alpha Ramp or paint map
     //
-    S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
-    gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep);
-    gGL.getTexUnit(alpha_ramp)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+    S32 alpha_ramp = -1;
+    S32 paint_map = -1;
+    if (paint_type == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE)
+    {
+        alpha_ramp = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+        gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep);
+        gGL.getTexUnit(alpha_ramp)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+    }
+    else if (paint_type == TERRAIN_PAINT_TYPE_PBR_PAINTMAP)
+    {
+        paint_map = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_PAINTMAP);
+        LLViewerTexture* tex_paint_map = use_local_materials ? gLocalTerrainMaterials.getPaintMap() : compp->getPaintMap();
+        // If no paintmap is available, fall back to rendering just material slot 1 (by binding the appropriate image)
+        if (!tex_paint_map) { tex_paint_map = LLViewerTexture::sBlackImagep.get(); }
+        // This is a paint map for four materials, but we save a channel by
+        // storing the paintmap as the "difference" between slot 1 and the
+        // other 3 slots.
+        llassert(tex_paint_map->getComponents() == 3);
+        gGL.getTexUnit(paint_map)->bind(tex_paint_map);
+        gGL.getTexUnit(paint_map)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+
+        shader->uniform1f(LLShaderMgr::REGION_SCALE, regionp->getWidth());
+    }
 
     //
     // GLTF uniforms
@@ -534,11 +559,22 @@ void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials)
 
     // Disable multitexture
 
-    sShader->disableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+    if (paint_type == TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE)
+    {
+        sShader->disableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
 
-    gGL.getTexUnit(alpha_ramp)->unbind(LLTexUnit::TT_TEXTURE);
-    gGL.getTexUnit(alpha_ramp)->disable();
-    gGL.getTexUnit(alpha_ramp)->activate();
+        gGL.getTexUnit(alpha_ramp)->unbind(LLTexUnit::TT_TEXTURE);
+        gGL.getTexUnit(alpha_ramp)->disable();
+        gGL.getTexUnit(alpha_ramp)->activate();
+    }
+    else if (paint_type == TERRAIN_PAINT_TYPE_PBR_PAINTMAP)
+    {
+        sShader->disableTexture(LLViewerShaderMgr::TERRAIN_PAINTMAP);
+
+        gGL.getTexUnit(paint_map)->unbind(LLTexUnit::TT_TEXTURE);
+        gGL.getTexUnit(paint_map)->disable();
+        gGL.getTexUnit(paint_map)->activate();
+    }
 
     for (U32 i = 0; i < terrain_material_count; ++i)
     {
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index a8097fb58b..5380463d01 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -38,7 +38,6 @@ public:
         VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
                     LLVertexBuffer::MAP_NORMAL |
                     LLVertexBuffer::MAP_TANGENT | // Only PBR terrain uses this currently
-                    LLVertexBuffer::MAP_TEXCOORD0 |
                     LLVertexBuffer::MAP_TEXCOORD1
     };
 
@@ -80,7 +79,7 @@ protected:
     void renderFull4TU();
     void renderFullShader();
     void renderFullShaderTextures();
-    void renderFullShaderPBR(bool local_materials = false);
+    void renderFullShaderPBR(bool use_local_materials = false);
     void drawLoop();
 
 private:
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 68295225b6..10a104730b 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -110,6 +110,7 @@ public:
     LLSurfacePatch *resolvePatchRegion(const F32 x, const F32 y) const;
     LLSurfacePatch *resolvePatchRegion(const LLVector3 &position_region) const;
     LLSurfacePatch *resolvePatchGlobal(const LLVector3d &position_global) const;
+    LLSurfacePatch *getPatch(const S32 x, const S32 y) const;
 
     // Update methods (called during idle, normally)
     template<bool PBR>
@@ -176,8 +177,6 @@ protected:
     void createPatchData();     // Allocates memory for patches.
     void destroyPatchData();    // Deallocates memory for patches.
 
-    LLSurfacePatch *getPatch(const S32 x, const S32 y) const;
-
 protected:
     LLVector3d  mOriginGlobal;      // In absolute frame
     LLSurfacePatch *mPatchList;     // Array of all patches
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 0550889a9b..4315c4c6b0 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -201,13 +201,13 @@ LLVector2 LLSurfacePatch::getTexCoords(const U32 x, const U32 y) const
 
 
 void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal,
-                          LLVector2 *tex0, LLVector2 *tex1)
+                          LLVector2 *tex1) const
 {
     if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge() || !mVObjp)
     {
         return; // failsafe
     }
-    llassert_always(vertex && normal && tex0 && tex1);
+    llassert_always(vertex && normal && tex1);
 
     U32 surface_stride = mSurfacep->getGridsPerEdge();
     U32 point_offset = x + y*surface_stride;
@@ -220,12 +220,6 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
     pos_agent.mV[VZ]  = *(mDataZ + point_offset);
     *vertex     = pos_agent-mVObjp->getRegion()->getOriginAgent();
 
-    LLVector3 rel_pos = pos_agent - mSurfacep->getOriginAgent();
-    // *NOTE: Only PBR terrain uses the UVs right now. Texture terrain just ignores it.
-    // *NOTE: In the future, UVs and horizontal position will no longer have a 1:1 relationship for PBR terrain
-    LLVector3 tex_pos = rel_pos;
-    tex0->mV[0]  = tex_pos.mV[0];
-    tex0->mV[1]  = tex_pos.mV[1];
     tex1->mV[0] = mSurfacep->getRegion()->getCompositionXY(llfloor(mOriginRegion.mV[0])+x, llfloor(mOriginRegion.mV[1])+y);
 
     const F32 xyScale = 4.9215f*7.f; //0.93284f;
diff --git a/indra/newview/llsurfacepatch.h b/indra/newview/llsurfacepatch.h
index 195250d2c0..f4831487c1 100644
--- a/indra/newview/llsurfacepatch.h
+++ b/indra/newview/llsurfacepatch.h
@@ -116,7 +116,7 @@ public:
     void calcNormalFlat(LLVector3& normal_out, const U32 x, const U32 y, const U32 index /* 0 or 1 */);
 
     void eval(const U32 x, const U32 y, const U32 stride,
-                LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1);
+                LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex1) const;
 
 
 
@@ -146,6 +146,8 @@ public:
     void dirty();           // Mark this surface patch as dirty...
     void clearDirty()                           { mDirty = false; }
 
+    bool isHeightsGenerated() const { return mHeightsGenerated; }
+
     void clearVObj();
 
 public:
diff --git a/indra/newview/llterrainpaintmap.cpp b/indra/newview/llterrainpaintmap.cpp
new file mode 100644
index 0000000000..4381d14546
--- /dev/null
+++ b/indra/newview/llterrainpaintmap.cpp
@@ -0,0 +1,285 @@
+/**
+ * @file llterrainpaintmap.cpp
+ * @brief Utilities for managing terrain paint maps
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llterrainpaintmap.h"
+
+#include "llviewerprecompiledheaders.h"
+
+// library includes
+#include "llglslshader.h"
+#include "llrendertarget.h"
+#include "llvertexbuffer.h"
+
+// newview includes
+#include "llrender.h"
+#include "llsurface.h"
+#include "llsurfacepatch.h"
+#include "llviewercamera.h"
+#include "llviewerregion.h"
+#include "llviewershadermgr.h"
+#include "llviewertexture.h"
+
+// static
+bool LLTerrainPaintMap::bakeHeightNoiseIntoPBRPaintMapRGB(const LLViewerRegion& region, LLViewerTexture& tex)
+{
+    llassert(tex.getComponents() == 3);
+    llassert(tex.getWidth() > 0 && tex.getHeight() > 0);
+    llassert(tex.getWidth() == tex.getHeight());
+    llassert(tex.getPrimaryFormat() == GL_RGB);
+    llassert(tex.getGLTexture());
+
+    const LLSurface& surface = region.getLand();
+    const U32 patch_count = surface.getPatchesPerEdge();
+
+    // *TODO: mHeightsGenerated isn't guaranteed to be true. Assume terrain is
+    // loaded for now. Would be nice to fix the loading issue or find a better
+    // heuristic to determine that the terrain is sufficiently loaded.
+#if 0
+    // Don't proceed if the region heightmap isn't loaded
+    for (U32 rj = 0; rj < patch_count; ++rj)
+    {
+        for (U32 ri = 0; ri < patch_count; ++ri)
+        {
+            const LLSurfacePatch* patch = surface.getPatch(ri, rj);
+            if (!patch->isHeightsGenerated())
+            {
+                LL_WARNS() << "Region heightmap not fully loaded" << LL_ENDL;
+                return false;
+            }
+        }
+    }
+#endif
+
+    // Bind the debug shader and render terrain to tex
+    // Use a scratch render target because its dimensions may exceed the standard bake target, and this is a one-off bake
+    LLRenderTarget scratch_target;
+    const S32 dim = llmin(tex.getWidth(), tex.getHeight());
+    scratch_target.allocate(dim, dim, GL_RGB, false, LLTexUnit::eTextureType::TT_TEXTURE,
+                                   LLTexUnit::eTextureMipGeneration::TMG_NONE);
+    if (!scratch_target.isComplete())
+    {
+        llassert(false);
+        LL_WARNS() << "Failed to allocate render target" << LL_ENDL;
+        return false;
+    }
+    gGL.getTexUnit(0)->disable();
+    stop_glerror();
+
+    scratch_target.bindTarget();
+    glClearColor(0, 0, 0, 0);
+    scratch_target.clear();
+
+    // Render terrain heightmap to paint map via shader
+
+    // Set up viewport, camera, and orthographic projection matrix. Position
+    // the camera such that the camera points straight down, and the region
+    // completely covers the "screen". Since orthographic projection does not
+    // distort, we arbitrarily choose the near plane and far plane to cover the
+    // full span of region heights, plus a small amount of padding to account
+    // for rounding errors.
+    const F32 region_width = region.getWidth();
+    const F32 region_half_width = region_width / 2.0f;
+    const F32 region_camera_height = surface.getMaxZ() + DEFAULT_NEAR_PLANE;
+    LLViewerCamera camera;
+    const LLVector3 region_center = LLVector3(region_half_width, region_half_width, 0.0) + region.getOriginAgent();
+    const LLVector3 camera_origin = LLVector3(0.0f, 0.0f, region_camera_height) + region_center;
+    camera.lookAt(camera_origin, region_center, LLVector3::y_axis);
+    camera.setAspect(F32(scratch_target.getHeight()) / F32(scratch_target.getWidth()));
+    const LLRect texture_rect(0, scratch_target.getHeight(), scratch_target.getWidth(), 0);
+    glViewport(texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight());
+    // Manually get modelview matrix from camera orientation.
+    glh::matrix4f modelview((GLfloat *) OGL_TO_CFR_ROTATION);
+    GLfloat ogl_matrix[16];
+    camera.getOpenGLTransform(ogl_matrix);
+    modelview *= glh::matrix4f(ogl_matrix);
+    gGL.matrixMode(LLRender::MM_MODELVIEW);
+    gGL.loadMatrix(modelview.m);
+    // Override the projection matrix from the camera
+    gGL.matrixMode(LLRender::MM_PROJECTION);
+    gGL.pushMatrix();
+    gGL.loadIdentity();
+    llassert(camera_origin.mV[VZ] >= surface.getMaxZ());
+    const F32 region_high_near = camera_origin.mV[VZ] - surface.getMaxZ();
+    constexpr F32 far_plane_delta = 0.25f;
+    const F32 region_low_far = camera_origin.mV[VZ] - surface.getMinZ() + far_plane_delta;
+    gGL.ortho(-region_half_width, region_half_width, -region_half_width, region_half_width, region_high_near, region_low_far);
+    // No need to call camera.setPerspective because we don't need the clip planes. It would be inaccurate due to the perspective rendering anyway.
+
+    // Need to get the full resolution vertices in order to get an accurate
+    // paintmap. It's not sufficient to iterate over the surface patches, as
+    // they may be at lower LODs.
+    // The functionality here is a subset of
+    // LLVOSurfacePatch::getTerrainGeometry. Unlike said function, we don't
+    // care about stride length since we're always rendering at full
+    // resolution. We also don't care about normals/tangents because those
+    // don't contribute to the paintmap.
+    // *NOTE: The actual getTerrainGeometry fits the terrain vertices snugly
+    // under the 16-bit indices limit. For the sake of simplicity, that has not
+    // been replicated here.
+    std::vector<LLPointer<LLDrawInfo>> infos;
+    // Vertex and index counts adapted from LLVOSurfacePatch::getGeomSizesMain,
+    // with additional vertices added as we are including the north and east
+    // edges here.
+    const U32 patch_size = (U32)surface.getGridsPerPatchEdge();
+    constexpr U32 stride = 1;
+    const U32 vert_size = (patch_size / stride) + 1;
+    const U32 n = vert_size * vert_size;
+    const U32 ni = 6 * (vert_size - 1) * (vert_size - 1);
+    const U32 region_vertices = n * patch_count * patch_count;
+    const U32 region_indices = ni * patch_count * patch_count;
+    if (LLGLSLShader::sCurBoundShaderPtr == nullptr)
+    { // make sure a shader is bound to satisfy mVertexBuffer->setBuffer
+        gDebugProgram.bind();
+    }
+    LLPointer<LLVertexBuffer> buf = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD1);
+    {
+        buf->allocateBuffer(region_vertices, region_indices*2); // hack double index count... TODO: find a better way to indicate 32-bit indices will be used
+        buf->setBuffer();
+        U32 vertex_total = 0;
+        std::vector<U32> index_array(region_indices);
+        std::vector<LLVector4a> positions(region_vertices);
+        std::vector<LLVector2> texcoords1(region_vertices);
+        auto idx = index_array.begin();
+        auto pos = positions.begin();
+        auto tex1 = texcoords1.begin();
+        for (U32 rj = 0; rj < patch_count; ++rj)
+        {
+            for (U32 ri = 0; ri < patch_count; ++ri)
+            {
+                const U32 index_offset = vertex_total;
+                for (U32 j = 0; j < (vert_size - 1); ++j)
+                {
+                    for (U32 i = 0; i < (vert_size - 1); ++i)
+                    {
+                        // y
+                        //    2....3
+                        // ^  .    .
+                        // |  0....1
+                        // |
+                        // ------->  x
+                        //
+                        // triangle 1: 0,1,2
+                        // triangle 2: 1,3,2
+                        // 0: vert0
+                        // 1: vert0 + 1
+                        // 2: vert0 + vert_size
+                        // 3: vert0 + vert_size + 1
+                        const U32 vert0 = index_offset + i + (j*vert_size);
+                        *idx++ = vert0;
+                        *idx++ = vert0 + 1;
+                        *idx++ = vert0 + vert_size;
+                        *idx++ = vert0 + 1;
+                        *idx++ = vert0 + vert_size + 1;
+                        *idx++ = vert0 + vert_size;
+                    }
+                }
+
+                const LLSurfacePatch* patch = surface.getPatch(ri, rj);
+                for (U32 j = 0; j < vert_size; ++j)
+                {
+                    for (U32 i = 0; i < vert_size; ++i)
+                    {
+                        LLVector3 scratch3;
+                        LLVector3 pos3;
+                        LLVector2 tex1_temp;
+                        patch->eval(i, j, stride, &pos3, &scratch3, &tex1_temp);
+                        (*pos++).set(pos3.mV[VX], pos3.mV[VY], pos3.mV[VZ]);
+                        *tex1++ = tex1_temp;
+                        vertex_total++;
+                    }
+                }
+            }
+        }
+        buf->setIndexData(index_array.data(), 0, (U32)index_array.size());
+        buf->setPositionData(positions.data(), 0, (U32)positions.size());
+        buf->setTexCoord1Data(texcoords1.data(), 0, (U32)texcoords1.size());
+        buf->unmapBuffer();
+        buf->unbind();
+    }
+
+    // Draw the region in agent space at full resolution
+    {
+
+        LLGLSLShader::unbind();
+        // *NOTE: A theoretical non-PBR terrain bake program would be
+        // *slightly* different, due the texture terrain shader not having an
+        // alpha ramp threshold (TERRAIN_RAMP_MIX_THRESHOLD)
+        LLGLSLShader& shader = gPBRTerrainBakeProgram;
+        shader.bind();
+
+        LLGLDisable stencil(GL_STENCIL_TEST);
+        LLGLDisable scissor(GL_SCISSOR_TEST);
+        LLGLEnable cull_face(GL_CULL_FACE);
+        LLGLDepthTest depth_test(GL_FALSE, GL_FALSE, GL_ALWAYS);
+
+        S32 alpha_ramp = shader.enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+        LLPointer<LLViewerTexture> alpha_ramp_texture = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD_2D);
+        gGL.getTexUnit(alpha_ramp)->bind(alpha_ramp_texture);
+        gGL.getTexUnit(alpha_ramp)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+
+        buf->setBuffer();
+        for (U32 rj = 0; rj < patch_count; ++rj)
+        {
+            for (U32 ri = 0; ri < patch_count; ++ri)
+            {
+                const U32 patch_index = ri + (rj * patch_count);
+                const U32 index_offset = ni * patch_index;
+                const U32 vertex_offset = n * patch_index;
+                llassert(index_offset + ni <= region_indices);
+                llassert(vertex_offset + n <= region_vertices);
+                buf->drawRange(LLRender::TRIANGLES, vertex_offset, vertex_offset + n - 1, ni, index_offset);
+            }
+        }
+
+        shader.disableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
+
+        gGL.getTexUnit(alpha_ramp)->unbind(LLTexUnit::TT_TEXTURE);
+        gGL.getTexUnit(alpha_ramp)->disable();
+        gGL.getTexUnit(alpha_ramp)->activate();
+
+        shader.unbind();
+    }
+
+    gGL.matrixMode(LLRender::MM_PROJECTION);
+    gGL.popMatrix();
+
+    gGL.flush();
+    LLVertexBuffer::unbind();
+    // Final step: Copy the output to the terrain paintmap
+    const bool success = tex.getGLTexture()->setSubImageFromFrameBuffer(0, 0, 0, 0, dim, dim);
+    if (!success)
+    {
+        LL_WARNS() << "Failed to copy framebuffer to paintmap" << LL_ENDL;
+    }
+    glGenerateMipmap(GL_TEXTURE_2D);
+    stop_glerror();
+
+    scratch_target.flush();
+
+    LLGLSLShader::unbind();
+
+    return success;
+}
diff --git a/indra/newview/llterrainpaintmap.h b/indra/newview/llterrainpaintmap.h
new file mode 100644
index 0000000000..66827862c5
--- /dev/null
+++ b/indra/newview/llterrainpaintmap.h
@@ -0,0 +1,42 @@
+/**
+ * @file llterrainpaintmap.h
+ * @brief Utilities for managing terrain paint maps
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#pragma once
+
+class LLViewerRegion;
+class LLViewerTexture;
+
+class LLTerrainPaintMap
+{
+public:
+
+    // Convert a region's heightmap and composition into a paint map texture which
+    // approximates how the terrain would be rendered with the heightmap.
+    // In effect, this allows converting terrain of type TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
+    // to type TERRAIN_PAINT_TYPE_PBR_PAINTMAP.
+    // Returns true if successful
+    static bool bakeHeightNoiseIntoPBRPaintMapRGB(const LLViewerRegion& region, LLViewerTexture& tex);
+};
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 0e1f4c09c7..c1bf31ff9a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -719,6 +719,8 @@ void handleLocalTerrainChanged(const LLSD& newValue)
         {
             gLocalTerrainMaterials.setMaterialOverride(i, mat_override);
         }
+        const bool paint_enabled = gSavedSettings.getBOOL("LocalTerrainPaintEnabled");
+        gLocalTerrainMaterials.setPaintType(paint_enabled ? TERRAIN_PAINT_TYPE_PBR_PAINTMAP : TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE);
     }
 }
 ////////////////////////////////////////////////////////////////////////////
@@ -909,6 +911,7 @@ void settings_setup_listeners()
     setting_setup_signal_listener(gSavedSettings, "AutoTuneImpostorByDistEnabled", handleUserImpostorByDistEnabledChanged);
     setting_setup_signal_listener(gSavedSettings, "TuningFPSStrategy", handleFPSTuningStrategyChanged);
     {
+        setting_setup_signal_listener(gSavedSettings, "LocalTerrainPaintEnabled", handleLocalTerrainChanged);
         const char* transform_suffixes[] = {
             "ScaleU",
             "ScaleV",
@@ -927,6 +930,7 @@ void settings_setup_listeners()
             }
         }
     }
+    setting_setup_signal_listener(gSavedSettings, "TerrainPaintBitDepth", handleSetShaderChanged);
 
     setting_setup_signal_listener(gSavedPerAccountSettings, "AvatarHoverOffsetZ", handleAvatarHoverOffsetChanged);
 }
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0c8dd6dff9..aa14820d55 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -42,6 +42,7 @@
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
 #include "llviewereventrecorder.h"
+#include "v4coloru.h"
 
 // newview includes
 #include "llagent.h"
@@ -105,6 +106,7 @@
 #include "llsidepanelappearance.h"
 #include "llspellcheckmenuhandler.h"
 #include "llstatusbar.h"
+#include "llterrainpaintmap.h"
 #include "lltextureview.h"
 #include "lltoolbarview.h"
 #include "lltoolcomp.h"
@@ -122,6 +124,7 @@
 #include "llviewerparcelmgr.h"
 #include "llviewerstats.h"
 #include "llviewerstatsrecorder.h"
+#include "llvlcomposition.h"
 #include "llvoavatarself.h"
 #include "llvoicevivox.h"
 #include "llworld.h"
@@ -1387,6 +1390,65 @@ class LLAdvancedResetInterestLists : public view_listener_t
 };
 
 
+/////////////
+// TERRAIN //
+/////////////
+
+class LLAdvancedRebuildTerrain : public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        gPipeline.rebuildTerrain();
+        return true;
+    }
+};
+
+class LLAdvancedTerrainCreateLocalPaintMap : public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        LLViewerRegion* region = gAgent.getRegion();
+        if (!region)
+        {
+            LL_WARNS() << "Agent not in a region" << LL_ENDL;
+            return false;
+        }
+
+        U16 dim = (U16)gSavedSettings.getU32("TerrainPaintResolution");
+        // Ensure a reasonable image size of power two
+        const U32 max_resolution = gSavedSettings.getU32("RenderMaxTextureResolution");
+        dim = llclamp(dim, 16, max_resolution);
+        dim = 1 << U32(std::ceil(std::log2(dim)));
+        LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
+        LLPointer<LLViewerTexture> tex = LLViewerTextureManager::getLocalTexture(image_raw.get(), true);
+        const bool success = LLTerrainPaintMap::bakeHeightNoiseIntoPBRPaintMapRGB(*region, *tex);
+        // This calls gLocalTerrainMaterials.setPaintType
+        gSavedSettings.setBOOL("LocalTerrainPaintEnabled", true);
+        // If baking the paintmap failed, set the paintmap to nullptr. This
+        // causes LLDrawPoolTerrain to use a blank paintmap instead.
+        if (!success) { tex = nullptr; }
+        gLocalTerrainMaterials.setPaintMap(tex);
+
+        return true;
+    }
+};
+
+class LLAdvancedTerrainDeleteLocalPaintMap : public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        // This calls gLocalTerrainMaterials.setPaintType
+        gSavedSettings.setBOOL("LocalTerrainPaintEnabled", false);
+        gLocalTerrainMaterials.setPaintMap(nullptr);
+
+        return true;
+    }
+};
+
+
+/////////////
+
+
 class LLAdvancedBuyCurrencyTest : public view_listener_t
     {
     bool handleEvent(const LLSD& userdata)
@@ -2242,20 +2304,6 @@ class LLAdvancedPurgeShaderCache : public view_listener_t
     }
 };
 
-/////////////////////
-// REBUILD TERRAIN //
-/////////////////////
-
-
-class LLAdvancedRebuildTerrain : public view_listener_t
-{
-    bool handleEvent(const LLSD& userdata)
-    {
-        gPipeline.rebuildTerrain();
-        return true;
-    }
-};
-
 ////////////////////
 // EVENT Recorder //
 ///////////////////
@@ -9851,7 +9899,6 @@ void initialize_menus()
     view_listener_t::addMenu(new LLAdvancedClickGLTFEdit(), "Advanced.ClickGLTFEdit");
     view_listener_t::addMenu(new LLAdvancedClickResizeWindow(), "Advanced.ClickResizeWindow");
     view_listener_t::addMenu(new LLAdvancedPurgeShaderCache(), "Advanced.ClearShaderCache");
-    view_listener_t::addMenu(new LLAdvancedRebuildTerrain(), "Advanced.RebuildTerrain");
 
     #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
     view_listener_t::addMenu(new LLAdvancedHandleToggleHackedGodmode(), "Advanced.HandleToggleHackedGodmode");
@@ -9868,6 +9915,11 @@ void initialize_menus()
     view_listener_t::addMenu(new LLAdvancedCheckInterestList360Mode(), "Advanced.CheckInterestList360Mode");
     view_listener_t::addMenu(new LLAdvancedResetInterestLists(), "Advanced.ResetInterestLists");
 
+    // Develop > Terrain
+    view_listener_t::addMenu(new LLAdvancedRebuildTerrain(), "Advanced.RebuildTerrain");
+    view_listener_t::addMenu(new LLAdvancedTerrainCreateLocalPaintMap(), "Advanced.TerrainCreateLocalPaintMap");
+    view_listener_t::addMenu(new LLAdvancedTerrainDeleteLocalPaintMap(), "Advanced.TerrainDeleteLocalPaintMap");
+
     // Advanced > UI
     commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2));   // sigh! this one opens the MEDIA browser
     commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2));   // this one opens the Web Content floater
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 96354ea18f..073a1787d5 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -100,6 +100,7 @@ LLGLSLShader    gBenchmarkProgram;
 LLGLSLShader    gReflectionProbeDisplayProgram;
 LLGLSLShader    gCopyProgram;
 LLGLSLShader    gCopyDepthProgram;
+LLGLSLShader    gPBRTerrainBakeProgram;
 
 //object shaders
 LLGLSLShader        gObjectPreviewProgram;
@@ -226,7 +227,7 @@ LLGLSLShader            gDeferredSkinnedPBROpaqueProgram;
 LLGLSLShader            gHUDPBRAlphaProgram;
 LLGLSLShader            gDeferredPBRAlphaProgram;
 LLGLSLShader            gDeferredSkinnedPBRAlphaProgram;
-LLGLSLShader            gDeferredPBRTerrainProgram;
+LLGLSLShader            gDeferredPBRTerrainProgram[TERRAIN_PAINT_TYPE_COUNT];
 
 LLGLSLShader            gGLTFPBRMetallicRoughnessProgram;
 
@@ -432,7 +433,10 @@ void LLViewerShaderMgr::finalizeShaderList()
     mShaderList.push_back(&gGLTFPBRMetallicRoughnessProgram);
     mShaderList.push_back(&gDeferredAvatarProgram);
     mShaderList.push_back(&gDeferredTerrainProgram);
-    mShaderList.push_back(&gDeferredPBRTerrainProgram);
+    for (U32 paint_type = 0; paint_type < TERRAIN_PAINT_TYPE_COUNT; ++paint_type)
+    {
+        mShaderList.push_back(&gDeferredPBRTerrainProgram[paint_type]);
+    }
     mShaderList.push_back(&gDeferredDiffuseAlphaMaskProgram);
     mShaderList.push_back(&gDeferredNonIndexedDiffuseAlphaMaskProgram);
     mShaderList.push_back(&gDeferredTreeProgram);
@@ -1129,7 +1133,10 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         gDeferredSkinnedPBROpaqueProgram.unload();
         gDeferredPBRAlphaProgram.unload();
         gDeferredSkinnedPBRAlphaProgram.unload();
-        gDeferredPBRTerrainProgram.unload();
+        for (U32 paint_type = 0; paint_type < TERRAIN_PAINT_TYPE_COUNT; ++paint_type)
+        {
+            gDeferredPBRTerrainProgram[paint_type].unload();
+        }
 
         return true;
     }
@@ -1443,25 +1450,31 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         S32 detail = gSavedSettings.getS32("RenderTerrainPBRDetail");
         detail = llclamp(detail, TERRAIN_PBR_DETAIL_MIN, TERRAIN_PBR_DETAIL_MAX);
         const S32 mapping = clamp_terrain_mapping(gSavedSettings.getS32("RenderTerrainPBRPlanarSampleCount"));
-        gDeferredPBRTerrainProgram.mName = llformat("Deferred PBR Terrain Shader %d %s",
-                detail,
-                (mapping == 1 ? "flat" : "triplanar"));
-        gDeferredPBRTerrainProgram.mFeatures.hasSrgb = true;
-        gDeferredPBRTerrainProgram.mFeatures.isAlphaLighting = true;
-        gDeferredPBRTerrainProgram.mFeatures.calculatesAtmospherics = true;
-        gDeferredPBRTerrainProgram.mFeatures.hasAtmospherics = true;
-        gDeferredPBRTerrainProgram.mFeatures.hasGamma = true;
-        gDeferredPBRTerrainProgram.mFeatures.hasTransport = true;
-        gDeferredPBRTerrainProgram.mFeatures.isPBRTerrain = true;
+        for (U32 paint_type = 0; paint_type < TERRAIN_PAINT_TYPE_COUNT; ++paint_type)
+        {
+            LLGLSLShader* shader = &gDeferredPBRTerrainProgram[paint_type];
+            shader->mName = llformat("Deferred PBR Terrain Shader %d %s %s",
+                    detail,
+                    (paint_type == TERRAIN_PAINT_TYPE_PBR_PAINTMAP ? "paintmap" : "heightmap-with-noise"),
+                    (mapping == 1 ? "flat" : "triplanar"));
+            shader->mFeatures.hasSrgb = true;
+            shader->mFeatures.isAlphaLighting = true;
+            shader->mFeatures.calculatesAtmospherics = true;
+            shader->mFeatures.hasAtmospherics = true;
+            shader->mFeatures.hasGamma = true;
+            shader->mFeatures.hasTransport = true;
+            shader->mFeatures.isPBRTerrain = true;
 
-        gDeferredPBRTerrainProgram.mShaderFiles.clear();
-        gDeferredPBRTerrainProgram.mShaderFiles.push_back(make_pair("deferred/pbrterrainV.glsl", GL_VERTEX_SHADER));
-        gDeferredPBRTerrainProgram.mShaderFiles.push_back(make_pair("deferred/pbrterrainF.glsl", GL_FRAGMENT_SHADER));
-        gDeferredPBRTerrainProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
-        gDeferredPBRTerrainProgram.addPermutation("TERRAIN_PBR_DETAIL", llformat("%d", detail));
-        gDeferredPBRTerrainProgram.addPermutation("TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT", llformat("%d", mapping));
-        success = gDeferredPBRTerrainProgram.createShader();
-        llassert(success);
+            shader->mShaderFiles.clear();
+            shader->mShaderFiles.push_back(make_pair("deferred/pbrterrainV.glsl", GL_VERTEX_SHADER));
+            shader->mShaderFiles.push_back(make_pair("deferred/pbrterrainF.glsl", GL_FRAGMENT_SHADER));
+            shader->mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+            shader->addPermutation("TERRAIN_PBR_DETAIL", llformat("%d", detail));
+            shader->addPermutation("TERRAIN_PAINT_TYPE", llformat("%d", paint_type));
+            shader->addPermutation("TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT", llformat("%d", mapping));
+            success = success && shader->createShader();
+            llassert(success);
+        }
     }
 
     if (success)
@@ -2957,6 +2970,25 @@ bool LLViewerShaderMgr::loadShadersInterface()
         success = gCopyDepthProgram.createShader();
     }
 
+    if (success)
+    {
+        LLGLSLShader* shader = &gPBRTerrainBakeProgram;
+        U32 bit_depth = gSavedSettings.getU32("TerrainPaintBitDepth");
+        // LLTerrainPaintMap currently uses an RGB8 texture internally
+        bit_depth = llclamp(bit_depth, 1, 8);
+        shader->mName = llformat("Terrain Bake Shader RGB%o", bit_depth);
+        shader->mFeatures.isPBRTerrain = true;
+
+        shader->mShaderFiles.clear();
+        shader->mShaderFiles.push_back(make_pair("interface/pbrTerrainBakeV.glsl", GL_VERTEX_SHADER));
+        shader->mShaderFiles.push_back(make_pair("interface/pbrTerrainBakeF.glsl", GL_FRAGMENT_SHADER));
+        shader->mShaderLevel = mShaderLevel[SHADER_INTERFACE];
+        const U32 value_range = (1 << bit_depth) - 1;
+        shader->addPermutation("TERRAIN_PAINT_PRECISION", llformat("%d", value_range));
+        success = success && shader->createShader();
+        llassert(success);
+    }
+
     if (success)
     {
         gAlphaMaskProgram.mName = "Alpha Mask Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 60ce8c430b..af47014a43 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -174,6 +174,7 @@ extern LLGLSLShader         gBenchmarkProgram;
 extern LLGLSLShader         gReflectionProbeDisplayProgram;
 extern LLGLSLShader         gCopyProgram;
 extern LLGLSLShader         gCopyDepthProgram;
+extern LLGLSLShader         gPBRTerrainBakeProgram;
 
 //output tex0[tc0] - tex1[tc1]
 extern LLGLSLShader         gTwoTextureCompareProgram;
@@ -304,5 +305,13 @@ enum TerrainPBRDetail : S32
     TERRAIN_PBR_DETAIL_BASE_COLOR         = -4,
     TERRAIN_PBR_DETAIL_MIN                = -4,
 };
-extern LLGLSLShader         gDeferredPBRTerrainProgram;
+enum TerrainPaintType : U32
+{
+    // Use LLVLComposition::mDatap (heightmap) generated by generateHeights, plus noise from TERRAIN_ALPHARAMP
+    TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE = 0,
+    // Use paint map if PBR terrain, otherwise fall back to TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE
+    TERRAIN_PAINT_TYPE_PBR_PAINTMAP         = 1,
+    TERRAIN_PAINT_TYPE_COUNT                = 2,
+};
+extern LLGLSLShader         gDeferredPBRTerrainProgram[TERRAIN_PAINT_TYPE_COUNT];
 #endif
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 9648a9af18..1369e3d306 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -42,6 +42,7 @@
 #include "llstl.h"
 #include "message.h"
 #include "lltimer.h"
+#include "v4coloru.h"
 
 // viewer includes
 #include "llimagegl.h"
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index f5f058a080..077e6e6cb1 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -312,6 +312,17 @@ bool LLTerrainMaterials::makeMaterialsReady(bool boost, bool strict)
     return one_ready;
 }
 
+LLViewerTexture* LLTerrainMaterials::getPaintMap()
+{
+    return mPaintMap.get();
+}
+
+void LLTerrainMaterials::setPaintMap(LLViewerTexture* paint_map)
+{
+    llassert(!paint_map || mPaintType == TERRAIN_PAINT_TYPE_PBR_PAINTMAP);
+    mPaintMap = paint_map;
+}
+
 // Boost the texture loading priority
 // Return true when ready to use (i.e. texture is sufficiently loaded)
 // static
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h
index 2637d77183..f15f9bff6a 100644
--- a/indra/newview/llvlcomposition.h
+++ b/indra/newview/llvlcomposition.h
@@ -28,6 +28,8 @@
 #define LL_LLVLCOMPOSITION_H
 
 #include "llviewerlayer.h"
+#include "llviewershadermgr.h"
+#include "llviewertexture.h"
 #include "llpointer.h"
 
 #include "llimage.h"
@@ -44,6 +46,7 @@ public:
     virtual const LLGLTFMaterial* getMaterialOverride(S32 asset) const = 0;
 };
 
+// The subset of the composition used by local terrain debug materials (gLocalTerrainMaterials)
 class LLTerrainMaterials : public LLModifyRegion
 {
 public:
@@ -79,6 +82,12 @@ public:
     // strict = false -> at least one material must be loaded
     bool makeMaterialsReady(bool boost, bool strict);
 
+    // See TerrainPaintType
+    U32 getPaintType() const { return mPaintType; }
+    void setPaintType(U32 paint_type) { mPaintType = paint_type; }
+    LLViewerTexture* getPaintMap();
+    void setPaintMap(LLViewerTexture* paint_map);
+
 protected:
     void unboost();
     static bool makeTextureReady(LLPointer<LLViewerFetchedTexture>& tex, bool boost);
@@ -93,6 +102,9 @@ protected:
     LLPointer<LLGLTFMaterial> mDetailMaterialOverrides[ASSET_COUNT];
     LLPointer<LLFetchedGLTFMaterial> mDetailRenderMaterials[ASSET_COUNT];
     bool mMaterialTexturesSet[ASSET_COUNT];
+
+    U32 mPaintType = TERRAIN_PAINT_TYPE_HEIGHTMAP_WITH_NOISE;
+    LLPointer<LLViewerTexture> mPaintMap;
 };
 
 // Local materials to override all regions
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 471174cf5d..b76717e660 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -245,7 +245,6 @@ bool LLVOSurfacePatch::updateLOD()
 
 void LLVOSurfacePatch::getTerrainGeometry(LLStrider<LLVector3> &verticesp,
                                               LLStrider<LLVector3> &normalsp,
-                                              LLStrider<LLVector2> &texCoords0p,
                                               LLStrider<LLVector2> &texCoords1p,
                                               LLStrider<U16> &indicesp)
 {
@@ -260,21 +259,18 @@ void LLVOSurfacePatch::getTerrainGeometry(LLStrider<LLVector3> &verticesp,
     updateMainGeometry(facep,
                     verticesp,
                     normalsp,
-                    texCoords0p,
                     texCoords1p,
                     indicesp,
                     index_offset);
     updateNorthGeometry(facep,
                         verticesp,
                         normalsp,
-                        texCoords0p,
                         texCoords1p,
                         indicesp,
                         index_offset);
     updateEastGeometry(facep,
                         verticesp,
                         normalsp,
-                        texCoords0p,
                         texCoords1p,
                         indicesp,
                         index_offset);
@@ -283,7 +279,6 @@ void LLVOSurfacePatch::getTerrainGeometry(LLStrider<LLVector3> &verticesp,
 void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
                                         LLStrider<LLVector3> &verticesp,
                                         LLStrider<LLVector3> &normalsp,
-                                        LLStrider<LLVector2> &texCoords0p,
                                         LLStrider<LLVector2> &texCoords1p,
                                         LLStrider<U16> &indicesp,
                                         U32 &index_offset)
@@ -322,10 +317,9 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
             {
                 x = i * render_stride;
                 y = j * render_stride;
-                mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+                mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
                 verticesp++;
                 normalsp++;
-                texCoords0p++;
                 texCoords1p++;
             }
         }
@@ -387,7 +381,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
 void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
                                         LLStrider<LLVector3> &verticesp,
                                         LLStrider<LLVector3> &normalsp,
-                                        LLStrider<LLVector2> &texCoords0p,
                                         LLStrider<LLVector2> &texCoords1p,
                                         LLStrider<U16> &indicesp,
                                         U32 &index_offset)
@@ -421,10 +414,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
             x = i * render_stride;
             y = 16 - render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -433,10 +425,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
         {
             x = i * render_stride;
             y = 16;
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -469,10 +460,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
             x = i * render_stride;
             y = 16 - render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -482,10 +472,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
             x = i * render_stride;
             y = 16;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -525,10 +514,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
             x = i * north_stride;
             y = 16 - render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -538,10 +526,9 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
             x = i * north_stride;
             y = 16;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -577,7 +564,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
 void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
                                           LLStrider<LLVector3> &verticesp,
                                           LLStrider<LLVector3> &normalsp,
-                                          LLStrider<LLVector2> &texCoords0p,
                                           LLStrider<LLVector2> &texCoords1p,
                                           LLStrider<U16> &indicesp,
                                           U32 &index_offset)
@@ -606,10 +592,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
             x = 16 - render_stride;
             y = i * render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -618,10 +603,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
         {
             x = 16;
             y = i * render_stride;
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -654,10 +638,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
             x = 16 - render_stride;
             y = i * render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
         // Iterate through the east patch's points
@@ -666,10 +649,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
             x = 16;
             y = i * render_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -708,10 +690,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
             x = 16 - render_stride;
             y = i * east_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
         // Iterate through the east patch's points
@@ -720,10 +701,9 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
             x = 16;
             y = i * east_stride;
 
-            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
+            mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords1p.get());
             verticesp++;
             normalsp++;
-            texCoords0p++;
             texCoords1p++;
         }
 
@@ -992,8 +972,8 @@ void gen_terrain_tangents(U16                    strider_vertex_count,
                           LLStrider<LLVector3>  &verticesp,
                           LLStrider<LLVector3>  &normalsp,
                           LLStrider<LLVector4a> &tangentsp,
-                          LLStrider<LLVector2>  &texCoords0p,
-                          LLStrider<U16>        &indicesp)
+                          LLStrider<U16>        &indicesp,
+                          F32 region_width)
 {
     LL_PROFILE_ZONE_SCOPED;
 
@@ -1010,7 +990,10 @@ void gen_terrain_tangents(U16                    strider_vertex_count,
         F32 *n       = normalsp[v].mV;
         normals[v]   = LLVector4a(n[0], n[1], n[2], 1.f);
         tangents[v]  = tangentsp[v];
-        texcoords[v] = texCoords0p[v];
+
+        // Calculate texcoords on-the-fly using the terrain positions
+        texcoords[v].mV[VX] = verticesp[v].mV[VX] / region_width;
+        texcoords[v].mV[VY] = verticesp[v].mV[VY] / region_width;
     }
     for (U32 i = 0; i < strider_index_count; ++i)
     {
@@ -1039,14 +1022,12 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
     LLStrider<LLVector3> vertices_start;
     LLStrider<LLVector3> normals_start;
     LLStrider<LLVector4a> tangents_start;
-    LLStrider<LLVector2> texcoords_start;
     LLStrider<LLVector2> texcoords2_start;
     LLStrider<U16> indices_start;
 
     llassert_always(buffer->getVertexStrider(vertices_start));
     llassert_always(buffer->getNormalStrider(normals_start));
     llassert_always(buffer->getTangentStrider(tangents_start));
-    llassert_always(buffer->getTexCoord0Strider(texcoords_start));
     llassert_always(buffer->getTexCoord1Strider(texcoords2_start));
     llassert_always(buffer->getIndexStrider(indices_start));
 
@@ -1056,7 +1037,6 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
     {
         LLStrider<LLVector3> vertices = vertices_start;
         LLStrider<LLVector3> normals = normals_start;
-        LLStrider<LLVector2> texcoords = texcoords_start;
         LLStrider<LLVector2> texcoords2 = texcoords2_start;
         LLStrider<U16> indices = indices_start;
 
@@ -1069,7 +1049,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
             facep->setVertexBuffer(buffer);
 
             LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject();
-            patchp->getTerrainGeometry(vertices, normals, texcoords, texcoords2, indices);
+            patchp->getTerrainGeometry(vertices, normals, texcoords2, indices);
 
             indices_index += facep->getIndicesCount();
             index_offset += facep->getGeomCount();
@@ -1082,10 +1062,20 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
         LLStrider<LLVector3> vertices = vertices_start;
         LLStrider<LLVector3> normals = normals_start;
         LLStrider<LLVector4a> tangents = tangents_start;
-        LLStrider<LLVector2> texcoords = texcoords_start;
         LLStrider<U16> indices = indices_start;
 
-        gen_terrain_tangents(index_offset, indices_index, vertices, normals, tangents, texcoords, indices);
+        F32 region_width = 256.0f;
+        if (mFaceList.empty())
+        {
+            llassert(false);
+        }
+        else
+        {
+            const LLViewerRegion* regionp = mFaceList[0]->getViewerObject()->getRegion();
+            llassert(regionp == mFaceList.back()->getViewerObject()->getRegion()); // Assume this spatial group is confined to one region
+            region_width = regionp->getWidth();
+        }
+        gen_terrain_tangents(index_offset, indices_index, vertices, normals, tangents, indices, region_width);
     }
 
     buffer->unmapBuffer();
diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h
index 2780b97a97..af5f05774b 100644
--- a/indra/newview/llvosurfacepatch.h
+++ b/indra/newview/llvosurfacepatch.h
@@ -41,14 +41,6 @@ class LLVOSurfacePatch : public LLStaticViewerObject
 public:
     static F32 sLODFactor;
 
-    enum
-    {
-        VERTEX_DATA_MASK =  (1 << LLVertexBuffer::TYPE_VERTEX) |
-                            (1 << LLVertexBuffer::TYPE_NORMAL) |
-                            (1 << LLVertexBuffer::TYPE_TEXCOORD0) |
-                            (1 << LLVertexBuffer::TYPE_TEXCOORD1)
-    };
-
     LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
 
     /*virtual*/ void markDead();
@@ -65,7 +57,6 @@ public:
     /*virtual*/ void        updateFaceSize(S32 idx);
     void getTerrainGeometry(LLStrider<LLVector3> &verticesp,
                                 LLStrider<LLVector3> &normalsp,
-                                LLStrider<LLVector2> &texCoords0p,
                                 LLStrider<LLVector2> &texCoords1p,
                                 LLStrider<U16> &indicesp);
 
@@ -118,21 +109,18 @@ protected:
     void updateMainGeometry(LLFace *facep,
                        LLStrider<LLVector3> &verticesp,
                        LLStrider<LLVector3> &normalsp,
-                       LLStrider<LLVector2> &texCoords0p,
                        LLStrider<LLVector2> &texCoords1p,
                        LLStrider<U16> &indicesp,
                        U32 &index_offset);
     void updateNorthGeometry(LLFace *facep,
                        LLStrider<LLVector3> &verticesp,
                        LLStrider<LLVector3> &normalsp,
-                       LLStrider<LLVector2> &texCoords0p,
                        LLStrider<LLVector2> &texCoords1p,
                        LLStrider<U16> &indicesp,
                        U32 &index_offset);
     void updateEastGeometry(LLFace *facep,
                        LLStrider<LLVector3> &verticesp,
                        LLStrider<LLVector3> &normalsp,
-                       LLStrider<LLVector2> &texCoords0p,
                        LLStrider<LLVector2> &texCoords1p,
                        LLStrider<U16> &indicesp,
                        U32 &index_offset);
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 941f0c6bb7..98cf03b30e 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3435,13 +3435,6 @@ function="World.EnvPreset"
             <menu_item_call.on_click
              function="Advanced.ClearShaderCache" />
           </menu_item_call>
-          <menu_item_call
-            enabled="true"
-            label="Rebuild Terrain"
-            name="Rebuild Terrain">
-            <menu_item_call.on_click
-             function="Advanced.RebuildTerrain" />
-          </menu_item_call>
           <menu_item_separator />
           <menu_item_call
             enabled="true"
@@ -3662,6 +3655,37 @@ function="World.EnvPreset"
                  function="Advanced.ResetInterestLists" />
 			</menu_item_call>
 		</menu>
+        <!-- terrain -->
+        <menu
+         create_jump_keys="true"
+         label="Terrain"
+         name="DevelopTerrain"
+         tear_off="true">
+            <menu_item_call
+              enabled="true"
+              label="Rebuild Terrain"
+              name="Rebuild Terrain">
+              <menu_item_call.on_click
+               function="Advanced.RebuildTerrain" />
+            </menu_item_call>
+
+            <menu_item_separator/>
+
+            <menu_item_call
+              enabled="true"
+              label="Create Local Paintmap"
+              name="Create Local Paintmap">
+              <menu_item_call.on_click
+               function="Advanced.TerrainCreateLocalPaintMap" />
+            </menu_item_call>
+            <menu_item_call
+              enabled="true"
+              label="Delete Local Paintmap"
+              name="Delete Local Paintmap">
+              <menu_item_call.on_click
+               function="Advanced.TerrainDeleteLocalPaintMap" />
+            </menu_item_call>
+		</menu>
         <menu
          create_jump_keys="true"
          label="UI"
-- 
cgit v1.2.3


From 93164fc5605a2b3d0d7a21d39c297cd392f75b60 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 7 Aug 2024 08:23:47 +0200
Subject: #1922 Make PBR scale and offset crosshair work (fix callbacks in
 LLPanelFace)

---
 indra/newview/llpanelface.cpp | 944 +++++++++++++++++-------------------------
 indra/newview/llpanelface.h   | 302 +++++++-------
 2 files changed, 530 insertions(+), 716 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 0afe967839..f01d327fb4 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -240,10 +240,10 @@ LLUUID  LLPanelFace::getCurrentNormalMap()          { return mBumpyTextureCtrl->
 LLUUID  LLPanelFace::getCurrentSpecularMap()        { return mShinyTextureCtrl->getImageAssetID();    }
 U32     LLPanelFace::getCurrentShininess()          { return getChild<LLComboBox>("combobox shininess")->getCurrentIndex();         }
 U32     LLPanelFace::getCurrentBumpiness()          { return getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex();         }
-U8          LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
-U8          LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger();      }
-U8          LLPanelFace::getCurrentEnvIntensity()       { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger();     }
-U8          LLPanelFace::getCurrentGlossiness()         { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger();      }
+U8      LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
+U8      LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger();      }
+U8      LLPanelFace::getCurrentEnvIntensity()       { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger();     }
+U8      LLPanelFace::getCurrentGlossiness()         { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger();      }
 F32     LLPanelFace::getCurrentBumpyRot()           { return (F32)getChild<LLUICtrl>("bumpyRot")->getValue().asReal();              }
 F32     LLPanelFace::getCurrentBumpyScaleU()        { return (F32)getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal();           }
 F32     LLPanelFace::getCurrentBumpyScaleV()        { return (F32)getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal();           }
@@ -259,49 +259,49 @@ F32     LLPanelFace::getCurrentShinyOffsetV()       { return (F32)getChild<LLUIC
 // Methods
 //
 
-bool    LLPanelFace::postBuild()
-{
-    childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
-    childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
-    childSetCommitCallback("combobox alphamode",&LLPanelFace::onCommitAlphaMode,this);
-    childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureScaleX, this);
-    childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureScaleY, this);
-    childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureRot, this);
-    childSetCommitCallback("rptctrl",&LLPanelFace::onCommitRepeatsPerMeter, this);
-    childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
-    childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureOffsetX, this);
-    childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureOffsetY, this);
-
-    childSetCommitCallback("bumpyScaleU",&LLPanelFace::onCommitMaterialBumpyScaleX, this);
-    childSetCommitCallback("bumpyScaleV",&LLPanelFace::onCommitMaterialBumpyScaleY, this);
-    childSetCommitCallback("bumpyRot",&LLPanelFace::onCommitMaterialBumpyRot, this);
-    childSetCommitCallback("bumpyOffsetU",&LLPanelFace::onCommitMaterialBumpyOffsetX, this);
-    childSetCommitCallback("bumpyOffsetV",&LLPanelFace::onCommitMaterialBumpyOffsetY, this);
-    childSetCommitCallback("shinyScaleU",&LLPanelFace::onCommitMaterialShinyScaleX, this);
-    childSetCommitCallback("shinyScaleV",&LLPanelFace::onCommitMaterialShinyScaleY, this);
-    childSetCommitCallback("shinyRot",&LLPanelFace::onCommitMaterialShinyRot, this);
-    childSetCommitCallback("shinyOffsetU",&LLPanelFace::onCommitMaterialShinyOffsetX, this);
-    childSetCommitCallback("shinyOffsetV",&LLPanelFace::onCommitMaterialShinyOffsetY, this);
-    childSetCommitCallback("glossiness",&LLPanelFace::onCommitMaterialGloss, this);
-    childSetCommitCallback("environment",&LLPanelFace::onCommitMaterialEnv, this);
-    childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this);
-    childSetCommitCallback("add_media", &LLPanelFace::onClickBtnAddMedia, this);
-    childSetCommitCallback("delete_media", &LLPanelFace::onClickBtnDeleteMedia, this);
-
-    getChild<LLUICtrl>("gltfTextureScaleU")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureScaleU, this, _1), nullptr);
-    getChild<LLUICtrl>("gltfTextureScaleV")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureScaleV, this, _1), nullptr);
-    getChild<LLUICtrl>("gltfTextureRotation")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFRotation, this, _1), nullptr);
-    getChild<LLUICtrl>("gltfTextureOffsetU")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureOffsetU, this, _1), nullptr);
-    getChild<LLUICtrl>("gltfTextureOffsetV")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureOffsetV, this, _1), nullptr);
+bool LLPanelFace::postBuild()
+{
+    childSetCommitCallback("combobox shininess", [&](LLUICtrl*, const void*) { onCommitShiny(); }, 0);
+    childSetCommitCallback("combobox bumpiness", [&](LLUICtrl*, const void*) { onCommitBump(); }, 0);
+    childSetCommitCallback("combobox alphamode", [&](LLUICtrl*, const void*) { onCommitAlphaMode(); }, 0);
+    childSetCommitCallback("TexScaleU", [&](LLUICtrl*, const void*) { onCommitTextureScaleX(); }, 0);
+    childSetCommitCallback("TexScaleV", [&](LLUICtrl*, const void*) { onCommitTextureScaleY(); }, 0);
+    childSetCommitCallback("TexRot", [&](LLUICtrl*, const void*) { onCommitTextureRot(); }, 0);
+    childSetCommitCallback("rptctrl", [&](LLUICtrl*, const void*) { onCommitRepeatsPerMeter(); }, 0);
+    childSetCommitCallback("checkbox planar align", [&](LLUICtrl*, const void*) { onCommitPlanarAlign(); }, 0);
+    childSetCommitCallback("TexOffsetU", [&](LLUICtrl*, const void*) { onCommitTextureOffsetX(); }, 0);
+    childSetCommitCallback("TexOffsetV", [&](LLUICtrl*, const void*) { onCommitTextureOffsetY(); }, 0);
+
+    childSetCommitCallback("bumpyScaleU", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyScaleX(); }, 0);
+    childSetCommitCallback("bumpyScaleV", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyScaleY(); }, 0);
+    childSetCommitCallback("bumpyRot", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyRot(); }, 0);
+    childSetCommitCallback("bumpyOffsetU", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyOffsetX(); }, 0);
+    childSetCommitCallback("bumpyOffsetV", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyOffsetY(); }, 0);
+    childSetCommitCallback("shinyScaleU", [&](LLUICtrl*, const void*) { onCommitMaterialShinyScaleX(); }, 0);
+    childSetCommitCallback("shinyScaleV", [&](LLUICtrl*, const void*) { onCommitMaterialShinyScaleY(); }, 0);
+    childSetCommitCallback("shinyRot", [&](LLUICtrl*, const void*) { onCommitMaterialShinyRot(); }, 0);
+    childSetCommitCallback("shinyOffsetU", [&](LLUICtrl*, const void*) { onCommitMaterialShinyOffsetX(); }, 0);
+    childSetCommitCallback("shinyOffsetV", [&](LLUICtrl*, const void*) { onCommitMaterialShinyOffsetY(); }, 0);
+    childSetCommitCallback("glossiness", [&](LLUICtrl*, const void*) { onCommitMaterialGloss(); }, 0);
+    childSetCommitCallback("environment", [&](LLUICtrl*, const void*) { onCommitMaterialEnv(); }, 0);
+    childSetCommitCallback("maskcutoff", [&](LLUICtrl*, const void*) { onCommitMaterialMaskCutoff(); }, 0);
+    childSetCommitCallback("add_media", [&](LLUICtrl*, const void*) { onClickBtnAddMedia(); }, 0);
+    childSetCommitCallback("delete_media", [&](LLUICtrl*, const void*) { onClickBtnDeleteMedia(); }, 0);
+
+    childSetCommitCallback("gltfTextureScaleU", [&](LLUICtrl*, const void*) { onCommitGLTFTextureScaleU(); }, 0);
+    childSetCommitCallback("gltfTextureScaleV", [&](LLUICtrl*, const void*) { onCommitGLTFTextureScaleV(); }, 0);
+    childSetCommitCallback("gltfTextureRotation", [&](LLUICtrl*, const void*) { onCommitGLTFRotation(); }, 0);
+    childSetCommitCallback("gltfTextureOffsetU", [&](LLUICtrl*, const void*) { onCommitGLTFTextureOffsetU(); }, 0);
+    childSetCommitCallback("gltfTextureOffsetV", [&](LLUICtrl*, const void*) { onCommitGLTFTextureOffsetV(); }, 0);
 
     LLGLTFMaterialList::addSelectionUpdateCallback(&LLPanelFace::onMaterialOverrideReceived);
     sMaterialOverrideSelection.connect();
 
-    childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
-    childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
-    childSetAction("pbr_from_inventory", &LLPanelFace::onClickBtnLoadInvPBR, this);
-    childSetAction("edit_selected_pbr", &LLPanelFace::onClickBtnEditPBR, this);
-    childSetAction("save_selected_pbr", &LLPanelFace::onClickBtnSavePBR, this);
+    childSetAction("button align", [&](LLUICtrl*, const LLSD&) { onClickAutoFix(); });
+    childSetAction("button align textures", [&](LLUICtrl*, const LLSD&) { onAlignTexture(); });
+    childSetAction("pbr_from_inventory", [&](LLUICtrl*, const LLSD&) { onClickBtnLoadInvPBR(); });
+    childSetAction("edit_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnEditPBR(); });
+    childSetAction("save_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnSavePBR(); });
 
     setMouseOpaque(false);
 
@@ -310,12 +310,12 @@ bool    LLPanelFace::postBuild()
     {
         mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
         mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
-        mPBRTextureCtrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
-        mPBRTextureCtrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
-        mPBRTextureCtrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
-        mPBRTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragPbr, this, _2));
-        mPBRTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onPbrSelectionChanged, this, _1));
-        mPBRTextureCtrl->setOnCloseCallback(boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2));
+        mPBRTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbr(); });
+        mPBRTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelPbr(); });
+        mPBRTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectPbr(); });
+        mPBRTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragPbr(item); });
+        mPBRTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onPbrSelectionChanged(item); });
+        mPBRTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
 
         mPBRTextureCtrl->setFollowsTop();
         mPBRTextureCtrl->setFollowsLeft();
@@ -326,15 +326,15 @@ bool    LLPanelFace::postBuild()
     }
 
     mTextureCtrl = getChild<LLTextureCtrl>("texture control");
-    if(mTextureCtrl)
+    if (mTextureCtrl)
     {
         mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
-        mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
-        mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
-        mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
-        mTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
-        mTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
-        mTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
+        mTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexture(); });
+        mTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelTexture(); });
+        mTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectTexture(); });
+        mTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+        mTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+        mTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
 
         mTextureCtrl->setFollowsTop();
         mTextureCtrl->setFollowsLeft();
@@ -343,16 +343,16 @@ bool    LLPanelFace::postBuild()
     }
 
     mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
-    if(mShinyTextureCtrl)
+    if (mShinyTextureCtrl)
     {
         mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
-        mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
-        mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
-        mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
-        mShinyTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
+        mShinyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitSpecularTexture(data); });
+        mShinyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelSpecularTexture(data); });
+        mShinyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectSpecularTexture(data); });
+        mShinyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
 
-        mShinyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
-        mShinyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
+        mShinyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+        mShinyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
         mShinyTextureCtrl->setFollowsTop();
         mShinyTextureCtrl->setFollowsLeft();
         mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
@@ -360,17 +360,17 @@ bool    LLPanelFace::postBuild()
     }
 
     mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
-    if(mBumpyTextureCtrl)
+    if (mBumpyTextureCtrl)
     {
         mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
         mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
-        mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
-        mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
-        mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
-        mBumpyTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
+        mBumpyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitNormalTexture(data); });
+        mBumpyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelNormalTexture(data); });
+        mBumpyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectNormalTexture(data); });
+        mBumpyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
 
-        mBumpyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
-        mBumpyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
+        mBumpyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+        mBumpyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
         mBumpyTextureCtrl->setFollowsTop();
         mBumpyTextureCtrl->setFollowsLeft();
         mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
@@ -378,38 +378,38 @@ bool    LLPanelFace::postBuild()
     }
 
     mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
-    if(mColorSwatch)
+    if (mColorSwatch)
     {
-        mColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitColor, this, _2));
-        mColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelColor, this, _2));
-        mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2));
+        mColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitColor(); });
+        mColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelColor(); });
+        mColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectColor(); });
         mColorSwatch->setFollowsTop();
         mColorSwatch->setFollowsLeft();
         mColorSwatch->setCanApplyImmediately(true);
     }
 
     mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
-    if(mShinyColorSwatch)
+    if (mShinyColorSwatch)
     {
-        mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2));
-        mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2));
-        mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
+        mShinyColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitShinyColor(); });
+        mShinyColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelShinyColor(); });
+        mShinyColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectShinyColor(); });
         mShinyColorSwatch->setFollowsTop();
         mShinyColorSwatch->setFollowsLeft();
         mShinyColorSwatch->setCanApplyImmediately(true);
     }
 
     mLabelColorTransp = getChild<LLTextBox>("color trans");
-    if(mLabelColorTransp)
+    if (mLabelColorTransp)
     {
         mLabelColorTransp->setFollowsTop();
         mLabelColorTransp->setFollowsLeft();
     }
 
     mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
-    if(mCtrlColorTransp)
+    if (mCtrlColorTransp)
     {
-        mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
+        mCtrlColorTransp->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitAlpha(); });
         mCtrlColorTransp->setPrecision(0);
         mCtrlColorTransp->setFollowsTop();
         mCtrlColorTransp->setFollowsLeft();
@@ -418,41 +418,41 @@ bool    LLPanelFace::postBuild()
     mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
     if (mCheckFullbright)
     {
-        mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright, this);
+        mCheckFullbright->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
     }
 
     mComboTexGen = getChild<LLComboBox>("combobox texgen");
-    if(mComboTexGen)
+    if (mComboTexGen)
     {
-        mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen, this);
+        mComboTexGen->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
         mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
     }
 
     mComboMatMedia = getChild<LLComboBox>("combobox matmedia");
-    if(mComboMatMedia)
+    if (mComboMatMedia)
     {
-        mComboMatMedia->setCommitCallback(LLPanelFace::onCommitMaterialsMedia,this);
+        mComboMatMedia->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
         mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
     }
 
     mRadioMaterialType = getChild<LLRadioGroup>("radio_material_type");
-    if(mRadioMaterialType)
+    if (mRadioMaterialType)
     {
-        mRadioMaterialType->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
+        mRadioMaterialType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
         mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
     }
 
     mRadioPbrType = getChild<LLRadioGroup>("radio_pbr_type");
     if (mRadioPbrType)
     {
-        mRadioPbrType->setCommitCallback(LLPanelFace::onCommitPbrType, this);
+        mRadioPbrType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
         mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
     }
 
     mCtrlGlow = getChild<LLSpinCtrl>("glow");
-    if(mCtrlGlow)
+    if (mCtrlGlow)
     {
-        mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this);
+        mCtrlGlow->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
     }
 
     mMenuClipboardColor = getChild<LLMenuButton>("clipboard_color_params_btn");
@@ -534,7 +534,7 @@ void LLPanelFace::sendTexture()
 void LLPanelFace::sendBump(U32 bumpiness)
 {
     if (bumpiness < BUMPY_TEXTURE)
-{
+    {
         LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL;
         mBumpyTextureCtrl->clear();
         mBumpyTextureCtrl->setImageAssetID(LLUUID());
@@ -544,12 +544,13 @@ void LLPanelFace::sendBump(U32 bumpiness)
 
     LLUUID current_normal_map = mBumpyTextureCtrl->getImageAssetID();
 
-    U8 bump = (U8) bumpiness & TEM_BUMP_MASK;
+    U8 bump = (U8)bumpiness & TEM_BUMP_MASK;
 
     // Clear legacy bump to None when using an actual normal map
-    //
     if (!current_normal_map.isNull())
+    {
         bump = 0;
+    }
 
     // Set the normal map or reset it to null as appropriate
     //
@@ -560,14 +561,14 @@ void LLPanelFace::sendBump(U32 bumpiness)
 
 void LLPanelFace::sendTexGen()
 {
-    U8 tex_gen = (U8) mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT;
-    LLSelectMgr::getInstance()->selectionSetTexGen( tex_gen );
+    U8 tex_gen = (U8)mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT;
+    LLSelectMgr::getInstance()->selectionSetTexGen(tex_gen);
 }
 
 void LLPanelFace::sendShiny(U32 shininess)
 {
     if (shininess < SHINY_TEXTURE)
-{
+    {
         mShinyTextureCtrl->clear();
         mShinyTextureCtrl->setImageAssetID(LLUUID());
     }
@@ -576,40 +577,38 @@ void LLPanelFace::sendShiny(U32 shininess)
 
     U8 shiny = (U8) shininess & TEM_SHINY_MASK;
     if (!specmap.isNull())
+    {
         shiny = 0;
+    }
 
     LLSelectedTEMaterial::setSpecularID(this, specmap);
 
-    LLSelectMgr::getInstance()->selectionSetShiny( shiny, mShinyTextureCtrl->getImageItemID() );
+    LLSelectMgr::getInstance()->selectionSetShiny(shiny, mShinyTextureCtrl->getImageItemID());
 
     updateShinyControls(!specmap.isNull(), true);
-
 }
 
 void LLPanelFace::sendFullbright()
 {
     if(!mCheckFullbright)return;
     U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0;
-    LLSelectMgr::getInstance()->selectionSetFullbright( fullbright );
+    LLSelectMgr::getInstance()->selectionSetFullbright(fullbright);
 }
 
 void LLPanelFace::sendColor()
 {
     if(!mColorSwatch)return;
     LLColor4 color = mColorSwatch->get();
-
-    LLSelectMgr::getInstance()->selectionSetColorOnly( color );
+    LLSelectMgr::getInstance()->selectionSetColorOnly(color);
 }
 
 void LLPanelFace::sendAlpha()
 {
     if(!mCtrlColorTransp)return;
     F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f;
-
     LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha );
 }
 
-
 void LLPanelFace::sendGlow()
 {
     if (mCtrlGlow)
@@ -750,6 +749,7 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
                 }
             }
         }
+
         return true;
     }
 private:
@@ -906,7 +906,7 @@ struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor
 
         LLVector2 aligned_st_offset, aligned_st_scale;
         F32 aligned_st_rot;
-        if ( facep->calcAlignedPlanarTE(mCenterFace, &aligned_st_offset, &aligned_st_scale, &aligned_st_rot) )
+        if (facep->calcAlignedPlanarTE(mCenterFace, &aligned_st_offset, &aligned_st_scale, &aligned_st_rot))
         {
             const LLTextureEntry* tep = facep->getTextureEntry();
             LLVector2 st_offset, st_scale;
@@ -947,7 +947,7 @@ struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor
 
 void LLPanelFace::sendTextureInfo()
 {
-    if ((bool)childGetValue("checkbox planar align").asBoolean())
+    if (childGetValue("checkbox planar align").asBoolean())
     {
         LLFace* last_face = NULL;
         bool identical_face =false;
@@ -1322,9 +1322,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             if (mShinyTextureCtrl)
             {
-                mShinyTextureCtrl->setTentative( !identical_spec );
-                mShinyTextureCtrl->setEnabled( editable && !has_pbr_material);
-                mShinyTextureCtrl->setImageAssetID( specmap_id );
+                mShinyTextureCtrl->setTentative(!identical_spec);
+                mShinyTextureCtrl->setEnabled(editable && !has_pbr_material);
+                mShinyTextureCtrl->setImageAssetID(specmap_id);
 
                 if (attachment)
                 {
@@ -1338,9 +1338,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             if (mBumpyTextureCtrl)
             {
-                mBumpyTextureCtrl->setTentative( !identical_norm );
-                mBumpyTextureCtrl->setEnabled( editable && !has_pbr_material);
-                mBumpyTextureCtrl->setImageAssetID( normmap_id );
+                mBumpyTextureCtrl->setTentative(!identical_norm);
+                mBumpyTextureCtrl->setEnabled(editable && !has_pbr_material);
+                mBumpyTextureCtrl->setImageAssetID(normmap_id);
 
                 if (attachment)
                 {
@@ -1386,10 +1386,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         bool identical_texgen = true;
         bool identical_planar_texgen = false;
 
-        {
-            LLSelectedTE::getTexGen(selected_texgen, identical_texgen);
-            identical_planar_texgen = (identical_texgen && (selected_texgen == LLTextureEntry::TEX_GEN_PLANAR));
-        }
+        LLSelectedTE::getTexGen(selected_texgen, identical_texgen);
+        identical_planar_texgen = (identical_texgen && (selected_texgen == LLTextureEntry::TEX_GEN_PLANAR));
 
         // Texture scale
         {
@@ -1428,7 +1426,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             bool norm_scale_tentative = !(identical && identical_norm_scale_s);
             bool spec_scale_tentative = !(identical && identical_spec_scale_s);
 
-            getChild<LLUICtrl>("TexScaleU")->setTentative(  LLSD(diff_scale_tentative));
+            getChild<LLUICtrl>("TexScaleU")->setTentative(LLSD(diff_scale_tentative));
             getChild<LLUICtrl>("shinyScaleU")->setTentative(LLSD(spec_scale_tentative));
             getChild<LLUICtrl>("bumpyScaleU")->setTentative(LLSD(norm_scale_tentative));
         }
@@ -1550,9 +1548,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             F32 norm_rotation = 0.f;
             F32 spec_rotation = 0.f;
 
-            LLSelectedTE::getRotation(diff_rotation,identical_diff_rotation);
-            LLSelectedTEMaterial::getSpecularRotation(spec_rotation,identical_spec_rotation);
-            LLSelectedTEMaterial::getNormalRotation(norm_rotation,identical_norm_rotation);
+            LLSelectedTE::getRotation(diff_rotation, identical_diff_rotation);
+            LLSelectedTEMaterial::getSpecularRotation(spec_rotation, identical_spec_rotation);
+            LLSelectedTEMaterial::getNormalRotation(norm_rotation, identical_norm_rotation);
 
             bool diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation);
             bool norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation);
@@ -1566,11 +1564,11 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             getChildView("shinyRot")->setEnabled(editable && has_material && specmap_id.notNull());
             getChildView("bumpyRot")->setEnabled(editable && has_material && normmap_id.notNull());
 
-            getChild<LLUICtrl>("TexRot")->setTentative(diff_rot_tentative);
-            getChild<LLUICtrl>("shinyRot")->setTentative(LLSD(norm_rot_tentative));
-            getChild<LLUICtrl>("bumpyRot")->setTentative(LLSD(spec_rot_tentative));
+            getChild<LLUICtrl>("TexRot")->setTentative(LLSD(diff_rot_tentative));
+            getChild<LLUICtrl>("shinyRot")->setTentative(LLSD(spec_rot_tentative));
+            getChild<LLUICtrl>("bumpyRot")->setTentative(LLSD(norm_rot_tentative));
 
-            getChild<LLUICtrl>("TexRot")->setValue(  editable ? diff_rot_deg : 0.0f);
+            getChild<LLUICtrl>("TexRot")->setValue(editable ? diff_rot_deg : 0.0f);
             getChild<LLUICtrl>("shinyRot")->setValue(editable ? spec_rot_deg : 0.0f);
             getChild<LLUICtrl>("bumpyRot")->setValue(editable ? norm_rot_deg : 0.0f);
         }
@@ -1578,7 +1576,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         {
             F32 glow = 0.f;
             bool identical_glow = false;
-            LLSelectedTE::getGlow(glow,identical_glow);
+            LLSelectedTE::getGlow(glow, identical_glow);
             mCtrlGlow->setValue(glow);
             mCtrlGlow->setTentative(!identical_glow);
             mCtrlGlow->setEnabled(editable);
@@ -1598,7 +1596,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             U8 fullbright_flag = 0;
             bool identical_fullbright = false;
 
-            LLSelectedTE::getFullbright(fullbright_flag,identical_fullbright);
+            LLSelectedTE::getFullbright(fullbright_flag, identical_fullbright);
 
             mCheckFullbright->setValue((S32)(fullbright_flag != 0));
             mCheckFullbright->setEnabled(editable && !has_pbr_material);
@@ -1625,7 +1623,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 bool enabled = editable && (index != 1);
                 bool identical_repeats = true;
                 S32 material_selection = mComboMatMedia->getCurrentIndex();
-                F32  repeats = 1.0f;
+                F32 repeats = 1.0f;
 
                 U32 material_type = MATTYPE_DIFFUSE;
                 if (material_selection == MATMEDIA_MATERIAL)
@@ -1642,37 +1640,29 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 {
                 default:
                 case MATTYPE_DIFFUSE:
-                {
                     if (material_selection != MATMEDIA_PBR)
                     {
                         enabled = editable && !id.isNull();
                     }
                     identical_repeats = identical_diff_repeats;
                     repeats = repeats_diff;
-                }
-                break;
-
+                    break;
                 case MATTYPE_SPECULAR:
-                {
                     if (material_selection != MATMEDIA_PBR)
                     {
                         enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull()));
                     }
                     identical_repeats = identical_spec_repeats;
                     repeats = repeats_spec;
-                }
-                break;
-
+                    break;
                 case MATTYPE_NORMAL:
-                {
                     if (material_selection != MATMEDIA_PBR)
                     {
                         enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull()));
                     }
                     identical_repeats = identical_norm_repeats;
                     repeats = repeats_norm;
-                }
-                break;
+                    break;
                 }
 
                 bool repeats_tentative = !identical_repeats;
@@ -1724,6 +1714,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 {
                     LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
                 }
+
                 getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
                 updateAlphaControls();
 
@@ -1735,8 +1726,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
                 if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
                 {
-                    material->getSpecularOffset(offset_x,offset_y);
-                    material->getSpecularRepeat(repeat_x,repeat_y);
+                    material->getSpecularOffset(offset_x, offset_y);
+                    material->getSpecularRepeat(repeat_x, repeat_y);
 
                     if (identical_planar_texgen)
                     {
@@ -1747,7 +1738,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     rot = material->getSpecularRotation();
                     getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
                     getChild<LLUICtrl>("shinyScaleV")->setValue(repeat_y);
-                    getChild<LLUICtrl>("shinyRot")->setValue(rot*RAD_TO_DEG);
+                    getChild<LLUICtrl>("shinyRot")->setValue(rot * RAD_TO_DEG);
                     getChild<LLUICtrl>("shinyOffsetU")->setValue(offset_x);
                     getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
                     getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
@@ -1785,7 +1776,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     rot = material->getNormalRotation();
                     getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
                     getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
-                    getChild<LLUICtrl>("bumpyRot")->setValue(rot*RAD_TO_DEG);
+                    getChild<LLUICtrl>("bumpyRot")->setValue(rot * RAD_TO_DEG);
                     getChild<LLUICtrl>("bumpyOffsetU")->setValue(offset_x);
                     getChild<LLUICtrl>("bumpyOffsetV")->setValue(offset_y);
 
@@ -1793,6 +1784,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 }
             }
         }
+
         S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
         bool single_volume = (selected_count == 1);
         mMenuClipboardColor->setEnabled(editable && single_volume);
@@ -2814,65 +2806,58 @@ void LLPanelFace::updateMediaTitle()
     };
 }
 
-//
-// Static functions
-//
-
 // static
 F32 LLPanelFace::valueGlow(LLViewerObject* object, S32 face)
 {
     return (F32)(object->getTE(face)->getGlow());
 }
 
-
-void LLPanelFace::onCommitColor(const LLSD& data)
+void LLPanelFace::onCommitColor()
 {
     sendColor();
 }
 
-void LLPanelFace::onCommitShinyColor(const LLSD& data)
+void LLPanelFace::onCommitShinyColor()
 {
     LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
 }
 
-void LLPanelFace::onCommitAlpha(const LLSD& data)
+void LLPanelFace::onCommitAlpha()
 {
     sendAlpha();
 }
 
-void LLPanelFace::onCancelColor(const LLSD& data)
+void LLPanelFace::onCancelColor()
 {
     LLSelectMgr::getInstance()->selectionRevertColors();
 }
 
-void LLPanelFace::onCancelShinyColor(const LLSD& data)
+void LLPanelFace::onCancelShinyColor()
 {
     LLSelectMgr::getInstance()->selectionRevertShinyColors();
 }
 
-void LLPanelFace::onSelectColor(const LLSD& data)
+void LLPanelFace::onSelectColor()
 {
     LLSelectMgr::getInstance()->saveSelectedObjectColors();
     sendColor();
 }
 
-void LLPanelFace::onSelectShinyColor(const LLSD& data)
+void LLPanelFace::onSelectShinyColor()
 {
     LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
     LLSelectMgr::getInstance()->saveSelectedShinyColors();
 }
 
-// static
-void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialsMedia()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
     // Force to default states to side-step problems with menu contents
     // and generally reflecting old state when switching tabs or objects
     //
-    self->updateShinyControls(false,true);
-    self->updateBumpyControls(false,true);
-    self->updateUI();
-    self->refreshMedia();
+    updateShinyControls(false, true);
+    updateBumpyControls(false, true);
+    updateUI();
+    refreshMedia();
 }
 
 void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
@@ -2967,62 +2952,42 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     updateVisibilityGLTF(objectp);
 }
 
-// static
-void LLPanelFace::onCommitMaterialType(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialType()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
      // Force to default states to side-step problems with menu contents
      // and generally reflecting old state when switching tabs or objects
      //
-     self->updateShinyControls(false,true);
-     self->updateBumpyControls(false,true);
-    self->updateUI();
+     updateShinyControls(false, true);
+     updateBumpyControls(false, true);
+     updateUI();
 }
 
-// static
-void LLPanelFace::onCommitPbrType(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitPbrType()
 {
-    LLPanelFace* self = (LLPanelFace*)userdata;
     // Force to default states to side-step problems with menu contents
     // and generally reflecting old state when switching tabs or objects
     //
-    self->updateUI();
+    updateUI();
 }
 
-// static
-void LLPanelFace::onCommitBump(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitBump()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-
-    LLComboBox* mComboBumpiness = self->getChild<LLComboBox>("combobox bumpiness");
-    if(!mComboBumpiness)
-        return;
-
-    U32 bumpiness = mComboBumpiness->getCurrentIndex();
-
-    self->sendBump(bumpiness);
+    sendBump(getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex());
 }
 
-// static
-void LLPanelFace::onCommitTexGen(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitTexGen()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->sendTexGen();
+    sendTexGen();
 }
 
-// static
 void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_shiny_combobox)
 {
     LLUUID shiny_texture_ID = mShinyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "Shiny texture selected: " << shiny_texture_ID << LL_ENDL;
     LLComboBox* comboShiny = getChild<LLComboBox>("combobox shininess");
 
-    if(mess_with_shiny_combobox)
+    if (mess_with_shiny_combobox)
     {
-        if (!comboShiny)
-        {
-            return;
-        }
         if (!shiny_texture_ID.isNull() && is_setting_texture)
         {
             if (!comboShiny->itemExists(USE_TEXTURE))
@@ -3042,7 +3007,7 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
     }
     else
     {
-        if (shiny_texture_ID.isNull() && comboShiny && comboShiny->itemExists(USE_TEXTURE))
+        if (shiny_texture_ID.isNull() && comboShiny->itemExists(USE_TEXTURE))
         {
             comboShiny->remove(SHINY_TEXTURE);
             comboShiny->selectFirstItem();
@@ -3063,16 +3028,11 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
     mShinyColorSwatch->setVisible(show_shinyctrls);
 }
 
-// static
 void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_combobox)
 {
     LLUUID bumpy_texture_ID = mBumpyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;
     LLComboBox* comboBumpy = getChild<LLComboBox>("combobox bumpiness");
-    if (!comboBumpy)
-    {
-        return;
-    }
 
     if (mess_with_combobox)
     {
@@ -3095,43 +3055,18 @@ void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_co
     }
 }
 
-// static
-void LLPanelFace::onCommitShiny(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitShiny()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-
-
-    LLComboBox* mComboShininess = self->getChild<LLComboBox>("combobox shininess");
-    if(!mComboShininess)
-        return;
-
-    U32 shininess = mComboShininess->getCurrentIndex();
-
-    self->sendShiny(shininess);
+    sendShiny(getChild<LLComboBox>("combobox shininess")->getCurrentIndex());
 }
 
-// static
 void LLPanelFace::updateAlphaControls()
 {
-    LLComboBox* comboAlphaMode = getChild<LLComboBox>("combobox alphamode");
-    if (!comboAlphaMode)
-    {
-        return;
-    }
-    U32 alpha_value = comboAlphaMode->getCurrentIndex();
+    U32 alpha_value = getChild<LLComboBox>("combobox alphamode")->getCurrentIndex();
     bool show_alphactrls = (alpha_value == ALPHAMODE_MASK); // Alpha masking
 
-    U32 mat_media = MATMEDIA_MATERIAL;
-    if (mComboMatMedia)
-    {
-        mat_media = mComboMatMedia->getCurrentIndex();
-    }
-
-    U32 mat_type = MATTYPE_DIFFUSE;
-    if(mRadioMaterialType)
-    {
-        mat_type = mRadioMaterialType->getSelectedIndex();
-    }
+    U32 mat_media = mComboMatMedia->getCurrentIndex();
+    U32 mat_type = mRadioMaterialType->getSelectedIndex();
 
     show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL);
     show_alphactrls = show_alphactrls && (mat_type == MATTYPE_DIFFUSE);
@@ -3140,30 +3075,23 @@ void LLPanelFace::updateAlphaControls()
     getChildView("maskcutoff")->setVisible(show_alphactrls);
 }
 
-// static
-void LLPanelFace::onCommitAlphaMode(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitAlphaMode()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->updateAlphaControls();
-    LLSelectedTEMaterial::setDiffuseAlphaMode(self,self->getCurrentDiffuseAlphaMode());
+    updateAlphaControls();
+    LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode());
 }
 
-// static
-void LLPanelFace::onCommitFullbright(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitFullbright()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->sendFullbright();
+    sendFullbright();
 }
 
-// static
-void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitGlow()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->sendGlow();
+    sendGlow();
 }
 
-// static
-bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragPbr(LLInventoryItem* item)
 {
     bool accept = true;
     for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -3180,9 +3108,8 @@ bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
     return accept;
 }
 
-void LLPanelFace::onCommitPbr(const LLSD& data)
+void LLPanelFace::onCommitPbr()
 {
-    if (!mPBRTextureCtrl) return;
     if (!mPBRTextureCtrl->getTentative())
     {
         // we grab the item id first, because we want to do a
@@ -3200,16 +3127,15 @@ void LLPanelFace::onCommitPbr(const LLSD& data)
     }
 }
 
-void LLPanelFace::onCancelPbr(const LLSD& data)
+void LLPanelFace::onCancelPbr()
 {
     LLSelectMgr::getInstance()->selectionRevertGLTFMaterials();
 }
 
-void LLPanelFace::onSelectPbr(const LLSD& data)
+void LLPanelFace::onSelectPbr()
 {
     LLSelectMgr::getInstance()->saveSelectedObjectTextures();
 
-    if (!mPBRTextureCtrl) return;
     if (!mPBRTextureCtrl->getTentative())
     {
         // we grab the item id first, because we want to do a
@@ -3226,8 +3152,7 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
     }
 }
 
-// static
-bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragTexture(LLInventoryItem* item)
 {
     bool accept = true;
     for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -3244,18 +3169,18 @@ bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
     return accept;
 }
 
-void LLPanelFace::onCommitTexture( const LLSD& data )
+void LLPanelFace::onCommitTexture()
 {
     add(LLStatViewer::EDIT_TEXTURE, 1);
     sendTexture();
 }
 
-void LLPanelFace::onCancelTexture(const LLSD& data)
+void LLPanelFace::onCancelTexture()
 {
     LLSelectMgr::getInstance()->selectionRevertTextures();
 }
 
-void LLPanelFace::onSelectTexture(const LLSD& data)
+void LLPanelFace::onSelectTexture()
 {
     LLSelectMgr::getInstance()->saveSelectedObjectTextures();
     sendTexture();
@@ -3265,31 +3190,25 @@ void LLPanelFace::onSelectTexture(const LLSD& data)
     bool missing_asset = false;
     LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
 
-    LLCtrlSelectionInterface* combobox_alphamode =
-        childGetSelectionInterface("combobox alphamode");
-
     U32 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
-    if (combobox_alphamode && !missing_asset)
+    if (!missing_asset)
     {
         switch (image_format)
         {
         case GL_RGBA:
         case GL_ALPHA:
-            {
-                alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
-            }
+            alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
+            break;
+        case GL_RGB:
             break;
-
-        case GL_RGB: break;
         default:
-            {
-                LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
-            }
+            LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
             break;
         }
 
-        combobox_alphamode->selectNthItem(alpha_mode);
+        childGetSelectionInterface("combobox alphamode")->selectNthItem(alpha_mode);
     }
+
     LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode());
 }
 
@@ -3299,13 +3218,13 @@ void LLPanelFace::onCloseTexturePicker(const LLSD& data)
     updateUI();
 }
 
-void LLPanelFace::onCommitSpecularTexture( const LLSD& data )
+void LLPanelFace::onCommitSpecularTexture(const LLSD& data)
 {
     LL_DEBUGS("Materials") << data << LL_ENDL;
     sendShiny(SHINY_TEXTURE);
 }
 
-void LLPanelFace::onCommitNormalTexture( const LLSD& data )
+void LLPanelFace::onCommitNormalTexture(const LLSD& data)
 {
     LL_DEBUGS("Materials") << data << LL_ENDL;
     LLUUID nmap_id = getCurrentNormalMap();
@@ -3348,34 +3267,32 @@ void LLPanelFace::onSelectNormalTexture(const LLSD& data)
 //////////////////////////////////////////////////////////////////////////////
 // called when a user wants to edit existing media settings on a prim or prim face
 // TODO: test if there is media on the item and only allow editing if present
-void LLPanelFace::onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnEditMedia()
 {
-    LLPanelFace* self = (LLPanelFace*)userdata;
-    self->refreshMedia();
+    refreshMedia();
     LLFloaterReg::showInstance("media_settings");
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // called when a user wants to delete media from a prim or prim face
-void LLPanelFace::onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnDeleteMedia()
 {
     LLNotificationsUtil::add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
 }
 
 //////////////////////////////////////////////////////////////////////////////
 // called when a user wants to add media to a prim or prim face
-void LLPanelFace::onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnAddMedia()
 {
     // check if multiple faces are selected
     if (LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())
     {
-        LLPanelFace* self = (LLPanelFace*)userdata;
-        self->refreshMedia();
+        refreshMedia();
         LLNotificationsUtil::add("MultipleFacesSelected", LLSD(), LLSD(), multipleFacesSelectedConfirm);
     }
     else
     {
-        onClickBtnEditMedia(ctrl, userdata);
+        onClickBtnEditMedia();
     }
 }
 
@@ -3416,396 +3333,316 @@ bool LLPanelFace::multipleFacesSelectedConfirm(const LLSD& notification, const L
     return false;
 }
 
-//static
-void LLPanelFace::syncOffsetX(LLPanelFace* self, F32 offsetU)
+void LLPanelFace::syncOffsetX(F32 offsetU)
 {
-    LLSelectedTEMaterial::setNormalOffsetX(self,offsetU);
-    LLSelectedTEMaterial::setSpecularOffsetX(self,offsetU);
-    self->getChild<LLSpinCtrl>("TexOffsetU")->forceSetValue(offsetU);
-    self->sendTextureInfo();
+    LLSelectedTEMaterial::setNormalOffsetX(this, offsetU);
+    LLSelectedTEMaterial::setSpecularOffsetX(this, offsetU);
+    getChild<LLSpinCtrl>("TexOffsetU")->forceSetValue(LLSD(offsetU));
+    sendTextureInfo();
 }
 
-//static
-void LLPanelFace::syncOffsetY(LLPanelFace* self, F32 offsetV)
+void LLPanelFace::syncOffsetY(F32 offsetV)
 {
-    LLSelectedTEMaterial::setNormalOffsetY(self,offsetV);
-    LLSelectedTEMaterial::setSpecularOffsetY(self,offsetV);
-    self->getChild<LLSpinCtrl>("TexOffsetV")->forceSetValue(offsetV);
-    self->sendTextureInfo();
+    LLSelectedTEMaterial::setNormalOffsetY(this, offsetV);
+    LLSelectedTEMaterial::setSpecularOffsetY(this, offsetV);
+    getChild<LLSpinCtrl>("TexOffsetV")->forceSetValue(LLSD(offsetV));
+    sendTextureInfo();
 }
 
-//static
-void LLPanelFace::onCommitMaterialBumpyOffsetX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyOffsetX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetX(self,self->getCurrentBumpyOffsetU());
+        syncOffsetX(getCurrentBumpyOffsetU());
     }
     else
     {
-        LLSelectedTEMaterial::setNormalOffsetX(self,self->getCurrentBumpyOffsetU());
+        LLSelectedTEMaterial::setNormalOffsetX(this, getCurrentBumpyOffsetU());
     }
-
 }
 
-//static
-void LLPanelFace::onCommitMaterialBumpyOffsetY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyOffsetY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetY(self,self->getCurrentBumpyOffsetV());
+        syncOffsetY(getCurrentBumpyOffsetV());
     }
     else
     {
-        LLSelectedTEMaterial::setNormalOffsetY(self,self->getCurrentBumpyOffsetV());
+        LLSelectedTEMaterial::setNormalOffsetY(this, getCurrentBumpyOffsetV());
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialShinyOffsetX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyOffsetX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetX(self, self->getCurrentShinyOffsetU());
+        syncOffsetX(getCurrentShinyOffsetU());
     }
     else
     {
-        LLSelectedTEMaterial::setSpecularOffsetX(self,self->getCurrentShinyOffsetU());
+        LLSelectedTEMaterial::setSpecularOffsetX(this, getCurrentShinyOffsetU());
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialShinyOffsetY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyOffsetY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetY(self,self->getCurrentShinyOffsetV());
+        syncOffsetY(getCurrentShinyOffsetV());
     }
     else
     {
-        LLSelectedTEMaterial::setSpecularOffsetY(self,self->getCurrentShinyOffsetV());
+        LLSelectedTEMaterial::setSpecularOffsetY(this, getCurrentShinyOffsetV());
     }
 }
 
-//static
-void LLPanelFace::syncRepeatX(LLPanelFace* self, F32 scaleU)
+void LLPanelFace::syncRepeatX(F32 scaleU)
 {
-    LLSelectedTEMaterial::setNormalRepeatX(self,scaleU);
-    LLSelectedTEMaterial::setSpecularRepeatX(self,scaleU);
-    self->sendTextureInfo();
+    LLSelectedTEMaterial::setNormalRepeatX(this, scaleU);
+    LLSelectedTEMaterial::setSpecularRepeatX(this, scaleU);
+    sendTextureInfo();
 }
 
-//static
-void LLPanelFace::syncRepeatY(LLPanelFace* self, F32 scaleV)
+void LLPanelFace::syncRepeatY(F32 scaleV)
 {
-    LLSelectedTEMaterial::setNormalRepeatY(self,scaleV);
-    LLSelectedTEMaterial::setSpecularRepeatY(self,scaleV);
-    self->sendTextureInfo();
+    LLSelectedTEMaterial::setNormalRepeatY(this, scaleV);
+    LLSelectedTEMaterial::setSpecularRepeatY(this, scaleV);
+    sendTextureInfo();
 }
 
-//static
-void LLPanelFace::onCommitMaterialBumpyScaleX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyScaleX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    F32 bumpy_scale_u = self->getCurrentBumpyScaleU();
-    if (self->isIdenticalPlanarTexgen())
+    F32 bumpy_scale_u = getCurrentBumpyScaleU();
+    if (isIdenticalPlanarTexgen())
     {
         bumpy_scale_u *= 0.5f;
     }
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(self->getCurrentBumpyScaleU());
-        syncRepeatX(self, bumpy_scale_u);
+        getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(getCurrentBumpyScaleU());
+        syncRepeatX(bumpy_scale_u);
     }
     else
     {
-        LLSelectedTEMaterial::setNormalRepeatX(self,bumpy_scale_u);
+        LLSelectedTEMaterial::setNormalRepeatX(this, bumpy_scale_u);
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialBumpyScaleY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyScaleY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    F32 bumpy_scale_v = self->getCurrentBumpyScaleV();
-    if (self->isIdenticalPlanarTexgen())
+    F32 bumpy_scale_v = getCurrentBumpyScaleV();
+    if (isIdenticalPlanarTexgen())
     {
         bumpy_scale_v *= 0.5f;
     }
 
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(self->getCurrentBumpyScaleV());
-        syncRepeatY(self, bumpy_scale_v);
+        getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(getCurrentBumpyScaleV());
+        syncRepeatY(bumpy_scale_v);
     }
     else
     {
-        LLSelectedTEMaterial::setNormalRepeatY(self,bumpy_scale_v);
+        LLSelectedTEMaterial::setNormalRepeatY(this, bumpy_scale_v);
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialShinyScaleX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyScaleX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    F32 shiny_scale_u = self->getCurrentShinyScaleU();
-    if (self->isIdenticalPlanarTexgen())
+    F32 shiny_scale_u = getCurrentShinyScaleU();
+    if (isIdenticalPlanarTexgen())
     {
         shiny_scale_u *= 0.5f;
     }
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(self->getCurrentShinyScaleU());
-        syncRepeatX(self, shiny_scale_u);
+        getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(LLSD(getCurrentShinyScaleU()));
+        syncRepeatX(shiny_scale_u);
     }
     else
     {
-        LLSelectedTEMaterial::setSpecularRepeatX(self,shiny_scale_u);
+        LLSelectedTEMaterial::setSpecularRepeatX(this, shiny_scale_u);
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialShinyScaleY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyScaleY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    F32 shiny_scale_v = self->getCurrentShinyScaleV();
-    if (self->isIdenticalPlanarTexgen())
+    F32 shiny_scale_v = getCurrentShinyScaleV();
+    if (isIdenticalPlanarTexgen())
     {
         shiny_scale_v *= 0.5f;
     }
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(self->getCurrentShinyScaleV());
-        syncRepeatY(self, shiny_scale_v);
+        getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(LLSD(getCurrentShinyScaleV()));
+        syncRepeatY(shiny_scale_v);
     }
     else
     {
-        LLSelectedTEMaterial::setSpecularRepeatY(self,shiny_scale_v);
+        LLSelectedTEMaterial::setSpecularRepeatY(this, shiny_scale_v);
     }
 }
 
-//static
-void LLPanelFace::syncMaterialRot(LLPanelFace* self, F32 rot, int te)
+void LLPanelFace::syncMaterialRot(F32 rot, int te)
 {
-    LLSelectedTEMaterial::setNormalRotation(self,rot * DEG_TO_RAD, te);
-    LLSelectedTEMaterial::setSpecularRotation(self,rot * DEG_TO_RAD, te);
-    self->sendTextureInfo();
+    LLSelectedTEMaterial::setNormalRotation(this, rot * DEG_TO_RAD, te);
+    LLSelectedTEMaterial::setSpecularRotation(this, rot * DEG_TO_RAD, te);
+    sendTextureInfo();
 }
 
-//static
-void LLPanelFace::onCommitMaterialBumpyRot(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyRot()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexRot")->forceSetValue(self->getCurrentBumpyRot());
-        syncMaterialRot(self, self->getCurrentBumpyRot());
+        getChild<LLSpinCtrl>("TexRot")->forceSetValue(LLSD(getCurrentBumpyRot()));
+        syncMaterialRot(getCurrentBumpyRot());
     }
     else
     {
-        if ((bool)self->childGetValue("checkbox planar align").asBoolean())
+        if (childGetValue("checkbox planar align").asBoolean())
         {
             LLFace* last_face = NULL;
             bool identical_face = false;
             LLSelectedTE::getFace(last_face, identical_face);
-            LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
+            LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
             LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
         }
         else
         {
-            LLSelectedTEMaterial::setNormalRotation(self, self->getCurrentBumpyRot() * DEG_TO_RAD);
+            LLSelectedTEMaterial::setNormalRotation(this, getCurrentBumpyRot() * DEG_TO_RAD);
         }
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialShinyRot(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyRot()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        self->getChild<LLSpinCtrl>("TexRot")->forceSetValue(self->getCurrentShinyRot());
-        syncMaterialRot(self, self->getCurrentShinyRot());
+        getChild<LLSpinCtrl>("TexRot")->forceSetValue(LLSD(getCurrentShinyRot()));
+        syncMaterialRot(getCurrentShinyRot());
     }
     else
     {
-        if ((bool)self->childGetValue("checkbox planar align").asBoolean())
+        if (childGetValue("checkbox planar align").asBoolean())
         {
             LLFace* last_face = NULL;
             bool identical_face = false;
             LLSelectedTE::getFace(last_face, identical_face);
-            LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
+            LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
             LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
         }
         else
         {
-            LLSelectedTEMaterial::setSpecularRotation(self, self->getCurrentShinyRot() * DEG_TO_RAD);
+            LLSelectedTEMaterial::setSpecularRotation(this, getCurrentShinyRot() * DEG_TO_RAD);
         }
     }
 }
 
-//static
-void LLPanelFace::onCommitMaterialGloss(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialGloss()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    LLSelectedTEMaterial::setSpecularLightExponent(self,self->getCurrentGlossiness());
+    LLSelectedTEMaterial::setSpecularLightExponent(this, getCurrentGlossiness());
 }
 
-//static
-void LLPanelFace::onCommitMaterialEnv(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialEnv()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    llassert_always(self);
-    LLSelectedTEMaterial::setEnvironmentIntensity(self,self->getCurrentEnvIntensity());
+    LLSelectedTEMaterial::setEnvironmentIntensity(this, getCurrentEnvIntensity());
 }
 
-//static
-void LLPanelFace::onCommitMaterialMaskCutoff(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialMaskCutoff()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    LLSelectedTEMaterial::setAlphaMaskCutoff(self,self->getCurrentAlphaMaskCutoff());
+    LLSelectedTEMaterial::setAlphaMaskCutoff(this, getCurrentAlphaMaskCutoff());
 }
 
-// static
-void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureInfo()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->sendTextureInfo();
+    sendTextureInfo();
     // vertical scale and repeats per meter depends on each other, so force set on changes
-    self->updateUI(true);
+    updateUI(true);
 }
 
-// static
-void LLPanelFace::onCommitTextureScaleX( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureScaleX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_u = (F32)self->getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
-        if (self->isIdenticalPlanarTexgen())
+        F32 bumpy_scale_u = (F32)getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
+        if (isIdenticalPlanarTexgen())
         {
             bumpy_scale_u *= 0.5f;
         }
-        syncRepeatX(self, bumpy_scale_u);
+        syncRepeatX(bumpy_scale_u);
     }
     else
     {
-        self->sendTextureInfo();
+        sendTextureInfo();
     }
-    self->updateUI(true);
+    updateUI(true);
 }
 
-// static
-void LLPanelFace::onCommitTextureScaleY( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureScaleY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_v = (F32)self->getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
-        if (self->isIdenticalPlanarTexgen())
+        F32 bumpy_scale_v = (F32)getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
+        if (isIdenticalPlanarTexgen())
         {
             bumpy_scale_v *= 0.5f;
         }
-        syncRepeatY(self, bumpy_scale_v);
+        syncRepeatY(bumpy_scale_v);
     }
     else
     {
-        self->sendTextureInfo();
+        sendTextureInfo();
     }
-    self->updateUI(true);
+    updateUI(true);
 }
 
-// static
-void LLPanelFace::onCommitTextureRot( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureRot()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncMaterialRot(self, (F32)self->getChild<LLUICtrl>("TexRot")->getValue().asReal());
+        syncMaterialRot((F32)getChild<LLUICtrl>("TexRot")->getValue().asReal());
     }
     else
     {
-        self->sendTextureInfo();
+        sendTextureInfo();
     }
-    self->updateUI(true);
+    updateUI(true);
 }
 
-// static
-void LLPanelFace::onCommitTextureOffsetX( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureOffsetX()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetX(self, (F32)self->getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
+        syncOffsetX((F32)getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
     }
     else
     {
-        self->sendTextureInfo();
+        sendTextureInfo();
     }
-    self->updateUI(true);
+    updateUI(true);
 }
 
-// static
-void LLPanelFace::onCommitTextureOffsetY( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureOffsetY()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetY(self, (F32)self->getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
+        syncOffsetY((F32)getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
     }
     else
     {
-        self->sendTextureInfo();
+        sendTextureInfo();
     }
-    self->updateUI(true);
+    updateUI(true);
 }
 
 // Commit the number of repeats per meter
-// static
-void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitRepeatsPerMeter()
 {
-    LLPanelFace *self = (LLPanelFace *) userdata;
-
-    LLUICtrl *repeats_ctrl = self->getChild<LLUICtrl>("rptctrl");
-
-    U32 materials_media = self->mComboMatMedia->getCurrentIndex();
-    U32 material_type   = 0;
-    if (materials_media == MATMEDIA_PBR)
-    {
-        material_type = self->mRadioPbrType->getSelectedIndex();
-    }
-    if (materials_media == MATMEDIA_MATERIAL)
-    {
-        material_type = self->mRadioMaterialType->getSelectedIndex();
-    }
-
-    F32 repeats_per_meter = (F32) repeats_ctrl->getValue().asReal();
+    F32 repeats_per_meter = (F32)getChild<LLUICtrl>("rptctrl")->getValue().asReal();
 
     F32 obj_scale_s = 1.0f;
     F32 obj_scale_t = 1.0f;
@@ -3816,64 +3653,57 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
     LLSelectedTE::getObjectScaleS(obj_scale_s, identical_scale_s);
     LLSelectedTE::getObjectScaleS(obj_scale_t, identical_scale_t);
 
-    LLUICtrl *bumpy_scale_u = self->getChild<LLUICtrl>("bumpyScaleU");
-    LLUICtrl *bumpy_scale_v = self->getChild<LLUICtrl>("bumpyScaleV");
-    LLUICtrl *shiny_scale_u = self->getChild<LLUICtrl>("shinyScaleU");
-    LLUICtrl *shiny_scale_v = self->getChild<LLUICtrl>("shinyScaleV");
+    LLUICtrl* bumpy_scale_u = getChild<LLUICtrl>("bumpyScaleU");
+    LLUICtrl* bumpy_scale_v = getChild<LLUICtrl>("bumpyScaleV");
+    LLUICtrl* shiny_scale_u = getChild<LLUICtrl>("shinyScaleU");
+    LLUICtrl* shiny_scale_v = getChild<LLUICtrl>("shinyScaleV");
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
+        LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
 
         bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
         bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
 
-        LLSelectedTEMaterial::setNormalRepeatX(self,obj_scale_s * repeats_per_meter);
-        LLSelectedTEMaterial::setNormalRepeatY(self,obj_scale_t * repeats_per_meter);
+        LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
+        LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
 
         shiny_scale_u->setValue(obj_scale_s * repeats_per_meter);
         shiny_scale_v->setValue(obj_scale_t * repeats_per_meter);
 
-        LLSelectedTEMaterial::setSpecularRepeatX(self,obj_scale_s * repeats_per_meter);
-        LLSelectedTEMaterial::setSpecularRepeatY(self,obj_scale_t * repeats_per_meter);
+        LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
+        LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
     }
     else
     {
+        U32 material_type = mRadioMaterialType->getSelectedIndex();
         switch (material_type)
         {
-            case MATTYPE_DIFFUSE:
-            {
-                LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
-            }
+        case MATTYPE_DIFFUSE:
+            LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
             break;
+        case MATTYPE_NORMAL:
+            bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
+            bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
 
-            case MATTYPE_NORMAL:
-            {
-                bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
-                bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
-
-                LLSelectedTEMaterial::setNormalRepeatX(self,obj_scale_s * repeats_per_meter);
-                LLSelectedTEMaterial::setNormalRepeatY(self,obj_scale_t * repeats_per_meter);
-            }
+            LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
+            LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
             break;
+        case MATTYPE_SPECULAR:
+            bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
+            bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
 
-            case MATTYPE_SPECULAR:
-            {
-                shiny_scale_u->setValue(obj_scale_s * repeats_per_meter);
-                shiny_scale_v->setValue(obj_scale_t * repeats_per_meter);
-
-                LLSelectedTEMaterial::setSpecularRepeatX(self,obj_scale_s * repeats_per_meter);
-                LLSelectedTEMaterial::setSpecularRepeatY(self,obj_scale_t * repeats_per_meter);
-            }
+            LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
+            LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
+            break;
+        default:
+            llassert(false);
             break;
-
-            default:
-                llassert(false);
-                break;
         }
     }
+
     // vertical scale and repeats per meter depends on each other, so force set on changes
-    self->updateUI(true);
+    updateUI(true);
 }
 
 struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
@@ -3883,22 +3713,20 @@ struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
         viewer_media_t pMediaImpl;
 
         const LLTextureEntry* tep = object->getTE(te);
-        const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL;
-        if ( mep )
+        if (const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL)
         {
             pMediaImpl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(mep->getMediaID());
         }
 
-        if ( pMediaImpl.isNull())
+        if (pMediaImpl.isNull())
         {
             // If we didn't find face media for this face, check whether this face is showing parcel media.
             pMediaImpl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(tep->getID());
         }
 
-        if ( pMediaImpl.notNull())
+        if (pMediaImpl.notNull())
         {
-            LLPluginClassMedia *media = pMediaImpl->getMediaPlugin();
-            if(media)
+            if (LLPluginClassMedia* media = pMediaImpl->getMediaPlugin())
             {
                 S32 media_width = media->getWidth();
                 S32 media_height = media->getHeight();
@@ -3908,17 +3736,17 @@ struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
                 F32 scale_t = (F32)media_height / (F32)texture_height;
 
                 // set scale and adjust offset
-                object->setTEScaleS( te, scale_s );
-                object->setTEScaleT( te, scale_t ); // don't need to flip Y anymore since QT does this for us now.
-                object->setTEOffsetS( te, -( 1.0f - scale_s ) / 2.0f );
-                object->setTEOffsetT( te, -( 1.0f - scale_t ) / 2.0f );
+                object->setTEScaleS(te, scale_s);
+                object->setTEScaleT(te, scale_t); // don't need to flip Y anymore since QT does this for us now.
+                object->setTEOffsetS(te, -( 1.0f - scale_s ) / 2.0f);
+                object->setTEOffsetT(te, -( 1.0f - scale_t ) / 2.0f);
             }
         }
         return true;
     };
 };
 
-void LLPanelFace::onClickAutoFix(void* userdata)
+void LLPanelFace::onClickAutoFix()
 {
     LLPanelFaceSetMediaFunctor setfunc;
     LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
@@ -3927,25 +3755,23 @@ void LLPanelFace::onClickAutoFix(void* userdata)
     LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
 }
 
-void LLPanelFace::onAlignTexture(void* userdata)
+void LLPanelFace::onAlignTexture()
 {
-    LLPanelFace* self = (LLPanelFace*)userdata;
-    self->alignTextureLayer();
+    alignTextureLayer();
 }
 
-void LLPanelFace::onClickBtnLoadInvPBR(void* userdata)
+void LLPanelFace::onClickBtnLoadInvPBR()
 {
     // Shouldn't this be "save to inventory?"
-    LLPanelFace* self = (LLPanelFace*)userdata;
-    self->mPBRTextureCtrl->showPicker(true);
+    mPBRTextureCtrl->showPicker(true);
 }
 
-void LLPanelFace::onClickBtnEditPBR(void* userdata)
+void LLPanelFace::onClickBtnEditPBR()
 {
     LLMaterialEditor::loadLive();
 }
 
-void LLPanelFace::onClickBtnSavePBR(void* userdata)
+void LLPanelFace::onClickBtnSavePBR()
 {
     LLMaterialEditor::saveObjectsMaterialAs();
 }
@@ -4806,44 +4632,39 @@ bool LLPanelFace::menuEnableItem(const LLSD& userdata)
     return false;
 }
 
-
-// static
-void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitPlanarAlign()
 {
-    LLPanelFace* self = (LLPanelFace*) userdata;
-    self->getState();
-    self->sendTextureInfo();
+    getState();
+    sendTextureInfo();
 }
 
-void LLPanelFace::updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit)
+void LLPanelFace::updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit)
 {
-    U32 texture_info_start;
-    U32 texture_info_end;
-    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
     if (texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT)
     {
-        texture_info_start = 0;
-        texture_info_end = LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
+        updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
+            {
+                for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+                {
+                    LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[(LLGLTFMaterial::TextureInfo)i];
+                    edit(&new_transform);
+                }
+            });
     }
     else
     {
-        texture_info_start = texture_info_from_pbrtype(pbr_type);
-        texture_info_end = texture_info_start + 1;
+        updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
+            {
+                LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[texture_info];
+                edit(&new_transform);
+            });
     }
-    updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
-    {
-        for (U32 ti = texture_info_start; ti < texture_info_end; ++ti)
-        {
-            LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[(LLGLTFMaterial::TextureInfo)ti];
-            edit(&new_transform);
-        }
-    });
 }
 
 void LLPanelFace::setMaterialOverridesFromSelection()
 {
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
     U32 texture_info_start;
     U32 texture_info_end;
     if (texture_info == LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_COUNT)
@@ -5009,51 +4830,46 @@ bool LLPanelFace::Selection::compareSelection()
     return selection_changed;
 }
 
-void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureScaleU()
 {
-    const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+    F32 value = (F32)getChild<LLUICtrl>("gltfTextureScaleU")->getValue().asReal();
+    updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VX] = value;
     });
 }
 
-void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureScaleV()
 {
-    const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+    F32 value = (F32)getChild<LLUICtrl>("gltfTextureScaleV")->getValue().asReal();
+    updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VY] = value;
     });
 }
 
-void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFRotation()
 {
-    const float value = (F32)ctrl->getValue().asReal() * DEG_TO_RAD;
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+    F32 value = (F32)getChild<LLUICtrl>("gltfTextureRotation")->getValue().asReal() * DEG_TO_RAD;
+    updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mRotation = value;
     });
 }
 
-void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureOffsetU()
 {
-    const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+    F32 value = (F32)getChild<LLUICtrl>("gltfTextureOffsetU")->getValue().asReal();
+    updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VX] = value;
     });
 }
 
-void LLPanelFace::onCommitGLTFTextureOffsetV(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureOffsetV()
 {
-    const float value = (F32)ctrl->getValue().asReal();
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+    F32 value = (F32)getChild<LLUICtrl>("gltfTextureOffsetV")->getValue().asReal();
+    updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VY] = value;
     });
@@ -5063,20 +4879,20 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
 {
     LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;
 
+    LLTextureCtrl* texture_ctrl;
     U32 mattype = mRadioMaterialType->getSelectedIndex();
-    std::string which_control="texture control";
     switch (mattype)
     {
         case MATTYPE_SPECULAR:
-            which_control = "shinytexture control";
+            texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
             break;
         case MATTYPE_NORMAL:
-            which_control = "bumpytexture control";
+            texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
             break;
-        // no default needed
+        default:
+            texture_ctrl = getChild<LLTextureCtrl>("texture control");
     }
-    LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL;
-    LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(which_control);
+
     if (texture_ctrl)
     {
         LLUUID obj_owner_id;
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 6e88116a2d..ede2ef9339 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -130,54 +130,54 @@ public:
     LLGLTFMaterial::TextureInfo getPBRDropChannel();
 
 protected:
-    void            navigateToTitleMedia(const std::string url);
-    bool            selectedMediaEditable();
-    void            clearMediaSettings();
-    void            updateMediaSettings();
-    void            updateMediaTitle();
-
-    void            getState();
-
-    void            sendTexture();          // applies and sends texture
-    void            sendTextureInfo();      // applies and sends texture scale, offset, etc.
-    void            sendColor();            // applies and sends color
-    void            sendAlpha();            // applies and sends transparency
-    void            sendBump(U32 bumpiness);                // applies and sends bump map
-    void            sendTexGen();               // applies and sends bump map
-    void            sendShiny(U32 shininess);           // applies and sends shininess
-    void            sendFullbright();       // applies and sends full bright
-
-    void            sendGlow();
-    void            alignTextureLayer();
-
-    void            updateCopyTexButton();
-
-    void    onCommitPbr(const LLSD& data);
-    void    onCancelPbr(const LLSD& data);
-    void    onSelectPbr(const LLSD& data);
-    static bool onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item);
-
-    // this function is to return true if the drag should succeed.
-    static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
-
-    void    onCommitTexture(const LLSD& data);
-    void    onCancelTexture(const LLSD& data);
-    void    onSelectTexture(const LLSD& data);
-    void    onCommitSpecularTexture(const LLSD& data);
-    void    onCancelSpecularTexture(const LLSD& data);
-    void    onSelectSpecularTexture(const LLSD& data);
-    void    onCommitNormalTexture(const LLSD& data);
-    void    onCancelNormalTexture(const LLSD& data);
-    void    onSelectNormalTexture(const LLSD& data);
-    void    onCommitColor(const LLSD& data);
-    void    onCommitShinyColor(const LLSD& data);
-    void    onCommitAlpha(const LLSD& data);
-    void    onCancelColor(const LLSD& data);
-    void    onCancelShinyColor(const LLSD& data);
-    void    onSelectColor(const LLSD& data);
-    void    onSelectShinyColor(const LLSD& data);
-
-    void    onCloseTexturePicker(const LLSD& data);
+    void navigateToTitleMedia(const std::string url);
+    bool selectedMediaEditable();
+    void clearMediaSettings();
+    void updateMediaSettings();
+    void updateMediaTitle();
+
+    void getState();
+
+    void sendTexture();            // applies and sends texture
+    void sendTextureInfo();        // applies and sends texture scale, offset, etc.
+    void sendColor();              // applies and sends color
+    void sendAlpha();              // applies and sends transparency
+    void sendBump(U32 bumpiness);  // applies and sends bump map
+    void sendTexGen();             // applies and sends bump map
+    void sendShiny(U32 shininess); // applies and sends shininess
+    void sendFullbright();         // applies and sends full bright
+
+    void sendGlow();
+    void alignTextureLayer();
+
+    void updateCopyTexButton();
+
+    void onCommitPbr();
+    void onCancelPbr();
+    void onSelectPbr();
+
+    // These functions are to return true if the drag should succeed
+    bool onDragPbr(LLInventoryItem* item);
+    bool onDragTexture(LLInventoryItem* item);
+
+    void onCommitTexture();
+    void onCancelTexture();
+    void onSelectTexture();
+    void onCommitSpecularTexture(const LLSD& data);
+    void onCancelSpecularTexture(const LLSD& data);
+    void onSelectSpecularTexture(const LLSD& data);
+    void onCommitNormalTexture(const LLSD& data);
+    void onCancelNormalTexture(const LLSD& data);
+    void onSelectNormalTexture(const LLSD& data);
+    void onCommitColor();
+    void onCommitShinyColor();
+    void onCommitAlpha();
+    void onCancelColor();
+    void onCancelShinyColor();
+    void onSelectColor();
+    void onSelectShinyColor();
+
+    void onCloseTexturePicker(const LLSD& data);
 
     static bool deleteMediaConfirm(const LLSD& notification, const LLSD& response);
     static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
@@ -195,81 +195,79 @@ protected:
 
     // Callback funcs for individual controls
     //
-    static void     onCommitTextureInfo(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTextureScaleX(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTextureScaleY(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTextureRot(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTextureOffsetX(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTextureOffsetY(LLUICtrl* ctrl, void* userdata);
-
-    static void     onCommitMaterialBumpyScaleX(    LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialBumpyScaleY(    LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialBumpyRot(       LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialBumpyOffsetX(   LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialBumpyOffsetY(   LLUICtrl* ctrl, void* userdata);
-
-    static void     syncRepeatX(LLPanelFace* self, F32 scaleU);
-    static void     syncRepeatY(LLPanelFace* self, F32 scaleV);
-    static void     syncOffsetX(LLPanelFace* self, F32 offsetU);
-    static void     syncOffsetY(LLPanelFace* self, F32 offsetV);
-    static void     syncMaterialRot(LLPanelFace* self, F32 rot, int te = -1);
-
-    static void     onCommitMaterialShinyScaleX(    LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialShinyScaleY(    LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialShinyRot(       LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialShinyOffsetX(   LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialShinyOffsetY(   LLUICtrl* ctrl, void* userdata);
-
-    static void     onCommitMaterialGloss(          LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialEnv(                LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialMaskCutoff( LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialID( LLUICtrl* ctrl, void* userdata);
-
-    static void     onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata);
-    static void     onCommitMaterialType(   LLUICtrl* ctrl, void* userdata);
-    static void     onCommitPbrType(LLUICtrl* ctrl, void* userdata);
-    static void     onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata);
-    static void     onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata);
-    static void     onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata);
-    static void     onCommitBump(               LLUICtrl* ctrl, void* userdata);
-    static void     onCommitTexGen(         LLUICtrl* ctrl, void* userdata);
-    static void     onCommitShiny(              LLUICtrl* ctrl, void* userdata);
-    static void     onCommitAlphaMode(      LLUICtrl* ctrl, void* userdata);
-    static void     onCommitFullbright(     LLUICtrl* ctrl, void* userdata);
-    static void     onCommitGlow(               LLUICtrl* ctrl, void *userdata);
-    static void     onCommitPlanarAlign(        LLUICtrl* ctrl, void* userdata);
-    static void     onCommitRepeatsPerMeter(    LLUICtrl* ctrl, void* userinfo);
-
-    void            onCommitGLTFTextureScaleU(LLUICtrl* ctrl);
-    void            onCommitGLTFTextureScaleV(LLUICtrl* ctrl);
-    void            onCommitGLTFRotation(LLUICtrl* ctrl);
-    void            onCommitGLTFTextureOffsetU(LLUICtrl* ctrl);
-    void            onCommitGLTFTextureOffsetV(LLUICtrl* ctrl);
-
-    static void     onClickAutoFix(void*);
-    static void     onAlignTexture(void*);
-    static void     onClickBtnLoadInvPBR(void* userdata);
-    static void     onClickBtnEditPBR(void* userdata);
-    static void     onClickBtnSavePBR(void* userdata);
+    void onCommitTextureInfo();
+    void onCommitTextureScaleX();
+    void onCommitTextureScaleY();
+    void onCommitTextureRot();
+    void onCommitTextureOffsetX();
+    void onCommitTextureOffsetY();
+
+    void onCommitMaterialBumpyScaleX();
+    void onCommitMaterialBumpyScaleY();
+    void onCommitMaterialBumpyRot();
+    void onCommitMaterialBumpyOffsetX();
+    void onCommitMaterialBumpyOffsetY();
+
+    void syncRepeatX(F32 scaleU);
+    void syncRepeatY(F32 scaleV);
+    void syncOffsetX(F32 offsetU);
+    void syncOffsetY(F32 offsetV);
+    void syncMaterialRot(F32 rot, int te = -1);
+
+    void onCommitMaterialShinyScaleX();
+    void onCommitMaterialShinyScaleY();
+    void onCommitMaterialShinyRot();
+    void onCommitMaterialShinyOffsetX();
+    void onCommitMaterialShinyOffsetY();
+
+    void onCommitMaterialGloss();
+    void onCommitMaterialEnv();
+    void onCommitMaterialMaskCutoff();
+    void onCommitMaterialID();
+
+    void onCommitMaterialsMedia();
+    void onCommitMaterialType();
+    void onCommitPbrType();
+    void onClickBtnEditMedia();
+    void onClickBtnDeleteMedia();
+    void onClickBtnAddMedia();
+    void onCommitBump();
+    void onCommitTexGen();
+    void onCommitShiny();
+    void onCommitAlphaMode();
+    void onCommitFullbright();
+    void onCommitGlow();
+    void onCommitPlanarAlign();
+    void onCommitRepeatsPerMeter();
+
+    void onCommitGLTFTextureScaleU();
+    void onCommitGLTFTextureScaleV();
+    void onCommitGLTFRotation();
+    void onCommitGLTFTextureOffsetU();
+    void onCommitGLTFTextureOffsetV();
+
+    void onClickAutoFix();
+    void onAlignTexture();
+    void onClickBtnLoadInvPBR();
+    void onClickBtnEditPBR();
+    void onClickBtnSavePBR();
 
 public: // needs to be accessible to selection manager
-    void            onCopyColor(); // records all selected faces
-    void            onPasteColor(); // to specific face
-    void            onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
-    void            onCopyTexture();
-    void            onPasteTexture();
-    void            onPasteTexture(LLViewerObject* objectp, S32 te);
+    void onCopyColor(); // records all selected faces
+    void onPasteColor(); // to specific face
+    void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
+    void onCopyTexture();
+    void onPasteTexture();
+    void onPasteTexture(LLViewerObject* objectp, S32 te);
 
 protected:
-    void            menuDoToSelected(const LLSD& userdata);
-    bool            menuEnableItem(const LLSD& userdata);
-
-    static F32     valueGlow(LLViewerObject* object, S32 face);
-
+    void menuDoToSelected(const LLSD& userdata);
+    bool menuEnableItem(const LLSD& userdata);
 
+    static F32 valueGlow(LLViewerObject* object, S32 face);
 
 private:
-    bool        isAlpha() { return mIsAlpha; }
+    bool isAlpha() { return mIsAlpha; }
 
     // Convenience funcs to keep the visual flack to a minimum
     //
@@ -483,7 +481,7 @@ private:
     void updateVisibilityGLTF(LLViewerObject* objectp = nullptr);
 
     void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);
-    void updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
+    void updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
 
     void setMaterialOverridesFromSelection();
 
@@ -578,41 +576,41 @@ public:
         static void getMaxNormalRepeats(F32& repeats, bool& identical);
         static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
 
-        DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getNormalID,LLUUID::null, false, LLUUID::null)
-        DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getSpecularID,LLUUID::null, false, LLUUID::null)
-        DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatX,1.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatY,1.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetX,0.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetY,0.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getSpecularRotation,0.0f, true, 0.001f)
-
-        DEF_GET_MAT_STATE(F32,F32,getNormalRepeatX,1.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getNormalRepeatY,1.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getNormalOffsetX,0.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getNormalOffsetY,0.0f, true, 0.001f)
-        DEF_GET_MAT_STATE(F32,F32,getNormalRotation,0.0f, true, 0.001f)
-
-        DEF_EDIT_MAT_STATE(U8,U8,setDiffuseAlphaMode);
-        DEF_EDIT_MAT_STATE(U8,U8,setAlphaMaskCutoff);
-
-        DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetX);
-        DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetY);
-        DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatX);
-        DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatY);
-        DEF_EDIT_MAT_STATE(F32,F32,setNormalRotation);
-
-        DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetX);
-        DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetY);
-        DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatX);
-        DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatY);
-        DEF_EDIT_MAT_STATE(F32,F32,setSpecularRotation);
-
-        DEF_EDIT_MAT_STATE(U8,U8,setEnvironmentIntensity);
-        DEF_EDIT_MAT_STATE(U8,U8,setSpecularLightExponent);
-
-        DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID);
-        DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID);
-        DEF_EDIT_MAT_STATE(LLColor4U,   const LLColor4U&,setSpecularLightColor);
+        DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getNormalID, LLUUID::null, false, LLUUID::null);
+        DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getSpecularID, LLUUID::null, false, LLUUID::null);
+        DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatX, 1.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatY, 1.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetX, 0.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetY, 0.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getSpecularRotation, 0.0f, true, 0.001f);
+
+        DEF_GET_MAT_STATE(F32, F32, getNormalRepeatX, 1.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getNormalRepeatY, 1.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getNormalOffsetX, 0.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getNormalOffsetY, 0.0f, true, 0.001f);
+        DEF_GET_MAT_STATE(F32, F32, getNormalRotation, 0.0f, true, 0.001f);
+
+        DEF_EDIT_MAT_STATE(U8, U8, setDiffuseAlphaMode);
+        DEF_EDIT_MAT_STATE(U8, U8, setAlphaMaskCutoff);
+
+        DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetX);
+        DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetY);
+        DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatX);
+        DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatY);
+        DEF_EDIT_MAT_STATE(F32, F32, setNormalRotation);
+
+        DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetX);
+        DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetY);
+        DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatX);
+        DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatY);
+        DEF_EDIT_MAT_STATE(F32, F32, setSpecularRotation);
+
+        DEF_EDIT_MAT_STATE(U8, U8, setEnvironmentIntensity);
+        DEF_EDIT_MAT_STATE(U8, U8, setSpecularLightExponent);
+
+        DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setNormalID);
+        DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setSpecularID);
+        DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&, setSpecularLightColor);
     };
 
     class LLSelectedTE
-- 
cgit v1.2.3


From 8754ce088fd0e901ad2d9dfd7bfc70266340bc39 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 7 Aug 2024 16:06:26 +0300
Subject: viewer#2212 Bulk upload makes an incorrect cost estimate

---
 indra/newview/llviewermenufile.cpp | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index c4fecf8dff..83f8e96f9a 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -547,9 +547,11 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
             if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
             {
                 LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
-                if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+                if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
                 {
-                    expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
+                    S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+                    S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+                    expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
                     resource_upload = true;
                 }
             }
@@ -643,16 +645,15 @@ bool get_bulk_upload_expected_cost(
             if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
             {
                 LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
-                if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+                if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
                 {
-                    total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
-                    if (image_frmted)
+                    S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+                    S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+                    total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
+                    S32 area = biased_width * biased_height;
+                    if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
                     {
-                        S32 area = image_frmted->getHeight() * image_frmted->getWidth();
-                        if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
-                        {
-                            textures_2k_count++;
-                        }
+                        textures_2k_count++;
                     }
                     file_count++;
                 }
-- 
cgit v1.2.3


From 413ece6c481e430ad380697934a20ecd95aaa7fb Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 7 Aug 2024 18:08:21 +0200
Subject: #1922 Make PBR scale and offset crosshair work (store control
 pointers in LLPanelFace)

---
 indra/newview/llpanelface.cpp | 1074 +++++++++++++++++++----------------------
 indra/newview/llpanelface.h   |  108 ++++-
 2 files changed, 573 insertions(+), 609 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index f01d327fb4..936ca273c3 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -226,7 +226,7 @@ LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
 
 LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
 {
-    if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
+    if (mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
     {
         return texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
     }
@@ -236,24 +236,24 @@ LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
 
 // Things the UI provides...
 //
-LLUUID  LLPanelFace::getCurrentNormalMap()          { return mBumpyTextureCtrl->getImageAssetID();    }
-LLUUID  LLPanelFace::getCurrentSpecularMap()        { return mShinyTextureCtrl->getImageAssetID();    }
-U32     LLPanelFace::getCurrentShininess()          { return getChild<LLComboBox>("combobox shininess")->getCurrentIndex();         }
-U32     LLPanelFace::getCurrentBumpiness()          { return getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex();         }
-U8      LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
-U8      LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger();      }
-U8      LLPanelFace::getCurrentEnvIntensity()       { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger();     }
-U8      LLPanelFace::getCurrentGlossiness()         { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger();      }
-F32     LLPanelFace::getCurrentBumpyRot()           { return (F32)getChild<LLUICtrl>("bumpyRot")->getValue().asReal();              }
-F32     LLPanelFace::getCurrentBumpyScaleU()        { return (F32)getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal();           }
-F32     LLPanelFace::getCurrentBumpyScaleV()        { return (F32)getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal();           }
-F32     LLPanelFace::getCurrentBumpyOffsetU()       { return (F32)getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal();          }
-F32     LLPanelFace::getCurrentBumpyOffsetV()       { return (F32)getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal();          }
-F32     LLPanelFace::getCurrentShinyRot()           { return (F32)getChild<LLUICtrl>("shinyRot")->getValue().asReal();              }
-F32     LLPanelFace::getCurrentShinyScaleU()        { return (F32)getChild<LLUICtrl>("shinyScaleU")->getValue().asReal();           }
-F32     LLPanelFace::getCurrentShinyScaleV()        { return (F32)getChild<LLUICtrl>("shinyScaleV")->getValue().asReal();           }
-F32     LLPanelFace::getCurrentShinyOffsetU()       { return (F32)getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal();          }
-F32     LLPanelFace::getCurrentShinyOffsetV()       { return (F32)getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal();          }
+LLUUID  LLPanelFace::getCurrentNormalMap()          { return mBumpyTextureCtrl->getImageAssetID(); }
+LLUUID  LLPanelFace::getCurrentSpecularMap()        { return mShinyTextureCtrl->getImageAssetID(); }
+U32     LLPanelFace::getCurrentShininess()          { return mComboShininess->getCurrentIndex(); }
+U32     LLPanelFace::getCurrentBumpiness()          { return mComboBumpiness->getCurrentIndex(); }
+U8      LLPanelFace::getCurrentDiffuseAlphaMode()   { return (U8)mComboAlphaMode->getCurrentIndex(); }
+U8      LLPanelFace::getCurrentAlphaMaskCutoff()    { return (U8)mMaskCutoff->getValue().asInteger(); }
+U8      LLPanelFace::getCurrentEnvIntensity()       { return (U8)mEnvironment->getValue().asInteger(); }
+U8      LLPanelFace::getCurrentGlossiness()         { return (U8)mGlossiness->getValue().asInteger(); }
+F32     LLPanelFace::getCurrentBumpyRot()           { return (F32)mBumpyRotate->getValue().asReal(); }
+F32     LLPanelFace::getCurrentBumpyScaleU()        { return (F32)mBumpyScaleU->getValue().asReal(); }
+F32     LLPanelFace::getCurrentBumpyScaleV()        { return (F32)mBumpyScaleV->getValue().asReal(); }
+F32     LLPanelFace::getCurrentBumpyOffsetU()       { return (F32)mBumpyOffsetU->getValue().asReal(); }
+F32     LLPanelFace::getCurrentBumpyOffsetV()       { return (F32)mBumpyOffsetV->getValue().asReal(); }
+F32     LLPanelFace::getCurrentShinyRot()           { return (F32)mShinyRotate->getValue().asReal(); }
+F32     LLPanelFace::getCurrentShinyScaleU()        { return (F32)mShinyScaleU->getValue().asReal(); }
+F32     LLPanelFace::getCurrentShinyScaleV()        { return (F32)mShinyScaleV->getValue().asReal(); }
+F32     LLPanelFace::getCurrentShinyOffsetU()       { return (F32)mShinyOffsetU->getValue().asReal(); }
+F32     LLPanelFace::getCurrentShinyOffsetV()       { return (F32)mShinyOffsetV->getValue().asReal(); }
 
 //
 // Methods
@@ -261,199 +261,156 @@ F32     LLPanelFace::getCurrentShinyOffsetV()       { return (F32)getChild<LLUIC
 
 bool LLPanelFace::postBuild()
 {
-    childSetCommitCallback("combobox shininess", [&](LLUICtrl*, const void*) { onCommitShiny(); }, 0);
-    childSetCommitCallback("combobox bumpiness", [&](LLUICtrl*, const void*) { onCommitBump(); }, 0);
-    childSetCommitCallback("combobox alphamode", [&](LLUICtrl*, const void*) { onCommitAlphaMode(); }, 0);
-    childSetCommitCallback("TexScaleU", [&](LLUICtrl*, const void*) { onCommitTextureScaleX(); }, 0);
-    childSetCommitCallback("TexScaleV", [&](LLUICtrl*, const void*) { onCommitTextureScaleY(); }, 0);
-    childSetCommitCallback("TexRot", [&](LLUICtrl*, const void*) { onCommitTextureRot(); }, 0);
-    childSetCommitCallback("rptctrl", [&](LLUICtrl*, const void*) { onCommitRepeatsPerMeter(); }, 0);
-    childSetCommitCallback("checkbox planar align", [&](LLUICtrl*, const void*) { onCommitPlanarAlign(); }, 0);
-    childSetCommitCallback("TexOffsetU", [&](LLUICtrl*, const void*) { onCommitTextureOffsetX(); }, 0);
-    childSetCommitCallback("TexOffsetV", [&](LLUICtrl*, const void*) { onCommitTextureOffsetY(); }, 0);
-
-    childSetCommitCallback("bumpyScaleU", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyScaleX(); }, 0);
-    childSetCommitCallback("bumpyScaleV", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyScaleY(); }, 0);
-    childSetCommitCallback("bumpyRot", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyRot(); }, 0);
-    childSetCommitCallback("bumpyOffsetU", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyOffsetX(); }, 0);
-    childSetCommitCallback("bumpyOffsetV", [&](LLUICtrl*, const void*) { onCommitMaterialBumpyOffsetY(); }, 0);
-    childSetCommitCallback("shinyScaleU", [&](LLUICtrl*, const void*) { onCommitMaterialShinyScaleX(); }, 0);
-    childSetCommitCallback("shinyScaleV", [&](LLUICtrl*, const void*) { onCommitMaterialShinyScaleY(); }, 0);
-    childSetCommitCallback("shinyRot", [&](LLUICtrl*, const void*) { onCommitMaterialShinyRot(); }, 0);
-    childSetCommitCallback("shinyOffsetU", [&](LLUICtrl*, const void*) { onCommitMaterialShinyOffsetX(); }, 0);
-    childSetCommitCallback("shinyOffsetV", [&](LLUICtrl*, const void*) { onCommitMaterialShinyOffsetY(); }, 0);
-    childSetCommitCallback("glossiness", [&](LLUICtrl*, const void*) { onCommitMaterialGloss(); }, 0);
-    childSetCommitCallback("environment", [&](LLUICtrl*, const void*) { onCommitMaterialEnv(); }, 0);
-    childSetCommitCallback("maskcutoff", [&](LLUICtrl*, const void*) { onCommitMaterialMaskCutoff(); }, 0);
-    childSetCommitCallback("add_media", [&](LLUICtrl*, const void*) { onClickBtnAddMedia(); }, 0);
-    childSetCommitCallback("delete_media", [&](LLUICtrl*, const void*) { onClickBtnDeleteMedia(); }, 0);
-
-    childSetCommitCallback("gltfTextureScaleU", [&](LLUICtrl*, const void*) { onCommitGLTFTextureScaleU(); }, 0);
-    childSetCommitCallback("gltfTextureScaleV", [&](LLUICtrl*, const void*) { onCommitGLTFTextureScaleV(); }, 0);
-    childSetCommitCallback("gltfTextureRotation", [&](LLUICtrl*, const void*) { onCommitGLTFRotation(); }, 0);
-    childSetCommitCallback("gltfTextureOffsetU", [&](LLUICtrl*, const void*) { onCommitGLTFTextureOffsetU(); }, 0);
-    childSetCommitCallback("gltfTextureOffsetV", [&](LLUICtrl*, const void*) { onCommitGLTFTextureOffsetV(); }, 0);
+    getChildSetCommitCallback(mComboShininess, "combobox shininess", [&](LLUICtrl*, const LLSD&) { onCommitShiny(); });
+    getChildSetCommitCallback(mComboBumpiness, "combobox bumpiness", [&](LLUICtrl*, const LLSD&) { onCommitBump(); });
+    getChildSetCommitCallback(mComboAlphaMode, "combobox alphamode", [&](LLUICtrl*, const LLSD&) { onCommitAlphaMode(); });
+    getChildSetCommitCallback(mTexScaleU, "TexScaleU", [&](LLUICtrl*, const LLSD&) { onCommitTextureScaleX(); });
+    getChildSetCommitCallback(mTexScaleV, "TexScaleV", [&](LLUICtrl*, const LLSD&) { onCommitTextureScaleY(); });
+    getChildSetCommitCallback(mTexRotate, "TexRot", [&](LLUICtrl*, const LLSD&) { onCommitTextureRot(); });
+    getChildSetCommitCallback(mTexRepeat, "rptctrl", [&](LLUICtrl*, const LLSD&) { onCommitRepeatsPerMeter(); });
+    getChildSetCommitCallback(mPlanarAlign, "checkbox planar align", [&](LLUICtrl*, const LLSD&) { onCommitPlanarAlign(); });
+    getChildSetCommitCallback(mTexOffsetU, "TexOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitTextureOffsetX(); });
+    getChildSetCommitCallback(mTexOffsetV, "TexOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitTextureOffsetY(); });
+
+    getChildSetCommitCallback(mBumpyScaleU, "bumpyScaleU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyScaleX(); });
+    getChildSetCommitCallback(mBumpyScaleV, "bumpyScaleV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyScaleY(); });
+    getChildSetCommitCallback(mBumpyRotate, "bumpyRot", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyRot(); });
+    getChildSetCommitCallback(mBumpyOffsetU, "bumpyOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyOffsetX(); });
+    getChildSetCommitCallback(mBumpyOffsetV, "bumpyOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyOffsetY(); });
+    getChildSetCommitCallback(mShinyScaleU, "shinyScaleU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyScaleX(); });
+    getChildSetCommitCallback(mShinyScaleV, "shinyScaleV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyScaleY(); });
+    getChildSetCommitCallback(mShinyRotate, "shinyRot", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyRot(); });
+    getChildSetCommitCallback(mShinyOffsetU, "shinyOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyOffsetX(); });
+    getChildSetCommitCallback(mShinyOffsetV, "shinyOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyOffsetY(); });
+
+    getChildSetCommitCallback(mGlossiness, "glossiness", [&](LLUICtrl*, const LLSD&) { onCommitMaterialGloss(); });
+    getChildSetCommitCallback(mEnvironment, "environment", [&](LLUICtrl*, const LLSD&) { onCommitMaterialEnv(); });
+    getChildSetCommitCallback(mMaskCutoff, "maskcutoff", [&](LLUICtrl*, const LLSD&) { onCommitMaterialMaskCutoff(); });
+    getChildSetCommitCallback(mAddMedia, "add_media", [&](LLUICtrl*, const LLSD&) { onClickBtnAddMedia(); });
+    getChildSetCommitCallback(mDelMedia, "delete_media", [&](LLUICtrl*, const LLSD&) { onClickBtnDeleteMedia(); });
+
+    getChildSetCommitCallback(mPBRScaleU, "gltfTextureScaleU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleU(); });
+    getChildSetCommitCallback(mPBRScaleV, "gltfTextureScaleV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleV(); });
+    getChildSetCommitCallback(mPBRRotate, "gltfTextureRotation", [&](LLUICtrl*, const LLSD&) { onCommitGLTFRotation(); });
+    getChildSetCommitCallback(mPBROffsetU, "gltfTextureOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetU(); });
+    getChildSetCommitCallback(mPBROffsetV, "gltfTextureOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetV(); });
 
     LLGLTFMaterialList::addSelectionUpdateCallback(&LLPanelFace::onMaterialOverrideReceived);
     sMaterialOverrideSelection.connect();
 
-    childSetAction("button align", [&](LLUICtrl*, const LLSD&) { onClickAutoFix(); });
-    childSetAction("button align textures", [&](LLUICtrl*, const LLSD&) { onAlignTexture(); });
-    childSetAction("pbr_from_inventory", [&](LLUICtrl*, const LLSD&) { onClickBtnLoadInvPBR(); });
-    childSetAction("edit_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnEditPBR(); });
-    childSetAction("save_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnSavePBR(); });
+    getChildSetClickedCallback(mBtnAlign, "button align", [&](LLUICtrl*, const LLSD&) { onClickAutoFix(); });
+    getChildSetClickedCallback(mBtnAlignTex, "button align textures", [&](LLUICtrl*, const LLSD&) { onAlignTexture(); });
+    getChildSetClickedCallback(mBtnPbrFromInv, "pbr_from_inventory", [&](LLUICtrl*, const LLSD&) { onClickBtnLoadInvPBR(); });
+    getChildSetClickedCallback(mBtnEditBbr, "edit_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnEditPBR(); });
+    getChildSetClickedCallback(mBtnSaveBbr, "save_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnSavePBR(); });
 
     setMouseOpaque(false);
 
     mPBRTextureCtrl = getChild<LLTextureCtrl>("pbr_control");
-    if (mPBRTextureCtrl)
-    {
-        mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
-        mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
-        mPBRTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbr(); });
-        mPBRTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelPbr(); });
-        mPBRTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectPbr(); });
-        mPBRTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragPbr(item); });
-        mPBRTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onPbrSelectionChanged(item); });
-        mPBRTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
-
-        mPBRTextureCtrl->setFollowsTop();
-        mPBRTextureCtrl->setFollowsLeft();
-        mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
-        mPBRTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
-        mPBRTextureCtrl->setBakeTextureEnabled(false);
-        mPBRTextureCtrl->setInventoryPickType(PICK_MATERIAL);
-    }
+    mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
+    mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
+    mPBRTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbr(); });
+    mPBRTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelPbr(); });
+    mPBRTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectPbr(); });
+    mPBRTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragPbr(item); });
+    mPBRTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onPbrSelectionChanged(item); });
+    mPBRTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+    mPBRTextureCtrl->setFollowsTop();
+    mPBRTextureCtrl->setFollowsLeft();
+    mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+    mPBRTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
+    mPBRTextureCtrl->setBakeTextureEnabled(false);
+    mPBRTextureCtrl->setInventoryPickType(PICK_MATERIAL);
 
     mTextureCtrl = getChild<LLTextureCtrl>("texture control");
-    if (mTextureCtrl)
-    {
-        mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
-        mTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexture(); });
-        mTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelTexture(); });
-        mTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectTexture(); });
-        mTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
-        mTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
-        mTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
-
-        mTextureCtrl->setFollowsTop();
-        mTextureCtrl->setFollowsLeft();
-        mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
-        mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
-    }
+    mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
+    mTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexture(); });
+    mTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelTexture(); });
+    mTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectTexture(); });
+    mTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+    mTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+    mTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+    mTextureCtrl->setFollowsTop();
+    mTextureCtrl->setFollowsLeft();
+    mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+    mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
 
     mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
-    if (mShinyTextureCtrl)
-    {
-        mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
-        mShinyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitSpecularTexture(data); });
-        mShinyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelSpecularTexture(data); });
-        mShinyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectSpecularTexture(data); });
-        mShinyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
-
-        mShinyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
-        mShinyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
-        mShinyTextureCtrl->setFollowsTop();
-        mShinyTextureCtrl->setFollowsLeft();
-        mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
-        mShinyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
-    }
+    mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
+    mShinyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitSpecularTexture(data); });
+    mShinyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelSpecularTexture(data); });
+    mShinyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectSpecularTexture(data); });
+    mShinyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+    mShinyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+    mShinyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+    mShinyTextureCtrl->setFollowsTop();
+    mShinyTextureCtrl->setFollowsLeft();
+    mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+    mShinyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
 
     mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
-    if (mBumpyTextureCtrl)
-    {
-        mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
-        mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
-        mBumpyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitNormalTexture(data); });
-        mBumpyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelNormalTexture(data); });
-        mBumpyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectNormalTexture(data); });
-        mBumpyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
-
-        mBumpyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
-        mBumpyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
-        mBumpyTextureCtrl->setFollowsTop();
-        mBumpyTextureCtrl->setFollowsLeft();
-        mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
-        mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
-    }
+    mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
+    mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
+    mBumpyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitNormalTexture(data); });
+    mBumpyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelNormalTexture(data); });
+    mBumpyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectNormalTexture(data); });
+    mBumpyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+    mBumpyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+    mBumpyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+    mBumpyTextureCtrl->setFollowsTop();
+    mBumpyTextureCtrl->setFollowsLeft();
+    mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+    mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
 
     mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
-    if (mColorSwatch)
-    {
-        mColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitColor(); });
-        mColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelColor(); });
-        mColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectColor(); });
-        mColorSwatch->setFollowsTop();
-        mColorSwatch->setFollowsLeft();
-        mColorSwatch->setCanApplyImmediately(true);
-    }
+    mColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitColor(); });
+    mColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelColor(); });
+    mColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectColor(); });
+    mColorSwatch->setFollowsTop();
+    mColorSwatch->setFollowsLeft();
+    mColorSwatch->setCanApplyImmediately(true);
 
     mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
-    if (mShinyColorSwatch)
-    {
-        mShinyColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitShinyColor(); });
-        mShinyColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelShinyColor(); });
-        mShinyColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectShinyColor(); });
-        mShinyColorSwatch->setFollowsTop();
-        mShinyColorSwatch->setFollowsLeft();
-        mShinyColorSwatch->setCanApplyImmediately(true);
-    }
+    mShinyColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitShinyColor(); });
+    mShinyColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelShinyColor(); });
+    mShinyColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectShinyColor(); });
+    mShinyColorSwatch->setFollowsTop();
+    mShinyColorSwatch->setFollowsLeft();
+    mShinyColorSwatch->setCanApplyImmediately(true);
 
     mLabelColorTransp = getChild<LLTextBox>("color trans");
-    if (mLabelColorTransp)
-    {
-        mLabelColorTransp->setFollowsTop();
-        mLabelColorTransp->setFollowsLeft();
-    }
+    mLabelColorTransp->setFollowsTop();
+    mLabelColorTransp->setFollowsLeft();
 
     mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
-    if (mCtrlColorTransp)
-    {
-        mCtrlColorTransp->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitAlpha(); });
-        mCtrlColorTransp->setPrecision(0);
-        mCtrlColorTransp->setFollowsTop();
-        mCtrlColorTransp->setFollowsLeft();
-    }
+    mCtrlColorTransp->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitAlpha(); });
+    mCtrlColorTransp->setPrecision(0);
+    mCtrlColorTransp->setFollowsTop();
+    mCtrlColorTransp->setFollowsLeft();
 
     mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
-    if (mCheckFullbright)
-    {
-        mCheckFullbright->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
-    }
+    mCheckFullbright->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
 
+    mLabelTexGen = getChild<LLTextBox>("tex gen");
     mComboTexGen = getChild<LLComboBox>("combobox texgen");
-    if (mComboTexGen)
-    {
-        mComboTexGen->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
-        mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
-    }
+    mComboTexGen->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
+    mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
 
     mComboMatMedia = getChild<LLComboBox>("combobox matmedia");
-    if (mComboMatMedia)
-    {
-        mComboMatMedia->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
-        mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
-    }
+    mComboMatMedia->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
+    mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
 
     mRadioMaterialType = getChild<LLRadioGroup>("radio_material_type");
-    if (mRadioMaterialType)
-    {
-        mRadioMaterialType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
-        mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
-    }
+    mRadioMaterialType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
+    mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
 
     mRadioPbrType = getChild<LLRadioGroup>("radio_pbr_type");
-    if (mRadioPbrType)
-    {
-        mRadioPbrType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
-        mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
-    }
+    mRadioPbrType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
+    mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
 
+    mLabelGlow = getChild<LLTextBox>("glow label");
     mCtrlGlow = getChild<LLSpinCtrl>("glow");
-    if (mCtrlGlow)
-    {
-        mCtrlGlow->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
-    }
+    mCtrlGlow->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
 
     mMenuClipboardColor = getChild<LLMenuButton>("clipboard_color_params_btn");
     mMenuClipboardTexture = getChild<LLMenuButton>("clipboard_texture_params_btn");
@@ -461,6 +418,19 @@ bool LLPanelFace::postBuild()
     mTitleMedia = getChild<LLMediaCtrl>("title_media");
     mTitleMediaText = getChild<LLTextBox>("media_info");
 
+    mLabelBumpiness = getChild<LLTextBox>("label bumpiness");
+    mLabelShininess = getChild<LLTextBox>("label shininess");
+    mLabelAlphaMode = getChild<LLTextBox>("label alphamode");
+    mLabelGlossiness = getChild<LLTextBox>("label glossiness");
+    mLabelEnvironment = getChild<LLTextBox>("label environment");
+    mLabelMaskCutoff = getChild<LLTextBox>("label maskcutoff");
+    mLabelShiniColor = getChild<LLTextBox>("label shinycolor");
+    mLabelColor = getChild<LLTextBox>("color label");
+
+    mLabelMatPermLoading = getChild<LLTextBox>("material_permissions_loading_label");
+
+    mCheckSyncSettings = getChild<LLCheckBoxCtrl>("checkbox_sync_settings");
+
     clearCtrls();
 
     return true;
@@ -513,8 +483,7 @@ void LLPanelFace::draw()
 
 void LLPanelFace::sendTexture()
 {
-    if(!mTextureCtrl) return;
-    if( !mTextureCtrl->getTentative() )
+    if (!mTextureCtrl->getTentative())
     {
         // we grab the item id first, because we want to do a
         // permissions check in the selection manager. ARGH!
@@ -590,32 +559,26 @@ void LLPanelFace::sendShiny(U32 shininess)
 
 void LLPanelFace::sendFullbright()
 {
-    if(!mCheckFullbright)return;
     U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0;
     LLSelectMgr::getInstance()->selectionSetFullbright(fullbright);
 }
 
 void LLPanelFace::sendColor()
 {
-    if(!mColorSwatch)return;
     LLColor4 color = mColorSwatch->get();
     LLSelectMgr::getInstance()->selectionSetColorOnly(color);
 }
 
 void LLPanelFace::sendAlpha()
 {
-    if(!mCtrlColorTransp)return;
     F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f;
     LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha );
 }
 
 void LLPanelFace::sendGlow()
 {
-    if (mCtrlGlow)
-    {
-        F32 glow = mCtrlGlow->get();
-        LLSelectMgr::getInstance()->selectionSetGlow( glow );
-    }
+    F32 glow = mCtrlGlow->get();
+    LLSelectMgr::getInstance()->selectionSetGlow(glow);
 }
 
 struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
@@ -623,47 +586,49 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
     LLPanelFaceSetTEFunctor(LLPanelFace* panel) : mPanel(panel) {}
     virtual bool apply(LLViewerObject* object, S32 te)
     {
-        bool valid;
-        F32 value;
-        std::string prefix;
+        LLSpinCtrl *ctrlTexScaleS, *ctrlTexScaleT, *ctrlTexOffsetS, *ctrlTexOffsetT, *ctrlTexRotation;
 
         // Effectively the same as MATMEDIA_PBR sans using different radio,
         // separate for the sake of clarity
-        LLRadioGroup * radio_mat_type = mPanel->getChild<LLRadioGroup>("radio_material_type");
-        switch (radio_mat_type->getSelectedIndex())
+        switch (mPanel->mRadioMaterialType->getSelectedIndex())
         {
         case MATTYPE_DIFFUSE:
-            prefix = "Tex";
+            ctrlTexScaleS = mPanel->mTexScaleU;
+            ctrlTexScaleT = mPanel->mTexScaleV;
+            ctrlTexOffsetS = mPanel->mTexOffsetU;
+            ctrlTexOffsetT = mPanel->mTexOffsetV;
+            ctrlTexRotation = mPanel->mTexRotate;
             break;
         case MATTYPE_NORMAL:
-            prefix = "bumpy";
+            ctrlTexScaleS = mPanel->mBumpyScaleU;
+            ctrlTexScaleT = mPanel->mBumpyScaleV;
+            ctrlTexOffsetS = mPanel->mBumpyOffsetU;
+            ctrlTexOffsetT = mPanel->mBumpyOffsetV;
+            ctrlTexRotation = mPanel->mBumpyRotate;
             break;
         case MATTYPE_SPECULAR:
-            prefix = "shiny";
+            ctrlTexScaleS = mPanel->mShinyScaleU;
+            ctrlTexScaleT = mPanel->mShinyScaleV;
+            ctrlTexOffsetS = mPanel->mShinyOffsetU;
+            ctrlTexOffsetT = mPanel->mShinyOffsetV;
+            ctrlTexRotation = mPanel->mShinyRotate;
             break;
+        default:
+            llassert(false);
+            return false;
         }
 
-        LLSpinCtrl * ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleU");
-        LLSpinCtrl * ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleV");
-        LLSpinCtrl * ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetU");
-        LLSpinCtrl * ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetV");
-        LLSpinCtrl * ctrlTexRotation = mPanel->getChild<LLSpinCtrl>(prefix + "Rot");
-
-        LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen");
-        LLCheckBoxCtrl* cb_planar_align = mPanel->getChild<LLCheckBoxCtrl>("checkbox planar align");
-        bool align_planar = (cb_planar_align && cb_planar_align->get());
+        bool align_planar = mPanel->mPlanarAlign->get();
 
-        llassert(comboTexGen);
         llassert(object);
 
         if (ctrlTexScaleS)
         {
-            valid = !ctrlTexScaleS->getTentative(); // || !checkFlipScaleS->getTentative();
+            bool valid = !ctrlTexScaleS->getTentative(); // || !checkFlipScaleS->getTentative();
             if (valid || align_planar)
             {
-                value = ctrlTexScaleS->get();
-                if (comboTexGen &&
-                    comboTexGen->getCurrentIndex() == 1)
+                F32 value = ctrlTexScaleS->get();
+                if (mPanel->mComboTexGen->getCurrentIndex() == 1)
                 {
                     value *= 0.5f;
                 }
@@ -679,20 +644,19 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
 
         if (ctrlTexScaleT)
         {
-            valid = !ctrlTexScaleT->getTentative(); // || !checkFlipScaleT->getTentative();
+            bool valid = !ctrlTexScaleT->getTentative(); // || !checkFlipScaleT->getTentative();
             if (valid || align_planar)
             {
-                value = ctrlTexScaleT->get();
-                //if( checkFlipScaleT->get() )
+                F32 value = ctrlTexScaleT->get();
+                //if (checkFlipScaleT->get())
                 //{
                 //  value = -value;
                 //}
-                if (comboTexGen &&
-                    comboTexGen->getCurrentIndex() == 1)
+                if (mPanel->mComboTexGen->getCurrentIndex() == 1)
                 {
                     value *= 0.5f;
                 }
-                object->setTEScaleT( te, value );
+                object->setTEScaleT(te, value);
 
                 if (align_planar)
                 {
@@ -704,11 +668,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
 
         if (ctrlTexOffsetS)
         {
-            valid = !ctrlTexOffsetS->getTentative();
+            bool valid = !ctrlTexOffsetS->getTentative();
             if (valid || align_planar)
             {
-                value = ctrlTexOffsetS->get();
-                object->setTEOffsetS( te, value );
+                F32 value = ctrlTexOffsetS->get();
+                object->setTEOffsetS(te, value);
 
                 if (align_planar)
                 {
@@ -720,11 +684,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
 
         if (ctrlTexOffsetT)
         {
-            valid = !ctrlTexOffsetT->getTentative();
+            bool valid = !ctrlTexOffsetT->getTentative();
             if (valid || align_planar)
             {
-                value = ctrlTexOffsetT->get();
-                object->setTEOffsetT( te, value );
+                F32 value = ctrlTexOffsetT->get();
+                object->setTEOffsetT(te, value);
 
                 if (align_planar)
                 {
@@ -736,11 +700,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
 
         if (ctrlTexRotation)
         {
-            valid = !ctrlTexRotation->getTentative();
+            bool valid = !ctrlTexRotation->getTentative();
             if (valid || align_planar)
             {
-                value = ctrlTexRotation->get() * DEG_TO_RAD;
-                object->setTERotation( te, value );
+                F32 value = ctrlTexRotation->get() * DEG_TO_RAD;
+                object->setTERotation(te, value);
 
                 if (align_planar)
                 {
@@ -947,7 +911,7 @@ struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor
 
 void LLPanelFace::sendTextureInfo()
 {
-    if (childGetValue("checkbox planar align").asBoolean())
+    if (mPlanarAlign->getValue().asBoolean())
     {
         LLFace* last_face = NULL;
         bool identical_face =false;
@@ -999,7 +963,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         const bool has_material = !has_pbr_material;
 
         // only turn on auto-adjust button if there is a media renderer and the media is loaded
-        childSetEnabled("button align", editable);
+        mBtnAlign->setEnabled(editable);
 
         if (mComboMatMedia->getCurrentIndex() < MATMEDIA_MATERIAL)
         {
@@ -1100,30 +1064,23 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         const bool pbr_selected = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR;
         const bool texture_info_selected = pbr_selected && mRadioPbrType->getSelectedIndex() != PBRTYPE_RENDER_MATERIAL_ID;
 
-        getChildView("checkbox_sync_settings")->setEnabled(editable);
-        childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
+        mCheckSyncSettings->setEnabled(editable);
+        mCheckSyncSettings->setValue(gSavedSettings.getBOOL("SyncMaterialSettings"));
 
         updateVisibility(objectp);
 
         // Color swatch
-        {
-            getChildView("color label")->setEnabled(editable);
-        }
-
+        mLabelColor->setEnabled(editable);
         LLColor4 color = LLColor4::white;
         bool identical_color = false;
 
-        {
-            LLSelectedTE::getColor(color, identical_color);
-            LLColor4 prev_color = mColorSwatch->get();
-
-            mColorSwatch->setOriginal(color);
-            mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable);
-
-            mColorSwatch->setValid(editable && !has_pbr_material);
-            mColorSwatch->setEnabled( editable && !has_pbr_material);
-            mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material);
-        }
+        LLSelectedTE::getColor(color, identical_color);
+        LLColor4 prev_color = mColorSwatch->get();
+        mColorSwatch->setOriginal(color);
+        mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable);
+        mColorSwatch->setValid(editable && !has_pbr_material);
+        mColorSwatch->setEnabled( editable && !has_pbr_material);
+        mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material);
 
         // Color transparency
         mLabelColorTransp->setEnabled(editable);
@@ -1132,65 +1089,51 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         mCtrlColorTransp->setValue(editable ? transparency : 0);
         mCtrlColorTransp->setEnabled(editable && has_material);
 
+        // Shiny
         U8 shiny = 0;
-        bool identical_shiny = false;
+        {
+            bool identical_shiny = false;
 
-        // Shiny
-        LLSelectedTE::getShiny(shiny, identical_shiny);
-        identical = identical && identical_shiny;
+            LLSelectedTE::getShiny(shiny, identical_shiny);
+            identical = identical && identical_shiny;
 
-        shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE;
+            shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE;
 
-        LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess");
-        if (combobox_shininess)
-        {
-            combobox_shininess->selectNthItem((S32)shiny);
-        }
+            mComboShininess->getSelectionInterface()->selectNthItem((S32)shiny);
 
-        getChildView("label shininess")->setEnabled(editable);
-        getChildView("combobox shininess")->setEnabled(editable);
+            mLabelShininess->setEnabled(editable);
+            mComboShininess->setEnabled(editable);
 
-        getChildView("label glossiness")->setEnabled(editable);
-        getChildView("glossiness")->setEnabled(editable);
+            mLabelGlossiness->setEnabled(editable);
+            mGlossiness->setEnabled(editable);
 
-        getChildView("label environment")->setEnabled(editable);
-        getChildView("environment")->setEnabled(editable);
-        getChildView("label shinycolor")->setEnabled(editable);
+            mLabelEnvironment->setEnabled(editable);
+            mEnvironment->setEnabled(editable);
+            mLabelShiniColor->setEnabled(editable);
 
-        getChild<LLUICtrl>("combobox shininess")->setTentative(!identical_spec);
-        getChild<LLUICtrl>("glossiness")->setTentative(!identical_spec);
-        getChild<LLUICtrl>("environment")->setTentative(!identical_spec);
-        mShinyColorSwatch->setTentative(!identical_spec);
+            mComboShininess->setTentative(!identical_spec);
+            mGlossiness->setTentative(!identical_spec);
+            mEnvironment->setTentative(!identical_spec);
+            mShinyColorSwatch->setTentative(!identical_spec);
 
-        {
             mShinyColorSwatch->setValid(editable);
-            mShinyColorSwatch->setEnabled( editable );
-            mShinyColorSwatch->setCanApplyImmediately( editable );
+            mShinyColorSwatch->setEnabled(editable);
+            mShinyColorSwatch->setCanApplyImmediately(editable);
         }
 
-        U8 bumpy = 0;
         // Bumpy
+        U8 bumpy = 0;
         {
             bool identical_bumpy = false;
-            LLSelectedTE::getBumpmap(bumpy,identical_bumpy);
+            LLSelectedTE::getBumpmap(bumpy, identical_bumpy);
 
             LLUUID norm_map_id = getCurrentNormalMap();
-            LLCtrlSelectionInterface* combobox_bumpiness = childGetSelectionInterface("combobox bumpiness");
-
             bumpy = norm_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
+            mComboBumpiness->getSelectionInterface()->selectNthItem((S32)bumpy);
 
-            if (combobox_bumpiness)
-            {
-                combobox_bumpiness->selectNthItem((S32)bumpy);
-            }
-            else
-            {
-                LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL;
-            }
-
-            getChildView("combobox bumpiness")->setEnabled(editable);
-            getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical_bumpy);
-            getChildView("label bumpiness")->setEnabled(editable);
+            mComboBumpiness->setEnabled(editable);
+            mComboBumpiness->setTentative(!identical_bumpy);
+            mLabelBumpiness->setEnabled(editable);
         }
 
         // Texture
@@ -1228,7 +1171,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             if (LLViewerMedia::getInstance()->textureHasMedia(id))
             {
-                getChildView("button align")->setEnabled(editable);
+                mBtnAlign->setEnabled(editable);
             }
 
             // Diffuse Alpha Mode
@@ -1243,22 +1186,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             //
             LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode, mIsAlpha);
 
-            LLCtrlSelectionInterface* combobox_alphamode = childGetSelectionInterface("combobox alphamode");
-            if (combobox_alphamode)
-            {
-                //it is invalid to have any alpha mode other than blend if transparency is greater than zero ...
-                // Want masking? Want emissive? Tough! You get BLEND!
-                alpha_mode = (transparency > 0.f) ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : alpha_mode;
+            // it is invalid to have any alpha mode other than blend if transparency is greater than zero ...
+            // Want masking? Want emissive? Tough! You get BLEND!
+            alpha_mode = (transparency > 0.f) ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : alpha_mode;
 
-                // ... unless there is no alpha channel in the texture, in which case alpha mode MUST be none
-                alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
+            // ... unless there is no alpha channel in the texture, in which case alpha mode MUST be none
+            alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
 
-                combobox_alphamode->selectNthItem(alpha_mode);
-            }
-            else
-            {
-                LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
-            }
+            mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
 
             updateAlphaControls();
 
@@ -1271,10 +1206,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     mTextureCtrl->setImageAssetID(id);
 
                     bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
-                    getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
-                    getChildView("label alphamode")->setEnabled(can_change_alpha);
-                    getChildView("maskcutoff")->setEnabled(can_change_alpha);
-                    getChildView("label maskcutoff")->setEnabled(can_change_alpha);
+                    mComboAlphaMode->setEnabled(can_change_alpha && transparency <= 0.f);
+                    mLabelAlphaMode->setEnabled(can_change_alpha);
+                    mMaskCutoff->setEnabled(can_change_alpha);
+                    mLabelMaskCutoff->setEnabled(can_change_alpha);
 
                     mTextureCtrl->setBakeTextureEnabled(true);
                 }
@@ -1284,10 +1219,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     mTextureCtrl->setTentative(false);
                     mTextureCtrl->setEnabled(false);
                     mTextureCtrl->setImageAssetID(LLUUID::null);
-                    getChildView("combobox alphamode")->setEnabled(false);
-                    getChildView("label alphamode")->setEnabled(false);
-                    getChildView("maskcutoff")->setEnabled(false);
-                    getChildView("label maskcutoff")->setEnabled(false);
+                    mComboAlphaMode->setEnabled(false);
+                    mLabelAlphaMode->setEnabled(false);
+                    mMaskCutoff->setEnabled(false);
+                    mLabelMaskCutoff->setEnabled(false);
 
                     mTextureCtrl->setBakeTextureEnabled(false);
                 }
@@ -1299,10 +1234,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     mTextureCtrl->setImageAssetID(id);
 
                     bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
-                    getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
-                    getChildView("label alphamode")->setEnabled(can_change_alpha);
-                    getChildView("maskcutoff")->setEnabled(can_change_alpha);
-                    getChildView("label maskcutoff")->setEnabled(can_change_alpha);
+                    mComboAlphaMode->setEnabled(can_change_alpha && transparency <= 0.f);
+                    mLabelAlphaMode->setEnabled(can_change_alpha);
+                    mMaskCutoff->setEnabled(can_change_alpha);
+                    mLabelMaskCutoff->setEnabled(can_change_alpha);
 
                     mTextureCtrl->setBakeTextureEnabled(true);
                 }
@@ -1354,28 +1289,24 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
         }
 
         // planar align
-        bool align_planar = false;
+        bool align_planar = mPlanarAlign->get();
         bool identical_planar_aligned = false;
-        {
-            LLCheckBoxCtrl* cb_planar_align = getChild<LLCheckBoxCtrl>("checkbox planar align");
-            align_planar = (cb_planar_align && cb_planar_align->get());
 
-            bool enabled = (editable && isIdenticalPlanarTexgen() && !texture_info_selected);
-            childSetValue("checkbox planar align", align_planar && enabled);
-            childSetVisible("checkbox planar align", enabled);
-            childSetEnabled("checkbox planar align", enabled);
-            childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
+        bool enabled = (editable && isIdenticalPlanarTexgen() && !texture_info_selected);
+        mPlanarAlign->setValue(align_planar && enabled);
+        mPlanarAlign->setVisible(enabled);
+        mPlanarAlign->setEnabled(enabled);
+        mBtnAlignTex->setEnabled(enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
 
-            if (align_planar && enabled)
-            {
-                LLFace* last_face = NULL;
-                bool identical_face = false;
-                LLSelectedTE::getFace(last_face, identical_face);
+        if (align_planar && enabled)
+        {
+            LLFace* last_face = NULL;
+            bool identical_face = false;
+            LLSelectedTE::getFace(last_face, identical_face);
 
-                LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face);
-                // this will determine if the texture param controls are tentative:
-                identical_planar_aligned = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&get_is_aligend_func);
-            }
+            LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face);
+            // this will determine if the texture param controls are tentative:
+            identical_planar_aligned = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&get_is_aligend_func);
         }
 
         // Needs to be public and before tex scale settings below to properly reflect
@@ -1414,21 +1345,21 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             spec_scale_s = editable ? spec_scale_s : 1.0f;
             spec_scale_s *= identical_planar_texgen ? 2.0f : 1.0f;
 
-            getChild<LLUICtrl>("TexScaleU")->setValue(diff_scale_s);
-            getChild<LLUICtrl>("shinyScaleU")->setValue(spec_scale_s);
-            getChild<LLUICtrl>("bumpyScaleU")->setValue(norm_scale_s);
+            mTexScaleU->setValue(diff_scale_s);
+            mShinyScaleU->setValue(spec_scale_s);
+            mBumpyScaleU->setValue(norm_scale_s);
 
-            getChildView("TexScaleU")->setEnabled(editable && has_material);
-            getChildView("shinyScaleU")->setEnabled(editable && has_material && specmap_id.notNull());
-            getChildView("bumpyScaleU")->setEnabled(editable && has_material && normmap_id.notNull());
+            mTexScaleU->setEnabled(editable && has_material);
+            mShinyScaleU->setEnabled(editable && has_material && specmap_id.notNull());
+            mBumpyScaleU->setEnabled(editable && has_material && normmap_id.notNull());
 
             bool diff_scale_tentative = !(identical && identical_diff_scale_s);
             bool norm_scale_tentative = !(identical && identical_norm_scale_s);
             bool spec_scale_tentative = !(identical && identical_spec_scale_s);
 
-            getChild<LLUICtrl>("TexScaleU")->setTentative(LLSD(diff_scale_tentative));
-            getChild<LLUICtrl>("shinyScaleU")->setTentative(LLSD(spec_scale_tentative));
-            getChild<LLUICtrl>("bumpyScaleU")->setTentative(LLSD(norm_scale_tentative));
+            mTexScaleU->setTentative(LLSD(diff_scale_tentative));
+            mShinyScaleU->setTentative(LLSD(spec_scale_tentative));
+            mBumpyScaleU->setTentative(LLSD(norm_scale_tentative));
         }
 
         {
@@ -1457,24 +1388,24 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             bool norm_scale_tentative = !identical_norm_scale_t;
             bool spec_scale_tentative = !identical_spec_scale_t;
 
-            getChildView("TexScaleV")->setEnabled(editable && has_material);
-            getChildView("shinyScaleV")->setEnabled(editable && has_material && specmap_id.notNull());
-            getChildView("bumpyScaleV")->setEnabled(editable && has_material && normmap_id.notNull());
+            mTexScaleV->setEnabled(editable && has_material);
+            mShinyScaleV->setEnabled(editable && has_material && specmap_id.notNull());
+            mBumpyScaleV->setEnabled(editable && has_material && normmap_id.notNull());
 
             if (force_set_values)
             {
-                getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(diff_scale_t);
+                mTexScaleV->forceSetValue(diff_scale_t);
             }
             else
             {
-                getChild<LLSpinCtrl>("TexScaleV")->setValue(diff_scale_t);
+                mTexScaleV->setValue(diff_scale_t);
             }
-            getChild<LLUICtrl>("shinyScaleV")->setValue(norm_scale_t);
-            getChild<LLUICtrl>("bumpyScaleV")->setValue(spec_scale_t);
+            mShinyScaleV->setValue(norm_scale_t);
+            mBumpyScaleV->setValue(spec_scale_t);
 
-            getChild<LLUICtrl>("TexScaleV")->setTentative(LLSD(diff_scale_tentative));
-            getChild<LLUICtrl>("shinyScaleV")->setTentative(LLSD(norm_scale_tentative));
-            getChild<LLUICtrl>("bumpyScaleV")->setTentative(LLSD(spec_scale_tentative));
+            mTexScaleV->setTentative(LLSD(diff_scale_tentative));
+            mShinyScaleV->setTentative(LLSD(spec_scale_tentative));
+            mBumpyScaleV->setTentative(LLSD(norm_scale_tentative));
         }
 
         // Texture offset
@@ -1495,17 +1426,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             bool norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s);
             bool spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s);
 
-            getChild<LLUICtrl>("TexOffsetU")->setValue(  editable ? diff_offset_s : 0.0f);
-            getChild<LLUICtrl>("bumpyOffsetU")->setValue(editable ? norm_offset_s : 0.0f);
-            getChild<LLUICtrl>("shinyOffsetU")->setValue(editable ? spec_offset_s : 0.0f);
+            mTexOffsetU->setValue(editable ? diff_offset_s : 0.0f);
+            mBumpyOffsetU->setValue(editable ? norm_offset_s : 0.0f);
+            mShinyOffsetU->setValue(editable ? spec_offset_s : 0.0f);
 
-            getChild<LLUICtrl>("TexOffsetU")->setTentative(LLSD(diff_offset_u_tentative));
-            getChild<LLUICtrl>("shinyOffsetU")->setTentative(LLSD(norm_offset_u_tentative));
-            getChild<LLUICtrl>("bumpyOffsetU")->setTentative(LLSD(spec_offset_u_tentative));
+            mTexOffsetU->setTentative(LLSD(diff_offset_u_tentative));
+            mShinyOffsetU->setTentative(LLSD(spec_offset_u_tentative));
+            mBumpyOffsetU->setTentative(LLSD(norm_offset_u_tentative));
 
-            getChildView("TexOffsetU")->setEnabled(editable && has_material);
-            getChildView("shinyOffsetU")->setEnabled(editable && has_material && specmap_id.notNull());
-            getChildView("bumpyOffsetU")->setEnabled(editable && has_material && normmap_id.notNull());
+            mTexOffsetU->setEnabled(editable && has_material);
+            mShinyOffsetU->setEnabled(editable && has_material && specmap_id.notNull());
+            mBumpyOffsetU->setEnabled(editable && has_material && normmap_id.notNull());
         }
 
         {
@@ -1525,17 +1456,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             bool norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t);
             bool spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t);
 
-            getChild<LLUICtrl>("TexOffsetV")->setValue(  editable ? diff_offset_t : 0.0f);
-            getChild<LLUICtrl>("bumpyOffsetV")->setValue(editable ? norm_offset_t : 0.0f);
-            getChild<LLUICtrl>("shinyOffsetV")->setValue(editable ? spec_offset_t : 0.0f);
+            mTexOffsetV->setValue(  editable ? diff_offset_t : 0.0f);
+            mBumpyOffsetV->setValue(editable ? norm_offset_t : 0.0f);
+            mShinyOffsetV->setValue(editable ? spec_offset_t : 0.0f);
 
-            getChild<LLUICtrl>("TexOffsetV")->setTentative(LLSD(diff_offset_v_tentative));
-            getChild<LLUICtrl>("shinyOffsetV")->setTentative(LLSD(norm_offset_v_tentative));
-            getChild<LLUICtrl>("bumpyOffsetV")->setTentative(LLSD(spec_offset_v_tentative));
+            mTexOffsetV->setTentative(LLSD(diff_offset_v_tentative));
+            mBumpyOffsetV->setTentative(LLSD(norm_offset_v_tentative));
+            mShinyOffsetV->setTentative(LLSD(spec_offset_v_tentative));
 
-            getChildView("TexOffsetV")->setEnabled(editable && has_material);
-            getChildView("shinyOffsetV")->setEnabled(editable && has_material && specmap_id.notNull());
-            getChildView("bumpyOffsetV")->setEnabled(editable && has_material && normmap_id.notNull());
+            mTexOffsetV->setEnabled(editable && has_material);
+            mShinyOffsetV->setEnabled(editable && has_material && specmap_id.notNull());
+            mBumpyOffsetV->setEnabled(editable && has_material && normmap_id.notNull());
         }
 
         // Texture rotation
@@ -1560,17 +1491,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             F32 norm_rot_deg = norm_rotation * RAD_TO_DEG;
             F32 spec_rot_deg = spec_rotation * RAD_TO_DEG;
 
-            getChildView("TexRot")->setEnabled(editable && has_material);
-            getChildView("shinyRot")->setEnabled(editable && has_material && specmap_id.notNull());
-            getChildView("bumpyRot")->setEnabled(editable && has_material && normmap_id.notNull());
+            mTexRotate->setEnabled(editable && has_material);
+            mShinyRotate->setEnabled(editable && has_material && specmap_id.notNull());
+            mBumpyRotate->setEnabled(editable && has_material && normmap_id.notNull());
 
-            getChild<LLUICtrl>("TexRot")->setTentative(LLSD(diff_rot_tentative));
-            getChild<LLUICtrl>("shinyRot")->setTentative(LLSD(spec_rot_tentative));
-            getChild<LLUICtrl>("bumpyRot")->setTentative(LLSD(norm_rot_tentative));
+            mTexRotate->setTentative(LLSD(diff_rot_tentative));
+            mShinyRotate->setTentative(LLSD(spec_rot_tentative));
+            mBumpyRotate->setTentative(LLSD(norm_rot_tentative));
 
-            getChild<LLUICtrl>("TexRot")->setValue(editable ? diff_rot_deg : 0.0f);
-            getChild<LLUICtrl>("shinyRot")->setValue(editable ? spec_rot_deg : 0.0f);
-            getChild<LLUICtrl>("bumpyRot")->setValue(editable ? norm_rot_deg : 0.0f);
+            mTexRotate->setValue(editable ? diff_rot_deg : 0.0f);
+            mShinyRotate->setValue(editable ? spec_rot_deg : 0.0f);
+            mBumpyRotate->setValue(editable ? norm_rot_deg : 0.0f);
         }
 
         {
@@ -1580,7 +1511,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             mCtrlGlow->setValue(glow);
             mCtrlGlow->setTentative(!identical_glow);
             mCtrlGlow->setEnabled(editable);
-            getChildView("glow label")->setEnabled(editable);
+            mLabelGlow->setEnabled(editable);
         }
 
         {
@@ -1589,7 +1520,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
             mComboTexGen->setEnabled(editable);
             mComboTexGen->setTentative(!identical);
-            getChildView("tex gen")->setEnabled(editable);
+            mLabelTexGen->setEnabled(editable);
         }
 
         {
@@ -1667,18 +1598,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
                 bool repeats_tentative = !identical_repeats;
 
-                LLSpinCtrl* rpt_ctrl = getChild<LLSpinCtrl>("rptctrl");
                 if (force_set_values)
                 {
-                    //onCommit, previosly edited element updates related ones
-                    rpt_ctrl->forceSetValue(editable ? repeats : 1.0f);
+                    // onCommit, previosly edited element updates related ones
+                    mTexRepeat->forceSetValue(editable ? repeats : 1.0f);
                 }
                 else
                 {
-                    rpt_ctrl->setValue(editable ? repeats : 1.0f);
+                    mTexRepeat->setValue(editable ? repeats : 1.0f);
                 }
-                rpt_ctrl->setTentative(LLSD(repeats_tentative));
-                rpt_ctrl->setEnabled(has_material && !identical_planar_texgen && enabled);
+                mTexRepeat->setTentative(LLSD(repeats_tentative));
+                mTexRepeat->setEnabled(has_material && !identical_planar_texgen && enabled);
             }
         }
 
@@ -1692,9 +1622,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                 LL_DEBUGS("Materials") << material->asLLSD() << LL_ENDL;
 
                 // Alpha
-                LLCtrlSelectionInterface* combobox_alphamode =
-                    childGetSelectionInterface("combobox alphamode");
-                if (combobox_alphamode)
                 {
                     U32 alpha_mode = material->getDiffuseAlphaMode();
 
@@ -1708,14 +1635,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                         alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
                     }
 
-                    combobox_alphamode->selectNthItem(alpha_mode);
-                }
-                else
-                {
-                    LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
+                    mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
                 }
 
-                getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
+                mMaskCutoff->setValue(material->getAlphaMaskCutoff());
                 updateAlphaControls();
 
                 identical_planar_texgen = isIdenticalPlanarTexgen();
@@ -1736,13 +1659,13 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     }
 
                     rot = material->getSpecularRotation();
-                    getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
-                    getChild<LLUICtrl>("shinyScaleV")->setValue(repeat_y);
-                    getChild<LLUICtrl>("shinyRot")->setValue(rot * RAD_TO_DEG);
-                    getChild<LLUICtrl>("shinyOffsetU")->setValue(offset_x);
-                    getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
-                    getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
-                    getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
+                    mShinyScaleU->setValue(repeat_x);
+                    mShinyScaleV->setValue(repeat_y);
+                    mShinyRotate->setValue(rot * RAD_TO_DEG);
+                    mShinyOffsetU->setValue(offset_x);
+                    mShinyOffsetV->setValue(offset_y);
+                    mGlossiness->setValue(material->getSpecularLightExponent());
+                    mEnvironment->setValue(material->getEnvironmentIntensity());
 
                     updateShinyControls(!material->getSpecularID().isNull(), true);
                 }
@@ -1774,11 +1697,11 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
                     }
 
                     rot = material->getNormalRotation();
-                    getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
-                    getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
-                    getChild<LLUICtrl>("bumpyRot")->setValue(rot * RAD_TO_DEG);
-                    getChild<LLUICtrl>("bumpyOffsetU")->setValue(offset_x);
-                    getChild<LLUICtrl>("bumpyOffsetV")->setValue(offset_y);
+                    mBumpyScaleU->setValue(repeat_x);
+                    mBumpyScaleV->setValue(repeat_y);
+                    mBumpyRotate->setValue(rot*RAD_TO_DEG);
+                    mBumpyOffsetU->setValue(offset_x);
+                    mBumpyOffsetV->setValue(offset_y);
 
                     updateBumpyControls(!material->getNormalID().isNull(), true);
                 }
@@ -1791,11 +1714,11 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
 
         // Set variable values for numeric expressions
         LLCalc* calcp = LLCalc::getInstance();
-        calcp->setVar(LLCalc::TEX_U_SCALE, (F32)childGetValue("TexScaleU").asReal());
-        calcp->setVar(LLCalc::TEX_V_SCALE, (F32)childGetValue("TexScaleV").asReal());
-        calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)childGetValue("TexOffsetU").asReal());
-        calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)childGetValue("TexOffsetV").asReal());
-        calcp->setVar(LLCalc::TEX_ROTATION, (F32)childGetValue("TexRot").asReal());
+        calcp->setVar(LLCalc::TEX_U_SCALE, (F32)mTexScaleU->getValue().asReal());
+        calcp->setVar(LLCalc::TEX_V_SCALE, (F32)mTexScaleV->getValue().asReal());
+        calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)mTexOffsetU->getValue().asReal());
+        calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)mTexOffsetV->getValue().asReal());
+        calcp->setVar(LLCalc::TEX_ROTATION, (F32)mTexRotate->getValue().asReal());
         calcp->setVar(LLCalc::TEX_TRANSPARENCY, (F32)mCtrlColorTransp->getValue().asReal());
         calcp->setVar(LLCalc::TEX_GLOW, (F32)mCtrlGlow->getValue().asReal());
     }
@@ -1830,14 +1753,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             mRadioMaterialType->setSelectedIndex(0);
         }
         mLabelColorTransp->setEnabled(false);
-        getChildView("rptctrl")->setEnabled(false);
-        getChildView("tex gen")->setEnabled(false);
-        getChildView("label shininess")->setEnabled(false);
-        getChildView("label bumpiness")->setEnabled(false);
-        getChildView("button align")->setEnabled(false);
-        getChildView("pbr_from_inventory")->setEnabled(false);
-        getChildView("edit_selected_pbr")->setEnabled(false);
-        getChildView("save_selected_pbr")->setEnabled(false);
+        mTexRepeat->setEnabled(false);
+        mLabelTexGen->setEnabled(false);
+        mLabelShininess->setEnabled(false);
+        mLabelBumpiness->setEnabled(false);
+        mBtnAlign->setEnabled(false);
+        mBtnPbrFromInv->setEnabled(false);
+        mBtnEditBbr->setEnabled(false);
+        mBtnSaveBbr->setEnabled(false);
 
         updateVisibility();
 
@@ -1960,9 +1883,9 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
         }
     }
 
-    getChildView("pbr_from_inventory")->setEnabled(settable);
-    getChildView("edit_selected_pbr")->setEnabled(editable && !has_faces_without_pbr);
-    getChildView("save_selected_pbr")->setEnabled(saveable && identical_pbr);
+    mBtnPbrFromInv->setEnabled(settable);
+    mBtnEditBbr->setEnabled(editable && !has_faces_without_pbr);
+    mBtnSaveBbr->setEnabled(saveable && identical_pbr);
     if (objectp->isInventoryPending())
     {
         // Reuse the same listener when possible
@@ -1992,17 +1915,11 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
     {
         const bool new_state = has_pbr_capabilities && has_pbr_material && !has_faces_without_pbr;
 
-        LLUICtrl* gltfCtrlTextureScaleU = getChild<LLUICtrl>("gltfTextureScaleU");
-        LLUICtrl* gltfCtrlTextureScaleV = getChild<LLUICtrl>("gltfTextureScaleV");
-        LLUICtrl* gltfCtrlTextureRotation = getChild<LLUICtrl>("gltfTextureRotation");
-        LLUICtrl* gltfCtrlTextureOffsetU = getChild<LLUICtrl>("gltfTextureOffsetU");
-        LLUICtrl* gltfCtrlTextureOffsetV = getChild<LLUICtrl>("gltfTextureOffsetV");
-
-        gltfCtrlTextureScaleU->setEnabled(new_state);
-        gltfCtrlTextureScaleV->setEnabled(new_state);
-        gltfCtrlTextureRotation->setEnabled(new_state);
-        gltfCtrlTextureOffsetU->setEnabled(new_state);
-        gltfCtrlTextureOffsetV->setEnabled(new_state);
+        mPBRScaleU->setEnabled(new_state);
+        mPBRScaleV->setEnabled(new_state);
+        mPBRRotate->setEnabled(new_state);
+        mPBROffsetU->setEnabled(new_state);
+        mPBROffsetV->setEnabled(new_state);
 
         // Control values will be set once per frame in
         // setMaterialOverridesFromSelection
@@ -2022,16 +1939,16 @@ void LLPanelFace::updateVisibilityGLTF(LLViewerObject* objectp /*= nullptr */)
 
     mPBRTextureCtrl->setVisible(show_pbr_render_material_id);
 
-    getChildView("pbr_from_inventory")->setVisible(show_pbr_render_material_id);
-    getChildView("edit_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending);
-    getChildView("save_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending);
-    getChildView("material_permissions_loading_label")->setVisible(show_pbr_render_material_id && inventory_pending);
+    mBtnPbrFromInv->setVisible(show_pbr_render_material_id);
+    mBtnEditBbr->setVisible(show_pbr_render_material_id && !inventory_pending);
+    mBtnSaveBbr->setVisible(show_pbr_render_material_id && !inventory_pending);
+    mLabelMatPermLoading->setVisible(show_pbr_render_material_id && inventory_pending);
 
-    getChildView("gltfTextureScaleU")->setVisible(show_pbr);
-    getChildView("gltfTextureScaleV")->setVisible(show_pbr);
-    getChildView("gltfTextureRotation")->setVisible(show_pbr);
-    getChildView("gltfTextureOffsetU")->setVisible(show_pbr);
-    getChildView("gltfTextureOffsetV")->setVisible(show_pbr);
+    mPBRScaleU->setVisible(show_pbr);
+    mPBRScaleV->setVisible(show_pbr);
+    mPBRRotate->setVisible(show_pbr);
+    mPBROffsetU->setVisible(show_pbr);
+    mPBROffsetV->setVisible(show_pbr);
 }
 
 void LLPanelFace::updateCopyTexButton()
@@ -2061,7 +1978,7 @@ void LLPanelFace::refreshMedia()
         && first_object->permModify()
         ))
     {
-        getChildView("add_media")->setEnabled(false);
+        mAddMedia->setEnabled(false);
         mTitleMediaText->clear();
         clearMediaSettings();
         return;
@@ -2072,7 +1989,7 @@ void LLPanelFace::refreshMedia()
 
     if (!has_media_capability)
     {
-        getChildView("add_media")->setEnabled(false);
+        mAddMedia->setEnabled(false);
         LL_WARNS("LLFloaterToolsMedia") << "Media not enabled (no capability) in this region!" << LL_ENDL;
         clearMediaSettings();
         return;
@@ -2154,7 +2071,7 @@ void LLPanelFace::refreshMedia()
     // update UI depending on whether "object" (prim or face) has media
     // and whether or not you are allowed to edit it.
 
-    getChildView("add_media")->setEnabled(editable);
+    mAddMedia->setEnabled(editable);
     // IF all the faces have media (or all dont have media)
     if (LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo)
     {
@@ -2176,7 +2093,7 @@ void LLPanelFace::refreshMedia()
             media_title = multi_media_info_str;
         }
 
-        getChildView("delete_media")->setEnabled(bool_has_media && editable);
+        mDelMedia->setEnabled(bool_has_media && editable);
         // TODO: display a list of all media on the face - use 'identical' flag
     }
     else // not all face has media but at least one does.
@@ -2198,7 +2115,7 @@ void LLPanelFace::refreshMedia()
             }
         }
 
-        getChildView("delete_media")->setEnabled(true);
+        mDelMedia->setEnabled(true);
     }
 
     U32 materials_media = mComboMatMedia->getCurrentIndex();
@@ -2862,9 +2779,7 @@ void LLPanelFace::onCommitMaterialsMedia()
 
 void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
 {
-    LLComboBox* combo_shininess = findChild<LLComboBox>("combobox shininess");
-    LLComboBox* combo_bumpiness = findChild<LLComboBox>("combobox bumpiness");
-    if (!mRadioMaterialType || !mRadioPbrType || !mComboMatMedia || !combo_shininess || !combo_bumpiness)
+    if (!mRadioMaterialType || !mRadioPbrType)
     {
         LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;
         return;
@@ -2884,53 +2799,53 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     mRadioMaterialType->setVisible(show_material);
 
     // Shared material controls
-    getChildView("checkbox_sync_settings")->setVisible(show_material || show_media);
-    getChildView("tex gen")->setVisible(show_material || show_media || show_pbr_asset);
+    mCheckSyncSettings->setVisible(show_material || show_media);
+    mLabelTexGen->setVisible(show_material || show_media || show_pbr_asset);
     mComboTexGen->setVisible(show_material || show_media || show_pbr_asset);
-    getChildView("button align textures")->setVisible(show_material || show_media);
+    mBtnAlignTex->setVisible(show_material || show_media);
 
     // Media controls
     mTitleMediaText->setVisible(show_media);
-    getChildView("add_media")->setVisible(show_media);
-    getChildView("delete_media")->setVisible(show_media);
-    getChildView("button align")->setVisible(show_media);
+    mAddMedia->setVisible(show_media);
+    mDelMedia->setVisible(show_media);
+    mBtnAlign->setVisible(show_media);
 
     // Diffuse texture controls
     mTextureCtrl->setVisible(show_texture && show_material);
-    getChildView("label alphamode")->setVisible(show_texture && show_material);
-    getChildView("combobox alphamode")->setVisible(show_texture && show_material);
-    getChildView("label maskcutoff")->setVisible(false);
-    getChildView("maskcutoff")->setVisible(false);
+    mLabelAlphaMode->setVisible(show_texture && show_material);
+    mComboAlphaMode->setVisible(show_texture && show_material);
+    mLabelMaskCutoff->setVisible(false);
+    mMaskCutoff->setVisible(false);
     if (show_texture && show_material)
     {
         updateAlphaControls();
     }
     // texture scale and position controls
-    getChildView("TexScaleU")->setVisible(show_texture);
-    getChildView("TexScaleV")->setVisible(show_texture);
-    getChildView("TexRot")->setVisible(show_texture);
-    getChildView("TexOffsetU")->setVisible(show_texture);
-    getChildView("TexOffsetV")->setVisible(show_texture);
+    mTexScaleU->setVisible(show_texture);
+    mTexScaleV->setVisible(show_texture);
+    mTexRotate->setVisible(show_texture);
+    mTexOffsetU->setVisible(show_texture);
+    mTexOffsetV->setVisible(show_texture);
 
     // Specular map controls
     mShinyTextureCtrl->setVisible(show_shininess);
-    getChildView("combobox shininess")->setVisible(show_shininess);
-    getChildView("label shininess")->setVisible(show_shininess);
-    getChildView("label glossiness")->setVisible(false);
-    getChildView("glossiness")->setVisible(false);
-    getChildView("label environment")->setVisible(false);
-    getChildView("environment")->setVisible(false);
-    getChildView("label shinycolor")->setVisible(false);
+    mComboShininess->setVisible(show_shininess);
+    mLabelShininess->setVisible(show_shininess);
+    mLabelGlossiness->setVisible(false);
+    mGlossiness->setVisible(false);
+    mLabelEnvironment->setVisible(false);
+    mEnvironment->setVisible(false);
+    mLabelShiniColor->setVisible(false);
     mShinyColorSwatch->setVisible(false);
     if (show_shininess)
     {
         updateShinyControls();
     }
-    getChildView("shinyScaleU")->setVisible(show_shininess);
-    getChildView("shinyScaleV")->setVisible(show_shininess);
-    getChildView("shinyRot")->setVisible(show_shininess);
-    getChildView("shinyOffsetU")->setVisible(show_shininess);
-    getChildView("shinyOffsetV")->setVisible(show_shininess);
+    mShinyScaleU->setVisible(show_shininess);
+    mShinyScaleV->setVisible(show_shininess);
+    mShinyRotate->setVisible(show_shininess);
+    mShinyOffsetU->setVisible(show_shininess);
+    mShinyOffsetV->setVisible(show_shininess);
 
     // Normal map controls
     if (show_bumpiness)
@@ -2938,15 +2853,15 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
         updateBumpyControls();
     }
     mBumpyTextureCtrl->setVisible(show_bumpiness);
-    getChildView("combobox bumpiness")->setVisible(show_bumpiness);
-    getChildView("label bumpiness")->setVisible(show_bumpiness);
-    getChildView("bumpyScaleU")->setVisible(show_bumpiness);
-    getChildView("bumpyScaleV")->setVisible(show_bumpiness);
-    getChildView("bumpyRot")->setVisible(show_bumpiness);
-    getChildView("bumpyOffsetU")->setVisible(show_bumpiness);
-    getChildView("bumpyOffsetV")->setVisible(show_bumpiness);
+    mComboBumpiness->setVisible(show_bumpiness);
+    mLabelBumpiness->setVisible(show_bumpiness);
+    mBumpyScaleU->setVisible(show_bumpiness);
+    mBumpyScaleV->setVisible(show_bumpiness);
+    mBumpyRotate->setVisible(show_bumpiness);
+    mBumpyOffsetU->setVisible(show_bumpiness);
+    mBumpyOffsetV->setVisible(show_bumpiness);
 
-    getChild<LLSpinCtrl>("rptctrl")->setVisible(show_material || show_media);
+    mTexRepeat->setVisible(show_material || show_media);
 
     // PBR controls
     updateVisibilityGLTF(objectp);
@@ -2972,7 +2887,7 @@ void LLPanelFace::onCommitPbrType()
 
 void LLPanelFace::onCommitBump()
 {
-    sendBump(getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex());
+    sendBump(mComboBumpiness->getCurrentIndex());
 }
 
 void LLPanelFace::onCommitTexGen()
@@ -2984,33 +2899,32 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
 {
     LLUUID shiny_texture_ID = mShinyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "Shiny texture selected: " << shiny_texture_ID << LL_ENDL;
-    LLComboBox* comboShiny = getChild<LLComboBox>("combobox shininess");
 
     if (mess_with_shiny_combobox)
     {
         if (!shiny_texture_ID.isNull() && is_setting_texture)
         {
-            if (!comboShiny->itemExists(USE_TEXTURE))
+            if (!mComboShininess->itemExists(USE_TEXTURE))
             {
-                comboShiny->add(USE_TEXTURE);
+                mComboShininess->add(USE_TEXTURE);
             }
-            comboShiny->setSimple(USE_TEXTURE);
+            mComboShininess->setSimple(USE_TEXTURE);
         }
         else
         {
-            if (comboShiny->itemExists(USE_TEXTURE))
+            if (mComboShininess->itemExists(USE_TEXTURE))
             {
-                comboShiny->remove(SHINY_TEXTURE);
-                comboShiny->selectFirstItem();
+                mComboShininess->remove(SHINY_TEXTURE);
+                mComboShininess->selectFirstItem();
             }
         }
     }
     else
     {
-        if (shiny_texture_ID.isNull() && comboShiny->itemExists(USE_TEXTURE))
+        if (shiny_texture_ID.isNull() && mComboShininess->itemExists(USE_TEXTURE))
         {
-            comboShiny->remove(SHINY_TEXTURE);
-            comboShiny->selectFirstItem();
+            mComboShininess->remove(SHINY_TEXTURE);
+            mComboShininess->selectFirstItem();
         }
     }
 
@@ -3018,13 +2932,13 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
     U32 material_type = mRadioMaterialType->getSelectedIndex();
     bool show_material = (materials_media == MATMEDIA_MATERIAL);
     bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
-    U32 shiny_value = comboShiny->getCurrentIndex();
+    U32 shiny_value = mComboShininess->getCurrentIndex();
     bool show_shinyctrls = (shiny_value == SHINY_TEXTURE) && show_shininess; // Use texture
-    getChildView("label glossiness")->setVisible(show_shinyctrls);
-    getChildView("glossiness")->setVisible(show_shinyctrls);
-    getChildView("label environment")->setVisible(show_shinyctrls);
-    getChildView("environment")->setVisible(show_shinyctrls);
-    getChildView("label shinycolor")->setVisible(show_shinyctrls);
+    mLabelGlossiness->setVisible(show_shinyctrls);
+    mGlossiness->setVisible(show_shinyctrls);
+    mLabelEnvironment->setVisible(show_shinyctrls);
+    mEnvironment->setVisible(show_shinyctrls);
+    mLabelShiniColor->setVisible(show_shinyctrls);
     mShinyColorSwatch->setVisible(show_shinyctrls);
 }
 
@@ -3032,24 +2946,23 @@ void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_co
 {
     LLUUID bumpy_texture_ID = mBumpyTextureCtrl->getImageAssetID();
     LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;
-    LLComboBox* comboBumpy = getChild<LLComboBox>("combobox bumpiness");
 
     if (mess_with_combobox)
     {
         if (!bumpy_texture_ID.isNull() && is_setting_texture)
         {
-            if (!comboBumpy->itemExists(USE_TEXTURE))
+            if (!mComboBumpiness->itemExists(USE_TEXTURE))
             {
-                comboBumpy->add(USE_TEXTURE);
+                mComboBumpiness->add(USE_TEXTURE);
             }
-            comboBumpy->setSimple(USE_TEXTURE);
+            mComboBumpiness->setSimple(USE_TEXTURE);
         }
         else
         {
-            if (comboBumpy->itemExists(USE_TEXTURE))
+            if (mComboBumpiness->itemExists(USE_TEXTURE))
             {
-                comboBumpy->remove(BUMPY_TEXTURE);
-                comboBumpy->selectFirstItem();
+                mComboBumpiness->remove(BUMPY_TEXTURE);
+                mComboBumpiness->selectFirstItem();
             }
         }
     }
@@ -3057,12 +2970,12 @@ void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_co
 
 void LLPanelFace::onCommitShiny()
 {
-    sendShiny(getChild<LLComboBox>("combobox shininess")->getCurrentIndex());
+    sendShiny(mComboShininess->getCurrentIndex());
 }
 
 void LLPanelFace::updateAlphaControls()
 {
-    U32 alpha_value = getChild<LLComboBox>("combobox alphamode")->getCurrentIndex();
+    U32 alpha_value = mComboAlphaMode->getCurrentIndex();
     bool show_alphactrls = (alpha_value == ALPHAMODE_MASK); // Alpha masking
 
     U32 mat_media = mComboMatMedia->getCurrentIndex();
@@ -3071,8 +2984,8 @@ void LLPanelFace::updateAlphaControls()
     show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL);
     show_alphactrls = show_alphactrls && (mat_type == MATTYPE_DIFFUSE);
 
-    getChildView("label maskcutoff")->setVisible(show_alphactrls);
-    getChildView("maskcutoff")->setVisible(show_alphactrls);
+    mLabelMaskCutoff->setVisible(show_alphactrls);
+    mMaskCutoff->setVisible(show_alphactrls);
 }
 
 void LLPanelFace::onCommitAlphaMode()
@@ -3206,7 +3119,7 @@ void LLPanelFace::onSelectTexture()
             break;
         }
 
-        childGetSelectionInterface("combobox alphamode")->selectNthItem(alpha_mode);
+        mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
     }
 
     LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode());
@@ -3337,7 +3250,7 @@ void LLPanelFace::syncOffsetX(F32 offsetU)
 {
     LLSelectedTEMaterial::setNormalOffsetX(this, offsetU);
     LLSelectedTEMaterial::setSpecularOffsetX(this, offsetU);
-    getChild<LLSpinCtrl>("TexOffsetU")->forceSetValue(LLSD(offsetU));
+    mTexOffsetU->forceSetValue(LLSD(offsetU));
     sendTextureInfo();
 }
 
@@ -3345,7 +3258,7 @@ void LLPanelFace::syncOffsetY(F32 offsetV)
 {
     LLSelectedTEMaterial::setNormalOffsetY(this, offsetV);
     LLSelectedTEMaterial::setSpecularOffsetY(this, offsetV);
-    getChild<LLSpinCtrl>("TexOffsetV")->forceSetValue(LLSD(offsetV));
+    mTexOffsetV->forceSetValue(LLSD(offsetV));
     sendTextureInfo();
 }
 
@@ -3421,7 +3334,7 @@ void LLPanelFace::onCommitMaterialBumpyScaleX()
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(getCurrentBumpyScaleU());
+        mTexScaleU->forceSetValue(LLSD(getCurrentBumpyScaleU()));
         syncRepeatX(bumpy_scale_u);
     }
     else
@@ -3440,7 +3353,7 @@ void LLPanelFace::onCommitMaterialBumpyScaleY()
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(getCurrentBumpyScaleV());
+        mTexScaleV->forceSetValue(LLSD(getCurrentBumpyScaleV()));
         syncRepeatY(bumpy_scale_v);
     }
     else
@@ -3459,7 +3372,7 @@ void LLPanelFace::onCommitMaterialShinyScaleX()
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(LLSD(getCurrentShinyScaleU()));
+        mTexScaleU->forceSetValue(LLSD(getCurrentShinyScaleU()));
         syncRepeatX(shiny_scale_u);
     }
     else
@@ -3478,7 +3391,7 @@ void LLPanelFace::onCommitMaterialShinyScaleY()
 
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(LLSD(getCurrentShinyScaleV()));
+        mTexScaleV->forceSetValue(LLSD(getCurrentShinyScaleV()));
         syncRepeatY(shiny_scale_v);
     }
     else
@@ -3498,12 +3411,12 @@ void LLPanelFace::onCommitMaterialBumpyRot()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexRot")->forceSetValue(LLSD(getCurrentBumpyRot()));
+        mTexRotate->forceSetValue(LLSD(getCurrentBumpyRot()));
         syncMaterialRot(getCurrentBumpyRot());
     }
     else
     {
-        if (childGetValue("checkbox planar align").asBoolean())
+        if (mPlanarAlign->getValue().asBoolean())
         {
             LLFace* last_face = NULL;
             bool identical_face = false;
@@ -3522,12 +3435,12 @@ void LLPanelFace::onCommitMaterialShinyRot()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        getChild<LLSpinCtrl>("TexRot")->forceSetValue(LLSD(getCurrentShinyRot()));
+        mTexRotate->forceSetValue(LLSD(getCurrentShinyRot()));
         syncMaterialRot(getCurrentShinyRot());
     }
     else
     {
-        if (childGetValue("checkbox planar align").asBoolean())
+        if (mPlanarAlign->getValue().asBoolean())
         {
             LLFace* last_face = NULL;
             bool identical_face = false;
@@ -3568,7 +3481,7 @@ void LLPanelFace::onCommitTextureScaleX()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_u = (F32)getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
+        F32 bumpy_scale_u = (F32)mTexScaleU->getValue().asReal();
         if (isIdenticalPlanarTexgen())
         {
             bumpy_scale_u *= 0.5f;
@@ -3586,7 +3499,7 @@ void LLPanelFace::onCommitTextureScaleY()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        F32 bumpy_scale_v = (F32)getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
+        F32 bumpy_scale_v = (F32)mTexScaleV->getValue().asReal();
         if (isIdenticalPlanarTexgen())
         {
             bumpy_scale_v *= 0.5f;
@@ -3604,7 +3517,7 @@ void LLPanelFace::onCommitTextureRot()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncMaterialRot((F32)getChild<LLUICtrl>("TexRot")->getValue().asReal());
+        syncMaterialRot((F32)mTexRotate->getValue().asReal());
     }
     else
     {
@@ -3617,7 +3530,7 @@ void LLPanelFace::onCommitTextureOffsetX()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetX((F32)getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
+        syncOffsetX((F32)mTexOffsetU->getValue().asReal());
     }
     else
     {
@@ -3630,7 +3543,7 @@ void LLPanelFace::onCommitTextureOffsetY()
 {
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
-        syncOffsetY((F32)getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
+        syncOffsetY((F32)mTexOffsetV->getValue().asReal());
     }
     else
     {
@@ -3642,7 +3555,7 @@ void LLPanelFace::onCommitTextureOffsetY()
 // Commit the number of repeats per meter
 void LLPanelFace::onCommitRepeatsPerMeter()
 {
-    F32 repeats_per_meter = (F32)getChild<LLUICtrl>("rptctrl")->getValue().asReal();
+    F32 repeats_per_meter = (F32)mTexRepeat->getValue().asReal();
 
     F32 obj_scale_s = 1.0f;
     F32 obj_scale_t = 1.0f;
@@ -3653,23 +3566,18 @@ void LLPanelFace::onCommitRepeatsPerMeter()
     LLSelectedTE::getObjectScaleS(obj_scale_s, identical_scale_s);
     LLSelectedTE::getObjectScaleS(obj_scale_t, identical_scale_t);
 
-    LLUICtrl* bumpy_scale_u = getChild<LLUICtrl>("bumpyScaleU");
-    LLUICtrl* bumpy_scale_v = getChild<LLUICtrl>("bumpyScaleV");
-    LLUICtrl* shiny_scale_u = getChild<LLUICtrl>("shinyScaleU");
-    LLUICtrl* shiny_scale_v = getChild<LLUICtrl>("shinyScaleV");
-
     if (gSavedSettings.getBOOL("SyncMaterialSettings"))
     {
         LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
 
-        bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
-        bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
+        mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+        mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
 
         LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
         LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
 
-        shiny_scale_u->setValue(obj_scale_s * repeats_per_meter);
-        shiny_scale_v->setValue(obj_scale_t * repeats_per_meter);
+        mShinyScaleU->setValue(obj_scale_s * repeats_per_meter);
+        mShinyScaleV->setValue(obj_scale_t * repeats_per_meter);
 
         LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
         LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
@@ -3683,15 +3591,15 @@ void LLPanelFace::onCommitRepeatsPerMeter()
             LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
             break;
         case MATTYPE_NORMAL:
-            bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
-            bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
+            mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+            mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
 
             LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
             LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
             break;
         case MATTYPE_SPECULAR:
-            bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
-            bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
+            mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+            mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
 
             LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
             LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
@@ -3701,7 +3609,6 @@ void LLPanelFace::onCommitRepeatsPerMeter()
             break;
         }
     }
-
     // vertical scale and repeats per meter depends on each other, so force set on changes
     updateUI(true);
 }
@@ -4737,23 +4644,17 @@ void LLPanelFace::setMaterialOverridesFromSelection()
         }
     }
 
-    LLUICtrl* gltfCtrlTextureScaleU = getChild<LLUICtrl>("gltfTextureScaleU");
-    LLUICtrl* gltfCtrlTextureScaleV = getChild<LLUICtrl>("gltfTextureScaleV");
-    LLUICtrl* gltfCtrlTextureRotation = getChild<LLUICtrl>("gltfTextureRotation");
-    LLUICtrl* gltfCtrlTextureOffsetU = getChild<LLUICtrl>("gltfTextureOffsetU");
-    LLUICtrl* gltfCtrlTextureOffsetV = getChild<LLUICtrl>("gltfTextureOffsetV");
-
-    gltfCtrlTextureScaleU->setValue(transform.mScale[VX]);
-    gltfCtrlTextureScaleV->setValue(transform.mScale[VY]);
-    gltfCtrlTextureRotation->setValue(transform.mRotation * RAD_TO_DEG);
-    gltfCtrlTextureOffsetU->setValue(transform.mOffset[VX]);
-    gltfCtrlTextureOffsetV->setValue(transform.mOffset[VY]);
+    mPBRScaleU->setValue(transform.mScale[VX]);
+    mPBRScaleV->setValue(transform.mScale[VY]);
+    mPBRRotate->setValue(transform.mRotation * RAD_TO_DEG);
+    mPBROffsetU->setValue(transform.mOffset[VX]);
+    mPBROffsetV->setValue(transform.mOffset[VY]);
 
-    gltfCtrlTextureScaleU->setTentative(!scale_u_same);
-    gltfCtrlTextureScaleV->setTentative(!scale_v_same);
-    gltfCtrlTextureRotation->setTentative(!rotation_same);
-    gltfCtrlTextureOffsetU->setTentative(!offset_u_same);
-    gltfCtrlTextureOffsetV->setTentative(!offset_v_same);
+    mPBRScaleU->setTentative(!scale_u_same);
+    mPBRScaleV->setTentative(!scale_v_same);
+    mPBRRotate->setTentative(!rotation_same);
+    mPBROffsetU->setTentative(!offset_u_same);
+    mPBROffsetV->setTentative(!offset_v_same);
 }
 
 void LLPanelFace::Selection::connect()
@@ -4832,7 +4733,7 @@ bool LLPanelFace::Selection::compareSelection()
 
 void LLPanelFace::onCommitGLTFTextureScaleU()
 {
-    F32 value = (F32)getChild<LLUICtrl>("gltfTextureScaleU")->getValue().asReal();
+    F32 value = (F32)mPBRScaleU->getValue().asReal();
     updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VX] = value;
@@ -4841,7 +4742,7 @@ void LLPanelFace::onCommitGLTFTextureScaleU()
 
 void LLPanelFace::onCommitGLTFTextureScaleV()
 {
-    F32 value = (F32)getChild<LLUICtrl>("gltfTextureScaleV")->getValue().asReal();
+    F32 value = (F32)mPBRScaleV->getValue().asReal();
     updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mScale.mV[VY] = value;
@@ -4850,7 +4751,7 @@ void LLPanelFace::onCommitGLTFTextureScaleV()
 
 void LLPanelFace::onCommitGLTFRotation()
 {
-    F32 value = (F32)getChild<LLUICtrl>("gltfTextureRotation")->getValue().asReal() * DEG_TO_RAD;
+    F32 value = (F32)mPBRRotate->getValue().asReal() * DEG_TO_RAD;
     updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mRotation = value;
@@ -4859,7 +4760,7 @@ void LLPanelFace::onCommitGLTFRotation()
 
 void LLPanelFace::onCommitGLTFTextureOffsetU()
 {
-    F32 value = (F32)getChild<LLUICtrl>("gltfTextureOffsetU")->getValue().asReal();
+    F32 value = (F32)mPBROffsetU->getValue().asReal();
     updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VX] = value;
@@ -4868,7 +4769,7 @@ void LLPanelFace::onCommitGLTFTextureOffsetU()
 
 void LLPanelFace::onCommitGLTFTextureOffsetV()
 {
-    F32 value = (F32)getChild<LLUICtrl>("gltfTextureOffsetV")->getValue().asReal();
+    F32 value = (F32)mPBROffsetV->getValue().asReal();
     updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
     {
         new_transform->mOffset.mV[VY] = value;
@@ -4884,42 +4785,39 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
     switch (mattype)
     {
         case MATTYPE_SPECULAR:
-            texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
+            texture_ctrl = mShinyTextureCtrl;
             break;
         case MATTYPE_NORMAL:
-            texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control");
+            texture_ctrl = mBumpyTextureCtrl;
             break;
         default:
-            texture_ctrl = getChild<LLTextureCtrl>("texture control");
+            texture_ctrl = mTextureCtrl;
     }
 
-    if (texture_ctrl)
-    {
-        LLUUID obj_owner_id;
-        std::string obj_owner_name;
-        LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name);
+    LLUUID obj_owner_id;
+    std::string obj_owner_name;
+    LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name);
 
-        LLSaleInfo sale_info;
-        LLSelectMgr::instance().selectGetSaleInfo(sale_info);
+    LLSaleInfo sale_info;
+    LLSelectMgr::instance().selectGetSaleInfo(sale_info);
 
-        bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture?
-        bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture?
-        bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent?
-        bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale?
+    bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture?
+    bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture?
+    bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent?
+    bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale?
 
-        if (can_copy && can_transfer)
-        {
-            texture_ctrl->setCanApply(true, true);
-            return;
-        }
+    if (can_copy && can_transfer)
+    {
+        texture_ctrl->setCanApply(true, true);
+        return;
+    }
 
-        // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale
-        texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
+    // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale
+    texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
 
-        if (gSavedSettings.getBOOL("TextureLivePreview"))
-        {
-            LLNotificationsUtil::add("LivePreviewUnavailable");
-        }
+    if (gSavedSettings.getBOOL("TextureLivePreview"))
+    {
+        LLNotificationsUtil::add("LivePreviewUnavailable");
     }
 }
 
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index ede2ef9339..e90453c564 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -290,27 +290,77 @@ private:
     F32     getCurrentShinyOffsetU();
     F32     getCurrentShinyOffsetV();
 
-    LLTextureCtrl* mPBRTextureCtrl = nullptr;
-    LLTextureCtrl* mTextureCtrl = nullptr;
-    LLTextureCtrl* mShinyTextureCtrl = nullptr;
-    LLTextureCtrl* mBumpyTextureCtrl = nullptr;
-    LLColorSwatchCtrl* mColorSwatch = nullptr;
-    LLColorSwatchCtrl* mShinyColorSwatch = nullptr;
-
-    LLComboBox* mComboTexGen = nullptr;
-
-    LLRadioGroup* mRadioMaterialType = nullptr;
-    LLRadioGroup* mRadioPbrType = nullptr;
-
-    LLCheckBoxCtrl* mCheckFullbright = nullptr;
-
-    LLTextBox* mLabelColorTransp = nullptr;
-    LLSpinCtrl* mCtrlColorTransp = nullptr;       // transparency = 1 - alpha
-
-    LLSpinCtrl* mCtrlGlow = nullptr;
-    LLComboBox *mComboMatMedia = nullptr;
-    LLMediaCtrl *mTitleMedia = nullptr;
-    LLTextBox *mTitleMediaText = nullptr;
+    LLTextureCtrl* mPBRTextureCtrl { nullptr };
+    LLTextureCtrl* mTextureCtrl { nullptr };
+    LLTextureCtrl* mShinyTextureCtrl { nullptr };
+    LLTextureCtrl* mBumpyTextureCtrl { nullptr };
+    LLTextBox* mLabelColor { nullptr };
+    LLColorSwatchCtrl* mColorSwatch { nullptr };
+    LLTextBox* mLabelShiniColor { nullptr };
+    LLColorSwatchCtrl* mShinyColorSwatch { nullptr };
+
+    LLTextBox* mLabelTexGen { nullptr };
+    LLComboBox* mComboTexGen { nullptr };
+
+    LLRadioGroup* mRadioMaterialType { nullptr };
+    LLRadioGroup* mRadioPbrType { nullptr };
+
+    LLCheckBoxCtrl* mCheckFullbright { nullptr };
+
+    LLTextBox* mLabelColorTransp { nullptr };
+    LLSpinCtrl* mCtrlColorTransp { nullptr }; // transparency = 1 - alpha
+
+    LLTextBox* mLabelGlow { nullptr };
+    LLSpinCtrl* mCtrlGlow { nullptr };
+    LLComboBox* mComboMatMedia { nullptr };
+    LLMediaCtrl* mTitleMedia { nullptr };
+    LLTextBox* mTitleMediaText { nullptr };
+
+    LLTextBox* mLabelMatPermLoading { nullptr };
+    LLCheckBoxCtrl* mCheckSyncSettings { nullptr };
+
+    LLTextBox* mLabelBumpiness { nullptr };
+    LLComboBox* mComboBumpiness { nullptr };
+    LLTextBox* mLabelShininess { nullptr };
+    LLComboBox* mComboShininess { nullptr };
+    LLTextBox* mLabelAlphaMode { nullptr };
+    LLComboBox* mComboAlphaMode { nullptr };
+    LLSpinCtrl* mTexScaleU { nullptr };
+    LLSpinCtrl* mTexScaleV { nullptr };
+    LLSpinCtrl* mTexRotate { nullptr };
+    LLSpinCtrl* mTexRepeat { nullptr };
+    LLSpinCtrl* mTexOffsetU { nullptr };
+    LLSpinCtrl* mTexOffsetV { nullptr };
+    LLCheckBoxCtrl* mPlanarAlign{ nullptr };
+    LLSpinCtrl* mBumpyScaleU { nullptr };
+    LLSpinCtrl* mBumpyScaleV { nullptr };
+    LLSpinCtrl* mBumpyRotate { nullptr };
+    LLSpinCtrl* mBumpyOffsetU { nullptr };
+    LLSpinCtrl* mBumpyOffsetV { nullptr };
+    LLSpinCtrl* mShinyScaleU { nullptr };
+    LLSpinCtrl* mShinyScaleV { nullptr };
+    LLSpinCtrl* mShinyRotate { nullptr };
+    LLSpinCtrl* mShinyOffsetU { nullptr };
+    LLSpinCtrl* mShinyOffsetV { nullptr };
+    LLTextBox* mLabelGlossiness { nullptr };
+    LLSpinCtrl* mGlossiness { nullptr };
+    LLTextBox* mLabelEnvironment { nullptr };
+    LLSpinCtrl* mEnvironment { nullptr };
+    LLTextBox* mLabelMaskCutoff { nullptr };
+    LLSpinCtrl* mMaskCutoff { nullptr };
+    LLButton* mAddMedia { nullptr };
+    LLButton* mDelMedia { nullptr };
+    LLSpinCtrl* mPBRScaleU { nullptr };
+    LLSpinCtrl* mPBRScaleV { nullptr };
+    LLSpinCtrl* mPBRRotate { nullptr };
+    LLSpinCtrl* mPBROffsetU { nullptr };
+    LLSpinCtrl* mPBROffsetV { nullptr };
+
+    LLButton* mBtnAlign { nullptr };
+    LLButton* mBtnAlignTex { nullptr };
+    LLButton* mBtnPbrFromInv { nullptr };
+    LLButton* mBtnEditBbr { nullptr };
+    LLButton* mBtnSaveBbr { nullptr };
 
     // Update visibility of controls to match current UI mode
     // (e.g. materials vs media editing)
@@ -322,6 +372,20 @@ private:
     // Hey look everyone, a type-safe alternative to copy and paste! :)
     //
 
+    template<class T>
+    void getChildSetCommitCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
+    {
+        ctrl = this->getChild<T>(name);
+        ctrl->setCommitCallback(cb);
+    }
+
+    template<class T>
+    void getChildSetClickedCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
+    {
+        ctrl = this->getChild<T>(name);
+        ctrl->setClickedCallback(cb);
+    }
+
     // Update material parameters by applying 'edit_func' to selected TEs
     //
     template<
@@ -636,6 +700,8 @@ public:
         DEF_GET_TE_STATE(LLTextureEntry::e_texgen,LLTextureEntry::e_texgen,getTexGen,LLTextureEntry::TEX_GEN_DEFAULT, false, LLTextureEntry::TEX_GEN_DEFAULT)
         DEF_GET_TE_STATE(LLColor4,const LLColor4&,getColor,LLColor4::white, false, LLColor4::black);
     };
+
+    friend struct LLPanelFaceSetTEFunctor;
 };
 
 #endif
-- 
cgit v1.2.3


From e20e387d481513e4e7eed570d224da19aa532fb8 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 7 Aug 2024 19:13:40 +0200
Subject: #1922 Make PBR scale and offset crosshair work (fix PBR channels in
 LLPanelFace)

---
 indra/newview/llpanelface.cpp | 112 +++++++++++++++++++++++++-----------------
 indra/newview/llpanelface.h   |   3 ++
 2 files changed, 71 insertions(+), 44 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 936ca273c3..94674dc557 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -117,26 +117,23 @@ const S32 PBRTYPE_METALLIC_ROUGHNESS = 2; // PBR Metallic
 const S32 PBRTYPE_EMISSIVE = 3;     // PBR Emissive
 const S32 PBRTYPE_NORMAL = 4;       // PBR Normal
 
-LLGLTFMaterial::TextureInfo texture_info_from_pbrtype(S32 pbr_type)
+LLGLTFMaterial::TextureInfo LLPanelFace::getPBRTextureInfo()
 {
-    switch (pbr_type)
+    // Radiogroup [ "Complete material", "Base color", "Metallic/roughness", "Emissive", "Normal" ]
+    S32 radio_group_index = mRadioPbrType->getSelectedIndex();
+    switch (radio_group_index)
     {
     case PBRTYPE_BASE_COLOR:
         return LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
-        break;
     case PBRTYPE_NORMAL:
         return LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL;
-        break;
     case PBRTYPE_METALLIC_ROUGHNESS:
         return LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS;
-        break;
     case PBRTYPE_EMISSIVE:
         return LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE;
-        break;
-    default:
-        return LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
-        break;
     }
+    // The default value is used as a fallback
+    return LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
 }
 
 void LLPanelFace::updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func)
@@ -195,43 +192,77 @@ std::string USE_TEXTURE;
 
 LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit()
 {
-    LLRender::eTexIndex channel_to_edit = LLRender::DIFFUSE_MAP;
-    if (mComboMatMedia)
+    S32 matmedia_selection = mComboMatMedia->getCurrentIndex();
+    switch (matmedia_selection)
     {
-        U32 matmedia_selection = mComboMatMedia->getCurrentIndex();
-        if (matmedia_selection == MATMEDIA_MATERIAL)
-        {
-            channel_to_edit = (LLRender::eTexIndex)mRadioMaterialType->getSelectedIndex();
-        }
-        if (matmedia_selection == MATMEDIA_PBR)
-        {
-            channel_to_edit = (LLRender::eTexIndex)mRadioPbrType->getSelectedIndex();
-        }
+    case MATMEDIA_MATERIAL:
+        return getMatTextureChannel();
+    case MATMEDIA_PBR:
+        return getPBRTextureChannel();
+    }
+    return (LLRender::eTexIndex)0;
+}
+
+LLRender::eTexIndex LLPanelFace::getMatTextureChannel()
+{
+    // Radiogroup [ "Texture (diffuse)", "Bumpiness (normal)", "Shininess (specular)" ]
+    S32 radio_group_index = mRadioMaterialType->getSelectedIndex();
+    switch (radio_group_index)
+    {
+    case MATTYPE_DIFFUSE: // "Texture (diffuse)"
+        return LLRender::DIFFUSE_MAP;
+    case MATTYPE_NORMAL: // "Bumpiness (normal)"
+        if (getCurrentNormalMap().notNull())
+            return LLRender::NORMAL_MAP;
+        break;
+    case MATTYPE_SPECULAR: // "Shininess (specular)"
+        if (getCurrentNormalMap().notNull())
+            return LLRender::SPECULAR_MAP;
+        break;
     }
+    // The default value is used as a fallback if no required texture is chosen
+    return (LLRender::eTexIndex)0;
+}
 
-    channel_to_edit = (channel_to_edit == LLRender::NORMAL_MAP)     ? (getCurrentNormalMap().isNull()       ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
-    channel_to_edit = (channel_to_edit == LLRender::SPECULAR_MAP)   ? (getCurrentSpecularMap().isNull()     ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
-    return channel_to_edit;
+LLRender::eTexIndex LLPanelFace::getPBRTextureChannel()
+{
+    // Radiogroup [ "Complete material", "Base color", "Metallic/roughness", "Emissive", "Normal" ]
+    S32 radio_group_index = mRadioPbrType->getSelectedIndex();
+    switch (radio_group_index)
+    {
+    case PBRTYPE_RENDER_MATERIAL_ID: // "Complete material"
+        return LLRender::NUM_TEXTURE_CHANNELS;
+    case PBRTYPE_BASE_COLOR: // "Base color"
+        return LLRender::BASECOLOR_MAP;
+    case PBRTYPE_METALLIC_ROUGHNESS: // "Metallic/roughness"
+        return LLRender::METALLIC_ROUGHNESS_MAP;
+    case PBRTYPE_EMISSIVE: // "Emissive"
+        return LLRender::EMISSIVE_MAP;
+    case PBRTYPE_NORMAL: // "Normal"
+        return LLRender::GLTF_NORMAL_MAP;
+    }
+    // The default value is used as a fallback
+    return LLRender::NUM_TEXTURE_CHANNELS;
 }
 
 LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
 {
-    if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)
+    if (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)
     {
-        return LLRender::eTexIndex(mRadioMaterialType->getSelectedIndex());
+        return getMatTextureChannel();
     }
 
-    return LLRender::eTexIndex(MATTYPE_DIFFUSE);
+    return (LLRender::eTexIndex)0;
 }
 
 LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
 {
     if (mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
     {
-        return texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
+        return getPBRTextureInfo();
     }
 
-    return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
+    return (LLGLTFMaterial::TextureInfo)0;
 }
 
 // Things the UI provides...
@@ -388,29 +419,23 @@ bool LLPanelFace::postBuild()
     mCtrlColorTransp->setFollowsTop();
     mCtrlColorTransp->setFollowsLeft();
 
-    mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
-    mCheckFullbright->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
+    getChildSetCommitCallback(mCheckFullbright, "checkbox fullbright", [&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
 
     mLabelTexGen = getChild<LLTextBox>("tex gen");
-    mComboTexGen = getChild<LLComboBox>("combobox texgen");
-    mComboTexGen->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
+    getChildSetCommitCallback(mComboTexGen, "combobox texgen", [&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
     mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
 
-    mComboMatMedia = getChild<LLComboBox>("combobox matmedia");
-    mComboMatMedia->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
+    getChildSetCommitCallback(mComboMatMedia, "combobox matmedia", [&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
     mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
 
-    mRadioMaterialType = getChild<LLRadioGroup>("radio_material_type");
-    mRadioMaterialType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
+    getChildSetCommitCallback(mRadioMaterialType, "radio_material_type", [&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
     mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
 
-    mRadioPbrType = getChild<LLRadioGroup>("radio_pbr_type");
-    mRadioPbrType->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
+    getChildSetCommitCallback(mRadioPbrType, "radio_pbr_type", [&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
     mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
 
     mLabelGlow = getChild<LLTextBox>("glow label");
-    mCtrlGlow = getChild<LLSpinCtrl>("glow");
-    mCtrlGlow->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
+    getChildSetCommitCallback(mCtrlGlow, "glow", [&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
 
     mMenuClipboardColor = getChild<LLMenuButton>("clipboard_color_params_btn");
     mMenuClipboardTexture = getChild<LLMenuButton>("clipboard_texture_params_btn");
@@ -2792,8 +2817,7 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
     bool show_bumpiness = show_material && (material_type == MATTYPE_NORMAL) && mComboMatMedia->getEnabled();
     bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
     const bool show_pbr = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR && mComboMatMedia->getEnabled();
-    const U32 pbr_type = mRadioPbrType->getSelectedIndex();
-    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+    const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
     const bool show_pbr_asset = show_pbr && texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
 
     mRadioMaterialType->setVisible(show_material);
@@ -4547,7 +4571,7 @@ void LLPanelFace::onCommitPlanarAlign()
 
 void LLPanelFace::updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit)
 {
-    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
+    const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
     if (texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT)
     {
         updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
@@ -4571,7 +4595,7 @@ void LLPanelFace::updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::
 
 void LLPanelFace::setMaterialOverridesFromSelection()
 {
-    const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
+    const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
     U32 texture_info_start;
     U32 texture_info_end;
     if (texture_info == LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_COUNT)
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index e90453c564..1caca0cf64 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -125,7 +125,10 @@ public:
         return new_material;
     }
 
+    LLGLTFMaterial::TextureInfo getPBRTextureInfo();
     LLRender::eTexIndex getTextureChannelToEdit();
+    LLRender::eTexIndex getMatTextureChannel();
+    LLRender::eTexIndex getPBRTextureChannel();
     LLRender::eTexIndex getTextureDropChannel();
     LLGLTFMaterial::TextureInfo getPBRDropChannel();
 
-- 
cgit v1.2.3


From 17f7b439d617bfdf4c865f1478ade662e86b61d2 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 7 Aug 2024 20:56:10 +0200
Subject: #1922 Make PBR scale and offset crosshair work like Texture crosshair
 do

---
 indra/llrender/llrender.h         |  19 +++--
 indra/llrender/llvertexbuffer.cpp |  12 +++
 indra/llrender/llvertexbuffer.h   |   9 ++-
 indra/newview/llface.cpp          | 116 ++++++++++++++++++++++-----
 indra/newview/llface.h            |   4 +-
 indra/newview/pipeline.cpp        | 159 ++++++++++++++++++++------------------
 indra/newview/pipeline.h          |   1 +
 7 files changed, 210 insertions(+), 110 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index e6b4118beb..010ab122b6 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -293,15 +293,18 @@ public:
 
     enum eTexIndex : U8
     {
-        DIFFUSE_MAP           = 0,
-        ALTERNATE_DIFFUSE_MAP = 1,
-        NORMAL_MAP            = 1,
-        SPECULAR_MAP          = 2,
-        BASECOLOR_MAP         = 3,
+        // Channels for material textures
+        DIFFUSE_MAP            = 0,
+        ALTERNATE_DIFFUSE_MAP  = 1,
+        NORMAL_MAP             = 1,
+        SPECULAR_MAP           = 2,
+        // Channels for PBR textures
+        BASECOLOR_MAP          = 3,
         METALLIC_ROUGHNESS_MAP = 4,
-        GLTF_NORMAL_MAP           = 5,
-        EMISSIVE_MAP          = 6,
-        NUM_TEXTURE_CHANNELS  = 7,
+        GLTF_NORMAL_MAP        = 5,
+        EMISSIVE_MAP           = 6,
+        // Total number of channels
+        NUM_TEXTURE_CHANNELS   = 7,
     };
 
     enum eVolumeTexIndex : U8
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 2eb7c21f77..02afcf12c6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -794,6 +794,18 @@ void LLVertexBuffer::setLabel(const char* label) {
 }
 #endif
 
+void LLVertexBuffer::clone(LLVertexBuffer& target) const
+{
+    target.mTypeMask = mTypeMask;
+    target.mIndicesType = mIndicesType;
+    target.mIndicesStride = mIndicesStride;
+    if (target.getNumVerts() != getNumVerts() ||
+        target.getNumIndices() != getNumIndices())
+    {
+        target.allocateBuffer(getNumVerts(), getNumIndices());
+    }
+}
+
 void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const
 {
     llassert(validateRange(start, end, count, indices_offset));
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 49500e28ce..4ada0c335b 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -163,13 +163,13 @@ public:
 
     // set for rendering
     // assumes (and will assert on) the following:
-    //      - this buffer has no pending unampBuffer call
+    //      - this buffer has no pending unmapBuffer call
     //      - a shader is currently bound
     //      - This buffer has sufficient attributes within it to satisfy the needs of the currently bound shader
     void    setBuffer();
 
     // Only call each getVertexPointer, etc, once before calling unmapBuffer()
-    // call unmapBuffer() after calls to getXXXStrider() before any cals to setBuffer()
+    // call unmapBuffer() after calls to getXXXStrider() before any calls to setBuffer()
     // example:
     //   vb->getVertexBuffer(verts);
     //   vb->getNormalStrider(norms);
@@ -218,12 +218,12 @@ public:
     U32 getNumIndices() const               { return mNumIndices; }
 
     U32 getTypeMask() const                 { return mTypeMask; }
-    bool hasDataType(AttributeType type) const      { return ((1 << type) & getTypeMask()); }
+    bool hasDataType(AttributeType type) const { return ((1 << type) & getTypeMask()); }
     U32 getSize() const                     { return mSize; }
     U32 getIndicesSize() const              { return mIndicesSize; }
     U8* getMappedData() const               { return mMappedData; }
     U8* getMappedIndices() const            { return mMappedIndexData; }
-    U32 getOffset(AttributeType type) const         { return mOffsets[type]; }
+    U32 getOffset(AttributeType type) const { return mOffsets[type]; }
 
     // these functions assume (and assert on) the current VBO being bound
     // Detailed error checking can be enabled by setting gDebugGL to true
@@ -242,6 +242,7 @@ public:
     void setLabel(const char* label);
     #endif
 
+    void clone(LLVertexBuffer& target) const;
 
 protected:
     U32     mGLBuffer = 0;      // GL VBO handle
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index f73c530ff9..d14a7ffddc 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -514,7 +514,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
     mDrawablep->getSpatialGroup()->rebuildGeom();
     mDrawablep->getSpatialGroup()->rebuildMesh();
 
-    if(mVertexBuffer.isNull())
+    if (mVertexBuffer.isNull())
     {
         return;
     }
@@ -567,8 +567,20 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
         {
             // cheaters sometimes prosper...
             //
-            mVertexBuffer->setBuffer();
-            mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
+            LLVertexBuffer* vertex_buffer = mVertexBuffer.get();
+            // To display selection markers (white squares with the rounded cross at the center)
+            // on faces with GLTF textures we use a spectal vertex buffer with other transforms
+            if (const LLTextureEntry* te = getTextureEntry())
+            {
+                if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial())
+                {
+                    vertex_buffer = mVertexBufferGLTF.get();
+                    vertex_buffer->unmapBuffer();
+                }
+            }
+            // Draw the selection marker using the correctly chosen vertex buffer
+            vertex_buffer->setBuffer();
+            vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
         }
 
         gGL.popMatrix();
@@ -1144,7 +1156,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
                                 const LLMatrix3& mat_norm_in,
                                 U16 index_offset,
                                 bool force_rebuild,
-                                bool no_debug_assert)
+                                bool no_debug_assert,
+                                bool rebuild_for_gltf)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
     llassert(verify());
@@ -1202,6 +1215,58 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
         }
     }
 
+    const LLTextureEntry* tep = mVObjp->getTE(face_index);
+    llassert(tep);
+    if (!tep)
+        return false;
+
+    LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
+    // To display selection markers (white squares with the rounded cross at the center)
+    // on faces with GLTF textures we use a special vertex buffer with other transforms
+    if (gltf_mat && !rebuild_for_gltf && tep->isSelected() && mVertexBuffer.notNull())
+    {
+        // Create a temporary vertex buffer to provide transforms for GLTF textures
+        if (mVertexBufferGLTF.isNull())
+        {
+            mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask());
+        }
+
+        // Clone the existing vertex buffer into the temporary one
+        mVertexBuffer->clone(*mVertexBufferGLTF);
+
+        // Recursive call the same function with the argument rebuild_for_gltf set to true
+        // This call will make geometry in mVertexBuffer but in fact for mVertexBufferGLTF
+        mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+        getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true);
+        mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+    }
+    else if (!tep->isSelected() && mVertexBufferGLTF.notNull())
+    {
+        // Free the temporary vertex buffer when it is not needed anymore
+        mVertexBufferGLTF = nullptr;
+    }
+
+    LLGLTFMaterial::TextureInfo gltf_info_index = (LLGLTFMaterial::TextureInfo)0;
+    if (gltf_mat && rebuild_for_gltf)
+    {
+        switch (LLPipeline::sRenderHighlightTextureChannel)
+        {
+        case LLRender::BASECOLOR_MAP:
+            gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
+            break;
+        case LLRender::METALLIC_ROUGHNESS_MAP:
+            gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS;
+            break;
+        case LLRender::GLTF_NORMAL_MAP:
+            gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL;
+            break;
+        case LLRender::EMISSIVE_MAP:
+            gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE;
+            break;
+        default:; // just to make clang happy
+        }
+    }
+
     LLStrider<LLVector3> vert;
     LLStrider<LLVector2> tex_coords0;
     LLStrider<LLVector2> tex_coords1;
@@ -1218,7 +1283,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
     LLVector3 scale;
     if (global_volume)
     {
-        scale.setVec(1,1,1);
+        scale.setVec(1, 1, 1);
     }
     else
     {
@@ -1233,7 +1298,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
     bool rebuild_tangent = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TANGENT);
     bool rebuild_weights = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_WEIGHT4);
 
-    const LLTextureEntry *tep = mVObjp->getTE(face_index);
     const U8 bump_code = tep ? tep->getBumpmap() : 0;
 
     bool is_static = mDrawablep->isStatic();
@@ -1323,7 +1387,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
 
 
     LLMaterial* mat = tep->getMaterialParams().get();
-    LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
 
     F32 r = 0, os = 0, ot = 0, ms = 0, mt = 0, cos_ang = 0, sin_ang = 0;
 
@@ -1334,13 +1397,27 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
 
     S32 xforms = XFORM_NONE;
     // For GLTF, transforms will be applied later
-    if (rebuild_tcoord && tep && !gltf_mat)
+    if (rebuild_tcoord && tep && (!gltf_mat || rebuild_for_gltf))
     {
-        r  = tep->getRotation();
-        os = tep->mOffsetS;
-        ot = tep->mOffsetT;
-        ms = tep->mScaleS;
-        mt = tep->mScaleT;
+        if (gltf_mat && rebuild_for_gltf)
+        {
+            // Apply special transformations for mVertexBufferGLTF
+            // They are used only to display a face selection marker
+            // (white square with a rounded cross at the center)
+            const auto& tt = gltf_mat->mTextureTransform[gltf_info_index];
+            r = -tt.mRotation * 2;
+            ms = tt.mScale[VX];
+            mt = tt.mScale[VY];
+            os += tt.mOffset[VX] + (ms - 1) / 2;
+            ot -= tt.mOffset[VY] + (mt - 1) / 2;
+        }
+        else
+        {
+            r = tep->getRotation();
+            tep->getOffset(&os, &ot);
+            tep->getScale(&ms, &mt);
+        }
+
         cos_ang = cos(r);
         sin_ang = sin(r);
 
@@ -1481,12 +1558,9 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
                     break;
                 }
 
-                F32 s_scale = 1.f;
-                F32 t_scale = 1.f;
-                if( tep )
-                {
-                    tep->getScale( &s_scale, &t_scale );
-                }
+                F32 s_scale = tep->getScaleS();
+                F32 t_scale = tep->getScaleT();
+
                 // Use the nudged south when coming from above sun angle, such
                 // that emboss mapping always shows up on the upward faces of cubes when
                 // it's noon (since a lot of builders build with the sun forced to noon).
@@ -1508,8 +1582,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
 
             bool tex_anim = false;
 
-                LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
-                tex_mode = vobj->mTexAnimMode;
+            LLVOVolume* vobj = (LLVOVolume*)mVObjp.get();
+            tex_mode = vobj->mTexAnimMode;
 
             if (vobj->mTextureAnimp)
             { //texture animation is in play, override specular and normal map tex coords with diffuse texcoords
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 917f3aa0b2..7cf256f731 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -161,7 +161,8 @@ public:
                             const LLMatrix3& mat_normal,
                             U16 index_offset,
                             bool force_rebuild = false,
-                            bool no_debug_assert = false);
+                            bool no_debug_assert = false,
+                            bool rebuild_for_gltf = false);
 
     // For avatar
     U16          getGeometryAvatar(
@@ -266,6 +267,7 @@ public:
 
 private:
     LLPointer<LLVertexBuffer> mVertexBuffer;
+    LLPointer<LLVertexBuffer> mVertexBufferGLTF;
 
     U32         mState;
     LLFacePool* mDrawPoolp;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2a461ca84b..1b2cffa6c9 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3580,9 +3580,12 @@ void LLPipeline::postSort(LLCamera &camera)
     {
         mSelectedFaces.clear();
 
+        bool tex_index_changed = false;
         if (!gNonInteractive)
         {
-            LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+            LLRender::eTexIndex tex_index = sRenderHighlightTextureChannel;
+            setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+            tex_index_changed = sRenderHighlightTextureChannel != tex_index;
         }
 
         // Draw face highlights for selected faces.
@@ -3604,6 +3607,24 @@ void LLPipeline::postSort(LLCamera &camera)
                 }
             } func;
             LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
+
+            if (tex_index_changed)
+            {
+                // Rebuild geometry for all selected faces with PBR textures
+                for (const LLFace* face : gPipeline.mSelectedFaces)
+                {
+                    if (const LLViewerObject* vobj = face->getViewerObject())
+                    {
+                        if (const LLTextureEntry* tep = vobj->getTE(face->getTEOffset()))
+                        {
+                            if (tep->getGLTFRenderMaterial())
+                            {
+                                gPipeline.markRebuild(face->getDrawable(), LLDrawable::REBUILD_VOLUME);
+                            }
+                        }
+                    }
+                }
+            }
         }
     }
 
@@ -3656,28 +3677,31 @@ void render_hud_elements()
     gUIProgram.unbind();
 }
 
-void LLPipeline::renderHighlights()
+static inline void bindHighlightProgram(LLGLSLShader& program)
 {
-    assertInitialized();
-
-    // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
-    // Render highlighted faces.
-    LLGLSPipelineAlpha gls_pipeline_alpha;
-    LLColor4 color(1.f, 1.f, 1.f, 0.5f);
-    disableLights();
-
     if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
     {
-        gHighlightProgram.bind();
-        gGL.diffuseColor4f(1,1,1,0.5f);
+        program.bind();
+        gGL.diffuseColor4f(1, 1, 1, 0.5f);
     }
+}
 
-    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && !mFaceSelectImagep)
-        {
-            mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
-        }
+static inline void unbindHighlightProgram(LLGLSLShader& program)
+{
+    if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
+    {
+        program.unbind();
+    }
+}
 
-    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP))
+void LLPipeline::renderSelectedFaces(const LLColor4& color)
+{
+    if (!mFaceSelectImagep)
+    {
+        mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
+    }
+
+    if (mFaceSelectImagep)
     {
         // Make sure the selection image gets downloaded and decoded
         mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
@@ -3693,81 +3717,61 @@ void LLPipeline::renderHighlights()
             facep->renderSelected(mFaceSelectImagep, color);
         }
     }
+}
 
-    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
-    {
-        // Paint 'em red!
-        color.setVec(1.f, 0.f, 0.f, 0.5f);
-
-        for (auto facep : mHighlightFaces)
-        {
-            facep->renderSelected(LLViewerTexture::sNullImagep, color);
-        }
-    }
+void LLPipeline::renderHighlights()
+{
+    assertInitialized();
 
-    // Contains a list of the faces of objects that are physical or
-    // have touch-handlers.
-    mHighlightFaces.clear();
+    // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
+    // Render highlighted faces.
+    LLGLSPipelineAlpha gls_pipeline_alpha;
+    disableLights();
 
-    if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
+    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
     {
-        gHighlightProgram.unbind();
-    }
-
+        bindHighlightProgram(gHighlightProgram);
 
-    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP))
-    {
-        color.setVec(1.0f, 0.5f, 0.5f, 0.5f);
-        if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
+        if (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP ||
+            sRenderHighlightTextureChannel == LLRender::BASECOLOR_MAP ||
+            sRenderHighlightTextureChannel == LLRender::METALLIC_ROUGHNESS_MAP ||
+            sRenderHighlightTextureChannel == LLRender::GLTF_NORMAL_MAP ||
+            sRenderHighlightTextureChannel == LLRender::EMISSIVE_MAP ||
+            sRenderHighlightTextureChannel == LLRender::NUM_TEXTURE_CHANNELS)
         {
-            gHighlightNormalProgram.bind();
-            gGL.diffuseColor4f(1,1,1,0.5f);
+            static const LLColor4 highlight_selected_color(1.f, 1.f, 1.f, 0.5f);
+            renderSelectedFaces(highlight_selected_color);
         }
 
-        mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
-
-        for (auto facep : mSelectedFaces)
+        // Paint 'em red!
+        static const LLColor4 highlight_face_color(1.f, 0.f, 0.f, 0.5f);
+        for (auto facep : mHighlightFaces)
         {
-            if (!facep || facep->getDrawable()->isDead())
-            {
-                LL_ERRS() << "Bad face on selection" << LL_ENDL;
-                return;
-            }
-
-            facep->renderSelected(mFaceSelectImagep, color);
+            facep->renderSelected(LLViewerTexture::sNullImagep, highlight_face_color);
         }
 
-        if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
-        {
-            gHighlightNormalProgram.unbind();
-        }
+        unbindHighlightProgram(gHighlightProgram);
     }
 
-    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP))
-    {
-        color.setVec(0.0f, 0.3f, 1.0f, 0.8f);
-        if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
-        {
-            gHighlightSpecularProgram.bind();
-            gGL.diffuseColor4f(1,1,1,0.5f);
-        }
-
-        mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
+    // Contains a list of the faces of objects that are physical or
+    // have touch-handlers.
+    mHighlightFaces.clear();
 
-        for (auto facep : mSelectedFaces)
+    if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
+    {
+        if (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP)
         {
-            if (!facep || facep->getDrawable()->isDead())
-            {
-                LL_ERRS() << "Bad face on selection" << LL_ENDL;
-                return;
-            }
-
-            facep->renderSelected(mFaceSelectImagep, color);
+            static const LLColor4 highlight_normal_color(1.0f, 0.5f, 0.5f, 0.5f);
+            bindHighlightProgram(gHighlightNormalProgram);
+            renderSelectedFaces(highlight_normal_color);
+            unbindHighlightProgram(gHighlightNormalProgram);
         }
-
-        if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
+        else if (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP)
         {
-            gHighlightSpecularProgram.unbind();
+            static const LLColor4 highlight_specular_color(0.0f, 0.3f, 1.0f, 0.8f);
+            bindHighlightProgram(gHighlightSpecularProgram);
+            renderSelectedFaces(highlight_specular_color);
+            unbindHighlightProgram(gHighlightSpecularProgram);
         }
     }
 }
@@ -6256,7 +6260,10 @@ bool LLPipeline::getRenderHighlights()
 // static
 void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
 {
-    sRenderHighlightTextureChannel = channel;
+    if (channel != sRenderHighlightTextureChannel)
+    {
+        sRenderHighlightTextureChannel = channel;
+    }
 }
 
 LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 6c79d20149..4164474238 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -342,6 +342,7 @@ public:
     void renderHighlight(const LLViewerObject* obj, F32 fade);
 
     void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool depth_clamp);
+    void renderSelectedFaces(const LLColor4& color);
     void renderHighlights();
     void renderDebug();
     void renderPhysicsDisplay();
-- 
cgit v1.2.3


From 12cb787f314b690e018d4b12ac54e08570b3b677 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 8 Aug 2024 11:57:26 -0400
Subject: Update libexpat to 2.6.2 and libapr 1.7.4 (#2214)

---
 indra/cmake/APR.cmake              | 14 +++++++-------
 indra/cmake/Copy3rdPartyLibs.cmake | 30 +++++++++++++++++++++---------
 indra/cmake/EXPAT.cmake            | 19 +++++++++----------
 indra/llcorehttp/CMakeLists.txt    |  2 --
 indra/newview/viewer_manifest.py   | 10 ----------
 5 files changed, 37 insertions(+), 38 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 21139319c3..97b316c4c7 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -18,6 +18,7 @@ if (WINDOWS)
           ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
           ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
           )
+  target_compile_definitions( ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
 elseif (DARWIN)
   if (LLCOMMON_LINK_SHARED)
     set(APR_selector     "0.dylib")
@@ -28,16 +29,15 @@ elseif (DARWIN)
   endif (LLCOMMON_LINK_SHARED)
 
   target_link_libraries( ll::apr INTERFACE
-          libapr-1.${APR_selector}
-          libaprutil-1.${APRUTIL_selector}
+          ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
+          ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APR_selector}
           iconv
           )
-else (WINDOWS)
+else()
   target_link_libraries( ll::apr INTERFACE
-          apr-1
-          aprutil-1
-          uuid
+          ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
+          ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
           rt
           )
-endif (WINDOWS)
+endif ()
 target_include_directories( ll::apr SYSTEM INTERFACE  ${LIBS_PREBUILT_DIR}/include/apr-1 )
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 2dc9d6080a..86c5b80fad 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -54,11 +54,14 @@ if(WINDOWS)
     set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(release_files
         openjp2.dll
-        libapr-1.dll
-        libaprutil-1.dll
         nghttp2.dll
         )
 
+    if(LLCOMMON_LINK_SHARED)
+        set(release_files ${release_files} libapr-1.dll)
+        set(release_files ${release_files} libaprutil-1.dll)
+    endif()
+
     # OpenSSL
     if(ADDRESS_SIZE EQUAL 64)
         set(release_files ${release_files} libcrypto-1_1-x64.dll)
@@ -179,16 +182,20 @@ elseif(DARWIN)
        )
     set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(release_files
-        libapr-1.0.dylib
-        libapr-1.dylib
-        libaprutil-1.0.dylib
-        libaprutil-1.dylib
-        ${EXPAT_COPY}
         libndofdev.dylib
         libnghttp2.dylib
         libnghttp2.14.dylib
        )
 
+    if(LLCOMMON_LINK_SHARED)
+        set(release_files ${release_files}
+            libapr-1.0.dylib
+            libapr-1.dylib
+            libaprutil-1.0.dylib
+            libaprutil-1.dylib
+            )
+    endif()
+
     if (TARGET ll::openal)
       list(APPEND release_files libalut.dylib libopenal.dylib)
     endif ()
@@ -224,8 +231,6 @@ elseif(LINUX)
 
      if( USE_AUTOBUILD_3P )
          list( APPEND release_files
-                 libapr-1.so.0
-                 libaprutil-1.so.0
                  libatk-1.0.so
                  libfreetype.so.6.6.2
                  libfreetype.so.6
@@ -237,6 +242,13 @@ elseif(LINUX)
                  libgmodule-2.0.so
                  libgobject-2.0.so
                  )
+
+        if(LLCOMMON_LINK_SHARED)
+            set(release_files ${release_files}
+                libapr-1.so.0
+                libaprutil-1.so.0
+                )
+        endif()
      endif()
 
 else(WINDOWS)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index 327fe8aa72..1a0b8789dc 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -7,14 +7,13 @@ add_library( ll::expat INTERFACE IMPORTED )
 use_system_binary(expat)
 use_prebuilt_binary(expat)
 if (WINDOWS)
-    target_link_libraries( ll::expat  INTERFACE libexpatMT )
-    set(EXPAT_COPY libexpatMT.dll)
-else (WINDOWS)
-    target_link_libraries( ll::expat INTERFACE expat )
-    if (DARWIN)
-        set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
-    else ()
-        set(EXPAT_COPY libexpat.so.1 libexpat.so)
-    endif ()
-endif (WINDOWS)
+    target_compile_definitions( ll::expat INTERFACE XML_STATIC=1)
+    target_link_libraries( ll::expat  INTERFACE
+            debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpatd.lib
+            optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
+else ()
+    target_link_libraries( ll::expat  INTERFACE
+            debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpat.a
+            optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
+endif ()
 target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index f7a6669825..d388883575 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -155,8 +155,6 @@ if (DARWIN)
   # for portability. This operation is Darwin-specific. We can count on the
   # 'cp' command.
   set(copy_dylibs
-    libapr-1.0.dylib
-    libaprutil-1.0.dylib
     libnghttp2*.dylib
     ${EXPAT_COPY}
     )
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 09397a0989..ea4b2ff4f4 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1008,9 +1008,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
                 libfile_parent = self.get_dst_prefix()
                 dylibs=[]
                 for libfile in (
-                                "libapr-1.0.dylib",
-                                "libaprutil-1.0.dylib",
-                                "libexpat.1.dylib",
                                 # libnghttp2.dylib is a symlink to
                                 # libnghttp2.major.dylib, which is a symlink to
                                 # libnghttp2.version.dylib. Get all of them.
@@ -1315,14 +1312,7 @@ class Linux_i686_Manifest(LinuxManifest):
         debpkgdir = os.path.join(pkgdir, "lib", "debug")
 
         with self.prefix(src=relpkgdir, dst="lib"):
-            self.path("libapr-1.so")
-            self.path("libapr-1.so.0")
-            self.path("libapr-1.so.0.4.5")
-            self.path("libaprutil-1.so")
-            self.path("libaprutil-1.so.0")
-            self.path("libaprutil-1.so.0.4.1")
             self.path("libdb*.so")
-            self.path("libexpat.so.*")
             self.path("libuuid.so*")
             self.path("libSDL-1.2.so.*")
             self.path("libdirectfb-1.*.so.*")
-- 
cgit v1.2.3


From 77d50cad495511a91ca1461d9e6f43a7e8656965 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 8 Aug 2024 14:59:41 +0300
Subject: viewer#2225 Fix Joystick Floater's FPS drops

---
 indra/newview/llfloaterjoystick.cpp | 33 ++++++++++++++++++++++++++-------
 indra/newview/llfloaterjoystick.h   |  2 ++
 2 files changed, 28 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 7db3621a4b..68b11ec92b 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -93,8 +93,9 @@ BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr,
 #endif
 
 LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
-    : LLFloater(data),
-    mHasDeviceList(false)
+    : LLFloater(data)
+    , mHasDeviceList(false)
+    , mJoystickInitialized(false)
 {
     if (!LLViewerJoystick::getInstance()->isJoystickInitialized())
     {
@@ -108,7 +109,10 @@ void LLFloaterJoystick::draw()
 {
     LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
     bool joystick_inited = joystick->isJoystickInitialized();
-    if (joystick_inited != mHasDeviceList)
+    if (!mHasDeviceList
+        || mJoystickInitialized != joystick_inited
+        || (joystick->isDeviceUUIDSet() && joystick->getDeviceUUID().asUUID() != mCurrentDeviceId)
+        || (!joystick->isDeviceUUIDSet() && mCurrentDeviceId.notNull()))
     {
         refreshListOfDevices();
     }
@@ -290,15 +294,16 @@ void LLFloaterJoystick::refreshListOfDevices()
         mHasDeviceList = true;
     }
 
-    bool is_device_id_set = LLViewerJoystick::getInstance()->isDeviceUUIDSet();
+    LLViewerJoystick* joystick = LLViewerJoystick::getInstance();
+    bool is_device_id_set = joystick->isDeviceUUIDSet();
 
-    if (LLViewerJoystick::getInstance()->isJoystickInitialized() &&
+    if (joystick->isJoystickInitialized() &&
         (!mHasDeviceList || !is_device_id_set))
     {
 #if LL_WINDOWS && !LL_MESA_HEADLESS
         LL_WARNS() << "NDOF connected to device without using SL provided handle" << LL_ENDL;
 #endif
-        std::string desc = LLViewerJoystick::getInstance()->getDescription();
+        std::string desc = joystick->getDescription();
         if (!desc.empty())
         {
             LLSD value = LLSD::Integer(1); // value for selection
@@ -311,11 +316,13 @@ void LLFloaterJoystick::refreshListOfDevices()
     {
         if (is_device_id_set)
         {
-            LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID();
+            LLSD guid = joystick->getDeviceUUID();
+            mCurrentDeviceId = guid.asUUID();
             mJoysticksCombo->selectByValue(guid);
         }
         else
         {
+            mCurrentDeviceId.setNull();
             mJoysticksCombo->selectByValue(LLSD::Integer(1));
         }
     }
@@ -323,6 +330,18 @@ void LLFloaterJoystick::refreshListOfDevices()
     {
         mJoysticksCombo->selectByValue(LLSD::Integer(0));
     }
+
+    // Update tracking
+    if (is_device_id_set)
+    {
+        LLSD guid = joystick->getDeviceUUID();
+        mCurrentDeviceId = guid.asUUID();
+    }
+    else
+    {
+        mCurrentDeviceId.setNull();
+    }
+    mJoystickInitialized = joystick->isJoystickInitialized();
 }
 
 void LLFloaterJoystick::cancel()
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index b94223a738..c7e727635d 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -95,6 +95,8 @@ private:
     LLComboBox      *mJoysticksCombo;
 
     bool mHasDeviceList;
+    bool mJoystickInitialized;
+    LLUUID mCurrentDeviceId;
 
     // stats view
     LLStatBar* mAxisStatsBar[6];
-- 
cgit v1.2.3


From fe0f1be17bfd83323f2fcda124f3327cc14b0cad Mon Sep 17 00:00:00 2001
From: Beq Janus <beqjanus@gmail.com>
Date: Thu, 8 Aug 2024 17:10:03 +0100
Subject: Auto-scaling amortisation of dynamic BB calcs (#2226)

* Auto-scaling amortisation of dynamic BB calcs

This fix limits the overhead of the dynamic BB calcs to
AvatarExtentRefreshMaxPerBatch per AvatarExtentRefreshPeriodBatch frames
default is 5 avatar per 4 frames. Thus a standard busy region 25 avatars would
 take 20 frames to refresh the BBs.

* Add comments to give context to the amortised BB recalcs

explain the frequency of updates given the number of avatars present as to how that limits the impact on frame rate in busy scenes
---
 indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++
 indra/newview/llviewerobjectlist.cpp    |  5 +++++
 indra/newview/llviewerobjectlist.h      |  2 ++
 indra/newview/llvoavatar.cpp            | 37 +++++++++++++++++++++++++++------
 4 files changed, 60 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eb053ebaa0..887a8584d8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1874,6 +1874,28 @@
     <key>Value</key>
     <real>64.0</real>
   </map>
+  <key>AvatarExtentRefreshPeriodBatch</key>
+  <map>
+    <key>Comment</key>
+    <string>how many frames do we spread over by default when refreshing extents (default is 4)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>S32</string>
+    <key>Value</key>
+    <integer>4</integer>
+  </map>
+  <key>AvatarExtentRefreshMaxPerBatch</key>
+  <map>
+    <key>Comment</key>
+    <string>how many avatars do we want to handle in total per batch (default is 5)</string>
+    <key>Persist</key>
+    <integer>1</integer>
+    <key>Type</key>
+    <string>S32</string>
+    <key>Value</key>
+    <integer>5</integer>
+  </map>
   <key>DebugAvatarAppearanceMessage</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index ae64ee7b92..435bd60917 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -889,6 +889,7 @@ void LLViewerObjectList::update(LLAgent &agent)
     static std::vector<LLViewerObject*> idle_list;
 
     U32 idle_count = 0;
+    mNumAvatars = 0;
 
     {
         for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
@@ -906,6 +907,10 @@ void LLViewerObjectList::update(LLAgent &agent)
                     idle_list[idle_count] = objectp;
                 }
                 ++idle_count;
+                if (objectp->isAvatar())
+                {
+                    mNumAvatars++;
+                }
             }
             else
             {   // There shouldn't be any NULL pointers in the list, but they have caused
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index ebdfd0d369..7dfa94b99f 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -145,6 +145,7 @@ public:
 
     S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); }
     S32 getOrphanCount() const { return mNumOrphans; }
+    S32 getAvatarCount() const { return mNumAvatars; }
     void orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port);
     void findOrphans(LLViewerObject* objectp, U32 ip, U32 port);
 
@@ -191,6 +192,7 @@ protected:
     std::vector<U64>    mOrphanParents; // LocalID/ip,port of orphaned objects
     std::vector<OrphanInfo> mOrphanChildren;    // UUID's of orphaned objects
     S32 mNumOrphans;
+    S32 mNumAvatars;
 
     typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d5a8ee6cf8..b3b8969faa 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2631,6 +2631,29 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
     }
 
     // Update should be happening max once per frame.
+    static LLCachedControl<S32> refreshPeriod(gSavedSettings, "AvatarExtentRefreshPeriodBatch");
+    static LLCachedControl<S32> refreshMaxPerPeriod(gSavedSettings, "AvatarExtentRefreshMaxPerBatch");
+    static S32 upd_freq = refreshPeriod; // initialise to a reasonable default of 1 batch
+    static S32 lastRecalibrationFrame{ 0 };
+
+    const S32 thisFrame = LLDrawable::getCurrentFrame();
+    if (thisFrame - lastRecalibrationFrame >= upd_freq)
+    {
+        // Only update at the start of a cycle. .
+        // update frequency = ((Num_Avatars -1 / NumberPerPeriod) + 1 ) * Periodicity
+        // Given NumberPerPeriod = 5 and Periodicity = 4
+        // | NumAvatars  | frequency |
+        // +-------------+-----------+
+        // |      1      |     4     |
+        // |      2      |     4     |
+        // |      5      |     4     |
+        // |     10      |     8     |
+        // |     25      |     20    |
+
+        upd_freq = (((gObjectList.getAvatarCount() - 1) / refreshMaxPerPeriod) + 1)*refreshPeriod;
+        lastRecalibrationFrame = thisFrame;
+    }
+
     if ((mLastAnimExtents[0]==LLVector3())||
         (mLastAnimExtents[1])==LLVector3())
     {
@@ -2638,8 +2661,9 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
     }
     else
     {
-        const S32 upd_freq = 4; // force update every upd_freq frames.
-        mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0);
+        // Update extent if necessary.
+        // if the frame counnter + the first byte of the UUID % upd_freq = 0 then update the extent.
+        mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
     }
 
     LLScopedContextString str("avatar_idle_update " + getFullname());
@@ -10725,10 +10749,11 @@ void LLVOAvatar::updateRiggingInfo()
     }
 
     //LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL;
-    LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
-    S32 joint_count, box_count;
-    showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
-    LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
+    // Remove debug only stuff on hot path
+    // LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
+    // S32 joint_count, box_count;
+    // showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
+    // LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
 }
 
 // virtual
-- 
cgit v1.2.3


From f782f5f5345e68e0c579e5fe78be94f749723dee Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Thu, 8 Aug 2024 23:21:28 +0200
Subject: Fix copy&paste error in LLPanelFace (#2233)

---
 indra/newview/llpanelface.cpp | 10 +++++-----
 indra/newview/llpanelface.h   |  5 ++---
 2 files changed, 7 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 94674dc557..544b6fbc9c 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1425,8 +1425,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
             {
                 mTexScaleV->setValue(diff_scale_t);
             }
-            mShinyScaleV->setValue(norm_scale_t);
-            mBumpyScaleV->setValue(spec_scale_t);
+            mShinyScaleV->setValue(spec_scale_t);
+            mBumpyScaleV->setValue(norm_scale_t);
 
             mTexScaleV->setTentative(LLSD(diff_scale_tentative));
             mShinyScaleV->setTentative(LLSD(spec_scale_tentative));
@@ -2181,7 +2181,7 @@ void LLPanelFace::onMaterialOverrideReceived(const LLUUID& object_id, S32 side)
 
 //////////////////////////////////////////////////////////////////////////////
 //
-void LLPanelFace::navigateToTitleMedia( const std::string url )
+void LLPanelFace::navigateToTitleMedia(const std::string& url)
 {
     std::string multi_media_info_str = LLTrans::getString("Multiple Media");
     if (url.empty() || multi_media_info_str == url)
@@ -2193,9 +2193,9 @@ void LLPanelFace::navigateToTitleMedia( const std::string url )
     {
         LLPluginClassMedia* media_plugin = mTitleMedia->getMediaPlugin();
         // check if url changed or if we need a new media source
-        if (mTitleMedia->getCurrentNavUrl() != url || media_plugin == NULL)
+        if (mTitleMedia->getCurrentNavUrl() != url || media_plugin == nullptr)
         {
-            mTitleMedia->navigateTo( url );
+            mTitleMedia->navigateTo(url);
 
             LLViewerMediaImpl* impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(mTitleMedia->getTextureID());
             if (impl)
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 1caca0cf64..dfd3201533 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -133,7 +133,7 @@ public:
     LLGLTFMaterial::TextureInfo getPBRDropChannel();
 
 protected:
-    void navigateToTitleMedia(const std::string url);
+    void navigateToTitleMedia(const std::string& url);
     bool selectedMediaEditable();
     void clearMediaSettings();
     void updateMediaSettings();
@@ -226,7 +226,6 @@ protected:
     void onCommitMaterialGloss();
     void onCommitMaterialEnv();
     void onCommitMaterialMaskCutoff();
-    void onCommitMaterialID();
 
     void onCommitMaterialsMedia();
     void onCommitMaterialType();
@@ -270,7 +269,7 @@ protected:
     static F32 valueGlow(LLViewerObject* object, S32 face);
 
 private:
-    bool isAlpha() { return mIsAlpha; }
+    bool isAlpha() const { return mIsAlpha; }
 
     // Convenience funcs to keep the visual flack to a minimum
     //
-- 
cgit v1.2.3


From a6131b5652124d40e782dd6bc653a9020061cf33 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 8 Aug 2024 22:13:57 +0200
Subject: #2229 BugSplat Crash #1502471:
 SecondLifeViewer!LLPolySkeletalDistortion::apply(196)

---
 indra/llcharacter/llcharacter.h | 18 ++++++++++++++++++
 indra/newview/llvoavatar.cpp    | 23 ++++-------------------
 indra/newview/llvoavatar.h      |  2 +-
 3 files changed, 23 insertions(+), 20 deletions(-)

(limited to 'indra')

diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 6da28f0692..6143ec8cd1 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -245,6 +245,24 @@ public:
     S32             getVisualParamCount() const { return (S32)mVisualParamIndexMap.size(); }
     LLVisualParam*  getVisualParam(const char *name);
 
+    void animateTweakableVisualParams(F32 delta)
+    {
+        for (auto& it : mVisualParamIndexMap)
+        {
+            if (it.second->isTweakable())
+            {
+                it.second->animate(delta);
+            }
+        }
+    }
+
+    void applyAllVisualParams(ESex avatar_sex)
+    {
+        for (auto& it : mVisualParamIndexMap)
+        {
+            it.second->apply(avatar_sex);
+        }
+    }
 
     ESex getSex() const         { return mSex; }
     void setSex( ESex sex )     { mSex = sex; }
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b3b8969faa..f813df3fb5 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3081,30 +3081,15 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
         }
         else
         {
-            F32 morph_amt = calcMorphAmount();
-            LLVisualParam *param;
-
             if (!isSelf())
             {
+                F32 morph_amt = calcMorphAmount();
                 // animate only top level params for non-self avatars
-                for (param = getFirstVisualParam();
-                     param;
-                     param = getNextVisualParam())
-                {
-                    if (param->isTweakable())
-                    {
-                        param->animate(morph_amt);
-                    }
-                }
+                animateTweakableVisualParams(morph_amt);
             }
 
             // apply all params
-            for (param = getFirstVisualParam();
-                 param;
-                 param = getNextVisualParam())
-            {
-                param->apply(avatar_sex);
-            }
+            applyAllVisualParams(avatar_sex);
 
             mLastAppearanceBlendTime = appearance_anim_time;
         }
@@ -3112,7 +3097,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
     }
 }
 
-F32 LLVOAvatar::calcMorphAmount()
+F32 LLVOAvatar::calcMorphAmount() const
 {
     F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32();
     F32 blend_frac = calc_bouncy_animation(appearance_anim_time / APPEARANCE_MORPH_TIME);
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2144be1ba5..aa6aee0de5 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -422,7 +422,7 @@ protected:
     bool            updateIsFullyLoaded();
     bool            processFullyLoadedChange(bool loading);
     void            updateRuthTimer(bool loading);
-    F32             calcMorphAmount();
+    F32             calcMorphAmount() const;
 
 private:
     bool            mFirstFullyVisible;
-- 
cgit v1.2.3


From 5a1ce7974b0c58d32c047a814fa94d4072a70de7 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Fri, 9 Aug 2024 16:32:11 +0200
Subject: #2230 BugSplat Crash #1502376:
 SecondLifeViewer!LLPrimitive::isAvatar(606)

---
 indra/newview/lldrawable.cpp | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 60e7171004..3b531c41d9 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1600,18 +1600,10 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
 
         mDrawable->updateDistance(camera, force_update);
 
-        LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
-        for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
-             iter != child_list.end(); iter++)
+        for (LLViewerObject* child : mDrawable->getVObj()->getChildren())
         {
-            LLViewerObject* child = *iter;
             LLDrawable* drawable = child->mDrawable;
-            if (!drawable)
-            {
-                continue;
-            }
-
-            if (!drawable->isAvatar())
+            if (drawable && !drawable->isDead() && drawable->isAvatar())
             {
                 drawable->updateDistance(camera, force_update);
             }
-- 
cgit v1.2.3


From ecfa05711ecf5e331c6b5eb6e404ecf940ad014e Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Fri, 9 Aug 2024 16:41:37 +0200
Subject: #2231 BugSplat Crash #1502347:
 SecondLifeViewer!LLViewerObject::getBoundingBoxAgent(5858)

---
 indra/newview/llviewerobject.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fd85d75d98..a2abd1d930 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5753,7 +5753,8 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const
     }
 
     if (avatar_parent && avatar_parent->isAvatar() &&
-        root_edit && root_edit->mDrawable.notNull() && root_edit->mDrawable->getXform()->getParent())
+        root_edit && root_edit->mDrawable.notNull() && !root_edit->mDrawable->isDead() &&
+        root_edit->mDrawable->getXform()->getParent())
     {
         LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent();
         position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
-- 
cgit v1.2.3


From 501e92250ef61abcbbdb26f2e6f882d864113ac4 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 11 Aug 2024 17:54:38 -0400
Subject: Fix avatar lod corruption from commit 5a1ce79 (#2247)

---
 indra/newview/lldrawable.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 3b531c41d9..ae48db24bc 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1603,7 +1603,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
         for (LLViewerObject* child : mDrawable->getVObj()->getChildren())
         {
             LLDrawable* drawable = child->mDrawable;
-            if (drawable && !drawable->isDead() && drawable->isAvatar())
+            if (drawable && !drawable->isDead() && !drawable->isAvatar())
             {
                 drawable->updateDistance(camera, force_update);
             }
-- 
cgit v1.2.3


From dff3fdbfd7d0b29b51d4d6b7ecfd84177e114eb8 Mon Sep 17 00:00:00 2001
From: Signal Linden <signal@lindenlab.com>
Date: Sun, 11 Aug 2024 16:44:39 -0700
Subject: Adopt NSIS 3.0 (#2248)

---
 indra/newview/installers/windows/installer_template.nsi | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index d1dab94a76..77f24ac6a6 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -32,6 +32,7 @@ SetCompressor /solid lzma	# Compress whole installer as one block
 SetDatablockOptimize off	# Only saves us 0.1%, not worth it
 XPStyle on                  # Add an XP manifest to the installer
 RequestExecutionLevel admin	# For when we write to Program Files
+Unicode true                # Enable unicode support
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Project flags
-- 
cgit v1.2.3


From af2b5a3c58999c12f7c5e091cd4703e358fe844c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 12 Aug 2024 00:15:21 -0400
Subject: Fix sculpt discard level being discarded due to shadowing outer scope
 discard_level (#2249)

---
 indra/newview/llvovolume.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9ebe648680..7a7d88327b 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1250,7 +1250,7 @@ void LLVOVolume::sculpt()
         if (!raw_image)
         {
             raw_image = mSculptTexture->getSavedRawImage();
-            S32 discard_level = mSculptTexture->getSavedRawImageLevel();
+            discard_level = mSculptTexture->getSavedRawImageLevel();
         }
 
         if (!raw_image)
-- 
cgit v1.2.3


From f982463488a35b58b86d5d76309055416eb9eaec Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 12 Aug 2024 00:30:42 -0400
Subject: Update zlib-ng libxml2 libpng freetype minizip-ng boost collada-dom
 tinygltf packages (#2250)

Rebuild expat, apr, meshoptimizer, ogg_vorbis, libjpeg-turbo for symbol fixes
---
 indra/cmake/00-Common.cmake                |  2 --
 indra/cmake/CURL.cmake                     | 19 +++++++++++----
 indra/cmake/Copy3rdPartyLibs.cmake         | 15 +-----------
 indra/cmake/FreeType.cmake                 |  8 ++++++-
 indra/cmake/LLPrimitive.cmake              | 15 ++++++------
 indra/cmake/NGHTTP2.cmake                  |  8 +++----
 indra/cmake/OpenSSL.cmake                  |  5 ++--
 indra/cmake/PNG.cmake                      |  4 ++--
 indra/cmake/ZLIBNG.cmake                   |  4 ++--
 indra/llcorehttp/CMakeLists.txt            | 37 ------------------------------
 indra/media_plugins/cef/CMakeLists.txt     |  2 +-
 indra/media_plugins/example/CMakeLists.txt |  2 +-
 indra/media_plugins/libvlc/CMakeLists.txt  |  2 +-
 indra/newview/CMakeLists.txt               |  4 ----
 indra/newview/viewer_manifest.py           | 15 ------------
 15 files changed, 44 insertions(+), 98 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index f1fa7761c3..4b3fa00fcf 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -64,9 +64,7 @@ if (WINDOWS)
   # http://www.cmake.org/pipermail/cmake/2009-September/032143.html
   string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
 
-  # zlib has assembly-language object files incompatible with SAFESEH
   add_link_options(/LARGEADDRESSAWARE
-          /SAFESEH:NO
           /NODEFAULTLIB:LIBCMT
           /IGNORE:4099)
 
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index b9f685f37b..eea0a2da62 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,5 +1,6 @@
 # -*- cmake -*-
 include(Prebuilt)
+include(Linking)
 
 include_guard()
 add_library( ll::libcurl INTERFACE IMPORTED )
@@ -7,8 +8,18 @@ add_library( ll::libcurl INTERFACE IMPORTED )
 use_system_binary(libcurl)
 use_prebuilt_binary(curl)
 if (WINDOWS)
-  target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
-else (WINDOWS)
-  target_link_libraries(ll::libcurl INTERFACE libcurl.a)
-endif (WINDOWS)
+  target_link_libraries(ll::libcurl INTERFACE
+    ${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.lib
+    ll::openssl
+    ll::nghttp2
+    ll::zlib-ng
+    )
+else ()
+  target_link_libraries(ll::libcurl INTERFACE
+    ${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.a
+    ll::openssl
+    ll::nghttp2
+    ll::zlib-ng
+    )
+endif ()
 target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 86c5b80fad..c6b89e1de3 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -54,7 +54,6 @@ if(WINDOWS)
     set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(release_files
         openjp2.dll
-        nghttp2.dll
         )
 
     if(LLCOMMON_LINK_SHARED)
@@ -62,15 +61,6 @@ if(WINDOWS)
         set(release_files ${release_files} libaprutil-1.dll)
     endif()
 
-    # OpenSSL
-    if(ADDRESS_SIZE EQUAL 64)
-        set(release_files ${release_files} libcrypto-1_1-x64.dll)
-        set(release_files ${release_files} libssl-1_1-x64.dll)
-    else(ADDRESS_SIZE EQUAL 64)
-        set(release_files ${release_files} libcrypto-1_1.dll)
-        set(release_files ${release_files} libssl-1_1.dll)
-    endif(ADDRESS_SIZE EQUAL 64)
-
     # Filenames are different for 32/64 bit BugSplat file and we don't
     # have any control over them so need to branch.
     if (USE_BUGSPLAT)
@@ -183,8 +173,6 @@ elseif(DARWIN)
     set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(release_files
         libndofdev.dylib
-        libnghttp2.dylib
-        libnghttp2.14.dylib
        )
 
     if(LLCOMMON_LINK_SHARED)
@@ -226,8 +214,7 @@ elseif(LINUX)
     set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     # *FIX - figure out what to do with duplicate libalut.so here -brad
     set(release_files
-            ${EXPAT_COPY}
-            )
+       )
 
      if( USE_AUTOBUILD_3P )
          list( APPEND release_files
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index 77140af641..563491556d 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -1,5 +1,6 @@
 # -*- cmake -*-
 include(Prebuilt)
+include(Linking)
 
 include_guard()
 add_library( ll::freetype INTERFACE IMPORTED )
@@ -7,5 +8,10 @@ add_library( ll::freetype INTERFACE IMPORTED )
 use_system_binary(freetype)
 use_prebuilt_binary(freetype)
 target_include_directories( ll::freetype SYSTEM INTERFACE  ${LIBS_PREBUILT_DIR}/include/freetype2/)
-target_link_libraries( ll::freetype INTERFACE freetype )
+
+if (WINDOWS)
+    target_link_libraries( ll::freetype INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/freetype.lib)
+else()
+    target_link_libraries( ll::freetype INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libfreetype.a)
+endif()
 
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 1e81532551..d0a52ffb63 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -2,6 +2,7 @@
 
 # these should be moved to their own cmake file
 include(Prebuilt)
+include(Linking)
 include(Boost)
 
 include_guard()
@@ -24,15 +25,15 @@ use_prebuilt_binary(minizip-ng) # needed for colladadom
 use_prebuilt_binary(libxml2)
 
 if (WINDOWS)
-    target_link_libraries( ll::minizip-ng INTERFACE libminizip )
+    target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/minizip.lib )
 else()
-    target_link_libraries( ll::minizip-ng INTERFACE minizip )
+    target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libminizip.a )
 endif()
 
 if (WINDOWS)
-    target_link_libraries( ll::libxml INTERFACE libxml2_a)
+    target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.lib Bcrypt.lib)
 else()
-    target_link_libraries( ll::libxml INTERFACE xml2)
+    target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.a)
 endif()
 
 target_include_directories( ll::colladadom SYSTEM INTERFACE
@@ -40,9 +41,9 @@ target_include_directories( ll::colladadom SYSTEM INTERFACE
         ${LIBS_PREBUILT_DIR}/include/collada/1.4
         )
 if (WINDOWS)
-    target_link_libraries(ll::colladadom INTERFACE libcollada14dom23-s ll::libxml ll::minizip-ng )
+    target_link_libraries(ll::colladadom INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ll::libxml ll::minizip-ng )
 elseif (DARWIN)
-    target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+    target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng)
 elseif (LINUX)
-    target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+    target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng)
 endif()
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index 6396a5bd01..7b2aa5971f 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -8,9 +8,7 @@ use_system_binary(nghttp2)
 use_prebuilt_binary(nghttp2)
 if (WINDOWS)
   target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
-elseif (DARWIN)
-  target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.dylib)
-else (WINDOWS)
-  target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a )
-endif (WINDOWS)
+else ()
+  target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libnghttp2.a)
+endif ()
 target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 3387c74f45..67a84e14af 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,5 +1,6 @@
 # -*- cmake -*-
 include(Prebuilt)
+include(Linking)
 
 include_guard()
 add_library( ll::openssl INTERFACE IMPORTED )
@@ -7,9 +8,9 @@ add_library( ll::openssl INTERFACE IMPORTED )
 use_system_binary(openssl)
 use_prebuilt_binary(openssl)
 if (WINDOWS)
-  target_link_libraries(ll::openssl INTERFACE libssl libcrypto)
+  target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.lib Crypt32.lib)
 elseif (LINUX)
-  target_link_libraries(ll::openssl INTERFACE ssl crypto dl)
+  target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.a dl)
 else()
   target_link_libraries(ll::openssl INTERFACE ssl crypto)
 endif (WINDOWS)
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake
index 044262bc8d..e5893e9a20 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -7,8 +7,8 @@ add_library( ll::libpng INTERFACE IMPORTED )
 use_system_binary(libpng)
 use_prebuilt_binary(libpng)
 if (WINDOWS)
-  target_link_libraries(ll::libpng INTERFACE libpng16)
+  target_link_libraries(ll::libpng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libpng16.lib)
 else()
-  target_link_libraries(ll::libpng INTERFACE png16 )
+  target_link_libraries(ll::libpng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libpng16.a)
 endif()
 target_include_directories( ll::libpng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/libpng16)
diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake
index 5d99cd9709..d7b920da26 100644
--- a/indra/cmake/ZLIBNG.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -12,9 +12,9 @@ endif()
 
 use_prebuilt_binary(zlib-ng)
 if (WINDOWS)
-  target_link_libraries( ll::zlib-ng INTERFACE zlib )
+  target_link_libraries( ll::zlib-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/zlib.lib )
 else()
-  target_link_libraries( ll::zlib-ng INTERFACE z )
+  target_link_libraries( ll::zlib-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libz.a )
 endif (WINDOWS)
 
 if( NOT LINUX )
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index d388883575..05b788a433 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -132,43 +132,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS)
                           "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py"
                           )
  
-if (DARWIN)
-  # Path inside the app bundle where we'll need to copy libraries
-  set(LL_TEST_DESTINATION_DIR
-    ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,,../>Resources
-  )
-
-  # Create the Contents/Resources directory
-  add_custom_command(
-    TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
-    COMMAND ${CMAKE_COMMAND}
-    ARGS
-      -E
-      make_directory
-      ${LL_TEST_DESTINATION_DIR}
-    COMMENT "Creating Resources directory in app bundle."
-  )
-  
-  # Copy the required libraries to the package app. We used to use a sequence
-  # of '${CMAKE_COMMAND} -E copy' commands, but 'cmake -E copy' does only a
-  # single file at a time: it doesn't understand wildcards. 'cmake -E copy' is
-  # for portability. This operation is Darwin-specific. We can count on the
-  # 'cp' command.
-  set(copy_dylibs
-    libnghttp2*.dylib
-    ${EXPAT_COPY}
-    )
-
-  add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
-    WORKING_DIRECTORY "${AUTOBUILD_INSTALL_DIR}/lib/release"
-    COMMAND cp -v
-    ${copy_dylibs}
-    ${LL_TEST_DESTINATION_DIR}
-    DEPENDS ${copy_dylibs}
-  )
-
-endif (DARWIN)
-
   #
   # Example Programs
   #
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 410778114d..0d1a833936 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -66,7 +66,7 @@ if (WINDOWS)
   set_target_properties(
     media_plugin_cef
     PROPERTIES
-    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
+    LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
     )
 endif (WINDOWS)
 
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index 7d3e7f663b..41e2353f31 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -36,7 +36,7 @@ if (WINDOWS)
   set_target_properties(
     media_plugin_example
     PROPERTIES
-    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT"
+    LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT"
     )
 endif (WINDOWS)
 
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index a3c1c4ef99..202cbed96e 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -39,7 +39,7 @@ if (WINDOWS)
   set_target_properties(
     media_plugin_libvlc
     PROPERTIES
-    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT"
+    LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT"
     )
 endif (WINDOWS)
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f7c5010e72..87823d5e9c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1749,15 +1749,11 @@ if (WINDOWS)
        list(APPEND COPY_INPUT_DEPENDENCIES
                ${SHARED_LIB_STAGING_DIR}/vivoxsdk_x64.dll
                ${SHARED_LIB_STAGING_DIR}/ortp_x64.dll
-               ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll
-               ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll
                )
     else (ADDRESS_SIZE EQUAL 64)
        list(APPEND COPY_INPUT_DEPENDENCIES
                ${SHARED_LIB_STAGING_DIR}/vivoxsdk.dll
                ${SHARED_LIB_STAGING_DIR}/ortp.dll
-               ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll
-               ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll
                )
     endif (ADDRESS_SIZE EQUAL 64)
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index ea4b2ff4f4..91a9347449 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -580,13 +580,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
             self.path("vivoxsdk_x64.dll")
             self.path("ortp_x64.dll")
 
-            # OpenSSL
-            self.path("libcrypto-1_1-x64.dll")
-            self.path("libssl-1_1-x64.dll")
-
-            # HTTP/2
-            self.path("nghttp2.dll")
-
             # BugSplat
             if self.args.get('bugsplat'):
                 self.path("BsSndRpt64.exe")
@@ -1007,14 +1000,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
                 # Need to get the llcommon dll from any of the build directories as well.
                 libfile_parent = self.get_dst_prefix()
                 dylibs=[]
-                for libfile in (
-                                # libnghttp2.dylib is a symlink to
-                                # libnghttp2.major.dylib, which is a symlink to
-                                # libnghttp2.version.dylib. Get all of them.
-                                "libnghttp2.*dylib",
-                                ):
-                    dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
-
                 # SLVoice executable
                 with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')):
                     self.path("SLVoice")
-- 
cgit v1.2.3


From 3f9a38bb4bf7514e575315c3c304e04e9b828c8b Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Mon, 12 Aug 2024 15:20:46 +0200
Subject: #2255 BugSplat Crash #1503774:
 SecondLifeViewer!LLViewerOctreeGroup::hasState(227)

---
 indra/newview/llspatialpartition.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ffe5fa394f..b1f80e48af 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1051,7 +1051,8 @@ public:
         LLSpatialGroup* group = (LLSpatialGroup*)base_group;
         group->checkOcclusion();
 
-        if (group->getOctreeNode()->getParent() &&  //never occlusion cull the root node
+        if (group->getOctreeNode() &&
+            group->getOctreeNode()->getParent() &&  //never occlusion cull the root node
             LLPipeline::sUseOcclusion &&            //ignore occlusion if disabled
             group->isOcclusionState(LLSpatialGroup::OCCLUDED))
         {
-- 
cgit v1.2.3


From c1bc32ad42413342dfff396c7b37372619a03f72 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Mon, 12 Aug 2024 14:40:40 +0200
Subject: #2253 BugSplat Crash #1504389:
 SecondLifeViewer!LLVOAvatar::updateRiggingInfo(10561)

---
 indra/newview/llvoavatar.cpp | 57 ++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 31 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f813df3fb5..09375a6930 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -10634,18 +10634,19 @@ void showRigInfoTabExtents(LLVOAvatar *avatar, LLJointRiggingInfoTab& tab, S32&
 void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
-    for ( LLVOAvatar::attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter )
+    for (const auto& iter : mAttachmentPoints)
     {
-        LLViewerJointAttachment* attachment = iter->second;
+        LLViewerJointAttachment* attachment = iter.second;
         LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_end = attachment->mAttachedObjects.end();
 
-        for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_iter = attachment->mAttachedObjects.begin();
-             attach_iter != attach_end; ++attach_iter)
+        for (LLViewerObject* attached_object : attachment->mAttachedObjects)
         {
-            LLViewerObject* attached_object =  attach_iter->get();
-            LLVOVolume *volume = dynamic_cast<LLVOVolume*>(attached_object);
-            if (volume)
+            if (attached_object->isDead())
+                continue;
+
+            if (attached_object->getPCode() == LL_PCODE_VOLUME)
             {
+                LLVOVolume* volume = (LLVOVolume*)attached_object;
                 volumes.push_back(volume);
                 if (volume->isAnimatedObject())
                 {
@@ -10655,15 +10656,12 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
                     continue;
                 }
             }
-            LLViewerObject::const_child_list_t& children = attached_object->getChildren();
-            for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
-                 it != children.end(); ++it)
+
+            for (LLViewerObject* childp : attached_object->getChildren())
             {
-                LLViewerObject *childp = *it;
-                LLVOVolume *volume = dynamic_cast<LLVOVolume*>(childp);
-                if (volume)
+                if (!childp->isDead() &&  childp->getPCode() == LL_PCODE_VOLUME)
                 {
-                    volumes.push_back(volume);
+                    volumes.push_back((LLVOVolume*)childp);
                 }
             }
         }
@@ -10702,33 +10700,30 @@ void LLVOAvatar::updateRiggingInfo()
 
     getAssociatedVolumes(volumes);
 
-    std::map<LLUUID,S32> curr_rigging_info_key;
+    std::map<LLUUID, S32> curr_rigging_info_key;
+
+    // Get current rigging info key
+    for (LLVOVolume* vol : volumes)
     {
-        // Get current rigging info key
-        for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); it != volumes.end(); ++it)
+        if (vol->isMesh() && vol->getVolume())
         {
-            LLVOVolume *vol = *it;
-            if (vol->isMesh() && vol->getVolume())
-            {
-                const LLUUID& mesh_id = vol->getVolume()->getParams().getSculptID();
-                S32 max_lod = llmax(vol->getLOD(), vol->mLastRiggingInfoLOD);
-                curr_rigging_info_key[mesh_id] = max_lod;
-            }
+            const LLUUID& mesh_id = vol->getVolume()->getParams().getSculptID();
+            S32 max_lod = llmax(vol->getLOD(), vol->mLastRiggingInfoLOD);
+            curr_rigging_info_key[mesh_id] = max_lod;
         }
+    }
 
-        // Check for key change, which indicates some change in volume composition or LOD.
-        if (curr_rigging_info_key == mLastRiggingInfoKey)
-        {
-            return;
-        }
+    // Check for key change, which indicates some change in volume composition or LOD.
+    if (curr_rigging_info_key == mLastRiggingInfoKey)
+    {
+        return;
     }
 
     // Something changed. Update.
     mLastRiggingInfoKey = curr_rigging_info_key;
     mJointRiggingInfoTab.clear();
-    for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); it != volumes.end(); ++it)
+    for (LLVOVolume* vol : volumes)
     {
-        LLVOVolume *vol = *it;
         vol->updateRiggingInfo();
         mJointRiggingInfoTab.merge(vol->mJointRiggingInfoTab);
     }
-- 
cgit v1.2.3


From 50e05c70d38c0e9da654cbc0f1758809e7159744 Mon Sep 17 00:00:00 2001
From: Beq Janus <beqjanus@gmail.com>
Date: Mon, 12 Aug 2024 19:01:34 +0100
Subject: Interim fix for particles no longer rezzing properly. (#2227)

In a previous PR, I noted:

Note this change moves the calcPixelArea() call to the top BEFORE we user getPixelArea(). Either that call is entirely redundant (i.e. if calc was called earlier in the frame) or we were using the stale pixelArea (one frame behind). If the former is true then it might be faster to just do an AABB frustum check.

It turns out that by moving the calcPixelArea to the "correct place", we break the rezzing of particles which are then being downsampled as a result. Moving this back to the "incorrect" location undoes the immediate effect but this whole scenario may need to be re-examined.
---
 indra/newview/llviewertexturelist.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 865805f9bf..7047ce7d29 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -938,9 +938,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                 onFace = true;
                 F32 radius;
                 F32 cos_angle_to_view_dir;
-                bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
                 static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
                 F32 vsize = face->getPixelArea();
+                bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
 
                 // Scale desired texture resolution higher or lower depending on texture scale
                 //
-- 
cgit v1.2.3


From 2cc21e982668750b237edf2c54979f58d1c52203 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 13 Aug 2024 13:14:17 -0500
Subject: Fix for coroutine assert rooted in coroRequestEnvironment (#2276)

---
 indra/newview/llenvironment.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 5dfaf176fd..6e31760e9e 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -2123,8 +2123,11 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
         LLSD environment = result[KEY_ENVIRONMENT];
         if (environment.isDefined() && apply)
         {
-            EnvironmentInfo::ptr_t envinfo = LLEnvironment::EnvironmentInfo::extract(environment);
-            apply(parcel_id, envinfo);
+            LLAppViewer::instance()->postToMainCoro([=]()
+                {
+                    EnvironmentInfo::ptr_t envinfo = LLEnvironment::EnvironmentInfo::extract(environment);
+                    apply(parcel_id, envinfo);
+                });
         }
     }
 
-- 
cgit v1.2.3


From 3cd1500801dfb0fba4a00a7162148fc8a60a1726 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 13 Aug 2024 14:52:50 +0200
Subject: #2271 BugSplat Crash #1504299:
 LLFocusableElement::~LLFocusableElement(79)

---
 indra/llui/llfocusmgr.cpp | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp
index c635d24f51..0d7c98294f 100644
--- a/indra/llui/llfocusmgr.cpp
+++ b/indra/llui/llfocusmgr.cpp
@@ -73,10 +73,20 @@ bool LLFocusableElement::wantsReturnKey() const
 // virtual
 LLFocusableElement::~LLFocusableElement()
 {
-    delete mFocusLostCallback;
-    delete mFocusReceivedCallback;
-    delete mFocusChangedCallback;
-    delete mTopLostCallback;
+    auto free_signal = [&](focus_signal_t*& signal)
+        {
+            if (signal)
+            {
+                signal->disconnect_all_slots();
+                delete signal;
+                signal = nullptr;
+            }
+        };
+
+    free_signal(mFocusLostCallback);
+    free_signal(mFocusReceivedCallback);
+    free_signal(mFocusChangedCallback);
+    free_signal(mTopLostCallback);
 }
 
 void LLFocusableElement::onFocusReceived()
-- 
cgit v1.2.3


From 183b097072015fe83c751904d8133fa105717a5b Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 16:28:23 -0400
Subject: Update tracy integration to 0.11 and rework client library to be
 configurable at build time Also copy tracy profiler client next to windows
 binary when enabled

---
 indra/cmake/Tracy.cmake          | 16 ++++++++++++++--
 indra/llcommon/CMakeLists.txt    |  4 ++++
 indra/llcommon/llprofiler.cpp    | 30 ++++++++++++++++++++++++++++++
 indra/llcommon/llprofiler.h      |  6 ------
 indra/newview/CMakeLists.txt     |  6 ++++++
 indra/newview/viewer_manifest.py |  5 +++++
 6 files changed, 59 insertions(+), 8 deletions(-)
 create mode 100644 indra/llcommon/llprofiler.cpp

(limited to 'indra')

diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index 32c02edb93..bd3c13b06a 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -4,14 +4,26 @@ include(Prebuilt)
 include_guard()
 add_library( ll::tracy INTERFACE IMPORTED )
 
-set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.")
+option(USE_TRACY "Use Tracy profiler." OFF)
 
 if (USE_TRACY)
+  option(USE_TRACY_ON_DEMAND "Use Tracy profiler." ON)
+  option(USE_TRACY_LOCAL_ONLY "Use Tracy profiler." OFF)
+
   use_system_binary(tracy)
   use_prebuilt_binary(tracy)
 
   target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
-  target_link_libraries( ll::tracy INTERFACE TracyClient )
+  
+  target_compile_definitions(ll::tracy INTERFACE -DTRACY_ENABLE=1 -DTRACY_ONLY_IPV4=1)
+
+  if (USE_TRACY_ON_DEMAND)
+    target_compile_definitions(ll::tracy INTERFACE -DTRACY_ON_DEMAND=1)
+  endif ()
+
+  if (USE_TRACY_LOCAL_ONLY)
+    target_compile_definitions(ll::tracy INTERFACE -DTRACY_NO_BROADCAST=1 -DTRACY_ONLY_LOCALHOST=1)
+  endif ()
 
   # See: indra/llcommon/llprofiler.h
   add_compile_definitions(LL_PROFILER_CONFIGURATION=3)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 8e43627a5f..165bfd52d5 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -267,6 +267,10 @@ if (DARWIN)
   list(APPEND llcommon_SOURCE_FILES llsys_objc.mm)
 endif (DARWIN)
 
+if (USE_TRACY)
+  list(APPEND llcommon_SOURCE_FILES llprofiler.cpp)
+endif ()
+
 list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
 
 add_library (llcommon ${llcommon_SOURCE_FILES})
diff --git a/indra/llcommon/llprofiler.cpp b/indra/llcommon/llprofiler.cpp
new file mode 100644
index 0000000000..bdddabf977
--- /dev/null
+++ b/indra/llcommon/llprofiler.cpp
@@ -0,0 +1,30 @@
+/**
+* @file llprofiler.cpp
+* @brief Implementation of llprofiler
+* @author Rye Cogtail
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+* $/LicenseInfo$
+*/
+
+#include "linden_common.h"
+
+#include "TracyClient.cpp"
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index 732436cc4f..b7d0522336 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -78,12 +78,6 @@ extern thread_local bool gProfilerEnabled;
 
 #if defined(LL_PROFILER_CONFIGURATION) && (LL_PROFILER_CONFIGURATION > LL_PROFILER_CONFIG_NONE)
     #if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY || LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
-        #define TRACY_ENABLE         1
-// Normally these would be enabled but we want to be able to build any viewer with Tracy enabled and run the Tracy server on another machine
-// They must be undefined in order to work across multiple machines
-//      #define TRACY_NO_BROADCAST   1
-//      #define TRACY_ONLY_LOCALHOST 1
-        #define TRACY_ONLY_IPV4      1
         #include "tracy/Tracy.hpp"
 
         // Enable OpenGL profiling
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index fbaf4e559f..7a9f3a46b5 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1776,6 +1776,7 @@ if (WINDOWS)
         --artwork=${ARTWORK_DIR}
         "--bugsplat=${BUGSPLAT_DB}"
         "--openal=${USE_OPENAL}"
+        "--tracy=${USE_TRACY}"
         --build=${CMAKE_CURRENT_BINARY_DIR}
         --buildtype=$<CONFIG>
         "--channel=${VIEWER_CHANNEL}"
@@ -1836,6 +1837,7 @@ if (WINDOWS)
               --artwork=${ARTWORK_DIR}
               "--bugsplat=${BUGSPLAT_DB}"
               "--openal=${USE_OPENAL}"
+              "--tracy=${USE_TRACY}"
               --build=${CMAKE_CURRENT_BINARY_DIR}
               --buildtype=$<CONFIG>
               "--channel=${VIEWER_CHANNEL}"
@@ -1985,6 +1987,7 @@ if (LINUX)
         --artwork=${ARTWORK_DIR}
         "--bugsplat=${BUGSPLAT_DB}"
         "--openal=${USE_OPENAL}"
+        "--tracy=${USE_TRACY}"
         --build=${CMAKE_CURRENT_BINARY_DIR}
         --buildtype=${CMAKE_BUILD_TYPE}
         "--channel=${VIEWER_CHANNEL}"
@@ -2012,6 +2015,7 @@ if (LINUX)
       --artwork=${ARTWORK_DIR}
       "--bugsplat=${BUGSPLAT_DB}"
       "--openal=${USE_OPENAL}"
+      "--tracy=${USE_TRACY}"
       --build=${CMAKE_CURRENT_BINARY_DIR}
       --buildtype=${CMAKE_BUILD_TYPE}
       "--channel=${VIEWER_CHANNEL}"
@@ -2087,6 +2091,7 @@ if (DARWIN)
       --artwork=${ARTWORK_DIR}
       "--bugsplat=${BUGSPLAT_DB}"
       "--openal=${USE_OPENAL}"
+      "--tracy=${USE_TRACY}"
       --build=${CMAKE_CURRENT_BINARY_DIR}
       --buildtype=$<CONFIG>
       --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
@@ -2121,6 +2126,7 @@ if (DARWIN)
               --artwork=${ARTWORK_DIR}
               "--bugsplat=${BUGSPLAT_DB}"
               "--openal=${USE_OPENAL}"
+              "--tracy=${USE_TRACY}"
               --build=${CMAKE_CURRENT_BINARY_DIR}
               --buildtype=$<CONFIG>
               "--channel=${VIEWER_CHANNEL}"
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 91a9347449..b2f9654eb3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -586,6 +586,10 @@ class Windows_x86_64_Manifest(ViewerManifest):
                 self.path("BugSplat64.dll")
                 self.path("BugSplatRc64.dll")
 
+            if self.args['tracy'] == 'ON':
+                with self.prefix(src=os.path.join(pkgdir, 'bin')):
+                    self.path("tracy-profiler.exe")
+
         self.path(src="licenses-win32.txt", dst="licenses.txt")
         self.path("featuretable.txt")
         self.path("cube.dae")
@@ -1372,6 +1376,7 @@ if __name__ == "__main__":
         dict(name='bugsplat', description="""BugSplat database to which to post crashes,
              if BugSplat crash reporting is desired""", default=''),
         dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
+        dict(name='tracy', description="""Indication tracy profiler is enabled""", default='OFF'),
         ]
     try:
         main(extra=extra_arguments)
-- 
cgit v1.2.3


From 70f455347eafa802036cf4a90d903d139a0fd7e9 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 17:26:19 -0400
Subject: Introduce tracy instrumentation of mutex in LLSingleton,
 LLInstanceTracker and logging

---
 indra/llcommon/llerror.cpp         | 55 ++++++++++++++++++--------------------
 indra/llcommon/llinstancetracker.h | 22 ++++++++-------
 indra/llcommon/llprofiler.h        | 18 +++++++++++++
 indra/llcommon/llsingleton.cpp     |  5 ++--
 indra/llcommon/llsingleton.h       | 18 +++++++------
 5 files changed, 69 insertions(+), 49 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 6c3b9c9542..41c69ba194 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -55,6 +55,7 @@
 #include "llsingleton.h"
 #include "llstl.h"
 #include "lltimer.h"
+#include "llprofiler.h"
 
 // On Mac, got:
 // #error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define
@@ -506,7 +507,7 @@ namespace
         LLError::TimeFunction               mTimeFunction;
 
         Recorders                           mRecorders;
-        LLCoros::RMutex                     mRecorderMutex;
+        LL_PROFILE_MUTEX_NAMED(LLCoros::RMutex, mRecorderMutex, "Log Recorders");
 
         int                                 mShouldLogCallCounter;
 
@@ -529,7 +530,6 @@ namespace
         mCrashFunction(NULL),
         mTimeFunction(NULL),
         mRecorders(),
-        mRecorderMutex(),
         mShouldLogCallCounter(0)
     {
     }
@@ -1044,7 +1044,7 @@ namespace LLError
             return;
         }
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
-        std::unique_lock lock(s->mRecorderMutex);
+        std::unique_lock lock(s->mRecorderMutex); LL_PROFILE_MUTEX_LOCK(s->mRecorderMutex);
         s->mRecorders.push_back(recorder);
     }
 
@@ -1055,7 +1055,7 @@ namespace LLError
             return;
         }
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
-        std::unique_lock lock(s->mRecorderMutex);
+        std::unique_lock lock(s->mRecorderMutex); LL_PROFILE_MUTEX_LOCK(s->mRecorderMutex);
         s->mRecorders.erase(std::remove(s->mRecorders.begin(), s->mRecorders.end(), recorder),
                             s->mRecorders.end());
     }
@@ -1104,7 +1104,7 @@ namespace LLError
     std::shared_ptr<RECORDER> findRecorder()
     {
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
-        std::unique_lock lock(s->mRecorderMutex);
+        std::unique_lock lock(s->mRecorderMutex); LL_PROFILE_MUTEX_LOCK(s->mRecorderMutex);
         return findRecorderPos<RECORDER>(s).first;
     }
 
@@ -1115,7 +1115,7 @@ namespace LLError
     bool removeRecorder()
     {
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
-        std::unique_lock lock(s->mRecorderMutex);
+        std::unique_lock lock(s->mRecorderMutex); LL_PROFILE_MUTEX_LOCK(s->mRecorderMutex);
         auto found = findRecorderPos<RECORDER>(s);
         if (found.first)
         {
@@ -1221,7 +1221,7 @@ namespace
 
         std::string escaped_message;
 
-        std::unique_lock lock(s->mRecorderMutex);
+        std::unique_lock lock(s->mRecorderMutex); LL_PROFILE_MUTEX_LOCK(s->mRecorderMutex);
         for (LLError::RecorderPtr& r : s->mRecorders)
         {
             if (!r->enabled())
@@ -1280,24 +1280,21 @@ namespace
 }
 
 namespace {
-    // We need a couple different mutexes, but we want to use the same mechanism
-    // for both. Make getMutex() a template function with different instances
-    // for different MutexDiscriminator values.
-    enum MutexDiscriminator
-    {
-        LOG_MUTEX,
-        STACKS_MUTEX
-    };
     // Some logging calls happen very early in processing -- so early that our
     // module-static variables aren't yet initialized. getMutex() wraps a
     // function-static LLMutex so that early calls can still have a valid
     // LLMutex instance.
-    template <MutexDiscriminator MTX>
-    LLMutex* getMutex()
+    auto getLogMutex()
+    {
+        // guaranteed to be initialized the first time control reaches here
+        static LL_PROFILE_MUTEX_NAMED(std::recursive_mutex, sLogMutex, "Log Mutex");
+        return &sLogMutex;
+    }
+    auto getStacksMutex()
     {
         // guaranteed to be initialized the first time control reaches here
-        static LLMutex sMutex;
-        return &sMutex;
+        static LL_PROFILE_MUTEX_NAMED(std::recursive_mutex, sStacksMutex, "Stacks Mutex");
+        return &sStacksMutex;
     }
 
     bool checkLevelMap(const LevelMap& map, const std::string& key,
@@ -1347,8 +1344,8 @@ namespace LLError
     bool Log::shouldLog(CallSite& site)
     {
         LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
-        LLMutexTrylock lock(getMutex<LOG_MUTEX>(), 5);
-        if (!lock.isLocked())
+        std::unique_lock lock(*getLogMutex(), std::try_to_lock); LL_PROFILE_MUTEX_LOCK(*getLogMutex());
+        if (!lock)
         {
             return false;
         }
@@ -1392,8 +1389,8 @@ namespace LLError
     void Log::flush(const std::ostringstream& out, const CallSite& site)
     {
         LL_PROFILE_ZONE_SCOPED_CATEGORY_LOGGING;
-        LLMutexTrylock lock(getMutex<LOG_MUTEX>(),5);
-        if (!lock.isLocked())
+        std::unique_lock lock(*getLogMutex(), std::try_to_lock); LL_PROFILE_MUTEX_LOCK(*getLogMutex());
+        if (!lock)
         {
             return;
         }
@@ -1523,8 +1520,8 @@ namespace LLError
     //static
     void LLCallStacks::push(const char* function, const int line)
     {
-        LLMutexTrylock lock(getMutex<STACKS_MUTEX>(), 5);
-        if (!lock.isLocked())
+        std::unique_lock lock(*getStacksMutex(), std::try_to_lock); LL_PROFILE_MUTEX_LOCK(*getStacksMutex());
+        if (!lock)
         {
             return;
         }
@@ -1548,8 +1545,8 @@ namespace LLError
     //static
     void LLCallStacks::end(const std::ostringstream& out)
     {
-        LLMutexTrylock lock(getMutex<STACKS_MUTEX>(), 5);
-        if (!lock.isLocked())
+        std::unique_lock lock(*getStacksMutex(), std::try_to_lock); LL_PROFILE_MUTEX_LOCK(*getStacksMutex());
+        if (!lock)
         {
             return;
         }
@@ -1565,8 +1562,8 @@ namespace LLError
     //static
     void LLCallStacks::print()
     {
-        LLMutexTrylock lock(getMutex<STACKS_MUTEX>(), 5);
-        if (!lock.isLocked())
+        std::unique_lock lock(*getStacksMutex(), std::try_to_lock); LL_PROFILE_MUTEX_LOCK(*getStacksMutex());
+        if (!lock)
         {
             return;
         }
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index 3232a0e219..92b26354a1 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -52,7 +52,7 @@ namespace LLInstanceTrackerPrivate
     struct StaticBase
     {
         // We need to be able to lock static data while manipulating it.
-        std::mutex mMutex;
+        LL_PROFILE_MUTEX_NAMED(std::mutex, mMutex, "InstanceTracker Data");
     };
 
     void logerrs(const char* cls, const std::string&, const std::string&, const std::string&);
@@ -101,7 +101,8 @@ public:
 
     static size_t instanceCount()
     {
-        return LockStatic()->mMap.size();
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
+        return lock->mMap.size();
     }
 
     // snapshot of std::pair<const KEY, std::shared_ptr<SUBCLASS>> pairs, for
@@ -236,7 +237,7 @@ public:
 
     static ptr_t getInstance(const KEY& k)
     {
-        LockStatic lock;
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
         const InstanceMap& map(lock->mMap);
         typename InstanceMap::const_iterator found = map.find(k);
         return (found == map.end()) ? NULL : found->second;
@@ -252,19 +253,19 @@ protected:
         ptr_t ptr(static_cast<T*>(this), [](T*){});
         // save corresponding weak_ptr for future reference
         mSelf = ptr;
-        LockStatic lock;
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
         add_(lock, key, ptr);
     }
 public:
     virtual ~LLInstanceTracker()
     {
-        LockStatic lock;
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
         remove_(lock);
     }
 protected:
     virtual void setKey(KEY key)
     {
-        LockStatic lock;
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
         // Even though the shared_ptr we store in our map has a no-op deleter
         // for T itself, letting the use count decrement to 0 will still
         // delete the use-count object. Capture the shared_ptr we just removed
@@ -376,7 +377,8 @@ public:
 
     static size_t instanceCount()
     {
-        return LockStatic()->mSet.size();
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
+        return lock->mSet.size();
     }
 
     // snapshot of std::shared_ptr<SUBCLASS> pointers
@@ -488,14 +490,16 @@ protected:
         // save corresponding weak_ptr for future reference
         mSelf = ptr;
         // Also store it in our class-static set to track this instance.
-        LockStatic()->mSet.emplace(ptr);
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
+        lock->mSet.emplace(ptr);
     }
 public:
     virtual ~LLInstanceTracker()
     {
         // convert weak_ptr to shared_ptr because that's what we store in our
         // InstanceSet
-        LockStatic()->mSet.erase(mSelf.lock());
+        LockStatic lock; LL_PROFILE_MUTEX_LOCK(lock->mMutex);
+        lock->mSet.erase(mSelf.lock());
     }
 protected:
     LLInstanceTracker(const LLInstanceTracker& other):
diff --git a/indra/llcommon/llprofiler.h b/indra/llcommon/llprofiler.h
index b7d0522336..f6a4d24747 100644
--- a/indra/llcommon/llprofiler.h
+++ b/indra/llcommon/llprofiler.h
@@ -102,6 +102,12 @@ extern thread_local bool gProfilerEnabled;
         #define LL_PROFILE_ZONE_ERR(name)               LL_PROFILE_ZONE_NAMED_COLOR( name, 0XFF0000  )  // RGB yellow
         #define LL_PROFILE_ZONE_INFO(name)              LL_PROFILE_ZONE_NAMED_COLOR( name, 0X00FFFF  )  // RGB cyan
         #define LL_PROFILE_ZONE_WARN(name)              LL_PROFILE_ZONE_NAMED_COLOR( name, 0x0FFFF00 )  // RGB red
+
+        #define LL_PROFILE_MUTEX(type, varname)                     TracyLockable(type, varname)
+        #define LL_PROFILE_MUTEX_NAMED(type, varname, desc)         TracyLockableN(type, varname, desc)
+        #define LL_PROFILE_MUTEX_SHARED(type, varname)              TracySharedLockable(type, varname)
+        #define LL_PROFILE_MUTEX_SHARED_NAMED(type, varname, desc)  TracySharedLockableN(type, varname, desc)
+        #define LL_PROFILE_MUTEX_LOCK(varname) { auto& mutex = varname; LockMark(mutex); }
     #endif
     #if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_FAST_TIMER
         #define LL_PROFILER_FRAME_END
@@ -118,6 +124,12 @@ extern thread_local bool gProfilerEnabled;
         #define LL_PROFILE_ZONE_ERR(name)               (void)(name); // Not supported
         #define LL_PROFILE_ZONE_INFO(name)              (void)(name); // Not supported
         #define LL_PROFILE_ZONE_WARN(name)              (void)(name); // Not supported
+
+        #define LL_PROFILE_MUTEX(type, varname) type varname
+        #define LL_PROFILE_MUTEX_NAMED(type, varname, desc) type varname
+        #define LL_PROFILE_MUTEX_SHARED(type, varname) type varname
+        #define LL_PROFILE_MUTEX_SHARED_NAMED(type, varname, desc) type varname
+        #define LL_PROFILE_MUTEX_LOCK(varname) // LL_PROFILE_MUTEX_LOCK is a no-op when Tracy is disabled
     #endif
     #if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
         #define LL_PROFILER_FRAME_END                   FrameMark
@@ -133,6 +145,12 @@ extern thread_local bool gProfilerEnabled;
         #define LL_PROFILE_ZONE_ERR(name)               LL_PROFILE_ZONE_NAMED_COLOR( name, 0XFF0000  )  // RGB yellow
         #define LL_PROFILE_ZONE_INFO(name)              LL_PROFILE_ZONE_NAMED_COLOR( name, 0X00FFFF  )  // RGB cyan
         #define LL_PROFILE_ZONE_WARN(name)              LL_PROFILE_ZONE_NAMED_COLOR( name, 0x0FFFF00 )  // RGB red
+
+        #define LL_PROFILE_MUTEX(type, varname)                     TracyLockable(type, varname)
+        #define LL_PROFILE_MUTEX_NAMED(type, varname, desc)         TracyLockableN(type, varname, desc)
+        #define LL_PROFILE_MUTEX_SHARED(type, varname)              TracySharedLockable(type, varname)
+        #define LL_PROFILE_MUTEX_SHARED_NAMED(type, varname, desc)  TracySharedLockableN(type, varname, desc)
+        #define LL_PROFILE_MUTEX_LOCK(varname) { auto& mutex = varname; LockMark(mutex); } // see https://github.com/wolfpld/tracy/issues/575
     #endif
 #else
     #define LL_PROFILER_FRAME_END
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index d00e703a10..05dc3cde79 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -59,9 +59,8 @@ private:
     // it's safe to log -- which involves querying a different LLSingleton --
     // which requires accessing the master list.
     typedef std::recursive_mutex mutex_t;
-    typedef std::unique_lock<mutex_t> lock_t;
-
-    mutex_t mMutex;
+    LL_PROFILE_MUTEX_NAMED(mutex_t, mMutex, "Singleton MasterList");
+    typedef std::unique_lock<decltype(mMutex)> lock_t;
 
 public:
     // Instantiate this to both obtain a reference to MasterList::instance()
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 316831cd74..b5659e053c 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -35,6 +35,8 @@
 #include "lockstatic.h"
 #include "llthread.h"               // on_main_thread()
 #include "llmainthreadtask.h"
+#include "llprofiler.h"
+#include "llerror.h"
 
 #ifdef LL_WINDOWS
 #pragma warning(push)
@@ -298,7 +300,7 @@ private:
         // Use a recursive_mutex in case of constructor circularity. With a
         // non-recursive mutex, that would result in deadlock.
         typedef std::recursive_mutex mutex_t;
-        mutex_t mMutex;             // LockStatic looks for mMutex
+        LL_PROFILE_MUTEX_NAMED(mutex_t, mMutex, "Singleton Data"); // LockStatic looks for mMutex
 
         EInitState      mInitState{UNINITIALIZED};
         DERIVED_TYPE*   mInstance{nullptr};
@@ -420,7 +422,7 @@ protected:
         // deleteSingleton() to defend against manual deletion. When we moved
         // cleanup to deleteSingleton(), we hit crashes due to dangling
         // pointers in the MasterList.
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
         lk->mInstance  = nullptr;
         lk->mInitState = DELETED;
 
@@ -448,7 +450,7 @@ public:
         // Hold the lock while we call cleanupSingleton() and the destructor.
         // Our destructor also instantiates LockStatic, requiring a recursive
         // mutex.
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
         // of course, only cleanup and delete if there's something there
         if (lk->mInstance)
         {
@@ -505,7 +507,7 @@ public:
         { // nested scope for 'lk'
             // In case racing threads call getInstance() at the same moment,
             // serialize the calls.
-            LockStatic lk;
+            LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
 
             switch (lk->mInitState)
             {
@@ -595,7 +597,7 @@ public:
     static bool instanceExists()
     {
         // defend any access to sData from racing threads
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
         return lk->mInitState == INITIALIZED;
     }
 
@@ -605,7 +607,7 @@ public:
     static bool wasDeleted()
     {
         // defend any access to sData from racing threads
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
         return lk->mInitState == DELETED;
     }
 };
@@ -644,7 +646,7 @@ private:
         // In case racing threads both call initParamSingleton() at the same
         // time, serialize them. One should initialize; the other should see
         // mInitState already set.
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
         // For organizational purposes this function shouldn't be called twice
         if (lk->mInitState != super::UNINITIALIZED)
         {
@@ -708,7 +710,7 @@ public:
     {
         // In case racing threads call getInstance() at the same moment as
         // initParamSingleton(), serialize the calls.
-        LockStatic lk;
+        LockStatic lk; LL_PROFILE_MUTEX_LOCK(lk->mMutex);
 
         switch (lk->mInitState)
         {
-- 
cgit v1.2.3


From 6f0e6765218543c8e0d84931d37460026bc6bb3c Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Wed, 14 Aug 2024 06:03:39 +0300
Subject: Update indra/cmake/Tracy.cmake

to stop pre-commit from complaining
---
 indra/cmake/Tracy.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index bd3c13b06a..3339c51ba0 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -14,7 +14,7 @@ if (USE_TRACY)
   use_prebuilt_binary(tracy)
 
   target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
-  
+
   target_compile_definitions(ll::tracy INTERFACE -DTRACY_ENABLE=1 -DTRACY_ONLY_IPV4=1)
 
   if (USE_TRACY_ON_DEMAND)
-- 
cgit v1.2.3


From ad8dc13150b640ae9613e1edd8cc8c2c72b1e6b2 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 18:24:53 -0400
Subject: Reduce thread contention on HTTPStats singleton access via simpleton.
 The main thread and http thread had significant contention in asset-fetch
 heavy scenarios that could result in main thread and http thread stalls when
 the http thread was accessing the HTTPStats singleton and the master
 singleton dependency list had to be queried.

The HTTP thread is the primary user of HTTPStats with the main thread only calling into it during shut down to query the stats for the session.
---
 indra/llcorehttp/httprequest.cpp | 2 ++
 indra/llcorehttp/httpstats.h     | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp
index 216d407deb..2aaf71f8a4 100644
--- a/indra/llcorehttp/httprequest.cpp
+++ b/indra/llcorehttp/httprequest.cpp
@@ -489,6 +489,7 @@ HttpStatus HttpRequest::createService()
         HttpRequestQueue::init();
         HttpRequestQueue * rq = HttpRequestQueue::instanceOf();
         HttpService::init(rq);
+        HTTPStats::createInstance();
         has_inited = true;
     }
 
@@ -502,6 +503,7 @@ HttpStatus HttpRequest::destroyService()
 
     if (has_inited)
     {
+        HTTPStats::deleteSingleton();
         HttpService::term();
         HttpRequestQueue::term();
         has_inited = false;
diff --git a/indra/llcorehttp/httpstats.h b/indra/llcorehttp/httpstats.h
index f12e59da0c..5c0f26d34e 100644
--- a/indra/llcorehttp/httpstats.h
+++ b/indra/llcorehttp/httpstats.h
@@ -35,12 +35,12 @@
 
 namespace LLCore
 {
-    class HTTPStats : public LLSingleton<HTTPStats>
+    class HTTPStats final : public LLSimpleton<HTTPStats>
     {
-        LLSINGLETON(HTTPStats);
-        virtual ~HTTPStats();
-
     public:
+        HTTPStats();
+        ~HTTPStats();
+
         void resetStats();
 
         typedef LLStatsAccumulator StatsAccumulator;
-- 
cgit v1.2.3


From 2cff1e217ba0df94fc50a30c8d49dc848c294ac6 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 18:39:57 -0400
Subject: Reduce UI draw stalls from LLSpellChecker singleton via simpleton

---
 indra/llui/llspellcheck.cpp   | 17 +++++------------
 indra/llui/llspellcheck.h     |  9 ++++-----
 indra/llui/llui.cpp           |  3 +++
 indra/newview/llappviewer.cpp | 29 +++++++++++++++--------------
 4 files changed, 27 insertions(+), 31 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 16ffd352cf..e15616a16b 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -42,19 +42,13 @@ static const std::string DICT_FILE_USER = "user_dictionaries.xml";
 LLSpellChecker::settings_change_signal_t LLSpellChecker::sSettingsChangeSignal;
 
 LLSpellChecker::LLSpellChecker()
-    : mHunspell(NULL)
 {
+    // Load initial dictionary information
+    refreshDictionaryMap();
 }
 
 LLSpellChecker::~LLSpellChecker()
 {
-    delete mHunspell;
-}
-
-void LLSpellChecker::initSingleton()
-{
-    // Load initial dictionary information
-    refreshDictionaryMap();
 }
 
 bool LLSpellChecker::checkSpelling(const std::string& word) const
@@ -300,8 +294,7 @@ void LLSpellChecker::initHunspell(const std::string& dict_language)
 {
     if (mHunspell)
     {
-        delete mHunspell;
-        mHunspell = NULL;
+        mHunspell.reset();
         mDictLanguage.clear();
         mDictFile.clear();
         mIgnoreList.clear();
@@ -322,11 +315,11 @@ void LLSpellChecker::initHunspell(const std::string& dict_language)
         const std::string filename_dic = dict_entry["name"].asString() + ".dic";
         if ( (gDirUtilp->fileExists(user_path + filename_aff)) && (gDirUtilp->fileExists(user_path + filename_dic)) )
         {
-            mHunspell = new Hunspell((user_path + filename_aff).c_str(), (user_path + filename_dic).c_str());
+            mHunspell = std::make_unique<Hunspell>((user_path + filename_aff).c_str(), (user_path + filename_dic).c_str());
         }
         else if ( (gDirUtilp->fileExists(app_path + filename_aff)) && (gDirUtilp->fileExists(app_path + filename_dic)) )
         {
-            mHunspell = new Hunspell((app_path + filename_aff).c_str(), (app_path + filename_dic).c_str());
+            mHunspell = std::make_unique<Hunspell>((app_path + filename_aff).c_str(), (app_path + filename_dic).c_str());
         }
         if (!mHunspell)
         {
diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h
index e4d8a12ef1..9df2f94085 100644
--- a/indra/llui/llspellcheck.h
+++ b/indra/llui/llspellcheck.h
@@ -34,12 +34,12 @@
 
 class Hunspell;
 
-class LLSpellChecker : public LLSingleton<LLSpellChecker>
+class LLSpellChecker : public LLSimpleton<LLSpellChecker>
 {
-    LLSINGLETON(LLSpellChecker);
+public:
+    LLSpellChecker();
     ~LLSpellChecker();
 
-public:
     void addToCustomDictionary(const std::string& word);
     void addToIgnoreList(const std::string& word);
     bool checkSpelling(const std::string& word) const;
@@ -47,7 +47,6 @@ public:
 protected:
     void addToDictFile(const std::string& dict_path, const std::string& word);
     void initHunspell(const std::string& dict_language);
-    void initSingleton() override;
 
 public:
     typedef std::list<std::string> dict_list_t;
@@ -77,7 +76,7 @@ public:
     static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb);
 
 protected:
-    Hunspell*   mHunspell;
+    std::unique_ptr<Hunspell>   mHunspell;
     std::string mDictLanguage;
     std::string mDictFile;
     dict_list_t mDictSecondary;
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 8d46422c09..e36dae3955 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -54,6 +54,7 @@
 #include "llmenubutton.h"
 #include "llloadingindicator.h"
 #include "llwindow.h"
+#include "llspellcheck.h"
 
 // for registration
 #include "llfiltereditor.h"
@@ -157,6 +158,7 @@ mRootView(NULL),
 mHelpImpl(NULL)
 {
     LLRender2D::createInstance(image_provider);
+    LLSpellChecker::createInstance();
 
     if ((get_ptr_in_map(mSettingGroups, std::string("config")) == NULL) ||
         (get_ptr_in_map(mSettingGroups, std::string("floater")) == NULL) ||
@@ -198,6 +200,7 @@ mHelpImpl(NULL)
 
 LLUI::~LLUI()
 {
+    LLSpellChecker::deleteSingleton();
     LLRender2D::deleteSingleton();
 }
 
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 262ab439b4..36fe5a953f 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -806,6 +806,20 @@ bool LLAppViewer::init()
         LLUIImageList::getInstance(),
         ui_audio_callback,
         deferred_ui_audio_callback);
+
+    if (gSavedSettings.getBOOL("SpellCheck"))
+    {
+        std::list<std::string> dict_list;
+        std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary");
+        boost::split(dict_list, dict_setting, boost::is_any_of(std::string(",")));
+        if (!dict_list.empty())
+        {
+            LLSpellChecker::setUseSpellCheck(dict_list.front());
+            dict_list.pop_front();
+            LLSpellChecker::instance().setSecondaryDictionaries(dict_list);
+        }
+    }
+
     LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;
 
     // NOW LLUI::getLanguage() should work. gDirUtilp must know the language
@@ -1611,7 +1625,7 @@ bool LLAppViewer::doFrame()
 
             {
                 LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df gMeshRepo");
-            gMeshRepo.update() ;
+                gMeshRepo.update() ;
             }
 
             if(!total_work_pending) //pause texture fetching threads if nothing to process.
@@ -2799,19 +2813,6 @@ bool LLAppViewer::initConfiguration()
                                  gSavedSettings.getString("Language"));
     }
 
-    if (gSavedSettings.getBOOL("SpellCheck"))
-    {
-        std::list<std::string> dict_list;
-        std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary");
-        boost::split(dict_list, dict_setting, boost::is_any_of(std::string(",")));
-        if (!dict_list.empty())
-        {
-            LLSpellChecker::setUseSpellCheck(dict_list.front());
-            dict_list.pop_front();
-            LLSpellChecker::instance().setSecondaryDictionaries(dict_list);
-        }
-    }
-
     if (gNonInteractive)
     {
         tempSetControl("AllowMultipleViewers", "true");
-- 
cgit v1.2.3


From 6dbf1cafb20557722f30618e744e5ab61e9365fa Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 18:45:50 -0400
Subject: Reduce texture fetch and main thread contention from
 LLViewerStatsRecorder via simpleton.

---
 indra/newview/llappviewer.cpp           |  2 ++
 indra/newview/llstartup.cpp             |  1 -
 indra/newview/llviewerstatsrecorder.cpp | 10 +---------
 indra/newview/llviewerstatsrecorder.h   |  9 +++------
 4 files changed, 6 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 36fe5a953f..ca7a300403 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1284,6 +1284,7 @@ bool LLAppViewer::init()
     //LLSimpleton creations
     LLEnvironment::createInstance();
     LLWorld::createInstance();
+    LLViewerStatsRecorder::createInstance();
     LLSelectMgr::createInstance();
     LLViewerCamera::createInstance();
     LL::GLTFSceneManager::createInstance();
@@ -2166,6 +2167,7 @@ bool LLAppViewer::cleanup()
     LL::GLTFSceneManager::deleteSingleton();
     LLEnvironment::deleteSingleton();
     LLSelectMgr::deleteSingleton();
+    LLViewerStatsRecorder::deleteSingleton();
     LLViewerEventRecorder::deleteSingleton();
     LLWorld::deleteSingleton();
     LLVoiceClient::deleteSingleton();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index b993ba16d5..7cefa21125 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1285,7 +1285,6 @@ bool idle_startup()
         //
         // Initialize classes w/graphics stuff.
         //
-        LLViewerStatsRecorder::instance(); // Since textures work in threads
         LLSurface::initClasses();
         display_startup();
 
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index 88edb96fbb..58065ecce5 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -27,16 +27,13 @@
 #include "llviewerprecompiledheaders.h"
 #include "llviewerstatsrecorder.h"
 
-
 #include "llcontrol.h"
 #include "llfile.h"
+#include "llviewercontrol.h"
 #include "llviewerregion.h"
 #include "llviewerobject.h"
 #include "llworld.h"
 
-extern LLControlGroup  gSavedSettings;
-
-LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL;
 LLViewerStatsRecorder::LLViewerStatsRecorder() :
     mStatsFile(NULL),
     mTimer(),
@@ -48,11 +45,6 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() :
     mMaxDuration(300.f),
     mSkipSaveIfZeros(false)
 {
-    if (NULL != sInstance)
-    {
-        LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL;
-    }
-    sInstance = this;
     clearStats();
 }
 
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index ecc321c0a8..2108f49dc3 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -38,13 +38,12 @@
 class LLMutex;
 class LLViewerObject;
 
-class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder>
+class LLViewerStatsRecorder : public LLSimpleton<LLViewerStatsRecorder>
 {
-    LLSINGLETON(LLViewerStatsRecorder);
+public:
+    LLViewerStatsRecorder();
     LOG_CLASS(LLViewerStatsRecorder);
     ~LLViewerStatsRecorder();
-
- public:
     // Enable/disable stats recording.  This is broken down into two
     // flags so we can record stats without writing them to the log
     // file.  This is useful to analyzing updates for scene loading.
@@ -140,8 +139,6 @@ private:
     void closeStatsFile();
     void makeStatsFileName();
 
-    static LLViewerStatsRecorder* sInstance;
-
     LLFILE *    mStatsFile;         // File to write data into
     std::string mStatsFileName;
 
-- 
cgit v1.2.3


From 0ee528c5fdfa8d49ebd43774853880f1b2e352d8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 13 Aug 2024 18:35:46 -0400
Subject: Mitigate asset fetch thread stalls from LLDiskCache mutex contention
 and trivial cleanup Move LLDiskCache::updateFileAccessTime to LLFilesystem as
 it's the only user of that function.

Change mCacheDir and LLDiskCache::metaDataToFilepath to statics.
---
 indra/llfilesystem/lldiskcache.cpp  | 120 ++++++++----------------------------
 indra/llfilesystem/lldiskcache.h    |  23 +------
 indra/llfilesystem/llfilesystem.cpp |  90 ++++++++++++++++++++++-----
 indra/llfilesystem/llfilesystem.h   |   7 +++
 4 files changed, 108 insertions(+), 132 deletions(-)

(limited to 'indra')

diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index 86b1e2ac81..e780387f4e 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -39,15 +39,25 @@
 
 #include "lldiskcache.h"
 
+ /**
+  * The prefix inserted at the start of a cache file filename to
+  * help identify it as a cache file. It's probably not required
+  * (just the presence in the cache folder is enough) but I am
+  * paranoid about the cache folder being set to something bad
+  * like the users' OS system dir by mistake or maliciously and
+  * this will help to offset any damage if that happens.
+  */
+static const std::string CACHE_FILENAME_PREFIX("sl_cache");
+
+std::string LLDiskCache::sCacheDir;
+
 LLDiskCache::LLDiskCache(const std::string cache_dir,
                          const uintmax_t max_size_bytes,
                          const bool enable_cache_debug_info) :
-    mCacheDir(cache_dir),
     mMaxSizeBytes(max_size_bytes),
     mEnableCacheDebugInfo(enable_cache_debug_info)
 {
-    mCacheFilenamePrefix = "sl_cache";
-
+    sCacheDir = cache_dir;
     LLFile::mkdir(cache_dir);
 }
 
@@ -83,7 +93,7 @@ void LLDiskCache::purge()
 {
     if (mEnableCacheDebugInfo)
     {
-        LL_INFOS() << "Total dir size before purge is " << dirFileSize(mCacheDir) << LL_ENDL;
+        LL_INFOS() << "Total dir size before purge is " << dirFileSize(sCacheDir) << LL_ENDL;
     }
 
     boost::system::error_code ec;
@@ -93,9 +103,9 @@ void LLDiskCache::purge()
     std::vector<file_info_t> file_info;
 
 #if LL_WINDOWS
-    std::wstring cache_path(utf8str_to_utf16str(mCacheDir));
+    std::wstring cache_path(utf8str_to_utf16str(sCacheDir));
 #else
-    std::string cache_path(mCacheDir);
+    std::string cache_path(sCacheDir);
 #endif
     if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed())
     {
@@ -104,7 +114,7 @@ void LLDiskCache::purge()
         {
             if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed())
             {
-                if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos)
+                if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos)
                 {
                     uintmax_t file_size = boost::filesystem::file_size(*iter, ec);
                     if (ec.failed())
@@ -181,7 +191,7 @@ void LLDiskCache::purge()
             LL_INFOS() << line.str() << LL_ENDL;
         }
 
-        LL_INFOS() << "Total dir size after purge is " << dirFileSize(mCacheDir) << LL_ENDL;
+        LL_INFOS() << "Total dir size after purge is " << dirFileSize(sCacheDir) << LL_ENDL;
         LL_INFOS() << "Cache purge took " << execute_time << " ms to execute for " << file_info.size() << " files" << LL_ENDL;
     }
 }
@@ -236,89 +246,9 @@ const std::string LLDiskCache::assetTypeToString(LLAssetType::EType at)
     return std::string("UNKNOWN");
 }
 
-const std::string LLDiskCache::metaDataToFilepath(const std::string id,
-        LLAssetType::EType at,
-        const std::string extra_info)
+const std::string LLDiskCache::metaDataToFilepath(const std::string& id, LLAssetType::EType at)
 {
-    std::ostringstream file_path;
-
-    file_path << mCacheDir;
-    file_path << gDirUtilp->getDirDelimiter();
-    file_path << mCacheFilenamePrefix;
-    file_path << "_";
-    file_path << id;
-    file_path << "_";
-    file_path << (extra_info.empty() ? "0" : extra_info);
-    //file_path << "_";
-    //file_path << assetTypeToString(at); // see  SL-14210 Prune descriptive tag from new cache filenames
-                                          // for details of why it was removed. Note that if you put it
-                                          // back or change the format of the filename, the cache files
-                                          // files will be invalidated (and perhaps, more importantly,
-                                          // never deleted unless you delete them manually).
-    file_path << ".asset";
-
-    return file_path.str();
-}
-
-void LLDiskCache::updateFileAccessTime(const std::string file_path)
-{
-    /**
-     * Threshold in time_t units that is used to decide if the last access time
-     * time of the file is updated or not. Added as a precaution for the concern
-     * outlined in SL-14582  about frequent writes on older SSDs reducing their
-     * lifespan. I think this is the right place for the threshold value - rather
-     * than it being a pref - do comment on that Jira if you disagree...
-     *
-     * Let's start with 1 hour in time_t units and see how that unfolds
-     */
-    const std::time_t time_threshold = 1 * 60 * 60;
-
-    // current time
-    const std::time_t cur_time = std::time(nullptr);
-
-    boost::system::error_code ec;
-#if LL_WINDOWS
-    // file last write time
-    const std::time_t last_write_time = boost::filesystem::last_write_time(utf8str_to_utf16str(file_path), ec);
-    if (ec.failed())
-    {
-        LL_WARNS() << "Failed to read last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
-        return;
-    }
-
-    // delta between cur time and last time the file was written
-    const std::time_t delta_time = cur_time - last_write_time;
-
-    // we only write the new value if the time in time_threshold has elapsed
-    // before the last one
-    if (delta_time > time_threshold)
-    {
-        boost::filesystem::last_write_time(utf8str_to_utf16str(file_path), cur_time, ec);
-    }
-#else
-    // file last write time
-    const std::time_t last_write_time = boost::filesystem::last_write_time(file_path, ec);
-    if (ec.failed())
-    {
-        LL_WARNS() << "Failed to read last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
-        return;
-    }
-
-    // delta between cur time and last time the file was written
-    const std::time_t delta_time = cur_time - last_write_time;
-
-    // we only write the new value if the time in time_threshold has elapsed
-    // before the last one
-    if (delta_time > time_threshold)
-    {
-        boost::filesystem::last_write_time(file_path, cur_time, ec);
-    }
-#endif
-
-    if (ec.failed())
-    {
-        LL_WARNS() << "Failed to update last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
-    }
+    return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.c_str());
 }
 
 const std::string LLDiskCache::getCacheInfo()
@@ -326,7 +256,7 @@ const std::string LLDiskCache::getCacheInfo()
     std::ostringstream cache_info;
 
     F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0f * 1024.0f);
-    F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0f;
+    F32 percent_used = ((F32)dirFileSize(sCacheDir) / (F32)mMaxSizeBytes) * 100.0f;
 
     cache_info << std::fixed;
     cache_info << std::setprecision(1);
@@ -346,9 +276,9 @@ void LLDiskCache::clearCache()
      */
     boost::system::error_code ec;
 #if LL_WINDOWS
-    std::wstring cache_path(utf8str_to_utf16str(mCacheDir));
+    std::wstring cache_path(utf8str_to_utf16str(sCacheDir));
 #else
-    std::string cache_path(mCacheDir);
+    std::string cache_path(sCacheDir);
 #endif
     if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed())
     {
@@ -357,7 +287,7 @@ void LLDiskCache::clearCache()
         {
             if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed())
             {
-                if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos)
+                if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos)
                 {
                     boost::filesystem::remove(*iter, ec);
                     if (ec.failed())
@@ -431,7 +361,7 @@ uintmax_t LLDiskCache::dirFileSize(const std::string dir)
         {
             if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed())
             {
-                if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos)
+                if ((*iter).path().string().find(CACHE_FILENAME_PREFIX) != std::string::npos)
                 {
                     uintmax_t file_size = boost::filesystem::file_size(*iter, ec);
                     if (!ec.failed())
diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h
index b60e74f8c9..62c19361fb 100644
--- a/indra/llfilesystem/lldiskcache.h
+++ b/indra/llfilesystem/lldiskcache.h
@@ -104,16 +104,9 @@ class LLDiskCache :
          * so many things had to be pushed back there to accomodate it, that I
          * decided to move it here.  Still not sure that's completely right.
          */
-        const std::string metaDataToFilepath(const std::string id,
-                                             LLAssetType::EType at,
-                                             const std::string extra_info);
+        static const std::string metaDataToFilepath(const std::string& id,
+                                             LLAssetType::EType at);
 
-        /**
-         * Update the "last write time" of a file to "now". This must be called whenever a
-         * file in the cache is read (not written) so that the last time the file was
-         * accessed is up to date (This is used in the mechanism for purging the cache)
-         */
-        void updateFileAccessTime(const std::string file_path);
 
         /**
          * Purge the oldest items in the cache so that the combined size of all files
@@ -170,17 +163,7 @@ class LLDiskCache :
          * setting could potentially point it at a non-cache directory (for example,
          * the Windows System dir) with disastrous results.
          */
-        std::string mCacheDir;
-
-        /**
-         * The prefix inserted at the start of a cache file filename to
-         * help identify it as a cache file. It's probably not required
-         * (just the presence in the cache folder is enough) but I am
-         * paranoid about the cache folder being set to something bad
-         * like the users' OS system dir by mistake or maliciously and
-         * this will help to offset any damage if that happens.
-         */
-        std::string mCacheFilenamePrefix;
+        static std::string sCacheDir;
 
         /**
          * When enabled, displays additional debugging information in
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 7d2a6bd6f5..b206aab7cf 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -34,6 +34,8 @@
 #include "llfasttimer.h"
 #include "lldiskcache.h"
 
+#include "boost/filesystem.hpp"
+
 const S32 LLFileSystem::READ        = 0x00000001;
 const S32 LLFileSystem::WRITE       = 0x00000002;
 const S32 LLFileSystem::READ_WRITE  = 0x00000003;  // LLFileSystem::READ & LLFileSystem::WRITE
@@ -56,9 +58,8 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
     {
         // build the filename (TODO: we do this in a few places - perhaps we should factor into a single function)
         std::string id;
-        mFileID.toString(id);
-        const std::string extra_info = "";
-        const std::string filename = LLDiskCache::getInstance()->metaDataToFilepath(id, mFileType, extra_info);
+        mFileID.asString();
+        const std::string filename = LLDiskCache::metaDataToFilepath(id, mFileType);
 
         // update the last access time for the file if it exists - this is required
         // even though we are reading and not writing because this is the
@@ -67,7 +68,7 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
         bool exists = gDirUtilp->fileExists(filename);
         if (exists)
         {
-            LLDiskCache::getInstance()->updateFileAccessTime(filename);
+            updateFileAccessTime(filename);
         }
     }
 }
@@ -82,8 +83,7 @@ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType fil
     LL_PROFILE_ZONE_SCOPED;
     std::string id_str;
     file_id.toString(id_str);
-    const std::string extra_info = "";
-    const std::string filename = LLDiskCache::getInstance()->metaDataToFilepath(id_str, file_type, extra_info);
+    const std::string filename = LLDiskCache::metaDataToFilepath(id_str, file_type);
 
     llifstream file(filename, std::ios::binary);
     if (file.is_open())
@@ -99,8 +99,7 @@ bool LLFileSystem::removeFile(const LLUUID& file_id, const LLAssetType::EType fi
 {
     std::string id_str;
     file_id.toString(id_str);
-    const std::string extra_info = "";
-    const std::string filename =  LLDiskCache::getInstance()->metaDataToFilepath(id_str, file_type, extra_info);
+    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, file_type);
 
     LLFile::remove(filename.c_str(), suppress_error);
 
@@ -113,12 +112,11 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
 {
     std::string old_id_str;
     old_file_id.toString(old_id_str);
-    const std::string extra_info = "";
-    const std::string old_filename =  LLDiskCache::getInstance()->metaDataToFilepath(old_id_str, old_file_type, extra_info);
+    const std::string old_filename =  LLDiskCache::metaDataToFilepath(old_id_str, old_file_type);
 
     std::string new_id_str;
     new_file_id.toString(new_id_str);
-    const std::string new_filename =  LLDiskCache::getInstance()->metaDataToFilepath(new_id_str, new_file_type, extra_info);
+    const std::string new_filename =  LLDiskCache::metaDataToFilepath(new_id_str, new_file_type);
 
     // Rename needs the new file to not exist.
     LLFileSystem::removeFile(new_file_id, new_file_type, ENOENT);
@@ -140,8 +138,7 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi
 {
     std::string id_str;
     file_id.toString(id_str);
-    const std::string extra_info = "";
-    const std::string filename =  LLDiskCache::getInstance()->metaDataToFilepath(id_str, file_type, extra_info);
+    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, file_type);
 
     S32 file_size = 0;
     llifstream file(filename, std::ios::binary);
@@ -160,8 +157,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
 
     std::string id;
     mFileID.toString(id);
-    const std::string extra_info = "";
-    const std::string filename =  LLDiskCache::getInstance()->metaDataToFilepath(id, mFileType, extra_info);
+    const std::string filename =  LLDiskCache::metaDataToFilepath(id, mFileType);
 
     llifstream file(filename, std::ios::binary);
     if (file.is_open())
@@ -205,8 +201,7 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
 {
     std::string id_str;
     mFileID.toString(id_str);
-    const std::string extra_info = "";
-    const std::string filename =  LLDiskCache::getInstance()->metaDataToFilepath(id_str, mFileType, extra_info);
+    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, mFileType);
 
     bool success = false;
 
@@ -325,3 +320,64 @@ bool LLFileSystem::remove()
 
     return true;
 }
+
+void LLFileSystem::updateFileAccessTime(const std::string& file_path)
+{
+    /**
+     * Threshold in time_t units that is used to decide if the last access time
+     * time of the file is updated or not. Added as a precaution for the concern
+     * outlined in SL-14582  about frequent writes on older SSDs reducing their
+     * lifespan. I think this is the right place for the threshold value - rather
+     * than it being a pref - do comment on that Jira if you disagree...
+     *
+     * Let's start with 1 hour in time_t units and see how that unfolds
+     */
+    const std::time_t time_threshold = 1 * 60 * 60;
+
+    // current time
+    const std::time_t cur_time = std::time(nullptr);
+
+    boost::system::error_code ec;
+#if LL_WINDOWS
+    // file last write time
+    const std::time_t last_write_time = boost::filesystem::last_write_time(utf8str_to_utf16str(file_path), ec);
+    if (ec.failed())
+    {
+        LL_WARNS() << "Failed to read last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
+        return;
+    }
+
+    // delta between cur time and last time the file was written
+    const std::time_t delta_time = cur_time - last_write_time;
+
+    // we only write the new value if the time in time_threshold has elapsed
+    // before the last one
+    if (delta_time > time_threshold)
+    {
+        boost::filesystem::last_write_time(utf8str_to_utf16str(file_path), cur_time, ec);
+    }
+#else
+    // file last write time
+    const std::time_t last_write_time = boost::filesystem::last_write_time(file_path, ec);
+    if (ec.failed())
+    {
+        LL_WARNS() << "Failed to read last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
+        return;
+    }
+
+    // delta between cur time and last time the file was written
+    const std::time_t delta_time = cur_time - last_write_time;
+
+    // we only write the new value if the time in time_threshold has elapsed
+    // before the last one
+    if (delta_time > time_threshold)
+    {
+        boost::filesystem::last_write_time(file_path, cur_time, ec);
+    }
+#endif
+
+    if (ec.failed())
+    {
+        LL_WARNS() << "Failed to update last write time for cache file " << file_path << ": " << ec.message() << LL_ENDL;
+    }
+}
diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h
index ea1b9cf3a1..983e452981 100644
--- a/indra/llfilesystem/llfilesystem.h
+++ b/indra/llfilesystem/llfilesystem.h
@@ -53,6 +53,13 @@ class LLFileSystem
         bool rename(const LLUUID& new_id, const LLAssetType::EType new_type);
         bool remove();
 
+        /**
+         * Update the "last write time" of a file to "now". This must be called whenever a
+         * file in the cache is read (not written) so that the last time the file was
+         * accessed is up to date (This is used in the mechanism for purging the cache)
+         */
+        void updateFileAccessTime(const std::string& file_path);
+
         static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type);
         static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error = 0);
         static bool renameFile(const LLUUID& old_file_id, const LLAssetType::EType old_file_type,
-- 
cgit v1.2.3


From b5e306f7d89e82984a37824a3640bd67a5c45d61 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 14 Aug 2024 11:01:02 -0400
Subject: Enable /permissive- on MSVC for better standards conformance  (#2251)

* Enable /permissive- on MSVC for better C++ conformance and fix related errors

* Clean up left over warning suppressions from old library or msvc versions
---
 indra/cmake/00-Common.cmake                      |  1 +
 indra/llappearance/llavatarappearancedefines.cpp |  1 +
 indra/llcommon/llallocator_heap_profile.cpp      |  7 -------
 indra/llcommon/llevents.h                        | 10 +---------
 indra/llcommon/llfindlocale.cpp                  |  2 +-
 indra/llcommon/llsdjson.cpp                      |  9 ---------
 indra/llcommon/llstacktrace.cpp                  |  3 ---
 indra/llcommon/llstring.cpp                      |  5 +++++
 indra/llcommon/llstring.h                        |  5 +++--
 indra/llcommon/lluuid.cpp                        |  1 +
 indra/llcommon/tests/commonmisc_test.cpp         |  6 ------
 indra/llimage/llimagejpeg.h                      |  1 -
 indra/llinventory/llinventorytype.cpp            |  1 +
 indra/llmath/llsimdtypes.h                       | 18 ------------------
 indra/llmessage/llblowfishcipher.cpp             |  6 +++---
 indra/llprimitive/lldaeloader.cpp                | 10 ++--------
 indra/llprimitive/tests/llmediaentry_test.cpp    |  9 ++-------
 indra/llwindow/lldxhardware.cpp                  |  6 +++---
 indra/llwindow/llwindowwin32.cpp                 |  4 ++--
 indra/llxml/llcontrol.h                          | 24 ------------------------
 indra/newview/llappearancemgr.cpp                |  5 -----
 indra/newview/llappviewer.cpp                    |  5 -----
 indra/newview/llcommandlineparser.cpp            | 14 --------------
 indra/newview/llgroupmgr.cpp                     | 11 -----------
 indra/newview/llimprocessing.cpp                 |  4 ----
 indra/newview/lllogchat.cpp                      | 12 ------------
 indra/newview/llmediadataclient.cpp              |  5 -----
 indra/newview/llsecapi.h                         |  4 ++++
 indra/newview/llsechandler_basic.h               |  9 +++++++++
 indra/newview/llviewerjoystick.cpp               |  2 +-
 indra/newview/llviewerjoystick.h                 |  2 +-
 indra/newview/llviewerprecompiledheaders.h       |  5 -----
 indra/newview/llvoavatarself.cpp                 | 11 -----------
 indra/newview/llwindebug.h                       |  3 ---
 indra/test/test.cpp                              |  8 --------
 indra/viewer_components/login/lllogin.cpp        |  7 -------
 36 files changed, 41 insertions(+), 195 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 4b3fa00fcf..5087c308ee 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -83,6 +83,7 @@ if (WINDOWS)
           /Oy-
           /fp:fast
           /MP
+          /permissive-
       )
 
   # Nicky: x64 implies SSE2
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index c69517cb22..580e6433c5 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -252,6 +252,7 @@ LLAvatarAppearanceDictionary::BakedEntry::BakedEntry(ETextureIndex tex_index,
         LLWearableType::EType t = (LLWearableType::EType)va_arg(argp,int);
         mWearables.push_back(t);
     }
+    va_end(argp);
 }
 
 ETextureIndex LLAvatarAppearanceDictionary::bakedToLocalTextureIndex(EBakedTextureIndex index) const
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
index 85e56b4db4..8cc44b6a01 100644
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ b/indra/llcommon/llallocator_heap_profile.cpp
@@ -28,13 +28,6 @@
 #include "linden_common.h"
 #include "llallocator_heap_profile.h"
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/algorithm/string/split.hpp>
 #include <boost/bind.hpp>
 #include <boost/lexical_cast.hpp>
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index f97fca0a32..4bf1fa07a2 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -38,16 +38,8 @@
 #include <vector>
 #include <deque>
 #include <functional>
-#if LL_WINDOWS
-    #pragma warning (push)
-    #pragma warning (disable : 4263) // boost::signals2::expired_slot::what() has const mismatch
-    #pragma warning (disable : 4264)
-#endif
-#include <boost/signals2.hpp>
-#if LL_WINDOWS
-    #pragma warning (pop)
-#endif
 
+#include <boost/signals2.hpp>
 #include <boost/bind.hpp>
 #include <boost/utility.hpp>        // noncopyable
 #include <boost/optional/optional.hpp>
diff --git a/indra/llcommon/llfindlocale.cpp b/indra/llcommon/llfindlocale.cpp
index ac52f90c9f..b4bcc80ac4 100644
--- a/indra/llcommon/llfindlocale.cpp
+++ b/indra/llcommon/llfindlocale.cpp
@@ -185,7 +185,7 @@ canonise_fl(FL_Locale *l) {
 #define RML(pn,sn) MAKELANGID(LANG_##pn, SUBLANG_##sn)
 struct IDToCode {
   LANGID id;
-  char*  code;
+  const char*  code;
 };
 static const IDToCode both_to_code[] = {
   {ML(ENGLISH,US),           "en_US.ISO_8859-1"},
diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp
index e95d2e6c1c..5d38e55686 100644
--- a/indra/llcommon/llsdjson.cpp
+++ b/indra/llcommon/llsdjson.cpp
@@ -35,16 +35,7 @@
 #include "llerror.h"
 #include "../llmath/llmath.h"
 
-#if LL_WINDOWS
-#pragma warning (push)
-#pragma warning (disable : 4702) // compiler thinks unreachable code
-#endif
 #include <boost/json/src.hpp>
-#if LL_WINDOWS
-#pragma warning (pop)
-#endif
-
-
 
 //=========================================================================
 LLSD LlsdFromJson(const boost::json::value& val)
diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp
index bda3579f60..ca8f4299d9 100644
--- a/indra/llcommon/llstacktrace.cpp
+++ b/indra/llcommon/llstacktrace.cpp
@@ -33,10 +33,7 @@
 #include <sstream>
 
 #include "llwin32headerslean.h"
-#pragma warning (push)
-#pragma warning (disable:4091) // a microsoft header has warnings. Very nice.
 #include <dbghelp.h>
-#pragma warning (pop)
 
 typedef USHORT NTAPI RtlCaptureStackBackTrace_Function(
     IN ULONG frames_to_skip,
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index c57f8b1e96..505789f9ea 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -900,6 +900,11 @@ void HeapFree_deleter(void* ptr)
 
 } // anonymous namespace
 
+unsigned long windows_get_last_error()
+{
+    return GetLastError();
+}
+
 template<>
 std::wstring windows_message<std::wstring>(DWORD error)
 {
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index b69a068830..db716b1431 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -46,7 +46,6 @@
 #endif
 
 #include <string.h>
-#include <boost/scoped_ptr.hpp>
 
 const char LL_UNKNOWN_CHAR = '?';
 class LLSD;
@@ -832,8 +831,10 @@ template<>
 LL_COMMON_API std::wstring windows_message<std::wstring>(unsigned long error);
 
 /// Get Windows message string, implicitly calling GetLastError()
+LL_COMMON_API unsigned long windows_get_last_error();
+
 template<typename STRING>
-STRING windows_message() { return windows_message<STRING>(GetLastError()); }
+STRING windows_message() { return windows_message<STRING>(windows_get_last_error()); }
 
 //@}
 
diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp
index 3b37365ec7..7aeabc3c4a 100644
--- a/indra/llcommon/lluuid.cpp
+++ b/indra/llcommon/lluuid.cpp
@@ -31,6 +31,7 @@
 // ugh, this is ugly.  We need to straighten out our linking for this library
 #pragma comment(lib, "IPHLPAPI.lib")
 #include <iphlpapi.h>
+#include <nb30.h>
 #endif
 
 #include "llapp.h"
diff --git a/indra/llcommon/tests/commonmisc_test.cpp b/indra/llcommon/tests/commonmisc_test.cpp
index 0057a1f639..b1a284225e 100644
--- a/indra/llcommon/tests/commonmisc_test.cpp
+++ b/indra/llcommon/tests/commonmisc_test.cpp
@@ -46,12 +46,6 @@
 
 #include "../test/lltut.h"
 
-
-#if LL_WINDOWS
-// disable overflow warnings
-#pragma warning(disable: 4307)
-#endif
-
 namespace tut
 {
     struct sd_data
diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h
index add6657117..012b87a42d 100644
--- a/indra/llimage/llimagejpeg.h
+++ b/indra/llimage/llimagejpeg.h
@@ -31,7 +31,6 @@
 
 #include "llimage.h"
 
-#include "llwin32headerslean.h"
 extern "C" {
 #ifdef LL_USESYSTEMLIBS
 # include <jpeglib.h>
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index 3dd1a5638d..8fa8983d3c 100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -53,6 +53,7 @@ struct InventoryEntry : public LLDictionaryEntry
             LLAssetType::EType t = (LLAssetType::EType)va_arg(argp,int);
             mAssetTypes.push_back(t);
         }
+        va_end(argp);
     }
 
     const std::string mHumanName;
diff --git a/indra/llmath/llsimdtypes.h b/indra/llmath/llsimdtypes.h
index 11462170fb..a407f51029 100644
--- a/indra/llmath/llsimdtypes.h
+++ b/indra/llmath/llsimdtypes.h
@@ -33,20 +33,6 @@
 
 typedef __m128  LLQuad;
 
-
-#if LL_WINDOWS
-#pragma warning(push)
-#pragma warning( disable : 4800 3 ) // Disable warning about casting int to bool for this class.
-#if defined(_MSC_VER) && (_MSC_VER < 1500)
-// VC++ 2005 is missing these intrinsics
-// __forceinline is MSVC specific and attempts to override compiler inlining judgment. This is so
-// even in debug builds this call is a NOP.
-__forceinline const __m128 _mm_castsi128_ps( const __m128i a ) { return reinterpret_cast<const __m128&>(a); }
-__forceinline const __m128i _mm_castps_si128( const __m128 a ) { return reinterpret_cast<const __m128i&>(a); }
-#endif // _MSC_VER
-
-#endif // LL_WINDOWS
-
 class LLBool32
 {
 public:
@@ -63,10 +49,6 @@ private:
     int m_bool{ 0 };
 };
 
-#if LL_WINDOWS
-#pragma warning(pop)
-#endif
-
 class LLSimdScalar
 {
 public:
diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp
index ed036e396d..3973565e22 100644
--- a/indra/llmessage/llblowfishcipher.cpp
+++ b/indra/llmessage/llblowfishcipher.cpp
@@ -88,7 +88,7 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len)
             src_len))
     {
         LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << LL_ENDL;
-        goto ERROR;
+        goto BF_ENCRYPT_ERROR;
     }
 
     // There may be some final data left to encrypt if the input is
@@ -96,14 +96,14 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len)
     if (!EVP_EncryptFinal_ex(context, (unsigned char*)(dst + output_len), &temp_len))
     {
         LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << LL_ENDL;
-        goto ERROR;
+        goto BF_ENCRYPT_ERROR;
     }
     output_len += temp_len;
 
     EVP_CIPHER_CTX_free(context);
     return output_len;
 
-ERROR:
+BF_ENCRYPT_ERROR:
     EVP_CIPHER_CTX_free(context);
     return 0;
 }
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 3e84eeffc2..4f47f16e33 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -24,10 +24,8 @@
  * $/LicenseInfo$
  */
 
-#if LL_MSVC
-#pragma warning (disable : 4263)
-#pragma warning (disable : 4264)
-#endif
+#include "linden_common.h"
+
 #include "dae.h"
 #include "dom/domAsset.h"
 #include "dom/domBind_material.h"
@@ -48,10 +46,6 @@
 #include "dom/domScale.h"
 #include "dom/domTranslate.h"
 #include "dom/domVisual_scene.h"
-#if LL_MSVC
-#pragma warning (default : 4263)
-#pragma warning (default : 4264)
-#endif
 
 #include "lldaeloader.h"
 #include "llsdserialize.h"
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index e8f40d1ffd..414df66680 100644
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -26,14 +26,9 @@
 
 #include "linden_common.h"
 #include "lltut.h"
-#if LL_WINDOWS
-#pragma warning (push)
-#pragma warning (disable : 4702) // boost::lexical_cast generates this warning
-#endif
+
 #include <boost/lexical_cast.hpp>
-#if LL_WINDOWS
-#pragma warning (pop)
-#endif
+
 #include "llstring.h"
 #include "llsdutil.h"
 #include "llsdserialize.h"
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index 392a67b5ce..4bc069c5a4 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -441,7 +441,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
     return mDriverVersion;
 }
 
-void get_wstring(IDxDiagContainer* containerp, WCHAR* wszPropName, WCHAR* wszPropValue, int outputSize)
+void get_wstring(IDxDiagContainer* containerp, const WCHAR* wszPropName, WCHAR* wszPropValue, int outputSize)
 {
     HRESULT hr;
     VARIANT var;
@@ -472,7 +472,7 @@ void get_wstring(IDxDiagContainer* containerp, WCHAR* wszPropName, WCHAR* wszPro
     VariantClear( &var );
 }
 
-std::string get_string(IDxDiagContainer *containerp, WCHAR *wszPropName)
+std::string get_string(IDxDiagContainer *containerp, const WCHAR *wszPropName)
 {
     WCHAR wszPropValue[256];
     get_wstring(containerp, wszPropName, wszPropValue, 256);
@@ -1059,7 +1059,7 @@ LLSD LLDXHardware::getDisplayInfo()
 
         // Dump the string as an int into the structure
         char *stopstring;
-        ret["VRAM"] = strtol(ram_str.c_str(), &stopstring, 10);
+        ret["VRAM"] = LLSD::Integer(strtol(ram_str.c_str(), &stopstring, 10));
         std::string device_name = get_string(device_containerp, L"szDescription");
         ret["DeviceName"] = device_name;
         std::string device_driver=  get_string(device_containerp, L"szDriverVersion");
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 94762db5c5..76abf5eaa2 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -805,8 +805,8 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
             size_t name_len = strlen(display_device.DeviceName  );
             size_t desc_len = strlen(display_device.DeviceString);
 
-            CHAR *name = name_len ? display_device.DeviceName   : "???";
-            CHAR *desc = desc_len ? display_device.DeviceString : "???";
+            const CHAR *name = name_len ? display_device.DeviceName   : "???";
+            const CHAR *desc = desc_len ? display_device.DeviceString : "???";
 
             sprintf(text, "Display Device %d: %s, %s", display_index, name, desc);
             LL_INFOS("Window") << text << LL_ENDL;
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 344352e980..4f54a9d705 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -36,32 +36,8 @@
 
 #include <vector>
 
-// *NOTE: boost::visit_each<> generates warning 4675 on .net 2003
-// Disable the warning for the boost includes.
-#if LL_WINDOWS
-# if (_MSC_VER >= 1300 && _MSC_VER < 1400)
-#   pragma warning(push)
-#   pragma warning( disable : 4675 )
-# endif
-#endif
-
 #include <boost/bind.hpp>
-
-#if LL_WINDOWS
-    #pragma warning (push)
-    #pragma warning (disable : 4263) // boost::signals2::expired_slot::what() has const mismatch
-    #pragma warning (disable : 4264)
-#endif
 #include <boost/signals2.hpp>
-#if LL_WINDOWS
-    #pragma warning (pop)
-#endif
-
-#if LL_WINDOWS
-# if (_MSC_VER >= 1300 && _MSC_VER < 1400)
-#   pragma warning(pop)
-# endif
-#endif
 
 class LLVector3;
 class LLVector3d;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 66082d317a..946d674e8b 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -66,11 +66,6 @@
 
 #include "llavatarpropertiesprocessor.h"
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 namespace
 {
     const S32   BAKE_RETRY_MAX_COUNT = 5;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 262ab439b4..e39d9e7e20 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -269,11 +269,6 @@ using namespace LL;
 #include "glib.h"
 #endif // (LL_LINUX) && LL_GTK
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
 
 ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index f301af9511..f21bae9805 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -28,26 +28,12 @@
 #include "llcommandlineparser.h"
 #include "llexception.h"
 
-// *NOTE: The boost::lexical_cast generates
-// the warning C4701(local used with out assignment) in VC7.1.
-// Disable the warning for the boost includes.
-#if _MSC_VER
-#   pragma warning(push)
-#   pragma warning( disable : 4701 )
-#else
-// NOTE: For the other platforms?
-#endif
-
 #include <boost/program_options.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/bind.hpp>
 #include <boost/tokenizer.hpp>
 #include <boost/assign/list_of.hpp>
 
-#if _MSC_VER
-#   pragma warning(pop)
-#endif
-
 #include "llsdserialize.h"
 #include "llerror.h"
 #include "stringize.h"
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 76d3e3e049..d53b36e59f 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -55,19 +55,8 @@
 #include "llcorehttputil.h"
 #include "lluiusage.h"
 
-
-#if LL_MSVC
-#pragma warning(push)
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/lexical_cast.hpp>
 
-#if LL_MSVC
-#pragma warning(pop)   // Restore all warnings to the previous state
-#endif
-
 const U32 MAX_CACHED_GROUPS = 20;
 
 //
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index e24274650d..c1e68e0288 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -58,10 +58,6 @@
 #include "llworld.h"
 
 #include "boost/lexical_cast.hpp"
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
 
 extern void on_new_message(const LLSD& msg);
 
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 329fb881e3..bf49f33049 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -42,19 +42,7 @@
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/regex.hpp>
-
-#if LL_MSVC
-#pragma warning(push)
-// disable warning about boost::lexical_cast unreachable code
-// when it fails to parse the string
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/date_time/gregorian/gregorian.hpp>
-#if LL_MSVC
-#pragma warning(pop)   // Restore all warnings to the previous state
-#endif
-
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/date_time/local_time_adjustor.hpp>
 
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 0f3e0306af..83a6e66019 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -29,11 +29,6 @@
 #include "llmediadataclient.h"
 #include "llviewercontrol.h"
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <algorithm>
 #include <boost/lexical_cast.hpp>
 
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index 5cc78d09dc..ceea11cc34 100644
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -35,6 +35,7 @@
 #include "llexception.h"
 
 #ifdef LL_WINDOWS
+#pragma warning (push)
 #pragma warning(disable:4250)
 #endif // LL_WINDOWS
 
@@ -549,5 +550,8 @@ void registerSecHandler(const std::string& handler_type,
 
 extern LLPointer<LLSecAPIHandler> gSecAPIHandler;
 
+#ifdef LL_WINDOWS
+#pragma warning (pop)
+#endif // LL_WINDOWS
 
 #endif // LL_SECAPI_H
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h
index 1484c6d0e1..2dffe84775 100644
--- a/indra/newview/llsechandler_basic.h
+++ b/indra/newview/llsechandler_basic.h
@@ -28,6 +28,11 @@
 #ifndef LLSECHANDLER_BASIC
 #define LLSECHANDLER_BASIC
 
+#ifdef LL_WINDOWS
+#pragma warning (push)
+#pragma warning(disable:4250)
+#endif // LL_WINDOWS
+
 #include "llsecapi.h"
 #include <vector>
 #include <openssl/x509.h>
@@ -346,6 +351,10 @@ protected:
 
 bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs);
 
+#ifdef LL_WINDOWS
+#pragma warning (pop)
+#endif // LL_WINDOWS
+
 #endif // LLSECHANDLER_BASIC
 
 
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 787ea02e4c..7543fb3743 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -524,7 +524,7 @@ void LLViewerJoystick::initDevice(LLSD &guid)
 #endif
 }
 
-bool LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid)
+bool LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, const std::string &name, const LLSD &guid)
 {
 #if LIB_NDOF
     mLastDeviceUUID = guid;
diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h
index b459987c68..c989615653 100644
--- a/indra/newview/llviewerjoystick.h
+++ b/indra/newview/llviewerjoystick.h
@@ -56,7 +56,7 @@ public:
     void init(bool autoenable);
     void initDevice(LLSD &guid);
     bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/);
-    bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, std::string &name, LLSD &guid);
+    bool initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8*/, const std::string &name, const LLSD &guid);
     void terminate();
 
     void updateStatus();
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 8398cd8a54..6561f0d644 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -37,11 +37,6 @@
 
 #include "linden_common.h"
 
-// Work around stupid Microsoft STL warning
-#ifdef LL_WINDOWS
-#pragma warning (disable : 4702) // warning C4702: unreachable code
-#endif
-
 #include <algorithm>
 #include <deque>
 #include <functional>
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 57f7734fea..00a7325db2 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -24,12 +24,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#endif
-
 #include "llviewerprecompiledheaders.h"
 
 #include "llvoavatarself.h"
@@ -69,11 +63,6 @@
 #include "llcorehttputil.h"
 #include "lluiusage.h"
 
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
 #include <boost/lexical_cast.hpp>
 
 LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index d2801c86e1..770584c88d 100644
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -30,10 +30,7 @@
 #include "stdtypes.h"
 #include "llwin32headerslean.h"
 
-#pragma warning (push)
-#pragma warning (disable:4091) // a microsoft header has warnings. Very nice.
 #include <dbghelp.h>
-#pragma warning (pop)
 
 class LLWinDebug:
     public LLSingleton<LLWinDebug>
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 6c4a1f43b4..233eee5c31 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -53,16 +53,8 @@
 #   include "ctype_workaround.h"
 #endif
 
-#if LL_MSVC
-#pragma warning (push)
-#pragma warning (disable : 4702) // warning C4702: unreachable code
-#endif
 #include <boost/iostreams/tee.hpp>
 #include <boost/iostreams/stream.hpp>
-#if LL_MSVC
-#pragma warning (pop)
-#endif
-
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/make_shared.hpp>
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 48fecb4f22..53bf97a47e 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -28,13 +28,6 @@
 #include "llsd.h"
 #include "llsdutil.h"
 
-/*==========================================================================*|
-#ifdef LL_WINDOWS
-    // non-virtual destructor warning, boost::statechart does this intentionally.
-    #pragma warning (disable : 4265)
-#endif
-|*==========================================================================*/
-
 #include "lllogin.h"
 
 #include <boost/bind.hpp>
-- 
cgit v1.2.3


From 714c6983f4cad754661654c09e9629b9d7a0db11 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Thu, 15 Aug 2024 04:49:23 +0200
Subject: Add missing va_end (#2301)

---
 indra/newview/pipeline.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 1b2cffa6c9..a5c7350fd8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10668,6 +10668,7 @@ bool LLPipeline::hasAnyRenderType(U32 type, ...) const
     {
         if (mRenderTypeEnabled[type])
         {
+            va_end(args);
             return true;
         }
         type = va_arg(args, U32);
-- 
cgit v1.2.3


From 9daa5b000cd61c77c9bec8f837920937e4e4b0f8 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 15 Aug 2024 18:17:39 +0300
Subject: viewer-private#268 When deleting worn items, move them to trash

---
 indra/newview/llinventoryfunctions.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 8471b2cea1..57c0d57190 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -3637,11 +3637,11 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con
                                                               {
                                                                   for (const LLUUID& id : item_deletion_list)
                                                                   {
-                                                                      remove_inventory_item(id, NULL);
+                                                                      gInventory.removeItem(id);
                                                                   }
                                                                   for (const LLUUID& id : cat_deletion_list)
                                                                   {
-                                                                      remove_inventory_category(id, NULL);
+                                                                      gInventory.removeCategory(id);
                                                                   }
                                                               });
         }
-- 
cgit v1.2.3


From ae0433f4ebba799c16d6498f8a78ccb101db9706 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 15 Aug 2024 21:02:04 +0300
Subject: Fix loose mGalleryPanel in LLInventoryGallery

LLInventoryGallery::buildGalleryPanel does the creation, not postBuild()
same for LLOutfitGallery. Either don't create mGalleryPanel or remove it
before creating again.
---
 indra/newview/llfloaterimnearbychathandler.cpp | 1 -
 indra/newview/llinventorygallery.cpp           | 2 --
 indra/newview/lloutfitgallery.cpp              | 2 --
 3 files changed, 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index a614299e03..e9cd912ca9 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -152,7 +152,6 @@ protected:
     toast_list_t m_toast_pool;
 
     bool    mStopProcessing;
-    bool    mChannelRect;
 };
 
 
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 9e6cf7ac73..46d1e822de 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -147,8 +147,6 @@ const LLInventoryGallery::Params& LLInventoryGallery::getDefaultParams()
 bool LLInventoryGallery::postBuild()
 {
     mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
-    LLPanel::Params params = LLPanel::getDefaultParams();
-    mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params);
     mMessageTextBox = getChild<LLTextBox>("empty_txt");
     mInventoryGalleryMenu = new LLInventoryGalleryContextMenu(this);
     mRootGalleryMenu = new LLInventoryGalleryContextMenu(this);
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index d7df9ceadc..72fb9464d8 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -109,8 +109,6 @@ bool LLOutfitGallery::postBuild()
 {
     bool rv = LLOutfitListBase::postBuild();
     mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel");
-    LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel
-    mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params);
     mMessageTextBox = getChild<LLTextBox>("no_outfits_txt");
     mOutfitGalleryMenu = new LLOutfitGalleryContextMenu(this);
     return rv;
-- 
cgit v1.2.3


From 4c0f342c93b4716ad6f7fb2b2b04bf217c0b824d Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Fri, 16 Aug 2024 23:38:42 +0200
Subject: Remove pointless CMake status message (#2322)

---
 indra/cmake/Copy3rdPartyLibs.cmake | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c6b89e1de3..6ac00fd131 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -155,10 +155,6 @@ if(WINDOWS)
             MESSAGE(STATUS "Redist lib ${release_msvc_file} not found")
         endif()
     endforeach()
-    MESSAGE(STATUS "Will copy redist files for MSVC ${MSVC_VER}:")
-    foreach(target ${third_party_targets})
-        MESSAGE(STATUS "${target}")
-    endforeach()
 
 elseif(DARWIN)
     set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
-- 
cgit v1.2.3


From d79ff40ee2bac1ddb9d721aa8a408a0f104d5a4d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 17 Aug 2024 18:23:58 -0400
Subject: Fix hero probes not releasing resources when disabled

---
 indra/newview/llheroprobemanager.cpp | 4 ----
 indra/newview/llheroprobemanager.h   | 7 -------
 indra/newview/pipeline.cpp           | 4 +++-
 3 files changed, 3 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index 91051f8235..ce419498cf 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -586,7 +586,6 @@ void LLHeroProbeManager::cleanup()
 {
     mVertexBuffer = nullptr;
     mRenderTarget.release();
-    mHeroRenderTarget.release();
 
     mMipChain.clear();
 
@@ -594,10 +593,7 @@ void LLHeroProbeManager::cleanup()
 
     mProbes.clear();
 
-    mReflectionMaps.clear();
-
     mDefaultProbe = nullptr;
-    mUpdatingProbe = nullptr;
 }
 
 void LLHeroProbeManager::doOcclusion()
diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h
index 28852770c3..58a94a3de8 100644
--- a/indra/newview/llheroprobemanager.h
+++ b/indra/newview/llheroprobemanager.h
@@ -104,8 +104,6 @@ private:
     // used to generate mipmaps without doing a copy-to-texture
     LLRenderTarget mRenderTarget;
 
-    LLRenderTarget mHeroRenderTarget;
-
     std::vector<LLRenderTarget> mMipChain;
 
     // storage for reflection probe radiance maps (plus two scratch space cubemaps)
@@ -124,11 +122,6 @@ private:
     // list of active reflection maps
     std::vector<LLPointer<LLReflectionMap>> mProbes;
 
-    // list of maps being used for rendering
-    std::vector<LLReflectionMap*> mReflectionMaps;
-
-    LLReflectionMap* mUpdatingProbe = nullptr;
-
     LLPointer<LLReflectionMap> mDefaultProbe;  // default reflection probe to fall back to for pixels with no probe influences (should always be at cube index 0)
 
     // number of reflection probes to use for rendering
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index a5c7350fd8..857af40601 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -777,7 +777,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
     if (mRT == &mMainRT)
     { // hacky -- allocate auxillary buffer
 
-        gCubeSnapshot = TRUE;
+        gCubeSnapshot = true;
 
         if (sReflectionProbesEnabled)
         {
@@ -1117,6 +1117,8 @@ void LLPipeline::releaseGLBuffers()
         mGlow[i].release();
     }
 
+    mHeroProbeManager.cleanup(); // release hero probes
+
     releaseScreenBuffers();
 
     gBumpImageList.destroyGL();
-- 
cgit v1.2.3


From 0d9ddae0c6734f8ce76a5cdb40947f6da105c0b2 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 17 Aug 2024 19:14:40 -0400
Subject: Reduce number of full screen render targets

---
 indra/newview/llviewerdisplay.cpp |  6 +--
 indra/newview/pipeline.cpp        | 92 ++++++++++++++++++++++-----------------
 indra/newview/pipeline.h          |  9 ++--
 3 files changed, 60 insertions(+), 47 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index fbbcf9bd84..8c6a38876a 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1603,7 +1603,7 @@ void render_ui_2d()
             LLView::sIsRectDirty = false;
             LLRect t_rect;
 
-            gPipeline.mRT->uiScreen.bindTarget();
+            gPipeline.mUIScreen.bindTarget();
             gGL.setColorMask(true, true);
             {
                 static const S32 pad = 8;
@@ -1635,7 +1635,7 @@ void render_ui_2d()
                 gViewerWindow->draw();
             }
 
-            gPipeline.mRT->uiScreen.flush();
+            gPipeline.mUIScreen.flush();
             gGL.setColorMask(true, false);
 
             LLView::sDirtyRect = t_rect;
@@ -1645,7 +1645,7 @@ void render_ui_2d()
         LLGLDisable blend(GL_BLEND);
         S32 width = gViewerWindow->getWindowWidthScaled();
         S32 height = gViewerWindow->getWindowHeightScaled();
-        gGL.getTexUnit(0)->bind(&gPipeline.mRT->uiScreen);
+        gGL.getTexUnit(0)->bind(&gPipeline.mUIScreen);
         gGL.begin(LLRender::TRIANGLE_STRIP);
         gGL.color4f(1.f,1.f,1.f,1.f);
         gGL.texCoord2f(0.f, 0.f);                 gGL.vertex2i(0, 0);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 857af40601..2bafa6e3af 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -812,17 +812,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
         resY /= res_mod;
     }
 
-    //water reflection texture (always needed as scratch space whether or not transparent water is enabled)
-    mWaterDis.allocate(resX, resY, GL_RGBA16F, true);
-
-    if (RenderUIBuffer)
-    {
-        if (!mRT->uiScreen.allocate(resX,resY, GL_RGBA))
-        {
-            return false;
-        }
-    }
-
     S32 shadow_detail = RenderShadowDetail;
     bool ssao = RenderDeferredSSAO;
 
@@ -836,15 +825,6 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
     mRT->deferredScreen.shareDepthBuffer(mRT->screen);
 
-    if (samples > 0)
-    {
-        if (!mRT->fxaaBuffer.allocate(resX, resY, GL_RGBA)) return false;
-    }
-    else
-    {
-        mRT->fxaaBuffer.release();
-    }
-
     if (shadow_detail > 0 || ssao || RenderDepthOfField || samples > 0)
     { //only need mRT->deferredLight for shadows OR ssao OR dof OR fxaa
         if (!mRT->deferredLight.allocate(resX, resY, GL_RGBA16F)) return false;
@@ -856,19 +836,45 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
     allocateShadowBuffer(resX, resY);
 
-    if (!gCubeSnapshot && RenderScreenSpaceReflections) // hack to not allocate mSceneMap for cube snapshots
+    if (!gCubeSnapshot) // hack to not re-allocate various targets for cube snapshots
     {
-        mSceneMap.allocate(resX, resY, GL_RGB, true);
-    }
+        if (RenderUIBuffer)
+        {
+            if (!mUIScreen.allocate(resX, resY, GL_RGBA))
+            {
+                return false;
+            }
+        }
 
-    const bool post_hdr = gSavedSettings.getBOOL("RenderPostProcessingHDR");
-    const U32 post_color_fmt = post_hdr ? GL_RGBA16F : GL_RGBA;
-    mPostMap.allocate(resX, resY, post_color_fmt);
+        if (samples > 0)
+        {
+            if (!mFXAAMap.allocate(resX, resY, GL_RGBA)) return false;
+        }
+        else
+        {
+            mFXAAMap.release();
+        }
 
-    // used to scale down textures
-    // See LLViwerTextureList::updateImagesCreateTextures and LLImageGL::scaleDown
-    mDownResMap.allocate(4, 4, GL_RGBA);
+        //water reflection texture (always needed as scratch space whether or not transparent water is enabled)
+        mWaterDis.allocate(resX, resY, GL_RGBA16F, true);
 
+        if(RenderScreenSpaceReflections)
+        {
+            mSceneMap.allocate(resX, resY, GL_RGB, true);
+        }
+        else
+        {
+            mSceneMap.release();
+        }
+
+        const bool post_hdr = gSavedSettings.getBOOL("RenderPostProcessingHDR");
+        const U32 post_color_fmt = post_hdr ? GL_RGBA16F : GL_RGBA;
+        mPostMap.allocate(resX, resY, post_color_fmt);
+
+        // used to scale down textures
+        // See LLViwerTextureList::updateImagesCreateTextures and LLImageGL::scaleDown
+        mDownResMap.allocate(4, 4, GL_RGBA);
+    }
     //HACK make screenbuffer allocations start failing after 30 seconds
     if (gSavedSettings.getBOOL("SimulateFBOFailure"))
     {
@@ -1110,6 +1116,10 @@ void LLPipeline::releaseGLBuffers()
 
     mPostMap.release();
 
+    mFXAAMap.release();
+
+    mUIScreen.release();
+
     mDownResMap.release();
 
     for (U32 i = 0; i < 3; i++)
@@ -1149,15 +1159,15 @@ void LLPipeline::releaseShadowBuffers()
 
 void LLPipeline::releaseScreenBuffers()
 {
-    mRT->uiScreen.release();
     mRT->screen.release();
-    mRT->fxaaBuffer.release();
     mRT->deferredScreen.release();
     mRT->deferredLight.release();
 
-    mHeroProbeRT.uiScreen.release();
+    mAuxillaryRT.screen.release();
+    mAuxillaryRT.deferredScreen.release();
+    mAuxillaryRT.deferredLight.release();
+
     mHeroProbeRT.screen.release();
-    mHeroProbeRT.fxaaBuffer.release();
     mHeroProbeRT.deferredScreen.release();
     mHeroProbeRT.deferredLight.release();
 }
@@ -7125,7 +7135,7 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
 {
     {
         llassert(!gCubeSnapshot);
-        bool multisample = RenderFSAASamples > 1 && mRT->fxaaBuffer.isComplete();
+        bool multisample = RenderFSAASamples > 1 && mFXAAMap.isComplete();
         LLGLSLShader* shader = &gGlowCombineProgram;
 
         S32 width = dst->getWidth();
@@ -7136,7 +7146,7 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
         {
             LL_PROFILE_GPU_ZONE("aa");
             // bake out texture2D with RGBL for FXAA shader
-            mRT->fxaaBuffer.bindTarget();
+            mFXAAMap.bindTarget();
 
             shader = &gGlowCombineFXAAProgram;
             shader->bind();
@@ -7156,16 +7166,16 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
             shader->disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
             shader->unbind();
 
-            mRT->fxaaBuffer.flush();
+            mFXAAMap.flush();
 
             dst->bindTarget();
             shader = &gFXAAProgram;
             shader->bind();
 
-            channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mRT->fxaaBuffer.getUsage());
+            channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAAMap.getUsage());
             if (channel > -1)
             {
-                mRT->fxaaBuffer.bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
+                mFXAAMap.bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
             }
 
             gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
@@ -7175,8 +7185,8 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
 
             glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
 
-            F32 scale_x = (F32)width / mRT->fxaaBuffer.getWidth();
-            F32 scale_y = (F32)height / mRT->fxaaBuffer.getHeight();
+            F32 scale_x = (F32)width / mFXAAMap.getWidth();
+            F32 scale_y = (F32)height / mFXAAMap.getHeight();
             shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
             shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f / width * scale_x, 1.f / height * scale_y);
             shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f / width * scale_x, -0.5f / height * scale_y,
@@ -7410,7 +7420,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
             { // combine result based on alpha
 
                 dst->bindTarget();
-                if (RenderFSAASamples > 1 && mRT->fxaaBuffer.isComplete())
+                if (RenderFSAASamples > 1 && mFXAAMap.isComplete())
                 {
                     glViewport(0, 0, dst->getWidth(), dst->getHeight());
                 }
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 4164474238..024303d5f0 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -687,10 +687,7 @@ public:
 
         //screen texture
         LLRenderTarget          screen;
-        LLRenderTarget          uiScreen;
         LLRenderTarget          deferredScreen;
-        LLRenderTarget          fxaaBuffer;
-        LLRenderTarget          edgeMap;
         LLRenderTarget          deferredLight;
 
         //sun shadow map
@@ -726,6 +723,12 @@ public:
     // tonemapped and gamma corrected render ready for post
     LLRenderTarget          mPostMap;
 
+    // FXAA helper target
+    LLRenderTarget          mFXAAMap;
+
+    // render ui to buffer target
+    LLRenderTarget          mUIScreen;
+
     // downres scratch space for GPU downscaling of textures
     LLRenderTarget          mDownResMap;
 
-- 
cgit v1.2.3


From 94aec3d1e619372b0652d298ded4d2a7ac96d131 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 17 Aug 2024 19:23:05 -0400
Subject: Avoid scaling probe shadow maps by RenderShadowResolutionScale

---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2bafa6e3af..979d0eba7e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -896,7 +896,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     S32 shadow_detail = RenderShadowDetail;
 
-    F32 scale = llmax(0.f, RenderShadowResolutionScale);
+    F32 scale = gCubeSnapshot ? 1.0 : llmax(0.f, RenderShadowResolutionScale); // Don't scale probe shadow maps
     U32 sun_shadow_map_width = BlurHappySize(resX, scale);
     U32 sun_shadow_map_height = BlurHappySize(resY, scale);
 
-- 
cgit v1.2.3


From 4e19b2ae34a0cd5e19068bedb8612ba4ea89e8c1 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 17 Aug 2024 19:19:18 -0400
Subject: Fix RenderReflectionProbeResolution debug setting not updating during
 runtime

---
 indra/newview/llreflectionmapmanager.cpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 1efe51c1aa..3526004071 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -1371,13 +1371,21 @@ void LLReflectionMapManager::initReflectionMaps()
 {
     U32 count = LL_MAX_REFLECTION_PROBE_COUNT;
 
-    if (mTexture.isNull() || mReflectionProbeCount != count || mReset)
+    static LLCachedControl<U32> ref_probe_res(gSavedSettings, "RenderReflectionProbeResolution", 128U);
+    U32 probe_resolution = nhpo2(llclamp(ref_probe_res(), (U32)64, (U32)512));
+    if (mTexture.isNull() || mReflectionProbeCount != count || mProbeResolution != probe_resolution || mReset)
     {
+        if(mProbeResolution != probe_resolution)
+        {
+            mRenderTarget.release();
+            mMipChain.clear();
+        }
+
         gEXRImage = nullptr;
 
         mReset = false;
         mReflectionProbeCount = count;
-        mProbeResolution = nhpo2(llclamp(gSavedSettings.getU32("RenderReflectionProbeResolution"), (U32)64, (U32)512));
+        mProbeResolution = probe_resolution;
         mMaxProbeLOD = log2f((F32)mProbeResolution) - 1.f; // number of mips - 1
 
         if (mTexture.isNull() ||
-- 
cgit v1.2.3


From ba2b77d0882f8ca3ef0ae95ca9d388aa217f9a7a Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 15:35:33 -0400
Subject: Fix findChild during draw in preference floater

---
 indra/newview/llfloaterpreference.cpp              | 49 ++++++++++------------
 indra/newview/llfloaterpreference.h                |  7 +++-
 .../default/xui/en/panel_preferences_alerts.xml    |  2 -
 3 files changed, 28 insertions(+), 30 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5e5cfcecbf..3441fff7e8 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -430,6 +430,13 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
 
 bool LLFloaterPreference::postBuild()
 {
+    mDeleteTranscriptsBtn = getChild<LLButton>("delete_transcripts");
+
+    mEnabledPopups = getChild<LLScrollListCtrl>("enabled_popups");
+    mDisabledPopups = getChild<LLScrollListCtrl>("disabled_popups");
+    mEnablePopupBtn = getChild<LLButton>("enable_this_popup");
+    mDisablePopupBtn = getChild<LLButton>("disable_this_popup");
+
     gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
 
     gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
@@ -519,7 +526,7 @@ bool LLFloaterPreference::postBuild()
 
 void LLFloaterPreference::updateDeleteTranscriptsButton()
 {
-    getChild<LLButton>("delete_transcripts")->setEnabled(LLLogChat::transcriptFilesExist());
+    mDeleteTranscriptsBtn->setEnabled(LLLogChat::transcriptFilesExist());
 }
 
 void LLFloaterPreference::onDoNotDisturbResponseChanged()
@@ -540,11 +547,11 @@ LLFloaterPreference::~LLFloaterPreference()
 
 void LLFloaterPreference::draw()
 {
-    bool has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
-    gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
+    bool has_first_selected = (mDisabledPopups->getFirstSelected()!=NULL);
+    mEnablePopupBtn->setEnabled(has_first_selected);
 
-    has_first_selected = (getChildRef<LLScrollListCtrl>("enabled_popups").getFirstSelected()!=NULL);
-    gSavedSettings.setBOOL("FirstSelectedEnabledPopups", has_first_selected);
+    has_first_selected = (mEnabledPopups->getFirstSelected()!=NULL);
+    mDisablePopupBtn->setEnabled(has_first_selected);
 
     LLFloater::draw();
 }
@@ -1171,13 +1178,8 @@ void LLFloaterPreference::refreshSkin(void* data)
 
 void LLFloaterPreference::buildPopupLists()
 {
-    LLScrollListCtrl& disabled_popups =
-        getChildRef<LLScrollListCtrl>("disabled_popups");
-    LLScrollListCtrl& enabled_popups =
-        getChildRef<LLScrollListCtrl>("enabled_popups");
-
-    disabled_popups.deleteAllItems();
-    enabled_popups.deleteAllItems();
+    mDisabledPopups->deleteAllItems();
+    mEnabledPopups->deleteAllItems();
 
     for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
          iter != LLNotifications::instance().templatesEnd();
@@ -1219,11 +1221,11 @@ void LLFloaterPreference::buildPopupLists()
                     }
                 }
             }
-            item = disabled_popups.addElement(row);
+            item = mDisabledPopups->addElement(row);
         }
         else
         {
-            item = enabled_popups.addElement(row);
+            item = mEnabledPopups->addElement(row);
         }
 
         if (item)
@@ -1324,9 +1326,7 @@ void LLFloaterPreference::onClickSetSounds()
 
 void LLFloaterPreference::onClickEnablePopup()
 {
-    LLScrollListCtrl& disabled_popups = getChildRef<LLScrollListCtrl>("disabled_popups");
-
-    std::vector<LLScrollListItem*> items = disabled_popups.getAllSelected();
+    std::vector<LLScrollListItem*> items = mDisabledPopups->getAllSelected();
     std::vector<LLScrollListItem*>::iterator itor;
     for (itor = items.begin(); itor != items.end(); ++itor)
     {
@@ -1345,9 +1345,7 @@ void LLFloaterPreference::onClickEnablePopup()
 
 void LLFloaterPreference::onClickDisablePopup()
 {
-    LLScrollListCtrl& enabled_popups = getChildRef<LLScrollListCtrl>("enabled_popups");
-
-    std::vector<LLScrollListItem*> items = enabled_popups.getAllSelected();
+    std::vector<LLScrollListItem*> items = mEnabledPopups->getAllSelected();
     std::vector<LLScrollListItem*>::iterator itor;
     for (itor = items.begin(); itor != items.end(); ++itor)
     {
@@ -1796,11 +1794,9 @@ void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification,
 
 void LLFloaterPreference::onLogChatHistorySaved()
 {
-    LLButton * delete_transcripts_buttonp = getChild<LLButton>("delete_transcripts");
-
-    if (!delete_transcripts_buttonp->getEnabled())
+    if (!mDeleteTranscriptsBtn->getEnabled())
     {
-        delete_transcripts_buttonp->setEnabled(true);
+        mDeleteTranscriptsBtn->setEnabled(true);
     }
 }
 
@@ -2334,7 +2330,6 @@ bool LLPanelPreferenceGraphics::postBuild()
 
 void LLPanelPreferenceGraphics::draw()
 {
-    setPresetText();
     LLPanelPreference::draw();
 }
 
@@ -3315,8 +3310,8 @@ void LLFloaterPreference::onUpdateFilterTerm(bool force)
 
 void LLFloaterPreference::filterIgnorableNotifications()
 {
-    bool visible = getChildRef<LLScrollListCtrl>("enabled_popups").highlightMatchingItems(mFilterEdit->getValue());
-    visible |= getChildRef<LLScrollListCtrl>("disabled_popups").highlightMatchingItems(mFilterEdit->getValue());
+    bool visible = mEnabledPopups->highlightMatchingItems(mFilterEdit->getValue());
+    visible |= mDisabledPopups->highlightMatchingItems(mFilterEdit->getValue());
 
     if (visible)
     {
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index c8b98d8e1b..51ed3d8179 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -225,7 +225,12 @@ private:
     std::string mSavedGraphicsPreset;
     LOG_CLASS(LLFloaterPreference);
 
-    LLSearchEditor *mFilterEdit;
+    LLSearchEditor* mFilterEdit = nullptr;
+    LLScrollListCtrl* mEnabledPopups = nullptr;
+    LLScrollListCtrl* mDisabledPopups = nullptr;
+    LLButton*       mDeleteTranscriptsBtn = nullptr;
+    LLButton*       mEnablePopupBtn = nullptr;
+    LLButton*       mDisablePopupBtn = nullptr;
     std::unique_ptr< ll::prefs::SearchData > mSearchData;
     bool mSearchDataDirty;
 
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
index fb528bf98f..425cbb6f44 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
@@ -69,7 +69,6 @@
      sort_ascending="true" 
      width="495" />
 	 <button
-	 enabled_control="FirstSelectedDisabledPopups"
      follows="top|left"
      height="23"
      image_overlay="Arrow_Up"
@@ -83,7 +82,6 @@
          function="Pref.ClickEnablePopup" />
     </button>
     <button
-	 enabled_control="FirstSelectedEnabledPopups"
 	 follows="top|left"
      height="23"
      image_overlay="Arrow_Down"
-- 
cgit v1.2.3


From 9827dff971807471a2c20c2342bd77c43a931e6f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 15:40:57 -0400
Subject: Fix frequent deep findChild calls for LLFloaterSidePanelContainer
 main during various ui callbacks

---
 indra/newview/llfloatersidepanelcontainer.cpp | 28 ++++++++++++++++++++++-----
 indra/newview/llfloatersidepanelcontainer.h   |  9 +++++++++
 2 files changed, 32 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 6c5d2570f2..9e577c83a8 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -53,9 +53,15 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
     LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this);
 }
 
+bool LLFloaterSidePanelContainer::postBuild()
+{
+    mMainPanel = getChild<LLPanel>(sMainPanelName);
+    return TRUE;
+}
+
 void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
 {
-    getChild<LLPanel>(sMainPanelName)->onOpen(key);
+    mMainPanel->onOpen(key);
 }
 
 void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
@@ -206,10 +212,16 @@ void LLFloaterSidePanelContainer::showPanel(std::string_view floater_name, std::
 LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, std::string_view panel_name)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
-
     if (floaterp)
     {
-        return floaterp->findChild<LLPanel>(panel_name, true);
+        if (panel_name == sMainPanelName)
+        {
+            return floaterp->mMainPanel;
+        }
+        else
+        {
+            return floaterp->findChild<LLPanel>(panel_name, true);
+        }
     }
 
     return NULL;
@@ -218,10 +230,16 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, st
 LLPanel* LLFloaterSidePanelContainer::findPanel(std::string_view floater_name, std::string_view panel_name)
 {
     LLFloaterSidePanelContainer* floaterp = LLFloaterReg::findTypedInstance<LLFloaterSidePanelContainer>(floater_name);
-
     if (floaterp)
     {
-        return floaterp->findChild<LLPanel>(panel_name, true);
+        if (panel_name == sMainPanelName)
+        {
+            return floaterp->mMainPanel;
+        }
+        else
+        {
+            return floaterp->findChild<LLPanel>(panel_name, true);
+        }
     }
 
     return NULL;
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index d7f6c309c4..a57a2da4d9 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -49,6 +49,8 @@ public:
     LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams());
     ~LLFloaterSidePanelContainer();
 
+    bool postBuild() override;
+
     void onOpen(const LLSD& key) override;
 
     void closeFloater(bool app_quitting = false) override;
@@ -77,6 +79,11 @@ public:
      * @returns a pointer to the panel of given type T.
      */
     template <typename T>
+    static T* findPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName)
+    {
+        return dynamic_cast<T*>(findPanel(floater_name, panel_name));
+    }
+    template <typename T>
     static T* getPanel(std::string_view floater_name, std::string_view panel_name = sMainPanelName)
     {
         T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name));
@@ -89,6 +96,8 @@ public:
 
 protected:
     void onCloseMsgCallback(const LLSD& notification, const LLSD& response);
+
+	LLPanel* mMainPanel = nullptr;
 };
 
 #endif // LL_LLFLOATERSIDEPANELCONTAINER_H
-- 
cgit v1.2.3


From 4fa41c5c784c6e478d49c6641893e694aa7ed5c3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 15:54:15 -0400
Subject: Fix findChild calls when inputting text into inventory search

---
 indra/newview/llpanelmaininventory.cpp | 30 ++++++++++++------------------
 indra/newview/llpanelmaininventory.h   |  5 +++++
 2 files changed, 17 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index fd7085c452..1a2c84af73 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -239,6 +239,11 @@ bool LLPanelMainInventory::postBuild()
         }
 
     }
+    mParentSidepanel = getParentSidepanelInventory();
+    if (mParentSidepanel)
+    {
+        mInboxPanel = mParentSidepanel->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
+    }
 
     mFilterEditor = getChild<LLFilterEditor>("inventory search editor");
     if (mFilterEditor)
@@ -761,14 +766,9 @@ void LLPanelMainInventory::onClearSearch()
     }
     mFilterSubString = "";
 
-    LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory();
-    if (sidepanel_inventory)
+    if (mInboxPanel)
     {
-        LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
-        if (inbox_panel)
-        {
-            inbox_panel->onClearSearch();
-        }
+        mInboxPanel->onClearSearch();
     }
 }
 
@@ -818,14 +818,9 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
     // set new filter string
     setFilterSubString(mFilterSubString);
 
-    LLSidepanelInventory * sidepanel_inventory = getParentSidepanelInventory();
-    if (sidepanel_inventory)
+    if (mInboxPanel)
     {
-        LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
-        if (inbox_panel)
-        {
-            inbox_panel->onFilterEdit(search_string);
-        }
+        mInboxPanel->onFilterEdit(search_string);
     }
 }
 
@@ -1578,16 +1573,15 @@ void LLPanelMainInventory::toggleViewMode()
     updateTitle();
     onFilterSelected();
 
-    LLSidepanelInventory* sidepanel_inventory = getParentSidepanelInventory();
-    if (sidepanel_inventory)
+    if (mParentSidepanel)
     {
         if(mSingleFolderMode)
         {
-            sidepanel_inventory->hideInbox();
+            mParentSidepanel->hideInbox();
         }
         else
         {
-            sidepanel_inventory->toggleInbox();
+            mParentSidepanel->toggleInbox();
         }
     }
 }
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 68ac3410d8..c1c7e9a7ab 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -49,6 +49,8 @@ class LLSidepanelInventory;
 class LLToggleableMenu;
 class LLFloater;
 class LLFloaterSidePanelContainer;
+class LLSidepanelInventory;
+class LLPanelMarketplaceInbox;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLPanelMainInventory
@@ -244,6 +246,9 @@ protected:
     void setUploadCostIfNeeded();
     void disableAddIfNeeded();
 private:
+    LLSidepanelInventory*       mParentSidepanel = nullptr;
+    LLPanelMarketplaceInbox*    mInboxPanel = nullptr;
+
     LLToggleableMenu*           mMenuGearDefault;
     LLToggleableMenu*           mMenuViewDefault;
     LLToggleableMenu*           mMenuVisibility;
-- 
cgit v1.2.3


From 699a6cd95ce6401342ab701666fa33e81b4ab01e Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 18:36:28 -0400
Subject: Reduce findChild UI stutter when toasts are created

---
 indra/newview/lldebugview.cpp                  | 2 +-
 indra/newview/llfloaterimnearbychathandler.cpp | 4 ++--
 indra/newview/llscreenchannel.cpp              | 8 ++++----
 indra/newview/llviewerwindow.cpp               | 4 +++-
 indra/newview/llviewerwindow.h                 | 5 +++++
 5 files changed, 15 insertions(+), 8 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 0596a8fe7d..53da9826ed 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -119,7 +119,7 @@ void LLDebugView::draw()
 {
     if (mFloaterSnapRegion == NULL)
     {
-        mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+        mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
     }
 
     LLRect debug_rect;
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index e9cd912ca9..c920a3c898 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -286,7 +286,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
 
     if (mFloaterSnapRegion == NULL)
     {
-        mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+        mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
     }
     LLRect channel_rect;
     mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
@@ -376,7 +376,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
 
     if (mFloaterSnapRegion == NULL)
     {
-        mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+        mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
     }
 
     if (!getParent())
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index f75e48c728..44c2a8fdaf 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -55,12 +55,12 @@ LLRect LLScreenChannelBase::getChannelRect()
 
     if (mFloaterSnapRegion == NULL)
     {
-        mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+        mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
     }
 
     if (mChicletRegion == NULL)
     {
-        mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+        mChicletRegion = gViewerWindow->getChicletContainer();
     }
 
     LLRect channel_rect;
@@ -103,12 +103,12 @@ bool LLScreenChannelBase::postBuild()
 {
     if (mFloaterSnapRegion == NULL)
     {
-        mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+        mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
     }
 
     if (mChicletRegion == NULL)
     {
-        mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+        mChicletRegion = gViewerWindow->getChicletContainer();
     }
 
     return true;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b13ccda5e0..be1b3bef1d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2079,6 +2079,8 @@ void LLViewerWindow::initBase()
     // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
     gToolBarView->setVisible(false);
 
+    mFloaterSnapRegion = gToolBarView->getChild<LLView>("floater_snap_region");
+    mChicletContainer = gToolBarView->getChild<LLPanel>("chiclet_container");
     // Constrain floaters to inside the menu and status bar regions.
     gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
     for (S32 i = 0; i < LLToolBarEnums::TOOLBAR_COUNT; ++i)
@@ -2089,7 +2091,7 @@ void LLViewerWindow::initBase()
             toolbarp->getCenterLayoutPanel()->setReshapeCallback(boost::bind(&LLFloaterView::setToolbarRect, gFloaterView, _1, _2));
         }
     }
-    gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
+    gFloaterView->setFloaterSnapView(mFloaterSnapRegion->getHandle());
     gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
 
     const F32 CHAT_PERSIST_TIME = 20.f;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index ba59ce4141..a449f4ad35 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -463,6 +463,9 @@ public:
 
     static std::string getLastSnapshotDir();
 
+    LLView* getFloaterSnapRegion() { return mFloaterSnapRegion; }
+    LLPanel* getChicletContainer() { return mChicletContainer; }
+
 private:
     bool                    shouldShowToolTipFor(LLMouseHandler *mh);
 
@@ -491,6 +494,8 @@ private:
     LLRect          mWorldViewRectRaw;          // area of screen for 3D world
     LLRect          mWorldViewRectScaled;       // area of screen for 3D world scaled by UI size
     LLRootView*     mRootView;                  // a view of size mWindowRectRaw, containing all child views
+    LLView*         mFloaterSnapRegion = nullptr;
+    LLPanel*        mChicletContainer = nullptr;
     LLVector2       mDisplayScale;
 
     LLCoordGL       mCurrentMousePoint;         // last mouse position in GL coords
-- 
cgit v1.2.3


From afed86e57977c9162972c7ea9daf67cbb3ca2318 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 16:04:31 -0400
Subject: Reduce ui stalls from findChild when logging in and when
 transitioning to/from mouselook

---
 indra/newview/llviewerwindow.cpp | 73 +++++++++++++++++-----------------------
 indra/newview/llviewerwindow.h   |  3 ++
 2 files changed, 34 insertions(+), 42 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index be1b3bef1d..8ea8fbf905 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2064,6 +2064,9 @@ void LLViewerWindow::initBase()
     mPopupView = main_view->getChild<LLPopupView>("popup_holder");
     mHintHolder = main_view->getChild<LLView>("hint_holder")->getHandle();
     mLoginPanelHolder = main_view->getChild<LLView>("login_panel_holder")->getHandle();
+    mStatusBarContainer = main_view->getChild<LLPanel>("status_bar_container");
+    mNavBarContainer = mStatusBarContainer->getChild<LLView>("nav_bar_container");
+    mTopInfoContainer = main_view->getChild<LLPanel>("topinfo_bar_container");
 
     // Create the toolbar view
     // Get a pointer to the toolbar view holder
@@ -2157,12 +2160,11 @@ void LLViewerWindow::initWorldUI()
 
     if (!gNonInteractive)
     {
-        LLPanel* chiclet_container = getRootView()->getChild<LLPanel>("chiclet_container");
         LLChicletBar* chiclet_bar = LLChicletBar::getInstance();
-        chiclet_bar->setShape(chiclet_container->getLocalRect());
+        chiclet_bar->setShape(mChicletContainer->getLocalRect());
         chiclet_bar->setFollowsAll();
-        chiclet_container->addChild(chiclet_bar);
-        chiclet_container->setVisible(true);
+        mChicletContainer->addChild(chiclet_bar);
+        mChicletContainer->setVisible(true);
     }
 
     LLRect morph_view_rect = full_window;
@@ -2187,30 +2189,25 @@ void LLViewerWindow::initWorldUI()
     if (!gStatusBar)
     {
         // Status bar
-        LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
-        gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
+        gStatusBar = new LLStatusBar(mStatusBarContainer->getLocalRect());
         gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
-        gStatusBar->setShape(status_bar_container->getLocalRect());
+        gStatusBar->setShape(mStatusBarContainer->getLocalRect());
         // sync bg color with menu bar
         gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor());
         // add InBack so that gStatusBar won't be drawn over menu
-        status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
-        status_bar_container->setVisible(true);
+        mStatusBarContainer->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
+        mStatusBarContainer->setVisible(true);
 
         // Navigation bar
-        LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
-
-        navbar->setShape(nav_bar_container->getLocalRect());
+        navbar->setShape(mNavBarContainer->getLocalRect());
         navbar->setBackgroundColor(gMenuBarView->getBackgroundColor());
-        nav_bar_container->addChild(navbar);
-        nav_bar_container->setVisible(true);
+        mNavBarContainer->addChild(navbar);
+        mNavBarContainer->setVisible(true);
     }
     else
     {
-        LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
-        LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
-        status_bar_container->setVisible(true);
-        nav_bar_container->setVisible(true);
+        mStatusBarContainer->setVisible(true);
+        mNavBarContainer->setVisible(true);
     }
 
     if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
@@ -2224,13 +2221,11 @@ void LLViewerWindow::initWorldUI()
 
 
     // Top Info bar
-    LLPanel* topinfo_bar_container = getRootView()->getChild<LLPanel>("topinfo_bar_container");
     LLPanelTopInfoBar* topinfo_bar = LLPanelTopInfoBar::getInstance();
+    topinfo_bar->setShape(mTopInfoContainer->getLocalRect());
 
-    topinfo_bar->setShape(topinfo_bar_container->getLocalRect());
-
-    topinfo_bar_container->addChild(topinfo_bar);
-    topinfo_bar_container->setVisible(true);
+    mTopInfoContainer->addChild(topinfo_bar);
+    mTopInfoContainer->setVisible(true);
 
     if (!gSavedSettings.getBOOL("ShowMiniLocationPanel"))
     {
@@ -2250,7 +2245,7 @@ void LLViewerWindow::initWorldUI()
         getRootView()->sendChildToBack(gHUDView);
     }
 
-    LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container");
+    LLPanel* panel_ssf_container = gToolBarView->getChild<LLPanel>("state_management_buttons_container");
 
     LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
     panel_ssf_container->addChild(panel_stand_stop_flying);
@@ -2573,12 +2568,11 @@ void LLViewerWindow::setNormalControlsVisible( bool visible )
         gStatusBar->setEnabled( visible );
     }
 
-    LLNavigationBar* navbarp = LLUI::getInstance()->getRootView()->findChild<LLNavigationBar>("navigation_bar");
-    if (navbarp)
+    if (mNavBarContainer)
     {
         // when it's time to show navigation bar we need to ensure that the user wants to see it
         // i.e. ShowNavbarNavigationPanel option is true
-        navbarp->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") );
+        mNavBarContainer->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") );
     }
 }
 
@@ -5956,23 +5950,20 @@ LLRect LLViewerWindow::getChatConsoleRect()
 
 void LLViewerWindow::reshapeStatusBarContainer()
 {
-    LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
-    LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
-
-    S32 new_height = status_bar_container->getRect().getHeight();
-    S32 new_width = status_bar_container->getRect().getWidth();
+    S32 new_height = mStatusBarContainer->getRect().getHeight();
+    S32 new_width = mStatusBarContainer->getRect().getWidth();
 
     if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
     {
         // Navigation bar is outside visible area, expand status_bar_container to show it
-        new_height += nav_bar_container->getRect().getHeight();
+        new_height += mNavBarContainer->getRect().getHeight();
     }
     else
     {
         // collapse status_bar_container
-        new_height -= nav_bar_container->getRect().getHeight();
+        new_height -= mNavBarContainer->getRect().getHeight();
     }
-    status_bar_container->reshape(new_width, new_height, true);
+    mStatusBarContainer->reshape(new_width, new_height, true);
 }
 
 void LLViewerWindow::resetStatusBarContainer()
@@ -5981,12 +5972,10 @@ void LLViewerWindow::resetStatusBarContainer()
     if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel") || navbar->getVisible())
     {
         // was previously showing navigation bar
-        LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
-        LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
-        S32 new_height = status_bar_container->getRect().getHeight();
-        S32 new_width = status_bar_container->getRect().getWidth();
-        new_height -= nav_bar_container->getRect().getHeight();
-        status_bar_container->reshape(new_width, new_height, true);
+        S32 new_height = mStatusBarContainer->getRect().getHeight();
+        S32 new_width = mStatusBarContainer->getRect().getWidth();
+        new_height -= mNavBarContainer->getRect().getHeight();
+        mStatusBarContainer->reshape(new_width, new_height, true);
     }
 }
 //----------------------------------------------------------------------------
@@ -6013,7 +6002,7 @@ void LLViewerWindow::setUIVisibility(bool visible)
 
     LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : false);
     LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : false);
-    mRootView->getChildView("status_bar_container")->setVisible(visible);
+    mStatusBarContainer->setVisible(visible);
 }
 
 bool LLViewerWindow::getUIVisibility()
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index a449f4ad35..395d8c78da 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -495,7 +495,10 @@ private:
     LLRect          mWorldViewRectScaled;       // area of screen for 3D world scaled by UI size
     LLRootView*     mRootView;                  // a view of size mWindowRectRaw, containing all child views
     LLView*         mFloaterSnapRegion = nullptr;
+    LLView*         mNavBarContainer = nullptr;
+    LLPanel*        mStatusBarContainer = nullptr;
     LLPanel*        mChicletContainer = nullptr;
+    LLPanel*        mTopInfoContainer = nullptr;
     LLVector2       mDisplayScale;
 
     LLCoordGL       mCurrentMousePoint;         // last mouse position in GL coords
-- 
cgit v1.2.3


From 39d65cc1c44496889e4d41956e6576012aba6624 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 16:16:37 -0400
Subject: Fix trying to find the outfit edit panel in non-appearance-panel
 instances of LLFloaterSidePanelContainer

---
 indra/newview/llfloatersidepanelcontainer.cpp | 35 ++++++++++++++-------------
 1 file changed, 18 insertions(+), 17 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 9e577c83a8..7bc95c2884 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -66,24 +66,26 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
 
 void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
 {
-    LLPanelOutfitEdit* panel_outfit_edit =
-        dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
-    if (panel_outfit_edit)
+    if(getInstanceName() == "appearance")
     {
-        LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
-        if (parent == this )
+        LLPanelOutfitEdit* panel_outfit_edit = findChild<LLPanelOutfitEdit>("panel_outfit_edit");
+        if (panel_outfit_edit)
         {
-            LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
-            if (panel_appearance)
+            LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
+            if (parent == this)
             {
-                LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
-                if (edit_wearable_ptr)
-                {
-                    edit_wearable_ptr->onClose();
-                }
-                if (!app_quitting)
+                LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(mMainPanel);
+                if (panel_appearance)
                 {
-                    panel_appearance->showOutfitsInventoryPanel();
+                    LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
+                    if (edit_wearable_ptr)
+                    {
+                        edit_wearable_ptr->onClose();
+                    }
+                    if(!app_quitting)
+                    {
+                        panel_appearance->showOutfitsInventoryPanel();
+                    }
                 }
             }
         }
@@ -99,10 +101,9 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
 
 void LLFloaterSidePanelContainer::onClickCloseBtn(bool app_quitting)
 {
-    if (!app_quitting)
+    if (!app_quitting && getInstanceName() == "appearance")
     {
-        LLPanelOutfitEdit* panel_outfit_edit =
-            dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
+        LLPanelOutfitEdit* panel_outfit_edit = findChild<LLPanelOutfitEdit>("panel_outfit_edit");
         if (panel_outfit_edit)
         {
             LLFloater* parent = gFloaterView->getParentFloater(panel_outfit_edit);
-- 
cgit v1.2.3


From ab4abd4387cb834e0c350bfe78e929e8530f4f80 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 17:33:59 -0400
Subject: Fix findChild stutter when changing people panel tabs

---
 indra/newview/llpanelpeople.cpp | 46 ++++++++++++++++-------------------------
 indra/newview/llpanelpeople.h   |  8 ++++++-
 2 files changed, 25 insertions(+), 29 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 2f0a8f7656..107b1cf6cd 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -727,12 +727,14 @@ bool LLPanelPeople::postBuild()
         LL_WARNS() << "People->Groups list menu not found" << LL_ENDL;
     }
 
-    LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>("tab_all");
-    accordion_tab->setDropDownStateChangedCallback(
+    mFriendsAccordion = friends_tab->getChild<LLAccordionCtrl>("friends_accordion");
+
+    mFriendsAllTab = mFriendsAccordion->getChild<LLAccordionCtrlTab>("tab_all");
+    mFriendsAllTab->setDropDownStateChangedCallback(
         boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mAllFriendList));
 
-    accordion_tab = getChild<LLAccordionCtrlTab>("tab_online");
-    accordion_tab->setDropDownStateChangedCallback(
+    mFriendsOnlineTab = mFriendsAccordion->getChild<LLAccordionCtrlTab>("tab_online");
+    mFriendsOnlineTab->setDropDownStateChangedCallback(
         boost::bind(&LLPanelPeople::onFriendsAccordionExpandedCollapsed, this, _1, _2, mOnlineFriendList));
 
     // Must go after setting commit callback and initializing all pointers to children.
@@ -1064,8 +1066,8 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
         mOnlineFriendList->setNameFilter(filter);
         mAllFriendList->setNameFilter(filter);
 
-        setAccordionCollapsedByUser("tab_online", false);
-        setAccordionCollapsedByUser("tab_all", false);
+        setAccordionCollapsedByUser(mFriendsOnlineTab, false);
+        setAccordionCollapsedByUser(mFriendsAllTab, false);
         showFriendsAccordionsIfNeeded();
 
         // restore accordion tabs state _after_ all manipulations
@@ -1108,7 +1110,6 @@ void LLPanelPeople::onGroupLimitInfo()
 
 void LLPanelPeople::onTabSelected(const LLSD& param)
 {
-    std::string tab_name = getChild<LLPanel>(param.asString())->getName();
     updateButtons();
 
     showFriendsAccordionsIfNeeded();
@@ -1142,9 +1143,9 @@ void LLPanelPeople::onAvatarListCommitted(LLAvatarList* list)
         uuid_vec_t selected_uuids;
         getCurrentItemIDs(selected_uuids);
         mMiniMap->setSelected(selected_uuids);
-    } else
+    }
     // Make sure only one of the friends lists (online/all) has selection.
-    if (getActiveTabName() == FRIENDS_TAB_NAME)
+    else if (getActiveTabName() == FRIENDS_TAB_NAME)
     {
         if (list == mOnlineFriendList)
             mAllFriendList->resetSelection(true);
@@ -1169,12 +1170,9 @@ void LLPanelPeople::onAddFriendButtonClicked()
 bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
 {
     const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
-    for ( uuid_vec_t::const_iterator
-              id = uuids.begin(),
-              id_end = uuids.end();
-          id != id_end; ++id )
+    for (const LLUUID& uuid : uuids)
     {
-        if (av_tracker.isBuddy (*id))
+        if (av_tracker.isBuddy(uuid))
         {
             return false;
         }
@@ -1479,15 +1477,8 @@ bool LLPanelPeople::notifyChildren(const LLSD& info)
     return LLPanel::notifyChildren(info);
 }
 
-void LLPanelPeople::showAccordion(const std::string name, bool show)
+void LLPanelPeople::showAccordion(LLAccordionCtrlTab* tab, bool show)
 {
-    if(name.empty())
-    {
-        LL_WARNS() << "No name provided" << LL_ENDL;
-        return;
-    }
-
-    LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(name);
     tab->setVisible(show);
     if(show)
     {
@@ -1505,12 +1496,11 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded()
     if(FRIENDS_TAB_NAME == getActiveTabName())
     {
         // Expand and show accordions if needed, else - hide them
-        showAccordion("tab_online", mOnlineFriendList->filterHasMatches());
-        showAccordion("tab_all", mAllFriendList->filterHasMatches());
+        showAccordion(mFriendsOnlineTab, mOnlineFriendList->filterHasMatches());
+        showAccordion(mFriendsAllTab, mAllFriendList->filterHasMatches());
 
         // Rearrange accordions
-        LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion");
-        accordion->arrange();
+        mFriendsAccordion->arrange();
 
         // *TODO: new no_matched_tabs_text attribute was implemented in accordion (EXT-7368).
         // this code should be refactored to use it
@@ -1523,11 +1513,11 @@ void LLPanelPeople::onFriendListRefreshComplete(LLUICtrl*ctrl, const LLSD& param
 {
     if(ctrl == mOnlineFriendList)
     {
-        showAccordion("tab_online", param.asInteger());
+        showAccordion(mFriendsOnlineTab, param.asInteger());
     }
     else if(ctrl == mAllFriendList)
     {
-        showAccordion("tab_all", param.asInteger());
+        showAccordion(mFriendsAllTab, param.asInteger());
     }
 }
 
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 445bc4c081..aef66db980 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -40,6 +40,8 @@ class LLGroupList;
 class LLMenuButton;
 class LLTabContainer;
 class LLNetMap;
+class LLAccordionCtrl;
+class LLAccordionCtrlTab;
 
 class LLPanelPeople
     : public LLPanel
@@ -120,7 +122,7 @@ private:
 
     void                    onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list);
 
-    void                    showAccordion(const std::string name, bool show);
+    void                    showAccordion(LLAccordionCtrlTab* tab, bool show);
 
     void                    showFriendsAccordionsIfNeeded();
 
@@ -139,6 +141,10 @@ private:
     LLGroupList*            mGroupList;
     LLNetMap*               mMiniMap;
 
+    LLAccordionCtrl* mFriendsAccordion = nullptr;
+    LLAccordionCtrlTab*     mFriendsAllTab = nullptr;
+    LLAccordionCtrlTab*     mFriendsOnlineTab = nullptr;
+
     LLButton*               mNearbyGearBtn = nullptr;
     LLButton*               mFriendsGearBtn = nullptr;
     LLButton*               mRecentGearBtn = nullptr;
-- 
cgit v1.2.3


From 048ebff444a154b103bdab161df17aaca2d18cd8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 17:35:13 -0400
Subject: Fix findChild frame drops when switching inventory panels

---
 indra/newview/llpanelmaininventory.cpp | 28 +++++++++++-----------------
 indra/newview/llviewermenu.cpp         |  1 -
 2 files changed, 11 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1a2c84af73..8334da1836 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -308,31 +308,29 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
     // for example, LLParamSDParser doesn't know about U64,
     // so some FilterOps params should be revised.
     LLSD filterRoot;
-    LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>(ALL_ITEMS);
-    if (all_items_panel)
+    if (mAllItemsPanel)
     {
         LLSD filterState;
         LLInventoryPanel::InventoryState p;
-        all_items_panel->getFilter().toParams(p.filter);
-        all_items_panel->getRootViewModel().getSorter().toParams(p.sort);
+        mAllItemsPanel->getFilter().toParams(p.filter);
+        mAllItemsPanel->getRootViewModel().getSorter().toParams(p.sort);
         if (p.validateBlock(false))
         {
             LLParamSDParser().writeSD(filterState, p);
-            filterRoot[all_items_panel->getName()] = filterState;
+            filterRoot[mAllItemsPanel->getName()] = filterState;
         }
     }
 
-    LLInventoryPanel* panel = findChild<LLInventoryPanel>(RECENT_ITEMS);
-    if (panel)
+    if (mRecentPanel)
     {
         LLSD filterState;
         LLInventoryPanel::InventoryState p;
-        panel->getFilter().toParams(p.filter);
-        panel->getRootViewModel().getSorter().toParams(p.sort);
+        mRecentPanel->getFilter().toParams(p.filter);
+        mRecentPanel->getRootViewModel().getSorter().toParams(p.sort);
         if (p.validateBlock(false))
         {
             LLParamSDParser().writeSD(filterState, p);
-            filterRoot[panel->getName()] = filterState;
+            filterRoot[mRecentPanel->getName()] = filterState;
         }
     }
 
@@ -1525,17 +1523,13 @@ void LLPanelMainInventory::onAddButtonClick()
 void LLPanelMainInventory::setActivePanel()
 {
     // Todo: should cover gallery mode in some way
-    if(mSingleFolderMode && isListViewMode())
-    {
-        mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv");
-    }
-    else if(mSingleFolderMode && isCombinationViewMode())
+    if(mSingleFolderMode && (isListViewMode() || isCombinationViewMode()))
     {
-        mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv");
+        mActivePanel = mCombinationInventoryPanel;
     }
     else
     {
-        mActivePanel = (LLInventoryPanel*)getChild<LLTabContainer>("inventory filter tabs")->getCurrentPanel();
+        mActivePanel = (LLInventoryPanel*)mFilterTabs->getCurrentPanel();
     }
     mViewModeBtn->setEnabled(mSingleFolderMode || (getAllItemsPanel() == getActivePanel()));
 }
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 529d6f97ca..97d5781566 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -10125,7 +10125,6 @@ void initialize_menus()
 
     commit.add("Object.Buy", boost::bind(&handle_buy));
     commit.add("Object.Edit", boost::bind(&handle_object_edit));
-    commit.add("Object.Edit", boost::bind(&handle_object_edit));
     commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material));
     commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
     commit.add("Object.Open", boost::bind(&handle_object_open));
-- 
cgit v1.2.3


From a242e8bee2c7f0b0906c850e065adddd5314275d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 18:21:55 -0400
Subject: Fix findChild during draw in notecard previews

---
 indra/newview/llpreviewnotecard.cpp | 175 +++++++++++++-----------------------
 indra/newview/llpreviewnotecard.h   |  17 ++--
 2 files changed, 71 insertions(+), 121 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 620b7c8b2d..9a991727b2 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -67,8 +67,7 @@
 
 // Default constructor
 LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id,
-    : LLPreview( key ),
-    mLiveFile(NULL)
+    : LLPreview( key )
 {
     const LLInventoryItem *item = getItem();
     if (item)
@@ -88,24 +87,30 @@ bool LLPreviewNotecard::postBuild()
     mEditor->setNotecardInfo(mItemUUID, mObjectID, getKey());
     mEditor->makePristine();
 
-    childSetAction("Save", onClickSave, this);
-    getChildView("lock")->setVisible( false);
+    mSaveBtn = getChild<LLButton>("Save");
+    mSaveBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::saveIfNeeded, this, nullptr, true));
 
-    childSetAction("Delete", onClickDelete, this);
-    getChildView("Delete")->setEnabled(false);
+    mLockBtn = getChild<LLUICtrl>("lock");
+    mLockBtn->setVisible(false);
 
-    childSetAction("Edit", onClickEdit, this);
+    mDeleteBtn = getChild<LLButton>("Delete");
+    mDeleteBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::deleteNotecard, this));
+    mDeleteBtn->setEnabled(false);
+
+    mEditBtn = getChild<LLButton>("Edit");
+    mEditBtn->setCommitCallback(boost::bind(&LLPreviewNotecard::openInExternalEditor, this));
 
     const LLInventoryItem* item = getItem();
 
-    childSetCommitCallback("desc", LLPreview::onText, this);
+    mDescEditor = getChild<LLLineEditor>("desc");
+    mDescEditor->setCommitCallback(boost::bind(&LLPreview::onText, mDescEditor, this));
     if (item)
     {
-        getChild<LLUICtrl>("desc")->setValue(item->getDescription());
+        mDescEditor->setValue(item->getDescription());
         bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID());
-        getChildView("Delete")->setEnabled(!source_library);
+        mDeleteBtn->setEnabled(!source_library);
     }
-    getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
+    mDescEditor->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
 
     return LLPreview::postBuild();
 }
@@ -118,22 +123,30 @@ bool LLPreviewNotecard::saveItem()
 
 void LLPreviewNotecard::setEnabled(bool enabled)
 {
-
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
-    getChildView("Notecard Editor")->setEnabled(enabled);
-    getChildView("lock")->setVisible( !enabled);
-    getChildView("desc")->setEnabled(enabled);
-    getChildView("Save")->setEnabled(enabled && editor && (!editor->isPristine()));
+    if (mEditor)
+    {
+        mEditor->setEnabled(enabled);
+    }
+    if (mLockBtn)
+    {
+        mLockBtn->setVisible(!enabled);
+    }
+    if (mDescEditor)
+    {
+        mDescEditor->setEnabled(enabled);
+    }
+    if (mSaveBtn)
+    {
+        mSaveBtn->setEnabled(enabled && mEditor && (!mEditor->isPristine()));
+    }
 }
 
 
 void LLPreviewNotecard::draw()
 {
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-    bool changed = !editor->isPristine();
+    bool changed = !mEditor->isPristine();
 
-    getChildView("Save")->setEnabled(changed && getEnabled());
+    mSaveBtn->setEnabled(changed && getEnabled());
 
     LLPreview::draw();
 }
@@ -153,9 +166,7 @@ bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
 // virtual
 bool LLPreviewNotecard::canClose()
 {
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
-    if(mForceClose || editor->isPristine())
+    if(mForceClose || mEditor->isPristine())
     {
         return true;
     }
@@ -176,28 +187,18 @@ void LLPreviewNotecard::setObjectID(const LLUUID& object_id)
 {
     LLPreview::setObjectID(object_id);
 
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-    editor->setNotecardObjectID(mObjectUUID);
-    editor->makePristine();
+    mEditor->setNotecardObjectID(mObjectUUID);
+    mEditor->makePristine();
 }
 
 const LLInventoryItem* LLPreviewNotecard::getDragItem()
 {
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
-    if(editor)
-    {
-        return editor->getDragItem();
-    }
-    return NULL;
+    return mEditor->getDragItem();
 }
 
 bool LLPreviewNotecard::hasEmbeddedInventory()
 {
-    LLViewerTextEditor* editor = NULL;
-    editor = getChild<LLViewerTextEditor>("Notecard Editor");
-    if (!editor) return false;
-    return editor->hasEmbeddedInventory();
+    return mEditor->hasEmbeddedInventory();
 }
 
 void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id)
@@ -215,10 +216,9 @@ void LLPreviewNotecard::updateTitleButtons()
 {
     LLPreview::updateTitleButtons();
 
-    LLUICtrl* lock_btn = getChild<LLUICtrl>("lock");
-    if(lock_btn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
+    if(mLockBtn && mLockBtn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized.
     {
-        LLRect lock_rc = lock_btn->getRect();
+        LLRect lock_rc = mLockBtn->getRect();
         LLRect buttons_rect = getDragHandle()->getButtonsRect();
         buttons_rect.mLeft = lock_rc.mLeft;
         getDragHandle()->setButtonsRect(buttons_rect);
@@ -229,11 +229,6 @@ void LLPreviewNotecard::loadAsset()
 {
     // request the asset.
     const LLInventoryItem* item = getItem();
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
-    if (!editor)
-        return;
-
     bool fail = false;
 
     if(item)
@@ -249,9 +244,9 @@ void LLPreviewNotecard::loadAsset()
             mAssetID = item->getAssetUUID();
             if(mAssetID.isNull())
             {
-                editor->setText(LLStringUtil::null);
-                editor->makePristine();
-                editor->setEnabled(true);
+                mEditor->setText(LLStringUtil::null);
+                mEditor->makePristine();
+                mEditor->setEnabled(true);
                 mAssetStatus = PREVIEW_ASSET_LOADED;
             }
             else
@@ -270,9 +265,9 @@ void LLPreviewNotecard::loadAsset()
                         // The object that we're trying to look at disappeared, bail.
                         LL_WARNS() << "Can't find object " << mObjectUUID << " associated with notecard." << LL_ENDL;
                         mAssetID.setNull();
-                        editor->setText(getString("no_object"));
-                        editor->makePristine();
-                        editor->setEnabled(false);
+                        mEditor->setText(getString("no_object"));
+                        mEditor->makePristine();
+                        mEditor->setEnabled(false);
                         mAssetStatus = PREVIEW_ASSET_LOADED;
                         return;
                     }
@@ -301,22 +296,22 @@ void LLPreviewNotecard::loadAsset()
         else
         {
             mAssetID.setNull();
-            editor->setText(getString("not_allowed"));
-            editor->makePristine();
-            editor->setEnabled(false);
+            mEditor->setText(getString("not_allowed"));
+            mEditor->makePristine();
+            mEditor->setEnabled(false);
             mAssetStatus = PREVIEW_ASSET_LOADED;
         }
 
         if(!allow_modify)
         {
-            editor->setEnabled(false);
-            getChildView("lock")->setVisible( true);
-            getChildView("Edit")->setEnabled(false);
+            mEditor->setEnabled(false);
+            mLockBtn->setVisible( true);
+            mEditBtn->setEnabled(false);
         }
 
         if((allow_modify || is_owner) && !source_library)
         {
-            getChildView("Delete")->setEnabled(true);
+            mDeleteBtn->setEnabled(true);
         }
     }
     else if (mObjectUUID.notNull() && mItemUUID.notNull())
@@ -345,9 +340,9 @@ void LLPreviewNotecard::loadAsset()
 
     if (fail)
     {
-        editor->setText(LLStringUtil::null);
-        editor->makePristine();
-        editor->setEnabled(true);
+        mEditor->setText(LLStringUtil::null);
+        mEditor->makePristine();
+        mEditor->setEnabled(true);
         // Don't set asset status here; we may not have set the item id yet
         // (e.g. when this gets called initially)
         //mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -377,7 +372,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
             buffer[file_length] = 0;
 
 
-            LLViewerTextEditor* previewEditor = preview->getChild<LLViewerTextEditor>("Notecard Editor");
+            LLViewerTextEditor* previewEditor = preview->mEditor;
 
             if( (file_length > 19) && !strncmp( &buffer[0], "Linden text version", 19 ) )
             {
@@ -421,38 +416,6 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid,
     delete floater_key;
 }
 
-// static
-void LLPreviewNotecard::onClickSave(void* user_data)
-{
-    //LL_INFOS() << "LLPreviewNotecard::onBtnSave()" << LL_ENDL;
-    LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
-    if(preview)
-    {
-        preview->saveIfNeeded();
-    }
-}
-
-
-// static
-void LLPreviewNotecard::onClickDelete(void* user_data)
-{
-    LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
-    if(preview)
-    {
-        preview->deleteNotecard();
-    }
-}
-
-// static
-void LLPreviewNotecard::onClickEdit(void* user_data)
-{
-    LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
-    if (preview)
-    {
-        preview->openInExternalEditor();
-    }
-}
-
 struct LLSaveNotecardInfo
 {
     LLPreviewNotecard* mSelf;
@@ -515,23 +478,15 @@ void LLPreviewNotecard::finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUI
 
 bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync)
 {
-    LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
-    if(!editor)
-    {
-        LL_WARNS() << "Cannot get handle to the notecard editor." << LL_ENDL;
-        return false;
-    }
-
-    if(!editor->isPristine())
+    if(!mEditor->isPristine())
     {
         std::string buffer;
-        if (!editor->exportBuffer(buffer))
+        if (!mEditor->exportBuffer(buffer))
         {
             return false;
         }
 
-        editor->makePristine();
+        mEditor->makePristine();
         const LLInventoryItem* item = getItem();
         // save it out to database
         if (item)
@@ -692,11 +647,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
         // Perform item copy to inventory
         if (info->mCopyItem.notNull())
         {
-            LLViewerTextEditor* editor = info->mSelf->getChild<LLViewerTextEditor>("Notecard Editor");
-            if (editor)
-            {
-                editor->copyInventory(info->mCopyItem);
-            }
+            info->mSelf->mEditor->copyInventory(info->mCopyItem);
         }
 
         // Find our window and close it if requested.
@@ -731,7 +682,7 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
     {
     case 0:  // "Yes"
         mCloseAfterSave = true;
-        LLPreviewNotecard::onClickSave((void*)this);
+        saveIfNeeded();
         break;
 
     case 1:  // "No"
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index db677b1cf9..be3c804f9b 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -41,6 +41,7 @@
 
 class LLViewerTextEditor;
 class LLButton;
+class LLLineEditor;
 
 class LLPreviewNotecard : public LLPreview, public LLVOInventoryListener
 {
@@ -93,12 +94,6 @@ protected:
                                LLAssetType::EType type,
                                void* user_data, S32 status, LLExtStat ext_status);
 
-    static void onClickSave(void* data);
-
-    static void onClickDelete(void* data);
-
-    static void onClickEdit(void* data);
-
     static void onSaveComplete(const LLUUID& asset_uuid,
                                void* user_data,
                                S32 status, LLExtStat ext_status);
@@ -116,14 +111,18 @@ protected:
     std::string getTmpFileName();
 
 protected:
-    LLViewerTextEditor* mEditor;
-    LLButton* mSaveBtn;
+    LLViewerTextEditor* mEditor = nullptr;
+    LLLineEditor* mDescEditor = nullptr;
+    LLButton* mSaveBtn = nullptr;
+    LLButton* mEditBtn = nullptr;
+    LLButton* mDeleteBtn = nullptr;
+    LLUICtrl* mLockBtn = nullptr;
 
     LLUUID mAssetID;
 
     LLUUID mObjectID;
 
-    LLLiveLSLFile* mLiveFile;
+    LLLiveLSLFile* mLiveFile = nullptr;
 };
 
 
-- 
cgit v1.2.3


From b214de1cc39ec6fff0d896dbacdb38b605833870 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 18:34:15 -0400
Subject: Fix findChild during draw in texture previews

---
 indra/newview/llpreviewtexture.cpp | 33 +++++++++++++++++++++------------
 indra/newview/llpreviewtexture.h   |  5 +++++
 2 files changed, 26 insertions(+), 12 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 2a5d7f2450..1b657d9ea1 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -129,6 +129,10 @@ void LLPreviewTexture::populateRatioList()
 // virtual
 bool LLPreviewTexture::postBuild()
 {
+    mButtonsPanel = getChild<LLLayoutPanel>("buttons_panel");
+    mDimensionsText = getChild<LLUICtrl>("dimensions");
+    mAspectRatioText = getChild<LLUICtrl>("aspect_ratio");
+
     if (mCopyToInv)
     {
         getChild<LLButton>("Keep")->setLabel(getString("Copy"));
@@ -346,15 +350,20 @@ void LLPreviewTexture::reshape(S32 width, S32 height, bool called_from_parent)
 {
     LLPreview::reshape(width, height, called_from_parent);
 
-    LLRect dim_rect(getChildView("dimensions")->getRect());
-
     S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
 
     // add space for dimensions and aspect ratio
-    S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD;
-    if (getChild<LLLayoutPanel>("buttons_panel")->getVisible())
+    S32 info_height = CLIENT_RECT_VPAD;
+
+    if (mDimensionsText)
+    {
+        LLRect dim_rect(mDimensionsText->getRect());
+        info_height += dim_rect.mTop;
+    }
+
+    if (mButtonsPanel && mButtonsPanel->getVisible())
     {
-        info_height += getChild<LLLayoutPanel>("buttons_panel")->getRect().getHeight();
+        info_height += mButtonsPanel->getRect().getHeight();
     }
     LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0);
     client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
@@ -404,8 +413,8 @@ void LLPreviewTexture::hideCtrlButtons()
 {
     getChildView("desc txt")->setVisible(false);
     getChildView("desc")->setVisible(false);
-    getChild<LLLayoutStack>("preview_stack")->collapsePanel(getChild<LLLayoutPanel>("buttons_panel"), true);
-    getChild<LLLayoutPanel>("buttons_panel")->setVisible(false);
+    getChild<LLLayoutStack>("preview_stack")->collapsePanel(mButtonsPanel, true);
+    mButtonsPanel->setVisible(false);
     getChild<LLComboBox>("combo_aspect_ratio")->setCurrentByIndex(0); //unconstrained
     reshape(getRect().getWidth(), getRect().getHeight());
 }
@@ -538,8 +547,8 @@ void LLPreviewTexture::updateDimensions()
 
 
     // Update the width/height display every time
-    getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]",  llformat("%d", img_width));
-    getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height));
+    mDimensionsText->setTextArg("[WIDTH]", llformat("%d", img_width));
+    mDimensionsText->setTextArg("[HEIGHT]", llformat("%d", img_height));
 
     mLastHeight = img_height;
     mLastWidth = img_width;
@@ -554,9 +563,9 @@ void LLPreviewTexture::updateDimensions()
 
         gFloaterView->adjustToFitScreen(this, false);
 
-        LLRect dim_rect(getChildView("dimensions")->getRect());
-        LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
-        getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
+        LLRect dim_rect(mDimensionsText->getRect());
+        LLRect aspect_label_rect(mAspectRatioText->getRect());
+        mAspectRatioText->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
     }
 }
 
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index e55d61ef10..44f3f07339 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -34,6 +34,7 @@
 
 class LLComboBox;
 class LLImageRaw;
+class LLLayoutPanel;
 
 class LLPreviewTexture : public LLPreview
 {
@@ -105,5 +106,9 @@ private:
 
     LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
     std::vector<std::string>        mRatiosList;
+
+    LLLayoutPanel* mButtonsPanel = nullptr;
+    LLUICtrl* mDimensionsText = nullptr;
+    LLUICtrl* mAspectRatioText = nullptr;
 };
 #endif  // LL_LLPREVIEWTEXTURE_H
-- 
cgit v1.2.3


From e5748df9a5f213ea6e3a7650719586e5f01233d9 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 18:34:42 -0400
Subject: Fix findChild during draw in script editor

---
 indra/newview/llpreviewscript.cpp | 12 +++++++-----
 indra/newview/llpreviewscript.h   |  2 ++
 2 files changed, 9 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index b7c929f0b5..02a4c7fb26 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -435,7 +435,7 @@ void LLLiveLSLEditor::experienceChanged()
     if(mScriptEd->getAssociatedExperience() != mExperiences->getSelectedValue().asUUID())
     {
         mScriptEd->enableSave(getIsModifiable());
-        //getChildView("Save_btn")->setEnabled(true);
+        //mSaveBtn->setEnabled(true);
         mScriptEd->setAssociatedExperience(mExperiences->getSelectedValue().asUUID());
         updateExperiencePanel();
     }
@@ -481,6 +481,7 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata )
 
 bool LLScriptEdCore::postBuild()
 {
+    mLineCol = getChild<LLTextBox>("line_col");
     mErrorList = getChild<LLScrollListCtrl>("lsl errors");
 
     mFunctions = getChild<LLComboBox>("Insert...");
@@ -490,7 +491,8 @@ bool LLScriptEdCore::postBuild()
     mEditor = getChild<LLScriptEditor>("Script Editor");
 
     childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
-    childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,false));
+    mSaveBtn = getChild<LLButton>("Save_btn");
+    mSaveBtn->setCommitCallback(boost::bind(&LLScriptEdCore::doSave, this, false));
     childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this));
 
     initMenu();
@@ -711,7 +713,7 @@ bool LLScriptEdCore::hasChanged()
 void LLScriptEdCore::draw()
 {
     bool script_changed = hasChanged();
-    getChildView("Save_btn")->setEnabled(script_changed && !mScriptRemoved);
+    mSaveBtn->setEnabled(script_changed && !mScriptRemoved);
 
     if( mEditor->hasFocus() )
     {
@@ -723,11 +725,11 @@ void LLScriptEdCore::draw()
         args["[LINE]"] = llformat ("%d", line);
         args["[COLUMN]"] = llformat ("%d", column);
         cursor_pos = LLTrans::getString("CursorPos", args);
-        getChild<LLUICtrl>("line_col")->setValue(cursor_pos);
+        mLineCol->setValue(cursor_pos);
     }
     else
     {
-        getChild<LLUICtrl>("line_col")->setValue(LLStringUtil::null);
+        mLineCol->setValue(LLStringUtil::null);
     }
 
     updateDynamicHelp();
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 9a3bc35f12..70ee1a4274 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -195,6 +195,8 @@ private:
     bool            mScriptRemoved;
     bool            mSaveDialogShown;
     LLUUID          mAssetID;
+    LLTextBox*      mLineCol = nullptr;
+    LLButton*       mSaveBtn = nullptr;
 
     LLScriptEdContainer* mContainer; // parent view
 
-- 
cgit v1.2.3


From 934e1f665fdbb1c8d7e053817115a57562572921 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 21:41:53 -0400
Subject: Fix findChild during draw in the tools floater

---
 indra/newview/llfloatertools.cpp | 47 ++++++++++++++++++++++------------------
 indra/newview/llfloatertools.h   | 14 +++++++++---
 2 files changed, 37 insertions(+), 24 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index aadc5b9580..52979d359e 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -284,6 +284,15 @@ bool    LLFloaterTools::postBuild()
     // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
     getChild<LLUICtrl>("slider force")->setValue(log10(gSavedSettings.getF32("LandBrushForce")));
 
+    mTextBulldozer = getChild<LLTextBox>("Bulldozer:");
+    mTextDozerSize = getChild<LLTextBox>("Dozer Size:");
+    mTextDozerStrength = getChild<LLTextBox>("Strength:");
+    mSliderZoom = getChild<LLSlider>("slider zoom");
+
+    mTextSelectionCount = getChild<LLTextBox>("selection_count");
+    mTextSelectionEmpty = getChild<LLTextBox>("selection_empty");
+    mTextSelectionFaces = getChild<LLTextBox>("selection_faces");
+
     mCostTextBorder = getChild<LLViewBorder>("cost_text_border");
 
     mTab = getChild<LLTabContainer>("Object Info Tabs");
@@ -450,10 +459,10 @@ void LLFloaterTools::refresh()
     {
         std::string obj_count_string;
         LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
-        getChild<LLUICtrl>("selection_count")->setTextArg("[OBJ_COUNT]", obj_count_string);
+        mTextSelectionCount->setTextArg("[OBJ_COUNT]", obj_count_string);
         std::string prim_count_string;
         LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
-        getChild<LLUICtrl>("selection_count")->setTextArg("[PRIM_COUNT]", prim_count_string);
+        mTextSelectionCount->setTextArg("[PRIM_COUNT]", prim_count_string);
 
         // calculate selection rendering cost
         if (sShowObjectCost)
@@ -521,23 +530,18 @@ void LLFloaterTools::refresh()
                     }
                 }
             }
-
-            childSetTextArg("selection_faces", "[FACES_STRING]", faces_str);
+            mTextSelectionFaces->setTextArg("[FACES_STRING]", faces_str);
         }
 
         bool show_faces = (object_count == 1)
                           && LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool();
-        getChildView("selection_faces")->setVisible(show_faces);
+        mTextSelectionFaces->setVisible(show_faces);
 
         LLStringUtil::format_map_t selection_args;
         selection_args["OBJ_COUNT"] = llformat("%.1d", link_count);
         selection_args["LAND_IMPACT"] = llformat("%.1d", (S32)link_cost);
 
-        std::ostringstream selection_info;
-
-        selection_info << getString("status_selectcount", selection_args);
-
-        getChild<LLTextBox>("selection_count")->setText(selection_info.str());
+        mTextSelectionCount->setText(getString("status_selectcount", selection_args));
     }
 
 
@@ -618,8 +622,9 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
     mBtnFocus   ->setToggleState( focus_visible );
 
     mRadioGroupFocus->setVisible( focus_visible );
-    getChildView("slider zoom")->setVisible( focus_visible);
-    getChildView("slider zoom")->setEnabled(gCameraBtnZoom);
+    
+    mSliderZoom->setVisible( focus_visible);
+    mSliderZoom->setEnabled(gCameraBtnZoom);
 
     if (!gCameraBtnOrbit &&
         !gCameraBtnPan &&
@@ -644,7 +649,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
     }
 
     // multiply by correction factor because volume sliders go [0, 0.5]
-    getChild<LLUICtrl>("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f);
+    mSliderZoom->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f);
 
     // Move buttons
     bool move_visible = (tool == LLToolGrab::getInstance());
@@ -832,22 +837,22 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
     }
     if (mSliderDozerSize)
     {
-        mSliderDozerSize    ->setVisible( land_visible );
-        getChildView("Bulldozer:")->setVisible( land_visible);
-        getChildView("Dozer Size:")->setVisible( land_visible);
+        mSliderDozerSize->setVisible( land_visible );
+        mTextBulldozer->setVisible( land_visible);
+        mTextDozerSize->setVisible( land_visible);
     }
     if (mSliderDozerForce)
     {
-        mSliderDozerForce   ->setVisible( land_visible );
-        getChildView("Strength:")->setVisible( land_visible);
+        mSliderDozerForce->setVisible( land_visible );
+        mTextDozerStrength->setVisible( land_visible);
     }
 
     bool have_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
 
-    getChildView("selection_count")->setVisible(!land_visible && have_selection);
-    getChildView("selection_faces")->setVisible(LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()
+    mTextSelectionCount->setVisible(!land_visible && have_selection);
+    mTextSelectionFaces->setVisible(LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()
                                                 && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1);
-    getChildView("selection_empty")->setVisible(!land_visible && !have_selection);
+    mTextSelectionEmpty->setVisible(!land_visible && !have_selection);
 
     mTab->setVisible(!land_visible);
     mPanelLandInfo->setVisible(land_visible);
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index f9c3b401bb..0f7a61b733 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -148,6 +148,11 @@ public:
     LLButton    *mBtnDuplicate;
     LLButton    *mBtnDuplicateInPlace;
 
+    LLTextBox*  mTextSelectionCount = nullptr;
+    LLTextBox*  mTextSelectionEmpty = nullptr;
+    LLTextBox*  mTextSelectionFaces = nullptr;
+    LLSlider*   mSliderZoom = nullptr;
+
     // Create buttons
     LLCheckBoxCtrl  *mCheckSticky;
     LLCheckBoxCtrl  *mCheckCopySelection;
@@ -155,9 +160,12 @@ public:
     LLCheckBoxCtrl  *mCheckCopyRotates;
 
     // Land buttons
-    LLRadioGroup*   mRadioGroupLand;
-    LLSlider        *mSliderDozerSize;
-    LLSlider        *mSliderDozerForce;
+    LLRadioGroup*   mRadioGroupLand = nullptr;
+    LLSlider        *mSliderDozerSize = nullptr;
+    LLSlider        *mSliderDozerForce = nullptr;
+    LLTextBox*      mTextBulldozer = nullptr;
+    LLTextBox*      mTextDozerSize = nullptr;
+    LLTextBox*      mTextDozerStrength = nullptr;
 
     LLButton        *mBtnApplyToSelection;
 
-- 
cgit v1.2.3


From 6db7b3012386b30ead792d1cb3968ce5179cb3ba Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 18 Aug 2024 22:56:35 -0400
Subject: Fix find child during search/draw in debug settings floater

---
 indra/newview/llfloatersettingsdebug.cpp | 377 +++++++++++++++----------------
 indra/newview/llfloatersettingsdebug.h   |  15 +-
 2 files changed, 202 insertions(+), 190 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 525317304d..8cc01f6dc6 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -51,6 +51,18 @@ bool LLFloaterSettingsDebug::postBuild()
 {
     enableResizeCtrls(true, false, true);
 
+    mValSpinner1 = getChild<LLSpinCtrl>("val_spinner_1");
+    mValSpinner2 = getChild<LLSpinCtrl>("val_spinner_2");
+    mValSpinner3 = getChild<LLSpinCtrl>("val_spinner_3");
+    mValSpinner4 = getChild<LLSpinCtrl>("val_spinner_4");
+    mBooleanCombo = getChild<LLUICtrl>("boolean_combo");
+    mValText = getChild<LLUICtrl>("val_text");
+
+    mColorSwatch = getChild<LLColorSwatchCtrl>("val_color_swatch");
+
+    mDefaultButton = getChild<LLUICtrl>("default_btn");
+    mSettingNameText = getChild<LLTextBox>("setting_name_txt");
+
     mComment = getChild<LLTextEditor>("comment_text");
 
     getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2));
@@ -104,56 +116,56 @@ void LLFloaterSettingsDebug::onCommitSettings()
     switch(controlp->type())
     {
       case TYPE_U32:
-        controlp->set(getChild<LLUICtrl>("val_spinner_1")->getValue());
+        controlp->set(mValSpinner1->getValue());
         break;
       case TYPE_S32:
-        controlp->set(getChild<LLUICtrl>("val_spinner_1")->getValue());
+        controlp->set(mValSpinner1->getValue());
         break;
       case TYPE_F32:
-        controlp->set(LLSD(getChild<LLUICtrl>("val_spinner_1")->getValue().asReal()));
+        controlp->set(LLSD(mValSpinner1->getValue().asReal()));
         break;
       case TYPE_BOOLEAN:
-        controlp->set(getChild<LLUICtrl>("boolean_combo")->getValue());
+        controlp->set(mBooleanCombo->getValue());
         break;
       case TYPE_STRING:
-        controlp->set(LLSD(getChild<LLUICtrl>("val_text")->getValue().asString()));
+        controlp->set(LLSD(mValText->getValue().asString()));
         break;
       case TYPE_VEC3:
-        vector.mV[VX] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
-        vector.mV[VY] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
-        vector.mV[VZ] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
+        vector.mV[VX] = (F32)mValSpinner1->getValue().asReal();
+        vector.mV[VY] = (F32)mValSpinner2->getValue().asReal();
+        vector.mV[VZ] = (F32)mValSpinner3->getValue().asReal();
         controlp->set(vector.getValue());
         break;
       case TYPE_VEC3D:
-        vectord.mdV[VX] = getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
-        vectord.mdV[VY] = getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
-        vectord.mdV[VZ] = getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
+        vectord.mdV[VX] = mValSpinner1->getValue().asReal();
+        vectord.mdV[VY] = mValSpinner2->getValue().asReal();
+        vectord.mdV[VZ] = mValSpinner3->getValue().asReal();
         controlp->set(vectord.getValue());
         break;
       case TYPE_QUAT:
-        quat.mQ[VX] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
-        quat.mQ[VY] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
-        quat.mQ[VZ] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
-        quat.mQ[VS] = (F32)getChild<LLUICtrl>("val_spinner_4")->getValue().asReal();;
+        quat.mQ[VX] = mValSpinner1->getValueF32();
+        quat.mQ[VY] = mValSpinner2->getValueF32();
+        quat.mQ[VZ] = mValSpinner3->getValueF32();
+        quat.mQ[VS] = mValSpinner4->getValueF32();
         controlp->set(quat.getValue());
         break;
       case TYPE_RECT:
-        rect.mLeft = getChild<LLUICtrl>("val_spinner_1")->getValue().asInteger();
-        rect.mRight = getChild<LLUICtrl>("val_spinner_2")->getValue().asInteger();
-        rect.mBottom = getChild<LLUICtrl>("val_spinner_3")->getValue().asInteger();
-        rect.mTop = getChild<LLUICtrl>("val_spinner_4")->getValue().asInteger();
+        rect.mLeft = mValSpinner1->getValue().asInteger();
+        rect.mRight = mValSpinner2->getValue().asInteger();
+        rect.mBottom = mValSpinner3->getValue().asInteger();
+        rect.mTop = mValSpinner4->getValue().asInteger();
         controlp->set(rect.getValue());
         break;
       case TYPE_COL4:
-        col3.setValue(getChild<LLUICtrl>("val_color_swatch")->getValue());
-        col4 = LLColor4(col3, (F32)getChild<LLUICtrl>("val_spinner_4")->getValue().asReal());
+        col3.setValue(mColorSwatch->getValue());
+        col4 = LLColor4(col3, (F32)mValSpinner4->getValue().asReal());
         controlp->set(col4.getValue());
         break;
       case TYPE_COL3:
-        controlp->set(getChild<LLUICtrl>("val_color_swatch")->getValue());
-        //col3.mV[VRED] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_1")->getValue().asC();
-        //col3.mV[VGREEN] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
-        //col3.mV[VBLUE] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
+        controlp->set(mColorSwatch->getValue());
+        //col3.mV[VRED] = (F32)floaterp->mValSpinner1->getValue().asC();
+        //col3.mV[VGREEN] = (F32)floaterp->mValSpinner2->getValue().asReal();
+        //col3.mV[VBLUE] = (F32)floaterp->mValSpinner3->getValue().asReal();
         //controlp->set(col3.getValue());
         break;
       default:
@@ -181,19 +193,6 @@ void LLFloaterSettingsDebug::onClickDefault()
 // we've switched controls, or doing per-frame update, so update spinners, etc.
 void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 {
-    LLSpinCtrl* spinner1 = getChild<LLSpinCtrl>("val_spinner_1");
-    LLSpinCtrl* spinner2 = getChild<LLSpinCtrl>("val_spinner_2");
-    LLSpinCtrl* spinner3 = getChild<LLSpinCtrl>("val_spinner_3");
-    LLSpinCtrl* spinner4 = getChild<LLSpinCtrl>("val_spinner_4");
-    LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("val_color_swatch");
-
-    if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch)
-    {
-        LL_WARNS() << "Could not find all desired controls by name"
-            << LL_ENDL;
-        return;
-    }
-
     hideUIControls();
 
     if (controlp && !isSettingHidden(controlp))
@@ -201,11 +200,11 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
         eControlType type = controlp->type();
 
         //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame
-        getChildView("boolean_combo")->setVisible( type == TYPE_BOOLEAN);
-        getChildView("default_btn")->setVisible(true);
-        getChildView("setting_name_txt")->setVisible(true);
-        getChild<LLTextBox>("setting_name_txt")->setText(controlp->getName());
-        getChild<LLTextBox>("setting_name_txt")->setToolTip(controlp->getName());
+        mBooleanCombo->setVisible( type == TYPE_BOOLEAN);
+        mDefaultButton->setVisible(true);
+        mSettingNameText->setVisible(true);
+        mSettingNameText->setText(controlp->getName());
+        mSettingNameText->setToolTip(controlp->getName());
         mComment->setVisible(true);
 
         std::string old_text = mComment->getText();
@@ -218,111 +217,111 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
             mComment->setText(controlp->getComment());
         }
 
-        spinner1->setMaxValue(F32_MAX);
-        spinner2->setMaxValue(F32_MAX);
-        spinner3->setMaxValue(F32_MAX);
-        spinner4->setMaxValue(F32_MAX);
-        spinner1->setMinValue(-F32_MAX);
-        spinner2->setMinValue(-F32_MAX);
-        spinner3->setMinValue(-F32_MAX);
-        spinner4->setMinValue(-F32_MAX);
-        if (!spinner1->hasFocus())
+        mValSpinner1->setMaxValue(F32_MAX);
+        mValSpinner2->setMaxValue(F32_MAX);
+        mValSpinner3->setMaxValue(F32_MAX);
+        mValSpinner4->setMaxValue(F32_MAX);
+        mValSpinner1->setMinValue(-F32_MAX);
+        mValSpinner2->setMinValue(-F32_MAX);
+        mValSpinner3->setMinValue(-F32_MAX);
+        mValSpinner4->setMinValue(-F32_MAX);
+        if (!mValSpinner1->hasFocus())
         {
-            spinner1->setIncrement(0.1f);
+            mValSpinner1->setIncrement(0.1f);
         }
-        if (!spinner2->hasFocus())
+        if (!mValSpinner2->hasFocus())
         {
-            spinner2->setIncrement(0.1f);
+            mValSpinner2->setIncrement(0.1f);
         }
-        if (!spinner3->hasFocus())
+        if (!mValSpinner3->hasFocus())
         {
-            spinner3->setIncrement(0.1f);
+            mValSpinner3->setIncrement(0.1f);
         }
-        if (!spinner4->hasFocus())
+        if (!mValSpinner4->hasFocus())
         {
-            spinner4->setIncrement(0.1f);
+            mValSpinner4->setIncrement(0.1f);
         }
 
         LLSD sd = controlp->get();
         switch(type)
         {
           case TYPE_U32:
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("value")); // Debug, don't translate
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("value")); // Debug, don't translate
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setValue(sd);
-                spinner1->setMinValue((F32)U32_MIN);
-                spinner1->setMaxValue((F32)U32_MAX);
-                spinner1->setIncrement(1.f);
-                spinner1->setPrecision(0);
+                mValSpinner1->setValue(sd);
+                mValSpinner1->setMinValue((F32)U32_MIN);
+                mValSpinner1->setMaxValue((F32)U32_MAX);
+                mValSpinner1->setIncrement(1.f);
+                mValSpinner1->setPrecision(0);
             }
             break;
           case TYPE_S32:
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("value")); // Debug, don't translate
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("value")); // Debug, don't translate
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setValue(sd);
-                spinner1->setMinValue((F32)S32_MIN);
-                spinner1->setMaxValue((F32)S32_MAX);
-                spinner1->setIncrement(1.f);
-                spinner1->setPrecision(0);
+                mValSpinner1->setValue(sd);
+                mValSpinner1->setMinValue((F32)S32_MIN);
+                mValSpinner1->setMaxValue((F32)S32_MAX);
+                mValSpinner1->setIncrement(1.f);
+                mValSpinner1->setPrecision(0);
             }
             break;
           case TYPE_F32:
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("value")); // Debug, don't translate
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("value")); // Debug, don't translate
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setPrecision(3);
-                spinner1->setValue(sd);
+                mValSpinner1->setPrecision(3);
+                mValSpinner1->setValue(sd);
             }
             break;
           case TYPE_BOOLEAN:
-            if (!getChild<LLUICtrl>("boolean_combo")->hasFocus())
+            if (!mBooleanCombo->hasFocus())
             {
                 if (sd.asBoolean())
                 {
-                    getChild<LLUICtrl>("boolean_combo")->setValue(LLSD("true"));
+                    mBooleanCombo->setValue(LLSD("true"));
                 }
                 else
                 {
-                    getChild<LLUICtrl>("boolean_combo")->setValue(LLSD(""));
+                    mBooleanCombo->setValue(LLSD(""));
                 }
             }
             break;
           case TYPE_STRING:
-            getChildView("val_text")->setVisible( true);
-            if (!getChild<LLUICtrl>("val_text")->hasFocus())
+            mValText->setVisible( true);
+            if (!mValText->hasFocus())
             {
-                getChild<LLUICtrl>("val_text")->setValue(sd);
+                mValText->setValue(sd);
             }
             break;
           case TYPE_VEC3:
           {
             LLVector3 v;
             v.setValue(sd);
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("X"));
-            spinner2->setVisible(true);
-            spinner2->setLabel(std::string("Y"));
-            spinner3->setVisible(true);
-            spinner3->setLabel(std::string("Z"));
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("X"));
+            mValSpinner2->setVisible(true);
+            mValSpinner2->setLabel(std::string("Y"));
+            mValSpinner3->setVisible(true);
+            mValSpinner3->setLabel(std::string("Z"));
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setPrecision(3);
-                spinner1->setValue(v[VX]);
+                mValSpinner1->setPrecision(3);
+                mValSpinner1->setValue(v[VX]);
             }
-            if (!spinner2->hasFocus())
+            if (!mValSpinner2->hasFocus())
             {
-                spinner2->setPrecision(3);
-                spinner2->setValue(v[VY]);
+                mValSpinner2->setPrecision(3);
+                mValSpinner2->setValue(v[VY]);
             }
-            if (!spinner3->hasFocus())
+            if (!mValSpinner3->hasFocus())
             {
-                spinner3->setPrecision(3);
-                spinner3->setValue(v[VZ]);
+                mValSpinner3->setPrecision(3);
+                mValSpinner3->setValue(v[VZ]);
             }
             break;
           }
@@ -330,26 +329,26 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
           {
             LLVector3d v;
             v.setValue(sd);
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("X"));
-            spinner2->setVisible(true);
-            spinner2->setLabel(std::string("Y"));
-            spinner3->setVisible(true);
-            spinner3->setLabel(std::string("Z"));
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("X"));
+            mValSpinner2->setVisible(true);
+            mValSpinner2->setLabel(std::string("Y"));
+            mValSpinner3->setVisible(true);
+            mValSpinner3->setLabel(std::string("Z"));
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setPrecision(3);
-                spinner1->setValue(v[VX]);
+                mValSpinner1->setPrecision(3);
+                mValSpinner1->setValue(v[VX]);
             }
-            if (!spinner2->hasFocus())
+            if (!mValSpinner2->hasFocus())
             {
-                spinner2->setPrecision(3);
-                spinner2->setValue(v[VY]);
+                mValSpinner2->setPrecision(3);
+                mValSpinner2->setValue(v[VY]);
             }
-            if (!spinner3->hasFocus())
+            if (!mValSpinner3->hasFocus())
             {
-                spinner3->setPrecision(3);
-                spinner3->setValue(v[VZ]);
+                mValSpinner3->setPrecision(3);
+                mValSpinner3->setValue(v[VZ]);
             }
             break;
           }
@@ -357,33 +356,33 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
           {
               LLQuaternion q;
               q.setValue(sd);
-              spinner1->setVisible(true);
-              spinner1->setLabel(std::string("X"));
-              spinner2->setVisible(true);
-              spinner2->setLabel(std::string("Y"));
-              spinner3->setVisible(true);
-              spinner3->setLabel(std::string("Z"));
-              spinner4->setVisible(true);
-              spinner4->setLabel(std::string("S"));
-              if (!spinner1->hasFocus())
+              mValSpinner1->setVisible(true);
+              mValSpinner1->setLabel(std::string("X"));
+              mValSpinner2->setVisible(true);
+              mValSpinner2->setLabel(std::string("Y"));
+              mValSpinner3->setVisible(true);
+              mValSpinner3->setLabel(std::string("Z"));
+              mValSpinner4->setVisible(true);
+              mValSpinner4->setLabel(std::string("S"));
+              if (!mValSpinner1->hasFocus())
               {
-                  spinner1->setPrecision(4);
-                  spinner1->setValue(q.mQ[VX]);
+                  mValSpinner1->setPrecision(4);
+                  mValSpinner1->setValue(q.mQ[VX]);
               }
-              if (!spinner2->hasFocus())
+              if (!mValSpinner2->hasFocus())
               {
-                  spinner2->setPrecision(4);
-                  spinner2->setValue(q.mQ[VY]);
+                  mValSpinner2->setPrecision(4);
+                  mValSpinner2->setValue(q.mQ[VY]);
               }
-              if (!spinner3->hasFocus())
+              if (!mValSpinner3->hasFocus())
               {
-                  spinner3->setPrecision(4);
-                  spinner3->setValue(q.mQ[VZ]);
+                  mValSpinner3->setPrecision(4);
+                  mValSpinner3->setValue(q.mQ[VZ]);
               }
-              if (!spinner4->hasFocus())
+              if (!mValSpinner4->hasFocus())
               {
-                  spinner4->setPrecision(4);
-                  spinner4->setValue(q.mQ[VS]);
+                  mValSpinner4->setPrecision(4);
+                  mValSpinner4->setValue(q.mQ[VS]);
               }
               break;
           }
@@ -391,70 +390,70 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
           {
             LLRect r;
             r.setValue(sd);
-            spinner1->setVisible(true);
-            spinner1->setLabel(std::string("Left"));
-            spinner2->setVisible(true);
-            spinner2->setLabel(std::string("Right"));
-            spinner3->setVisible(true);
-            spinner3->setLabel(std::string("Bottom"));
-            spinner4->setVisible(true);
-            spinner4->setLabel(std::string("Top"));
-            if (!spinner1->hasFocus())
+            mValSpinner1->setVisible(true);
+            mValSpinner1->setLabel(std::string("Left"));
+            mValSpinner2->setVisible(true);
+            mValSpinner2->setLabel(std::string("Right"));
+            mValSpinner3->setVisible(true);
+            mValSpinner3->setLabel(std::string("Bottom"));
+            mValSpinner4->setVisible(true);
+            mValSpinner4->setLabel(std::string("Top"));
+            if (!mValSpinner1->hasFocus())
             {
-                spinner1->setPrecision(0);
-                spinner1->setValue(r.mLeft);
+                mValSpinner1->setPrecision(0);
+                mValSpinner1->setValue(r.mLeft);
             }
-            if (!spinner2->hasFocus())
+            if (!mValSpinner2->hasFocus())
             {
-                spinner2->setPrecision(0);
-                spinner2->setValue(r.mRight);
+                mValSpinner2->setPrecision(0);
+                mValSpinner2->setValue(r.mRight);
             }
-            if (!spinner3->hasFocus())
+            if (!mValSpinner3->hasFocus())
             {
-                spinner3->setPrecision(0);
-                spinner3->setValue(r.mBottom);
+                mValSpinner3->setPrecision(0);
+                mValSpinner3->setValue(r.mBottom);
             }
-            if (!spinner4->hasFocus())
+            if (!mValSpinner4->hasFocus())
             {
-                spinner4->setPrecision(0);
-                spinner4->setValue(r.mTop);
+                mValSpinner4->setPrecision(0);
+                mValSpinner4->setValue(r.mTop);
             }
 
-            spinner1->setMinValue((F32)S32_MIN);
-            spinner1->setMaxValue((F32)S32_MAX);
-            spinner1->setIncrement(1.f);
+            mValSpinner1->setMinValue((F32)S32_MIN);
+            mValSpinner1->setMaxValue((F32)S32_MAX);
+            mValSpinner1->setIncrement(1.f);
 
-            spinner2->setMinValue((F32)S32_MIN);
-            spinner2->setMaxValue((F32)S32_MAX);
-            spinner2->setIncrement(1.f);
+            mValSpinner2->setMinValue((F32)S32_MIN);
+            mValSpinner2->setMaxValue((F32)S32_MAX);
+            mValSpinner2->setIncrement(1.f);
 
-            spinner3->setMinValue((F32)S32_MIN);
-            spinner3->setMaxValue((F32)S32_MAX);
-            spinner3->setIncrement(1.f);
+            mValSpinner3->setMinValue((F32)S32_MIN);
+            mValSpinner3->setMaxValue((F32)S32_MAX);
+            mValSpinner3->setIncrement(1.f);
 
-            spinner4->setMinValue((F32)S32_MIN);
-            spinner4->setMaxValue((F32)S32_MAX);
-            spinner4->setIncrement(1.f);
+            mValSpinner4->setMinValue((F32)S32_MIN);
+            mValSpinner4->setMaxValue((F32)S32_MAX);
+            mValSpinner4->setIncrement(1.f);
             break;
           }
           case TYPE_COL4:
           {
             LLColor4 clr;
             clr.setValue(sd);
-            color_swatch->setVisible(true);
+            mColorSwatch->setVisible(true);
             // only set if changed so color picker doesn't update
-            if(clr != LLColor4(color_swatch->getValue()))
+            if(clr != LLColor4(mColorSwatch->getValue()))
             {
-                color_swatch->set(LLColor4(sd), true, false);
+                mColorSwatch->set(LLColor4(sd), true, false);
             }
-            spinner4->setVisible(true);
-            spinner4->setLabel(std::string("Alpha"));
-            if (!spinner4->hasFocus())
+            mValSpinner4->setVisible(true);
+            mValSpinner4->setLabel(std::string("Alpha"));
+            if (!mValSpinner4->hasFocus())
             {
-                spinner4->setPrecision(3);
-                spinner4->setMinValue(0.0);
-                spinner4->setMaxValue(1.f);
-                spinner4->setValue(clr.mV[VALPHA]);
+                mValSpinner4->setPrecision(3);
+                mValSpinner4->setMinValue(0.0);
+                mValSpinner4->setMaxValue(1.f);
+                mValSpinner4->setValue(clr.mV[VALPHA]);
             }
             break;
           }
@@ -462,8 +461,8 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
           {
             LLColor3 clr;
             clr.setValue(sd);
-            color_swatch->setVisible(true);
-            color_swatch->setValue(sd);
+            mColorSwatch->setVisible(true);
+            mColorSwatch->setValue(sd);
             break;
           }
           default:
@@ -624,15 +623,15 @@ void LLFloaterSettingsDebug::updateDefaultColumn(LLControlVariable* control)
 
 void LLFloaterSettingsDebug::hideUIControls()
 {
-    getChildView("val_spinner_1")->setVisible(false);
-    getChildView("val_spinner_2")->setVisible(false);
-    getChildView("val_spinner_3")->setVisible(false);
-    getChildView("val_spinner_4")->setVisible(false);
-    getChildView("val_color_swatch")->setVisible(false);
-    getChildView("val_text")->setVisible(false);
-    getChildView("default_btn")->setVisible(false);
-    getChildView("boolean_combo")->setVisible(false);
-    getChildView("setting_name_txt")->setVisible(false);
+    mValSpinner1->setVisible(false);
+    mValSpinner2->setVisible(false);
+    mValSpinner3->setVisible(false);
+    mValSpinner4->setVisible(false);
+    mColorSwatch->setVisible(false);
+    mValText->setVisible(false);
+    mDefaultButton->setVisible(false);
+    mBooleanCombo->setVisible(false);
+    mSettingNameText->setVisible(false);
     mComment->setVisible(false);
 }
 
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index 4df0dc8dd2..b813cf4a74 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -30,9 +30,12 @@
 #include "llcontrol.h"
 #include "llfloater.h"
 
+class LLColorSwatchCtrl;
 class LLScrollListCtrl;
+class LLSpinCtrl;
+class LLTextBox;
 
-class LLFloaterSettingsDebug
+class LLFloaterSettingsDebug final
 :   public LLFloater
 {
     friend class LLFloaterReg;
@@ -67,6 +70,16 @@ private:
 
 protected:
     class LLTextEditor* mComment;
+    LLSpinCtrl*         mValSpinner1 = nullptr;
+    LLSpinCtrl*         mValSpinner2 = nullptr;
+    LLSpinCtrl*         mValSpinner3 = nullptr;
+    LLSpinCtrl*         mValSpinner4 = nullptr;
+    LLUICtrl*           mBooleanCombo = nullptr;
+    LLUICtrl*           mValText = nullptr;
+    LLUICtrl*           mDefaultButton = nullptr;
+    LLTextBox*          mSettingNameText = nullptr;
+
+    LLColorSwatchCtrl* mColorSwatch = nullptr;
 
     std::string mSearchFilter;
 };
-- 
cgit v1.2.3


From 4a00da1ada89af6f313cee30f5177634b0b180a9 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 19 Aug 2024 08:18:41 +0300
Subject: Update indra/newview/llfloatertools.cpp

Remove trailing whitespace to pass pre-commit check
---
 indra/newview/llfloatertools.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 52979d359e..f6d8fcab36 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -622,7 +622,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
     mBtnFocus   ->setToggleState( focus_visible );
 
     mRadioGroupFocus->setVisible( focus_visible );
-    
+
     mSliderZoom->setVisible( focus_visible);
     mSliderZoom->setEnabled(gCameraBtnZoom);
 
-- 
cgit v1.2.3


From ec7db659faf0420f5d3cd1f0be108c5aaeb53dd9 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 19 Aug 2024 08:21:51 +0300
Subject: Update indra/newview/llfloatersidepanelcontainer.h

Fix tab indentation
---
 indra/newview/llfloatersidepanelcontainer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index a57a2da4d9..4b9d0e34a7 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -97,7 +97,7 @@ public:
 protected:
     void onCloseMsgCallback(const LLSD& notification, const LLSD& response);
 
-	LLPanel* mMainPanel = nullptr;
+    LLPanel* mMainPanel = nullptr;
 };
 
 #endif // LL_LLFLOATERSIDEPANELCONTAINER_H
-- 
cgit v1.2.3


From d6190bbf13547800c56828d7670944f1a06af7dd Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Mon, 19 Aug 2024 08:39:35 +0200
Subject: Refactor LLFileSystem for and fix an old issue in LLFile (#2332)

---
 indra/llcommon/llfile.cpp           |  4 +--
 indra/llcommon/llfile.h             |  8 ++---
 indra/llfilesystem/lldiskcache.cpp  | 58 +++------------------------------
 indra/llfilesystem/lldiskcache.h    | 14 ++------
 indra/llfilesystem/llfilesystem.cpp | 64 ++++++++++++-------------------------
 indra/llfilesystem/llfilesystem.h   | 14 ++++----
 indra/newview/llmeshrepository.cpp  | 12 -------
 7 files changed, 39 insertions(+), 135 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index 9045324bf2..ed94ef21ef 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -293,7 +293,7 @@ int LLFile::rename(const std::string& filename, const std::string& newname, int
     return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc, supress_error);
 }
 
-bool LLFile::copy(const std::string from, const std::string to)
+bool LLFile::copy(const std::string& from, const std::string& to)
 {
     bool copied = false;
     LLFILE* in = LLFile::fopen(from, "rb");     /* Flawfinder: ignore */
@@ -424,7 +424,7 @@ LLFILE *    LLFile::_Fiopen(const std::string& filename,
 
     if (valid[n] == 0)
         return (0); // no valid mode
-    else if (norepflag && mode & (ios_base::out || ios_base::app)
+    else if (norepflag && mode & (ios_base::out | ios_base::app)
         && (fp = LLFile::fopen(filename, "r")) != 0)    /* Flawfinder: ignore */
         {   // file must not exist, close and fail
         fclose(fp);
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 74110343fc..1661cbeb55 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -77,7 +77,7 @@ public:
     static  int     rmdir(const std::string& filename);
     static  int     remove(const std::string& filename, int supress_error = 0);
     static  int     rename(const std::string& filename,const std::string& newname, int supress_error = 0);
-    static  bool    copy(const std::string from, const std::string to);
+    static  bool    copy(const std::string& from, const std::string& to);
 
     static  int     stat(const std::string& filename,llstat*    file_status);
     static  bool    isdir(const std::string&    filename);
@@ -160,7 +160,7 @@ private:
  *  Does The Right Thing when passed a non-ASCII pathname. Sadly, that isn't
  *  true of Microsoft's std::ifstream.
  */
-class LL_COMMON_API llifstream  :   public  std::ifstream
+class LL_COMMON_API llifstream : public std::ifstream
 {
     // input stream associated with a C stream
   public:
@@ -205,7 +205,7 @@ class LL_COMMON_API llifstream  :   public  std::ifstream
  *  Right Thing when passed a non-ASCII pathname. Sadly, that isn't true of
  *  Microsoft's std::ofstream.
 */
-class LL_COMMON_API llofstream  :   public  std::ofstream
+class LL_COMMON_API llofstream : public std::ofstream
 {
   public:
     // Constructors:
@@ -241,7 +241,7 @@ class LL_COMMON_API llofstream  :   public  std::ofstream
 
 
 /**
- * @breif filesize helpers.
+ * @brief filesize helpers.
  *
  * The file size helpers are not considered particularly efficient,
  * and should only be used for config files and the like -- not in a
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index e780387f4e..49904911a9 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -51,7 +51,7 @@ static const std::string CACHE_FILENAME_PREFIX("sl_cache");
 
 std::string LLDiskCache::sCacheDir;
 
-LLDiskCache::LLDiskCache(const std::string cache_dir,
+LLDiskCache::LLDiskCache(const std::string& cache_dir,
                          const uintmax_t max_size_bytes,
                          const bool enable_cache_debug_info) :
     mMaxSizeBytes(max_size_bytes),
@@ -196,59 +196,9 @@ void LLDiskCache::purge()
     }
 }
 
-const std::string LLDiskCache::assetTypeToString(LLAssetType::EType at)
+const std::string LLDiskCache::metaDataToFilepath(const LLUUID& id, LLAssetType::EType at)
 {
-    /**
-     * Make use of the handy C++17  feature that allows
-     * for inline initialization of an std::map<>
-     */
-    typedef std::map<LLAssetType::EType, std::string> asset_type_to_name_t;
-    asset_type_to_name_t asset_type_to_name =
-    {
-        { LLAssetType::AT_TEXTURE, "TEXTURE" },
-        { LLAssetType::AT_SOUND, "SOUND" },
-        { LLAssetType::AT_CALLINGCARD, "CALLINGCARD" },
-        { LLAssetType::AT_LANDMARK, "LANDMARK" },
-        { LLAssetType::AT_SCRIPT, "SCRIPT" },
-        { LLAssetType::AT_CLOTHING, "CLOTHING" },
-        { LLAssetType::AT_OBJECT, "OBJECT" },
-        { LLAssetType::AT_NOTECARD, "NOTECARD" },
-        { LLAssetType::AT_CATEGORY, "CATEGORY" },
-        { LLAssetType::AT_LSL_TEXT, "LSL_TEXT" },
-        { LLAssetType::AT_LSL_BYTECODE, "LSL_BYTECODE" },
-        { LLAssetType::AT_TEXTURE_TGA, "TEXTURE_TGA" },
-        { LLAssetType::AT_BODYPART, "BODYPART" },
-        { LLAssetType::AT_SOUND_WAV, "SOUND_WAV" },
-        { LLAssetType::AT_IMAGE_TGA, "IMAGE_TGA" },
-        { LLAssetType::AT_IMAGE_JPEG, "IMAGE_JPEG" },
-        { LLAssetType::AT_ANIMATION, "ANIMATION" },
-        { LLAssetType::AT_GESTURE, "GESTURE" },
-        { LLAssetType::AT_SIMSTATE, "SIMSTATE" },
-        { LLAssetType::AT_LINK, "LINK" },
-        { LLAssetType::AT_LINK_FOLDER, "LINK_FOLDER" },
-        { LLAssetType::AT_MARKETPLACE_FOLDER, "MARKETPLACE_FOLDER" },
-        { LLAssetType::AT_WIDGET, "WIDGET" },
-        { LLAssetType::AT_PERSON, "PERSON" },
-        { LLAssetType::AT_MESH, "MESH" },
-        { LLAssetType::AT_SETTINGS, "SETTINGS" },
-        { LLAssetType::AT_MATERIAL, "MATERIAL" },
-        { LLAssetType::AT_GLTF, "GLTF" },
-        { LLAssetType::AT_GLTF_BIN, "GLTF_BIN" },
-        { LLAssetType::AT_UNKNOWN, "UNKNOWN" }
-    };
-
-    asset_type_to_name_t::iterator iter = asset_type_to_name.find(at);
-    if (iter != asset_type_to_name.end())
-    {
-        return iter->second;
-    }
-
-    return std::string("UNKNOWN");
-}
-
-const std::string LLDiskCache::metaDataToFilepath(const std::string& id, LLAssetType::EType at)
-{
-    return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.c_str());
+    return llformat("%s%s%s_%s_0.asset", sCacheDir.c_str(), gDirUtilp->getDirDelimiter().c_str(), CACHE_FILENAME_PREFIX.c_str(), id.asString().c_str());
 }
 
 const std::string LLDiskCache::getCacheInfo()
@@ -335,7 +285,7 @@ void LLDiskCache::removeOldVFSFiles()
     }
 }
 
-uintmax_t LLDiskCache::dirFileSize(const std::string dir)
+uintmax_t LLDiskCache::dirFileSize(const std::string& dir)
 {
     uintmax_t total_file_size = 0;
 
diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h
index 62c19361fb..f07b26c2d7 100644
--- a/indra/llfilesystem/lldiskcache.h
+++ b/indra/llfilesystem/lldiskcache.h
@@ -81,7 +81,7 @@ class LLDiskCache :
                      * a child of the main Viewer cache directory. Defined
                      * by the setting at 'DiskCacheDirName'
                      */
-                    const std::string cache_dir,
+                    const std::string& cache_dir,
                     /**
                      * The maximum size of the cache in bytes - Based on the
                      * setting at 'CacheSize' and 'DiskCachePercentOfTotal'
@@ -104,9 +104,7 @@ class LLDiskCache :
          * so many things had to be pushed back there to accomodate it, that I
          * decided to move it here.  Still not sure that's completely right.
          */
-        static const std::string metaDataToFilepath(const std::string& id,
-                                             LLAssetType::EType at);
-
+        static const std::string metaDataToFilepath(const LLUUID& id, LLAssetType::EType at);
 
         /**
          * Purge the oldest items in the cache so that the combined size of all files
@@ -141,13 +139,7 @@ class LLDiskCache :
          * directory. Primarily used here to determine the directory size
          * before and after the cache purge
          */
-        uintmax_t dirFileSize(const std::string dir);
-
-        /**
-         * Utility function to convert an LLAssetType enum into a
-         * string that we use as part of the cache file filename
-         */
-        const std::string assetTypeToString(LLAssetType::EType at);
+        uintmax_t dirFileSize(const std::string& dir);
 
     private:
         /**
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index b206aab7cf..c8ce9531c2 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -36,10 +36,10 @@
 
 #include "boost/filesystem.hpp"
 
-const S32 LLFileSystem::READ        = 0x00000001;
-const S32 LLFileSystem::WRITE       = 0x00000002;
-const S32 LLFileSystem::READ_WRITE  = 0x00000003;  // LLFileSystem::READ & LLFileSystem::WRITE
-const S32 LLFileSystem::APPEND      = 0x00000006;  // 0x00000004 & LLFileSystem::WRITE
+constexpr S32 LLFileSystem::READ        = 0x00000001;
+constexpr S32 LLFileSystem::WRITE       = 0x00000002;
+constexpr S32 LLFileSystem::READ_WRITE  = 0x00000003;  // LLFileSystem::READ & LLFileSystem::WRITE
+constexpr S32 LLFileSystem::APPEND      = 0x00000006;  // 0x00000004 & LLFileSystem::WRITE
 
 static LLTrace::BlockTimerStatHandle FTM_VFILE_WAIT("VFile Wait");
 
@@ -57,9 +57,7 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
     if (mode == LLFileSystem::READ)
     {
         // build the filename (TODO: we do this in a few places - perhaps we should factor into a single function)
-        std::string id;
-        mFileID.asString();
-        const std::string filename = LLDiskCache::metaDataToFilepath(id, mFileType);
+        const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
 
         // update the last access time for the file if it exists - this is required
         // even though we are reading and not writing because this is the
@@ -73,17 +71,11 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_
     }
 }
 
-LLFileSystem::~LLFileSystem()
-{
-}
-
 // static
 bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type)
 {
     LL_PROFILE_ZONE_SCOPED;
-    std::string id_str;
-    file_id.toString(id_str);
-    const std::string filename = LLDiskCache::metaDataToFilepath(id_str, file_type);
+    const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
 
     llifstream file(filename, std::ios::binary);
     if (file.is_open())
@@ -97,9 +89,7 @@ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType fil
 // static
 bool LLFileSystem::removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error /*= 0*/)
 {
-    std::string id_str;
-    file_id.toString(id_str);
-    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, file_type);
+    const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
 
     LLFile::remove(filename.c_str(), suppress_error);
 
@@ -110,13 +100,8 @@ bool LLFileSystem::removeFile(const LLUUID& file_id, const LLAssetType::EType fi
 bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::EType old_file_type,
                               const LLUUID& new_file_id, const LLAssetType::EType new_file_type)
 {
-    std::string old_id_str;
-    old_file_id.toString(old_id_str);
-    const std::string old_filename =  LLDiskCache::metaDataToFilepath(old_id_str, old_file_type);
-
-    std::string new_id_str;
-    new_file_id.toString(new_id_str);
-    const std::string new_filename =  LLDiskCache::metaDataToFilepath(new_id_str, new_file_type);
+    const std::string old_filename = LLDiskCache::metaDataToFilepath(old_file_id, old_file_type);
+    const std::string new_filename = LLDiskCache::metaDataToFilepath(new_file_id, new_file_type);
 
     // Rename needs the new file to not exist.
     LLFileSystem::removeFile(new_file_id, new_file_type, ENOENT);
@@ -127,7 +112,7 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
         // failed but the original code does not and doing so seems to
         // break a lot of things so we go with the flow...
         //return false;
-        LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_id_str << " reason: "  << strerror(errno) << LL_ENDL;
+        LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_file_id << " reason: " << strerror(errno) << LL_ENDL;
     }
 
     return true;
@@ -136,9 +121,7 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
 // static
 S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type)
 {
-    std::string id_str;
-    file_id.toString(id_str);
-    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, file_type);
+    const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type);
 
     S32 file_size = 0;
     llifstream file(filename, std::ios::binary);
@@ -155,9 +138,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
 {
     bool success = false;
 
-    std::string id;
-    mFileID.toString(id);
-    const std::string filename =  LLDiskCache::metaDataToFilepath(id, mFileType);
+    const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
 
     llifstream file(filename, std::ios::binary);
     if (file.is_open())
@@ -187,21 +168,19 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
     return success;
 }
 
-S32 LLFileSystem::getLastBytesRead()
+S32 LLFileSystem::getLastBytesRead() const
 {
     return mBytesRead;
 }
 
-bool LLFileSystem::eof()
+bool LLFileSystem::eof() const
 {
     return mPosition >= getSize();
 }
 
 bool LLFileSystem::write(const U8* buffer, S32 bytes)
 {
-    std::string id_str;
-    mFileID.toString(id_str);
-    const std::string filename =  LLDiskCache::metaDataToFilepath(id_str, mFileType);
+    const std::string filename = LLDiskCache::metaDataToFilepath(mFileID, mFileType);
 
     bool success = false;
 
@@ -212,12 +191,11 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
         {
             ofs.write((const char*)buffer, bytes);
 
-            mPosition = (S32)ofs.tellp(); // <FS:Ansariel> Fix asset caching
+            mPosition = (S32)ofs.tellp();
 
             success = true;
         }
     }
-    // <FS:Ansariel> Fix asset caching
     else if (mMode == READ_WRITE)
     {
         // Don't truncate if file already exists
@@ -241,7 +219,6 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
             }
         }
     }
-    // </FS:Ansariel>
     else
     {
         llofstream ofs(filename, std::ios::binary);
@@ -293,12 +270,12 @@ S32 LLFileSystem::tell() const
     return mPosition;
 }
 
-S32 LLFileSystem::getSize()
+S32 LLFileSystem::getSize() const
 {
     return LLFileSystem::getFileSize(mFileID, mFileType);
 }
 
-S32 LLFileSystem::getMaxSize()
+S32 LLFileSystem::getMaxSize() const
 {
     // offer up a huge size since we don't care what the max is
     return INT_MAX;
@@ -314,10 +291,9 @@ bool LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_typ
     return true;
 }
 
-bool LLFileSystem::remove()
+bool LLFileSystem::remove() const
 {
     LLFileSystem::removeFile(mFileID, mFileType);
-
     return true;
 }
 
@@ -332,7 +308,7 @@ void LLFileSystem::updateFileAccessTime(const std::string& file_path)
      *
      * Let's start with 1 hour in time_t units and see how that unfolds
      */
-    const std::time_t time_threshold = 1 * 60 * 60;
+    constexpr std::time_t time_threshold = 1 * 60 * 60;
 
     // current time
     const std::time_t cur_time = std::time(nullptr);
diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h
index 983e452981..10649b6920 100644
--- a/indra/llfilesystem/llfilesystem.h
+++ b/indra/llfilesystem/llfilesystem.h
@@ -38,20 +38,20 @@ class LLFileSystem
 {
     public:
         LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_type, S32 mode = LLFileSystem::READ);
-        ~LLFileSystem();
+        ~LLFileSystem() = default;
 
         bool read(U8* buffer, S32 bytes);
-        S32  getLastBytesRead();
-        bool eof();
+        S32  getLastBytesRead() const;
+        bool eof() const;
 
         bool write(const U8* buffer, S32 bytes);
         bool seek(S32 offset, S32 origin = -1);
         S32  tell() const;
 
-        S32 getSize();
-        S32 getMaxSize();
+        S32 getSize() const;
+        S32 getMaxSize() const;
         bool rename(const LLUUID& new_id, const LLAssetType::EType new_type);
-        bool remove();
+        bool remove() const;
 
         /**
          * Update the "last write time" of a file to "now". This must be called whenever a
@@ -78,8 +78,6 @@ class LLFileSystem
         S32     mPosition;
         S32     mMode;
         S32     mBytesRead;
-//private:
-//    static const std::string idToFilepath(const std::string id, LLAssetType::EType at);
 };
 
 #endif  // LL_FILESYSTEM_H
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 349df11f35..26e2d8f319 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3292,8 +3292,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
             // only allocate as much space in the cache as is needed for the local cache
             data_size = llmin(data_size, bytes);
 
-            // <FS:Ansariel> Fix asset caching
-            //LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::WRITE);
             LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
             if (file.getMaxSize() >= bytes)
             {
@@ -3302,7 +3300,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
 
                 file.write(data, data_size);
 
-                // <FS:Ansariel> Fix asset caching
                 S32 remaining = bytes - file.tell();
                 if (remaining > 0)
                 {
@@ -3314,7 +3311,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
                         delete[] block;
                     }
                 }
-                // </FS:Ansariel>
             }
         }
         else
@@ -3367,8 +3363,6 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * /* body */, S32 /* body
         if (result == MESH_OK)
         {
             // good fetch from sim, write to cache
-            // <FS:Ansariel> Fix asset caching
-            //LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::WRITE);
             LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
 
             S32 offset = mOffset;
@@ -3432,8 +3426,6 @@ void LLMeshSkinInfoHandler::processData(LLCore::BufferArray * /* body */, S32 /*
         && gMeshRepo.mThread->skinInfoReceived(mMeshID, data, data_size))
     {
         // good fetch from sim, write to cache
-        // <FS:Ansariel> Fix asset caching
-        //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
         LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
 
         S32 offset = mOffset;
@@ -3483,8 +3475,6 @@ void LLMeshDecompositionHandler::processData(LLCore::BufferArray * /* body */, S
         && gMeshRepo.mThread->decompositionReceived(mMeshID, data, data_size))
     {
         // good fetch from sim, write to cache
-        // <FS:Ansariel> Fix asset caching
-        //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
         LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
 
         S32 offset = mOffset;
@@ -3532,8 +3522,6 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * /* body */, S3
         && gMeshRepo.mThread->physicsShapeReceived(mMeshID, data, data_size) == MESH_OK)
     {
         // good fetch from sim, write to cache for caching
-        // <FS:Ansariel> Fix asset caching
-        //LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE);
         LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE);
 
         S32 offset = mOffset;
-- 
cgit v1.2.3


From 4c61461883e6f90b1cdccf6b626ae3f289c257b1 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 19 Aug 2024 02:40:01 -0400
Subject: Clean up excessive dynamic casts in LLAccordionCtrl (#2333)

---
 indra/llui/llaccordionctrl.cpp | 115 ++++++++++++++++-------------------------
 indra/llui/llaccordionctrl.h   |  26 +++++-----
 2 files changed, 57 insertions(+), 84 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 06f7a20add..495ba2f40f 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -36,12 +36,12 @@
 
 #include "boost/bind.hpp"
 
-static const S32 BORDER_MARGIN = 2;
-static const S32 PARENT_BORDER_MARGIN = 5;
-static const S32 VERTICAL_MULTIPLE = 16;
-static const F32 MIN_AUTO_SCROLL_RATE = 120.f;
-static const F32 MAX_AUTO_SCROLL_RATE = 500.f;
-static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
+static constexpr S32 BORDER_MARGIN = 2;
+static constexpr S32 PARENT_BORDER_MARGIN = 5;
+static constexpr S32 VERTICAL_MULTIPLE = 16;
+static constexpr F32 MIN_AUTO_SCROLL_RATE = 120.f;
+static constexpr F32 MAX_AUTO_SCROLL_RATE = 500.f;
+static constexpr F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
 
 // LLAccordionCtrl =================================================================|
 
@@ -49,13 +49,7 @@ static LLDefaultChildRegistry::Register<LLAccordionCtrl>    t2("accordion");
 
 LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
  , mFitParent(params.fit_parent)
- , mAutoScrolling( false )
- , mAutoScrollRate( 0.f )
- , mSelectedTab( NULL )
- , mTabComparator( NULL )
- , mNoVisibleTabsHelpText(NULL)
  , mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString())
- , mSkipScrollToChild(false)
 {
     initNoTabsWidget(params.no_matched_tabs_text);
 
@@ -67,10 +61,6 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
 }
 
 LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
- , mAutoScrolling( false )
- , mAutoScrollRate( 0.f )
- , mSelectedTab( NULL )
- , mNoVisibleTabsHelpText(NULL)
 {
     initNoTabsWidget(LLTextBox::Params());
 
@@ -133,11 +123,10 @@ bool LLAccordionCtrl::postBuild()
     mScrollbar->setFollowsBottom();
 
     //if it was created from xml...
-    std::vector<LLUICtrl*> accordion_tabs;
-    for (child_list_const_iter_t it = getChildList()->begin();
-        getChildList()->end() != it; ++it)
+    std::vector<LLAccordionCtrlTab*> accordion_tabs;
+    for(LLView* viewp : *getChildList())
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(*it);
+        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(viewp);
         if (accordion_tab == NULL)
             continue;
         if (std::find(mAccordionTabs.begin(), mAccordionTabs.end(), accordion_tab) == mAccordionTabs.end())
@@ -146,7 +135,7 @@ bool LLAccordionCtrl::postBuild()
         }
     }
 
-    for (std::vector<LLUICtrl*>::reverse_iterator it = accordion_tabs.rbegin();
+    for (auto it = accordion_tabs.rbegin();
         it < accordion_tabs.rend(); ++it)
     {
         addCollapsibleCtrl(*it);
@@ -294,11 +283,8 @@ void LLAccordionCtrl::hideScrollbar(S32 width, S32 height)
 S32 LLAccordionCtrl::calcRecuiredHeight()
 {
     S32 rec_height = 0;
-
-    std::vector<LLAccordionCtrlTab*>::iterator panel;
-    for(panel=mAccordionTabs.begin(); panel!=mAccordionTabs.end(); ++panel)
+    for(LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(*panel);
         if(accordion_tab && accordion_tab->getVisible())
         {
             rec_height += accordion_tab->getRect().getHeight();
@@ -330,9 +316,8 @@ void LLAccordionCtrl::ctrlShiftVertical(LLView* panel, S32 delta)
 
 //---------------------------------------------------------------------------------
 
-void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
+void LLAccordionCtrl::addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
 {
-    LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
     if (!accordion_tab)
         return;
     if (std::find(beginChild(), endChild(), accordion_tab) == endChild())
@@ -343,9 +328,8 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
     arrange();
 }
 
-void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
+void LLAccordionCtrl::removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab)
 {
-    LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view);
     if(!accordion_tab)
         return;
 
@@ -363,7 +347,7 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
     }
 
     // if removed is selected - reset selection
-    if (mSelectedTab == view)
+    if (mSelectedTab == accordion_tab)
     {
         mSelectedTab = NULL;
     }
@@ -401,24 +385,20 @@ void LLAccordionCtrl::arrangeSingle()
 
     S32 collapsed_height = 0;
 
-    for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+    for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
-
         if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
             continue;
         if (!accordion_tab->isExpanded() )
         {
-            collapsed_height+=mAccordionTabs[i]->getRect().getHeight();
+            collapsed_height += accordion_tab->getRect().getHeight();
         }
     }
 
     S32 expanded_height = getRect().getHeight() - BORDER_MARGIN - collapsed_height;
 
-    for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+    for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
-
         if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
             continue;
         if (!accordion_tab->isExpanded() )
@@ -448,8 +428,8 @@ void LLAccordionCtrl::arrangeSingle()
         // make sure at least header is shown
         panel_height = llmax(panel_height, accordion_tab->getHeaderHeight());
 
-        ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
-        panel_top -= mAccordionTabs[i]->getRect().getHeight();
+        ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
+        panel_top -= accordion_tab->getRect().getHeight();
     }
 
     show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
@@ -463,17 +443,16 @@ void LLAccordionCtrl::arrangeMultiple()
     S32 panel_width = getRect().getWidth() - 4;
 
     //Calculate params
-    for (size_t i = 0; i < mAccordionTabs.size(); i++ )
+    for (size_t i = 0, end = mAccordionTabs.size(); i < end; i++)
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
-
+        LLAccordionCtrlTab* accordion_tab = static_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
         if (!accordion_tab->getVisible()) // Skip hidden accordion tabs
             continue;
 
         if (!accordion_tab->isExpanded() )
         {
-            ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, accordion_tab->getRect().getHeight());
-            panel_top -= mAccordionTabs[i]->getRect().getHeight();
+            ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, accordion_tab->getRect().getHeight());
+            panel_top -= accordion_tab->getRect().getHeight();
         }
         else
         {
@@ -495,13 +474,13 @@ void LLAccordionCtrl::arrangeMultiple()
                 }
 
                 // minimum tab height is equal to header height
-                if (mAccordionTabs[i]->getHeaderHeight() > panel_height)
+                if (accordion_tab->getHeaderHeight() > panel_height)
                 {
-                    panel_height = mAccordionTabs[i]->getHeaderHeight();
+                    panel_height = accordion_tab->getHeaderHeight();
                 }
             }
 
-            ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
+            ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
             panel_top -= panel_height;
 
         }
@@ -528,7 +507,7 @@ void LLAccordionCtrl::arrange()
         S32 panel_top = getRect().getHeight() - BORDER_MARGIN; // Top coordinate of the first panel
         S32 panel_width = getRect().getWidth() - 4;
 
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[0]);
+        LLAccordionCtrlTab* accordion_tab = mAccordionTabs[0];
 
         LLRect panel_rect = accordion_tab->getRect();
 
@@ -638,12 +617,12 @@ void LLAccordionCtrl::updateLayout(S32 width, S32 height)
         panel_width -= scrollbar_size;
 
     // set sizes for first panels and dragbars
-    for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+    for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        if (!mAccordionTabs[i]->getVisible())
+        if (!accordion_tab->getVisible())
             continue;
-        LLRect panel_rect = mAccordionTabs[i]->getRect();
-        ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
+        LLRect panel_rect = accordion_tab->getRect();
+        ctrlSetLeftTopAndSize(accordion_tab, panel_rect.mLeft, panel_top, panel_width, panel_rect.getHeight());
         panel_top -= panel_rect.getHeight();
     }
 }
@@ -685,9 +664,8 @@ void LLAccordionCtrl::onUpdateScrollToChild(const LLUICtrl *cntrl)
 
 void LLAccordionCtrl::onOpen(const LLSD& key)
 {
-    for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+    for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
         LLPanel* panel = dynamic_cast<LLPanel*>(accordion_tab->getAccordionView());
         if (panel != NULL)
         {
@@ -711,7 +689,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
         {
             for (size_t i = 0; i < mAccordionTabs.size(); ++i)
             {
-                LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+                LLAccordionCtrlTab* accordion_tab = static_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
                 if (accordion_tab->hasFocus())
                 {
                     while (++i < mAccordionTabs.size())
@@ -721,7 +699,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
                     }
                     if (i < mAccordionTabs.size())
                     {
-                        accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+                        accordion_tab = static_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
                         accordion_tab->notify(LLSD().with("action","select_first"));
                         return 1;
                     }
@@ -734,7 +712,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
         {
             for (size_t i = 0; i < mAccordionTabs.size(); ++i)
             {
-                LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+                LLAccordionCtrlTab* accordion_tab = static_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
                 if (accordion_tab->hasFocus() && i > 0)
                 {
                     bool prev_visible_tab_found = false;
@@ -749,7 +727,7 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
 
                     if (prev_visible_tab_found)
                     {
-                        accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
+                        accordion_tab = static_cast<LLAccordionCtrlTab*>(mAccordionTabs[i]);
                         accordion_tab->notify(LLSD().with("action","select_last"));
                         return 1;
                     }
@@ -887,15 +865,12 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
 
 const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const
 {
-    typedef std::vector<LLAccordionCtrlTab*>::const_iterator tabs_const_iterator;
-
-    const LLAccordionCtrlTab* result = 0;
-
-    for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i)
+    const LLAccordionCtrlTab* result = nullptr;
+    for (LLAccordionCtrlTab* accordion_tab : mAccordionTabs)
     {
-        if ((*i)->isExpanded())
+        if (accordion_tab->isExpanded())
         {
-            result = *i;
+            result = accordion_tab;
             break;
         }
     }
@@ -913,11 +888,11 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl
     S32 collapsed_tabs_height = 0;
     S32 num_expanded = 0;
 
-    for (size_t n = tab_index; n < mAccordionTabs.size(); ++n)
+    for (LLAccordionCtrlTab* tab : mAccordionTabs)
     {
-        if (!mAccordionTabs[n]->isExpanded())
+        if (!tab->isExpanded())
         {
-            collapsed_tabs_height += mAccordionTabs[n]->getHeaderHeight();
+            collapsed_tabs_height += tab->getHeaderHeight();
         }
         else
         {
@@ -939,10 +914,8 @@ void LLAccordionCtrl::collapseAllTabs()
 {
     if (mAccordionTabs.size() > 0)
     {
-        for (size_t i = 0; i < mAccordionTabs.size(); ++i)
+        for (LLAccordionCtrlTab* tab : mAccordionTabs)
         {
-            LLAccordionCtrlTab *tab = mAccordionTabs[i];
-
             if (tab->getDisplayChildren())
             {
                 tab->setDisplayChildren(false);
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 1dfa9100f6..43a33a2b3c 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -57,8 +57,8 @@ public:
     class LLTabComparator
     {
     public:
-        LLTabComparator() {};
-        virtual ~LLTabComparator() {};
+        LLTabComparator() = default;
+        virtual ~LLTabComparator() = default;
 
         /** Returns true if tab1 < tab2, false otherwise */
         virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
@@ -103,8 +103,8 @@ public:
     // Call reshape after changing splitter's size
     virtual void reshape(S32 width, S32 height, bool called_from_parent = true);
 
-    void addCollapsibleCtrl(LLView* view);
-    void removeCollapsibleCtrl(LLView* view);
+    void addCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
+    void removeCollapsibleCtrl(LLAccordionCtrlTab* accordion_tab);
     void arrange();
 
 
@@ -180,20 +180,20 @@ private:
 
 private:
     LLRect          mInnerRect;
-    LLScrollbar*    mScrollbar;
-    bool            mSingleExpansion;
-    bool            mFitParent;
-    bool            mAutoScrolling;
-    F32             mAutoScrollRate;
-    LLTextBox*      mNoVisibleTabsHelpText;
+    LLScrollbar*    mScrollbar = nullptr;
+    bool            mSingleExpansion = false;
+    bool            mFitParent = false;
+    bool            mAutoScrolling = false;
+    F32             mAutoScrollRate = 0.f;
+    LLTextBox*      mNoVisibleTabsHelpText = nullptr;
 
-    bool            mSkipScrollToChild;
+    bool            mSkipScrollToChild = false;
 
     std::string     mNoMatchedTabsOrigString;
     std::string     mNoVisibleTabsOrigString;
 
-    LLAccordionCtrlTab*     mSelectedTab;
-    const LLTabComparator*  mTabComparator;
+    LLAccordionCtrlTab*     mSelectedTab = nullptr;
+    const LLTabComparator*  mTabComparator = nullptr;
 };
 
 
-- 
cgit v1.2.3


From 54fd466b3b036116ca20b6b7ee856c99b1646f53 Mon Sep 17 00:00:00 2001
From: Andrey Lihatskiy <alihatskiy@productengine.com>
Date: Mon, 19 Aug 2024 09:54:07 +0300
Subject: Update indra/newview/pipeline.cpp

Fix build error
---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 979d0eba7e..98fdb68222 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -896,7 +896,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     S32 shadow_detail = RenderShadowDetail;
 
-    F32 scale = gCubeSnapshot ? 1.0 : llmax(0.f, RenderShadowResolutionScale); // Don't scale probe shadow maps
+    F32 scale = gCubeSnapshot ? 1.0f : llmax(0.f, RenderShadowResolutionScale); // Don't scale probe shadow maps
     U32 sun_shadow_map_width = BlurHappySize(resX, scale);
     U32 sun_shadow_map_height = BlurHappySize(resY, scale);
 
-- 
cgit v1.2.3


From 627d512c473b8429128869f77d4b2fbbe741d067 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 19 Aug 2024 08:41:10 +0300
Subject: viewer#2311 When email or profile image upload fails show a more
 fitting reason

---
 indra/newview/llviewerassetupload.cpp                |  8 +++++++-
 indra/newview/llwebprofile.cpp                       |  5 +++++
 indra/newview/llwebprofile.h                         |  2 ++
 indra/newview/skins/default/xui/en/notifications.xml | 20 ++++++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index b74b48b9f6..7ef2c8d697 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -984,6 +984,7 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
         label = result["label"].asString();
     }
 
+    LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
     if (result.has("message"))
     {
         reason = result["message"].asString();
@@ -994,6 +995,12 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
         {
         case 404:
             reason = LLTrans::getString("AssetUploadServerUnreacheble");
+            if (floater_snapshot
+                && floater_snapshot->isWaitingState()
+                && uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG)
+            {
+                label = "CannotUploadSnapshotEmailTooBig";
+            }
             break;
         case 499:
             reason = LLTrans::getString("AssetUploadServerDifficulties");
@@ -1030,7 +1037,6 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
     // Todo: move these floater specific actions into proper callbacks
 
     // Let the Snapshot floater know we have failed uploading.
-    LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
     if (floater_snapshot && floater_snapshot->isWaitingState())
     {
         if (uploadInfo->getAssetType() == LLAssetType::AT_IMAGE_JPEG)
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 83e417633a..feb5ecb1fb 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -38,6 +38,7 @@
 // newview
 #include "llavataractions.h" // for getProfileURL()
 #include "llviewermedia.h" // FIXME: don't use LLViewerMedia internals
+#include "llnotificationsutil.h"
 
 #include "llcorehttputil.h"
 
@@ -132,6 +133,10 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
 
     if (!status)
     {
+        if (image->getDataSize() > MAX_WEB_DATASIZE)
+        {
+            LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig");
+        }
         LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL;
         LLWebProfile::reportImageUploadStatus(false);
         return;
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
index 335282bf13..a9cfa102c0 100644
--- a/indra/newview/llwebprofile.h
+++ b/indra/newview/llwebprofile.h
@@ -57,6 +57,8 @@ public:
     static void setAuthCookie(const std::string& cookie);
     static void setImageUploadResultCallback(status_callback_t cb) { mStatusCallback = cb; }
 
+    static constexpr S32 MAX_WEB_DATASIZE = 8 * 1024 * 1024; // 8MB
+
 private:
     static LLCore::HttpHeaders::ptr_t buildDefaultHeaders();
 
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 91b137b75f..e539388735 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2388,6 +2388,26 @@ Unable to upload [FILE] due to the following reason: [REASON]
 Please try again later.
   <tag>fail</tag>
   </notification>
+    
+  <notification
+   icon="alertmodal.tga"
+   name="CannotUploadSnapshotEmailTooBig"
+   type="alertmodal">
+Unable to upload snapshot [FILE] due to the following reason: [REASON]
+
+File might be too big, try reducing resolution, quality or try again later.
+  <tag>fail</tag>
+  </notification>
+    
+  <notification
+   icon="alertmodal.tga"
+   name="CannotUploadSnapshotWebTooBig"
+   type="alertmodal">
+Unable to upload snapshot.
+
+File might be too big, try reducing resolution or try again later.
+  <tag>fail</tag>
+  </notification>
 
   <notification
    icon="notifytip.tga"
-- 
cgit v1.2.3


From 8f658804bc34d26457a65e3a1ff4487c19448f64 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 19 Aug 2024 08:47:24 +0300
Subject: viewer#2310 Highlight image size when over limit for profile feed

---
 indra/newview/llfloatersnapshot.cpp | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index ddd55d0c17..f7c82621fb 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -344,10 +344,22 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
     }
 
     floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
-    floater->getChild<LLUICtrl>("file_size_label")->setColor(
-            shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
-            && got_bytes
-            && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" ));
+
+    LLUIColor color = LLUIColorTable::instance().getColor( "LabelTextColor" );
+    if (shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
+        && got_bytes
+        && previewp->getDataSize() > MAX_POSTCARD_DATASIZE)
+    {
+        color = LLUIColor(LLColor4::red);
+    }
+    if (shot_type == LLSnapshotModel::SNAPSHOT_WEB
+        && got_bytes
+        && previewp->getDataSize() > LLWebProfile::MAX_WEB_DATASIZE)
+    {
+        color = LLUIColor(LLColor4::red);
+    }
+
+    floater->getChild<LLUICtrl>("file_size_label")->setColor(color);
 
     // Update the width and height spinners based on the corresponding resolution combos. (?)
     switch(shot_type)
-- 
cgit v1.2.3


From ee320b22b39c7ecaecb26a04683c6ccbea0deab6 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 14 Aug 2024 14:04:19 +0200
Subject: #2289 BugSplat Crash #1496385:
 SecondLifeViewer!LLFocusableElement::~LLFocusableElement(79)

---
 indra/llui/lllayoutstack.cpp | 51 ++++++++++++++++++++++++++++++--------------
 1 file changed, 35 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 3a3aa7e4df..1c59938f90 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -86,10 +86,6 @@ void LLLayoutPanel::initFromParams(const Params& p)
 
 LLLayoutPanel::~LLLayoutPanel()
 {
-    // probably not necessary, but...
-    delete mResizeBar;
-    mResizeBar = NULL;
-
     gFocusMgr.removeKeyboardFocusWithoutCallback(this);
 }
 
@@ -242,11 +238,9 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
 
 LLLayoutStack::~LLLayoutStack()
 {
-    e_panel_list_t panels = mPanels; // copy list of panel pointers
-    mPanels.clear(); // clear so that removeChild() calls don't cause trouble
-    std::for_each(panels.begin(), panels.end(), DeletePointer());
 }
 
+// virtual
 void LLLayoutStack::draw()
 {
     updateLayout();
@@ -284,8 +278,14 @@ void LLLayoutStack::draw()
     }
 }
 
+// virtual
 void LLLayoutStack::deleteAllChildren()
 {
+    for (LLLayoutPanel* p : mPanels)
+    {
+        p->mResizeBar = nullptr;
+    }
+
     mPanels.clear();
     LLView::deleteAllChildren();
 
@@ -295,29 +295,47 @@ void LLLayoutStack::deleteAllChildren()
     mNeedsLayout = true;
 }
 
+// virtual
 void LLLayoutStack::removeChild(LLView* view)
 {
-    LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view));
-
-    if (embedded_panelp)
+    if (LLLayoutPanel* embedded_panelp = dynamic_cast<LLLayoutPanel*>(view))
     {
-        mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp));
-        LLView::removeChild(view);
-        updateFractionalSizes();
-        mNeedsLayout = true;
+        auto it = std::find(mPanels.begin(), mPanels.end(), embedded_panelp);
+        if (it != mPanels.end())
+        {
+            mPanels.erase(it);
+        }
+        if (embedded_panelp->mResizeBar)
+        {
+            LLView::removeChild(embedded_panelp->mResizeBar);
+            embedded_panelp->mResizeBar = nullptr;
+        }
     }
-    else
+    else if (LLResizeBar* resize_bar = dynamic_cast<LLResizeBar*>(view))
     {
-        LLView::removeChild(view);
+        for (LLLayoutPanel* p : mPanels)
+        {
+            if (p->mResizeBar == resize_bar)
+            {
+                p->mResizeBar = nullptr;
+            }
+        }
     }
+
+    LLView::removeChild(view);
+
+    updateFractionalSizes();
+    mNeedsLayout = true;
 }
 
+// virtual
 bool LLLayoutStack::postBuild()
 {
     updateLayout();
     return true;
 }
 
+// virtual
 bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
 {
     LLLayoutPanel* panelp = dynamic_cast<LLLayoutPanel*>(child);
@@ -983,6 +1001,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
     //normalizeFractionalSizes();
 }
 
+// virtual
 void LLLayoutStack::reshape(S32 width, S32 height, bool called_from_parent)
 {
     mNeedsLayout = true;
-- 
cgit v1.2.3


From f929c4f0fdf8f3036dee2a7b9b4e0ad38c8de070 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 19 Aug 2024 19:17:34 +0300
Subject: viewer#2342 Return AvatarBakedTextureUploadTimeout

Partial rollback of d00b6e4
QA uses AvatarBakedTextureUploadTimeout and requested restoration.
---
 indra/newview/app_settings/settings.xml | 12 ++++++++++++
 indra/newview/lltextureview.cpp         |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b89618dc87..483c8774a7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -621,6 +621,18 @@
       <key>Value</key>
       <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
     </map>
+    <!--AvatarBakedTextureUploadTimeout is in use by QA-->
+    <key>AvatarBakedTextureUploadTimeout</key>
+    <map>
+        <key>Comment</key>
+        <string>Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance.  Set to 0 to disable and wait until all baked textures are at highest resolution.</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>U32</string>
+        <key>Value</key>
+        <integer>60</integer>
+    </map>
     <key>AvatarPhysics</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index e5a61b359d..9eaee2e326 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -415,12 +415,14 @@ void LLAvatarTexBar::draw()
                                                  text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
         line_num++;
     }
+    const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureUploadTimeout");
     const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
 
     LLColor4 header_color(1.f, 1.f, 1.f, 0.9f);
 
+    const std::string texture_timeout_str = texture_timeout ? llformat("%d", texture_timeout) : "Disabled";
     const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled";
-    std::string header_text = llformat("[ Timeout:60 ] [ LOD_Override('TextureDiscardLevel'):%s ]", override_tex_discard_level_str.c_str());
+    std::string header_text = llformat("[ Timeout('AvatarBakedTextureUploadTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str());
     LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num,
                                              header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
     line_num++;
-- 
cgit v1.2.3


From 600635f9005d1809c278918e3284e1b43f1be475 Mon Sep 17 00:00:00 2001
From: "Jonathan \"Geenz\" Goodman" <geenz@lindenlab.com>
Date: Mon, 19 Aug 2024 14:37:08 -0700
Subject: #2345 Disable mirrors from the feature table regardless of quality
 level. (#2352)

---
 indra/newview/featuretable.txt     | 6 +++---
 indra/newview/featuretable_mac.txt | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 358fc2dfc8..213f0ab845 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -250,7 +250,7 @@ RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   3
-RenderMirrors				1	1
+RenderMirrors				1	0
 RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	8
 RenderHeroProbeUpdateRate	1	2
@@ -285,7 +285,7 @@ RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   3
-RenderMirrors				1	1
+RenderMirrors				1	0
 RenderHeroProbeResolution	1	1024
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
@@ -320,7 +320,7 @@ RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   3
-RenderMirrors				1	1
+RenderMirrors				1	0
 RenderHeroProbeResolution	1	2048
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 581350d73c..4f361a8dfe 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -282,7 +282,7 @@ RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   2
-RenderMirrors				1	1
+RenderMirrors				1	0
 RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
@@ -317,7 +317,7 @@ RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   3
-RenderMirrors				1	1
+RenderMirrors				1	0
 RenderHeroProbeResolution	1	1024
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
-- 
cgit v1.2.3


From 862a4671f2a48eae4a2360d570b71f4adbb7328c Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Mon, 19 Aug 2024 23:47:42 +0200
Subject: Remove orphaned LLAllocator (#2348)

---
 indra/llcommon/CMakeLists.txt               |   4 -
 indra/llcommon/llallocator.cpp              |  58 ------------
 indra/llcommon/llallocator.h                |  51 ----------
 indra/llcommon/llallocator_heap_profile.cpp | 138 ----------------------------
 indra/llcommon/llallocator_heap_profile.h   |  71 --------------
 indra/newview/llappviewer.cpp               |   3 -
 indra/newview/llappviewer.h                 |   5 -
 indra/newview/llviewerprecompiledheaders.h  |   1 -
 8 files changed, 331 deletions(-)
 delete mode 100644 indra/llcommon/llallocator.cpp
 delete mode 100644 indra/llcommon/llallocator.h
 delete mode 100644 indra/llcommon/llallocator_heap_profile.cpp
 delete mode 100644 indra/llcommon/llallocator_heap_profile.h

(limited to 'indra')

diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 165bfd52d5..c4041f0c79 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -18,8 +18,6 @@ set(llcommon_SOURCE_FILES
     commoncontrol.cpp
     indra_constants.cpp
     lazyeventapi.cpp
-    llallocator.cpp
-    llallocator_heap_profile.cpp
     llapp.cpp
     llapr.cpp
     llassettype.cpp
@@ -127,8 +125,6 @@ set(llcommon_HEADER_FILES
     lazyeventapi.h
     linden_common.h
     llalignedarray.h
-    llallocator.h
-    llallocator_heap_profile.h
     llapp.h
     llapr.h
     llassettype.h
diff --git a/indra/llcommon/llallocator.cpp b/indra/llcommon/llallocator.cpp
deleted file mode 100644
index abe3779b85..0000000000
--- a/indra/llcommon/llallocator.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file llallocator.cpp
- * @brief Implementation of the LLAllocator class.
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-#include "llallocator.h"
-
-//
-// stub implementations for when tcmalloc is disabled
-//
-
-void LLAllocator::setProfilingEnabled(bool should_enable)
-{
-}
-
-// static
-bool LLAllocator::isProfiling()
-{
-    return false;
-}
-
-std::string LLAllocator::getRawProfile()
-{
-    return std::string();
-}
-
-LLAllocatorHeapProfile const & LLAllocator::getProfile()
-{
-    mProf.mLines.clear();
-
-    // *TODO - avoid making all these extra copies of things...
-    std::string prof_text = getRawProfile();
-    //std::cout << prof_text << std::endl;
-    mProf.parse(prof_text);
-    return mProf;
-}
diff --git a/indra/llcommon/llallocator.h b/indra/llcommon/llallocator.h
deleted file mode 100644
index aa3eead546..0000000000
--- a/indra/llcommon/llallocator.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file llallocator.h
- * @brief Declaration of the LLAllocator class.
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLALLOCATOR_H
-#define LL_LLALLOCATOR_H
-
-#include <string>
-
-#include "llallocator_heap_profile.h"
-
-class LL_COMMON_API LLAllocator {
-    friend class LLMemoryView;
-
-public:
-    void setProfilingEnabled(bool should_enable);
-
-    static bool isProfiling();
-
-    LLAllocatorHeapProfile const & getProfile();
-
-private:
-    std::string getRawProfile();
-
-private:
-    LLAllocatorHeapProfile mProf;
-};
-
-#endif // LL_LLALLOCATOR_H
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
deleted file mode 100644
index 8cc44b6a01..0000000000
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * @file llallocator_heap_profile.cpp
- * @brief Implementation of the parser for tcmalloc heap profile data.
- * @author Brad Kittenbrink
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-#include "llallocator_heap_profile.h"
-
-#include <boost/algorithm/string/split.hpp>
-#include <boost/bind.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/range/iterator_range.hpp>
-
-static const std::string HEAP_PROFILE_MAGIC_STR = "heap profile:";
-
-static bool is_separator(char c)
-{
-    return isspace(c) || c == '[' || c == ']' || c == ':';
-}
-
-void LLAllocatorHeapProfile::parse(std::string const & prof_text)
-{
-    // a typedef for handling a token in the string buffer
-    // it's a begin/end pair of string::const_iterators
-    typedef boost::iterator_range<std::string::const_iterator> range_t;
-
-    mLines.clear();
-
-    if(prof_text.compare(0, HEAP_PROFILE_MAGIC_STR.length(), HEAP_PROFILE_MAGIC_STR) != 0)
-    {
-        // *TODO - determine if there should be some better error state than
-        // mLines being empty. -brad
-        LL_WARNS() << "invalid heap profile data passed into parser." << LL_ENDL;
-        return;
-    }
-
-    std::vector< range_t > prof_lines;
-
-    std::string::const_iterator prof_begin = prof_text.begin() + HEAP_PROFILE_MAGIC_STR.length();
-
-    range_t prof_range(prof_begin, prof_text.end());
-    boost::algorithm::split(prof_lines,
-        prof_range,
-        boost::bind(std::equal_to<llwchar>(), '\n', _1));
-
-    std::vector< range_t >::const_iterator i;
-    for(i = prof_lines.begin(); i != prof_lines.end() && !i->empty(); ++i)
-    {
-        range_t const & line_text = *i;
-
-        std::vector<range_t> line_elems;
-
-        boost::algorithm::split(line_elems,
-            line_text,
-            is_separator);
-
-        std::vector< range_t >::iterator j;
-        j = line_elems.begin();
-
-        while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens
-        llassert_always(j != line_elems.end());
-        U32 live_count = boost::lexical_cast<U32>(*j);
-        ++j;
-
-        while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens
-        llassert_always(j != line_elems.end());
-        U64 live_size = boost::lexical_cast<U64>(*j);
-        ++j;
-
-        while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens
-        llassert_always(j != line_elems.end());
-        U32 tot_count = boost::lexical_cast<U32>(*j);
-        ++j;
-
-        while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens
-        llassert_always(j != line_elems.end());
-        U64 tot_size = boost::lexical_cast<U64>(*j);
-        ++j;
-
-        while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens
-    llassert(j != line_elems.end());
-        if (j != line_elems.end())
-    {
-        ++j; // skip the '@'
-
-        mLines.push_back(line(live_count, live_size, tot_count, tot_size));
-        line & current_line = mLines.back();
-
-        for(; j != line_elems.end(); ++j)
-        {
-            if(!j->empty())
-            {
-                U32 marker = boost::lexical_cast<U32>(*j);
-                current_line.mTrace.push_back(marker);
-            }
-        }
-    }
-    }
-    // *TODO - parse MAPPED_LIBRARIES section here if we're ever interested in it
-}
-
-void LLAllocatorHeapProfile::dump(std::ostream & out) const
-{
-    for (const LLAllocatorHeapProfile::line& line : mLines)
-    {
-        out << line.mLiveCount << ": " << line.mLiveSize << '[' << line.mTotalCount << ": " << line.mTotalSize << "] @";
-
-        for (const stack_marker marker : line.mTrace)
-        {
-            out << ' ' << marker;
-        }
-        out << '\n';
-    }
-    out.flush();
-}
-
diff --git a/indra/llcommon/llallocator_heap_profile.h b/indra/llcommon/llallocator_heap_profile.h
deleted file mode 100644
index 22f284b703..0000000000
--- a/indra/llcommon/llallocator_heap_profile.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file llallocator_heap_profile.h
- * @brief Declaration of the parser for tcmalloc heap profile data.
- * @author Brad Kittenbrink
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLALLOCATOR_HEAP_PROFILE_H
-#define LL_LLALLOCATOR_HEAP_PROFILE_H
-
-#include "stdtypes.h"
-
-#include <map>
-#include <vector>
-
-class LLAllocatorHeapProfile
-{
-public:
-    typedef int stack_marker;
-
-    typedef std::vector<stack_marker> stack_trace;
-
-    struct line {
-        line(U32 live_count, U64 live_size, U32 tot_count, U64 tot_size) :
-            mLiveSize(live_size),
-            mTotalSize(tot_size),
-            mLiveCount(live_count),
-            mTotalCount(tot_count)
-        {
-        }
-        U64 mLiveSize, mTotalSize;
-        U32 mLiveCount, mTotalCount;
-        stack_trace mTrace;
-    };
-
-    typedef std::vector<line> lines_t;
-
-    LLAllocatorHeapProfile()
-    {
-    }
-
-    void parse(std::string const & prof_text);
-
-    void dump(std::ostream & out) const;
-
-public:
-    lines_t mLines;
-};
-
-
-#endif // LL_LLALLOCATOR_HEAP_PROFILE_H
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b75d02a8a7..afa701c5f2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -62,7 +62,6 @@
 #include "llfocusmgr.h"
 #include "llurlfloaterdispatchhandler.h"
 #include "llviewerjoystick.h"
-#include "llallocator.h"
 #include "llcalc.h"
 #include "llconversationlog.h"
 #if LL_WINDOWS
@@ -769,8 +768,6 @@ bool LLAppViewer::init()
         LLError::setFatalFunction([rc](const std::string&){ _exit(rc); });
     }
 
-    mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
-
     // Initialize the non-LLCurl libcurl library.  Should be called
     // before consumers (LLTextureFetch).
     mAppCoreHttp.init();
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index cf5f1ab1e3..9a5dd6dca3 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -44,7 +44,6 @@
 #define LL_LLAPPVIEWER_H
 
 #include "llapp.h"
-#include "llallocator.h"
 #include "llapr.h"
 #include "llcontrol.h"
 #include "llsys.h"          // for LLOSInfo
@@ -194,8 +193,6 @@ public:
     // *NOTE:Mani Fix this for login abstraction!!
     void handleLoginComplete();
 
-    LLAllocator & getAllocator() { return mAlloc; }
-
     // On LoginCompleted callback
     typedef boost::signals2::signal<void (void)> login_completed_signal_t;
     login_completed_signal_t mOnLoginCompleted;
@@ -338,8 +335,6 @@ private:
     bool mAgentRegionLastAlive;
     LLUUID mAgentRegionLastID;
 
-    LLAllocator mAlloc;
-
     // llcorehttp library init/shutdown helper
     LLAppCoreHttp mAppCoreHttp;
 
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 6561f0d644..7c8067ede3 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -50,7 +50,6 @@
 // Library headers from llcommon project:
 #include "indra_constants.h"
 #include "llinitparam.h"
-#include "llallocator.h"
 #include "llapp.h"
 #include "llcriticaldamp.h"
 #include "lldefs.h"
-- 
cgit v1.2.3


From 169599fd2f211d66f80a54e13daf975229607022 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Mon, 19 Aug 2024 23:48:07 +0200
Subject: Fix a bunch of XUI errors (#2347)

* Fix a bunch of XUI errors

* Change TRUE to true
---
 indra/newview/llfloaterpreference.cpp              |  5 --
 .../llfloaterpreferencesgraphicsadvanced.cpp       | 57 ----------------------
 indra/newview/llfloatersidepanelcontainer.cpp      |  2 +-
 .../skins/default/xui/en/floater_fast_timers.xml   |  2 +
 indra/newview/skins/default/xui/en/panel_login.xml |  1 -
 .../default/xui/en/panel_preferences_colors.xml    |  1 -
 .../skins/default/xui/en/widgets/slider_bar.xml    |  1 -
 7 files changed, 3 insertions(+), 66 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 3441fff7e8..e673752986 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1237,11 +1237,6 @@ void LLFloaterPreference::buildPopupLists()
 
 void LLFloaterPreference::refreshEnabledState()
 {
-    LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders");
-
-    //PBR
-    ctrl_pbr->setEnabled(true);
-
     // Cannot have floater active until caps have been received
     getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() >= STATE_STARTED);
 
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index d66c303c65..55293aa7f0 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -153,7 +153,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh()
     updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail",    true), getChild<LLTextBox>("TerrainMeshDetailText",     true));
     updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess",    true), getChild<LLTextBox>("PostProcessText",           true));
     updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail",        true), getChild<LLTextBox>("SkyMeshDetailText",         true));
-    updateSliderText(getChild<LLSliderCtrl>("TerrainDetail",        true), getChild<LLTextBox>("TerrainDetailText",         true));
     LLAvatarComplexityControls::setIndirectControls();
     setMaxNonImpostorsText(
         gSavedSettings.getU32("RenderAvatarMaxNonImpostors"),
@@ -268,10 +267,6 @@ void LLFloaterPreferenceGraphicsAdvanced::setMaxNonImpostorsText(U32 value, LLTe
 
 void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
 {
-    LLComboBox* ctrl_reflections   = getChild<LLComboBox>("Reflections");
-    LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
-    LLCheckBoxCtrl* ctrl_wind_light    = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
-    LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
     LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
     LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText");
     LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
@@ -282,9 +277,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
     // disabled windlight
     if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
     {
-        ctrl_wind_light->setEnabled(false);
-        ctrl_wind_light->setValue(false);
-
         sky->setEnabled(false);
         sky_text->setEnabled(false);
 
@@ -298,9 +290,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
 
         ctrl_dof->setEnabled(false);
         ctrl_dof->setValue(false);
-
-        ctrl_deferred->setEnabled(false);
-        ctrl_deferred->setValue(false);
     }
 
     // disabled deferred
@@ -315,9 +304,6 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
 
         ctrl_dof->setEnabled(false);
         ctrl_dof->setValue(false);
-
-        ctrl_deferred->setEnabled(false);
-        ctrl_deferred->setValue(false);
     }
 
     // disabled deferred SSAO
@@ -338,51 +324,13 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
 
 void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
 {
-    LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
-    LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
-
-    // Reflections
-    bool reflections = LLCubeMap::sUseCubeMaps;
-    ctrl_reflections->setEnabled(reflections);
-    reflections_text->setEnabled(reflections);
-
-    // Bump & Shiny
-    LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
-    bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
-    bumpshiny_ctrl->setEnabled(bumpshiny);
-
-    // Vertex Shaders, Global Shader Enable
-    // SL-12594 Basic shaders are always enabled. DJH TODO clean up now-orphaned state handling code
-    LLSliderCtrl* terrain_detail = getChild<LLSliderCtrl>("TerrainDetail");   // can be linked with control var
-    LLTextBox* terrain_text = getChild<LLTextBox>("TerrainDetailText");
-
-    terrain_detail->setEnabled(false);
-    terrain_text->setEnabled(false);
-
     // WindLight
-    //LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
-    //ctrl_wind_light->setEnabled(true);
     LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
     LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
     sky->setEnabled(true);
     sky_text->setEnabled(true);
 
     bool enabled = true;
-#if 0 // deferred always on now
-    //Deferred/SSAO/Shadows
-    LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
-
-    enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
-        bumpshiny_ctrl && bumpshiny_ctrl->get() &&
-        ctrl_wind_light->get();
-
-    ctrl_deferred->setEnabled(enabled);
-#endif
-
-    LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders");
-
-    //PBR
-    ctrl_pbr->setEnabled(true);
 
     LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
     LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
@@ -414,11 +362,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
         getChildView("texture compression")->setEnabled(false);
     }
 
-    // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
-    LLUICtrl* gamma_ctrl = getChild<LLUICtrl>("gamma");
-    gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
-    getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders());
-    getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders());
     getChildView("antialiasing restart")->setVisible(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"));
 
     // now turn off any features that are unavailable
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 7bc95c2884..78550b6520 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -56,7 +56,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
 bool LLFloaterSidePanelContainer::postBuild()
 {
     mMainPanel = getChild<LLPanel>(sMainPanelName);
-    return TRUE;
+    return true;
 }
 
 void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
diff --git a/indra/newview/skins/default/xui/en/floater_fast_timers.xml b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
index f5852fdfaf..00411ba20b 100644
--- a/indra/newview/skins/default/xui/en/floater_fast_timers.xml
+++ b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
@@ -73,7 +73,9 @@
         name="scroll_vert"
         orientation="vertical"
         step_size="16"
+        doc_pos="0"
         doc_size="3000"
+        page_size="0"
           />
     </layout_panel>
     <layout_panel name="timers_panel"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 1801ae1f49..27b74a46ce 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -145,7 +145,6 @@
     control_name="RememberPassword"
     follows="left|top"
     font="SansSerifMedium"
-    text_color="EmphasisColor"
     height="24"
     left="408"
     bottom_delta="0"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
index 5d93846ce5..44df5354aa 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
@@ -313,7 +313,6 @@
   <color_swatch
    can_apply_immediately="true"
    color="0 0 0 1"
-   control_name="NameTagBackground"
    follows="left|top"
    height="24"
    label_height="0"
diff --git a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
index 1cfe3d68f9..8c52f06c45 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--All horizontal sliders are configured to have no highlighted track. See EXT-5939. -->
 <slider_bar follows="left|top"
-            track_color="SliderTrackColor"
             thumb_outline_color="SliderThumbOutlineColor"
             thumb_center_color="SliderThumbCenterColor"
             thumb_image="SliderThumb_Off"
-- 
cgit v1.2.3


From 342eee503865af8ee193a1d04f0bc80712c5d80c Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 19 Aug 2024 22:59:48 +0300
Subject: SL-15061 Crash at LLConversationItemSession::clearAndDeparentModels
 #3

---
 indra/newview/llfloaterimcontainer.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 08e13276b3..f43f403755 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -112,6 +112,18 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
     {
         LLIMMgr::getInstance()->removeSessionObserver(this);
     }
+
+    for (auto& session : mConversationsItems)
+    {
+        LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(session.second.get());
+        if (session_model)
+        {
+            // Models have overcomplicated double ownership, clear
+            // and resolve '0 references' ownership now, before owned
+            // part of the models gets deleted by their owners
+            session_model->clearAndDeparentModels();
+        }
+    }
 }
 
 void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg)
-- 
cgit v1.2.3


From f92c2040b94da7eb4fb2ba3ae9f7f7233e2463b1 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 20 Aug 2024 02:21:57 -0400
Subject: Follow up for 4fa41c5 breaking inbox search/hiding (#2356)

---
 indra/newview/llpanelmaininventory.cpp | 5 -----
 indra/newview/llpanelmaininventory.h   | 3 +++
 indra/newview/llsidepanelinventory.cpp | 2 ++
 3 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 8334da1836..2466ee5973 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -239,11 +239,6 @@ bool LLPanelMainInventory::postBuild()
         }
 
     }
-    mParentSidepanel = getParentSidepanelInventory();
-    if (mParentSidepanel)
-    {
-        mInboxPanel = mParentSidepanel->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
-    }
 
     mFilterEditor = getChild<LLFilterEditor>("inventory search editor");
     if (mFilterEditor)
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index c1c7e9a7ab..3347ab904b 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -139,6 +139,9 @@ public:
 
     LLInventoryFilter& getCurrentFilter();
 
+    void setParentSidepanel(LLSidepanelInventory* parent_sidepanel) { mParentSidepanel = parent_sidepanel; }
+    void setInboxPanel(LLPanelMarketplaceInbox* inbox_panel) { mInboxPanel = inbox_panel; }
+
 protected:
     //
     // Misc functions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 9b7289df67..5693f2808c 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -161,6 +161,8 @@ bool LLSidepanelInventory::postBuild()
 
         mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
         mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
+        mPanelMainInventory->setParentSidepanel(this);
+        mPanelMainInventory->setInboxPanel(getChild<LLPanelMarketplaceInbox>("marketplace_inbox"));
         //LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs");
         //tabs->setCommitCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this));
 
-- 
cgit v1.2.3


From 16c9c47f14411263889798d89eaa6dde9b1e4771 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 20 Aug 2024 06:50:33 -0500
Subject: #2354 Enable Tracy on test builds (#2357)

* #2354 Enable Tracy on test builds

* Only enable Tracy by default on windows
---
 indra/cmake/Tracy.cmake | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake
index 3339c51ba0..d54a32fdc2 100644
--- a/indra/cmake/Tracy.cmake
+++ b/indra/cmake/Tracy.cmake
@@ -4,11 +4,17 @@ include(Prebuilt)
 include_guard()
 add_library( ll::tracy INTERFACE IMPORTED )
 
-option(USE_TRACY "Use Tracy profiler." OFF)
+# default Tracy profiling on for test builds, but off for all others
+string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
+if(WINDOWS AND channel_lower MATCHES "^second life test")
+  option(USE_TRACY "Use Tracy profiler." ON)
+else()
+    option(USE_TRACY "Use Tracy profiler." OFF)
+endif()
 
 if (USE_TRACY)
-  option(USE_TRACY_ON_DEMAND "Use Tracy profiler." ON)
-  option(USE_TRACY_LOCAL_ONLY "Use Tracy profiler." OFF)
+  option(USE_TRACY_ON_DEMAND "Use on-demand Tracy profiling." ON)
+  option(USE_TRACY_LOCAL_ONLY "Disallow remote Tracy profiling." OFF)
 
   use_system_binary(tracy)
   use_prebuilt_binary(tracy)
-- 
cgit v1.2.3


From ed6732eda8c80d17e05bbc6563b6ce08ef6b8c72 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 20 Aug 2024 06:59:07 -0500
Subject: #2315 Ensure textures are deleted when they are no longer referenced.
 (#2343)

* #2315 WIP -- Clean up deletion rules in texture list.  Incidental decruft.

* Touch up assertions.

* Move mLastReferencedTimer to LLViewerMediaTexture since it's no longer used by LLViewerTexture
---
 indra/llrender/llgltexture.h          |   2 -
 indra/newview/gltfscenemanager.cpp    |   4 +-
 indra/newview/llappviewer.h           |   2 -
 indra/newview/lldrawpoolavatar.cpp    |   2 -
 indra/newview/llface.cpp              |   2 -
 indra/newview/lltextureview.cpp       |   2 +-
 indra/newview/llviewertexture.cpp     |  42 ------------
 indra/newview/llviewertexture.h       |  21 ++----
 indra/newview/llviewertexturelist.cpp | 117 +++++-----------------------------
 indra/newview/llviewertexturelist.h   |   6 --
 10 files changed, 26 insertions(+), 174 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h
index a7de20dc5c..122d2a7f9c 100644
--- a/indra/llrender/llgltexture.h
+++ b/indra/llrender/llgltexture.h
@@ -82,8 +82,6 @@ public:
     typedef enum
     {
         DELETED = 0,         //removed from memory
-        DELETION_CANDIDATE,  //ready to be removed from memory
-        INACTIVE,            //not be used for the last certain period (i.e., 30 seconds).
         ACTIVE,              //just being used, can become inactive if not being used for a certain time (10 seconds).
         NO_DELETE = 99       //stay in memory, can not be removed.
     } LLGLTextureState;
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 44564b7926..086f41c1cb 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -357,7 +357,9 @@ void GLTFSceneManager::addGLTFObject(LLViewerObject* obj, LLUUID gltf_id)
 
     if (obj->mGLTFAsset)
     { // object already has a GLTF asset, don't reload it
-        llassert(std::find(mObjects.begin(), mObjects.end(), obj) != mObjects.end());
+
+        // TODO: below assertion fails on dupliate requests for assets -- possibly need to touch up asset loading state machine
+        // llassert(std::find(mObjects.begin(), mObjects.end(), obj) != mObjects.end());
         return;
     }
 
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 9a5dd6dca3..7b456cc542 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -408,8 +408,6 @@ extern LLVector3 gRelativeWindVec;
 extern U32  gPacketsIn;
 extern bool gPrintMessagesThisFrame;
 
-extern LLUUID gBlackSquareID;
-
 extern bool gRandomizeFramerate;
 extern bool gPeriodicSlowFrame;
 
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index ec70c7ebc0..95f96e85d6 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -62,8 +62,6 @@ S32     LLDrawPoolAvatar::sShadowPass = -1;
 S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
 F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
 
-LLUUID gBlackSquareID;
-
 static bool is_deferred_render = false;
 static bool is_post_deferred_render = false;
 
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index d14a7ffddc..4dec4d5641 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -357,8 +357,6 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
         return;
     }
 
-    llassert(mTexture[ch].notNull());
-
     if (ch == LLRender::DIFFUSE_MAP)
     {
         getViewerObject()->changeTEImage(mTEOffset, new_texture) ;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 9eaee2e326..ca3386948d 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -836,7 +836,7 @@ void LLTextureView::draw()
         for (LLViewerTextureList::image_list_t::iterator iter = gTextureList.mImageList.begin();
              iter != gTextureList.mImageList.end(); )
         {
-            LLPointer<LLViewerFetchedTexture> imagep = *iter++;
+            LLViewerFetchedTexture* imagep = *iter++;
             if(!imagep->hasFetcher())
             {
                 continue ;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 98da378c0d..5974625dfa 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1083,8 +1083,6 @@ void LLViewerFetchedTexture::init(bool firstinit)
     mKeptSavedRawImageTime = 0.f;
     mLastCallBackActiveTime = 0.f;
     mForceCallbackFetch = false;
-    mInDebug = false;
-    mUnremovable = false;
 
     mFTType = FTT_UNKNOWN;
 }
@@ -1234,32 +1232,6 @@ bool LLViewerFetchedTexture::isDeleted()
     return mTextureState == DELETED;
 }
 
-bool LLViewerFetchedTexture::isInactive()
-{
-    return mTextureState == INACTIVE;
-}
-
-bool LLViewerFetchedTexture::isDeletionCandidate()
-{
-    return mTextureState == DELETION_CANDIDATE;
-}
-
-void LLViewerFetchedTexture::setDeletionCandidate()
-{
-    if(mGLTexturep.notNull() && mGLTexturep->getTexName() && (mTextureState == INACTIVE))
-    {
-        mTextureState = DELETION_CANDIDATE;
-    }
-}
-
-//set the texture inactive
-void LLViewerFetchedTexture::setInactive()
-{
-    if(mTextureState == ACTIVE && mGLTexturep.notNull() && mGLTexturep->getTexName() && !mGLTexturep->getBoundRecently())
-    {
-        mTextureState = INACTIVE;
-    }
-}
 
 bool LLViewerFetchedTexture::isFullyLoaded() const
 {
@@ -1778,20 +1750,6 @@ S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching()
     return current_discard;
 }
 
-bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level)
-{
-    if(debug_level < 0)
-    {
-        mInDebug = false;
-        return false;
-    }
-    mInDebug = true;
-
-    mDesiredDiscardLevel = debug_level;
-
-    return true;
-}
-
 bool LLViewerFetchedTexture::isActiveFetching()
 {
     static LLCachedControl<bool> monitor_enabled(gSavedSettings,"DebugShowTextureInfo");
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index ada818c220..9046daeab2 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -146,8 +146,6 @@ public:
 
     virtual F32  getMaxVirtualSize() ;
 
-    LLFrameTimer* getLastReferencedTimer() {return &mLastReferencedTimer ;}
-
     S32 getFullWidth() const { return mFullWidth; }
     S32 getFullHeight() const { return mFullHeight; }
     /*virtual*/ void setKnownDrawSize(S32 width, S32 height);
@@ -197,7 +195,6 @@ protected:
     mutable F32 mMaxVirtualSize = 0.f;  // The largest virtual size of the image, in pixels - how much data to we need?
     mutable S32  mMaxVirtualSizeResetCounter;
     mutable S32  mMaxVirtualSizeResetInterval;
-    LLFrameTimer mLastReferencedTimer;
 
     ll_face_list_t    mFaceList[LLRender::NUM_TEXTURE_CHANNELS]; //reverse pointer pointing to the faces using this image as texture
     U32               mNumFaces[LLRender::NUM_TEXTURE_CHANNELS];
@@ -339,11 +336,6 @@ public:
 
     void setBoostLevel(S32 level) override;
     bool updateFetch();
-    bool setDebugFetching(S32 debug_level);
-    bool isInDebug() const { return mInDebug; }
-
-    void setUnremovable(bool value) { mUnremovable = value; }
-    bool isUnremovable() const { return mUnremovable; }
 
     void clearFetchedResults(); //clear all fetched results, for debug use.
 
@@ -378,10 +370,6 @@ public:
     const std::string& getUrl() const {return mUrl;}
     //---------------
     bool isDeleted() ;
-    bool isInactive() ;
-    bool isDeletionCandidate();
-    void setDeletionCandidate() ;
-    void setInactive() ;
     bool getUseDiscard() const { return mUseMipMaps && !mDontDiscard; }
     //---------------
 
@@ -434,8 +422,6 @@ private:
 
 private:
     bool  mFullyLoaded;
-    bool  mInDebug;
-    bool  mUnremovable;
     bool  mInFastCacheList;
     bool  mForceCallbackFetch;
 
@@ -586,6 +572,10 @@ public:
     /*virtual*/ void removeFace(U32 ch, LLFace* facep) ;
 
     /*virtual*/ F32  getMaxVirtualSize() ;
+
+    // get the timer that tracks the last time reinit was called
+    LLFrameTimer* getLastReferencedTimer() { return &mLastReferencedTimer; }
+
 private:
     void switchTexture(U32 ch, LLFace* facep) ;
     bool findFaces() ;
@@ -606,6 +596,9 @@ private:
     bool mIsPlaying ;
     U32  mUpdateVirtualSizeTime ;
 
+    // tracks last time reinit was called
+    LLFrameTimer mLastReferencedTimer;
+
 public:
     static void updateClass() ;
     static void cleanUpClass() ;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 7047ce7d29..1ac97a20cf 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -187,13 +187,6 @@ void LLViewerTextureList::doPreloadImages()
         image->setAddressMode(LLTexUnit::TAM_CLAMP);
         mImagePreloads.insert(image);
     }
-
-    LLPointer<LLImageRaw> img_blak_square_tex(new LLImageRaw(2, 2, 3));
-    memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize());
-    LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, false));
-    gBlackSquareID = img_blak_square->getID();
-    img_blak_square->setUnremovable(true);
-    addImage(img_blak_square, TEX_LIST_STANDARD);
 }
 
 static std::string get_texture_list_name()
@@ -725,6 +718,7 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
     size_t count = 0;
     if (image->isInImageList())
     {
+        image->setInImageList(false);
         count = mImageList.erase(image) ;
         if(count != 1)
         {
@@ -761,8 +755,6 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
                 << LL_ENDL;
         }
     }
-
-    image->setInImageList(false) ;
 }
 
 void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image, ETexListType tex_type)
@@ -808,15 +800,6 @@ void LLViewerTextureList::deleteImage(LLViewerFetchedTexture *image)
 ///////////////////////////////////////////////////////////////////////////////
 
 
-////////////////////////////////////////////////////////////////////////////
-
-void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
-{
-    mDirtyTextureList.insert(image);
-}
-
-////////////////////////////////////////////////////////////////////////////
-
 void LLViewerTextureList::updateImages(F32 max_time)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -857,12 +840,6 @@ void LLViewerTextureList::updateImages(F32 max_time)
     //handle results from decode threads
     updateImagesCreateTextures(remaining_time);
 
-    if (!mDirtyTextureList.empty())
-    {
-        gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
-        mDirtyTextureList.clear();
-    }
-
     bool didone = false;
     for (image_list_t::iterator iter = mCallbackList.begin();
         iter != mCallbackList.end(); )
@@ -906,12 +883,6 @@ extern bool gCubeSnapshot;
 
 void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images)
 {
-    if (imagep->isInDebug() || imagep->isUnremovable())
-    {
-        //update_counter--;
-        return; //is in debug, ignore.
-    }
-
     llassert(!gCubeSnapshot);
 
     static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
@@ -926,7 +897,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     }
 
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    bool onFace = false;
     for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
     {
         for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
@@ -935,7 +905,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
 
             if (face && face->getViewerObject())
             {
-                onFace = true;
                 F32 radius;
                 F32 cos_angle_to_view_dir;
                 static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
@@ -983,24 +952,17 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
         volume->updateSpotLightPriority();
     }
 
-    //imagep->setDebugText(llformat("%.3f - %d", sqrtf(imagep->getMaxVirtualSize()), imagep->getBoostLevel()));
-
-    F32 lazy_flush_timeout = 30.f; // stop decoding
-    F32 max_inactive_time = 20.f; // actually delete
-    S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
+    F32 max_inactive_time = 20.f; // inactive time before deleting saved raw image
+    S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, and 1 for "entries" in updateImagesFetchTextures
 
     //
     // Flush formatted images using a lazy flush
     //
     S32 num_refs = imagep->getNumRefs();
-    if (num_refs == min_refs && flush_images)
+    if (num_refs <= min_refs && flush_images)
     {
-        if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
-        {
-            // Remove the unused image from the image list
-            deleteImage(imagep);
-            imagep = NULL; // should destroy the image
-        }
+        // Remove the unused image from the image list
+        deleteImage(imagep);
         return;
     }
     else
@@ -1017,27 +979,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
         {
             return;
         }
-        else if (imagep->isDeletionCandidate())
-        {
-            imagep->destroyTexture();
-            return;
-        }
-        else if (imagep->isInactive())
-        {
-            if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > max_inactive_time)
-            {
-                imagep->setDeletionCandidate();
-            }
-            return;
-        }
-        else
-        {
-            imagep->getLastReferencedTimer()->reset();
-
-            //reset texture state.
-            if(!onFace)
-                imagep->setInactive();
-        }
     }
 
     if (!imagep->isInImageList())
@@ -1052,20 +993,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     imagep->processTextureStats();
 }
 
-void LLViewerTextureList::setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level)
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    if(!tex->setDebugFetching(debug_level))
-    {
-        return;
-    }
-
-    const F32 DEBUG_PRIORITY = 100000.f;
-    removeImageFromList(tex);
-    tex->mMaxVirtualSize = DEBUG_PRIORITY;
-    addImageToList(tex);
-}
-
 F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
@@ -1169,21 +1096,12 @@ F32 LLViewerTextureList::updateImagesLoadingFastCache(F32 max_time)
 void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    if(!imagep)
+    if(!imagep || gCubeSnapshot)
     {
         return ;
     }
-    if(imagep->isInImageList())
-    {
-        removeImageFromList(imagep);
-    }
 
-    if (!gCubeSnapshot)
-    { // never call processTextureStats in a cube snapshot
-        imagep->processTextureStats();
-    }
-    imagep->sMaxVirtualSize = LLViewerFetchedTexture::sMaxVirtualSize;
-    addImageToList(imagep);
+    imagep->processTextureStats();
 
     return ;
 }
@@ -1198,12 +1116,15 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
     // update N textures at beginning of mImageList
     U32 update_count = 0;
     static const S32 MIN_UPDATE_COUNT = gSavedSettings.getS32("TextureFetchUpdateMinCount");       // default: 32
-    // WIP -- dumb code here
+
+    // NOTE:  a texture may be deleted as a side effect of some of these updates
+    // Deletion rules check ref count, so be careful not to hold any LLPointer references to the textures here other than the one in entries.
+
     //update MIN_UPDATE_COUNT or 5% of other textures, whichever is greater
     update_count = llmax((U32) MIN_UPDATE_COUNT, (U32) mUUIDMap.size()/20);
     update_count = llmin(update_count, (U32) mUUIDMap.size());
 
-    {
+    { // copy entries out of UUID map to avoid iterator invalidation from deletion inside updateImageDecodeProiroty or updateFetch below
         LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vtluift - copy");
 
         // copy entries out of UUID map for updating
@@ -1226,30 +1147,22 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
 
     LLTimer timer;
 
-    LLPointer<LLViewerTexture> last_imagep = nullptr;
-
     for (auto& imagep : entries)
     {
-        if (imagep->getNumRefs() > 1) // make sure this image hasn't been deleted before attempting to update (may happen as a side effect of some other image updating)
+        mLastUpdateKey = LLTextureKey(imagep->getID(), (ETexListType)imagep->getTextureListType());
 
+        if (imagep->getNumRefs() > 1) // make sure this image hasn't been deleted before attempting to update (may happen as a side effect of some other image updating)
         {
             updateImageDecodePriority(imagep);
             imagep->updateFetch();
         }
 
-        last_imagep = imagep;
-
         if (timer.getElapsedTimeF32() > max_time)
         {
             break;
         }
     }
 
-    if (last_imagep)
-    {
-        mLastUpdateKey = LLTextureKey(last_imagep->getID(), (ETexListType)last_imagep->getTextureListType());
-    }
-
     return timer.getElapsedTimeF32();
 }
 
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index b614753b4f..7c7112f4cf 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -122,8 +122,6 @@ public:
     LLViewerFetchedTexture *findImage(const LLUUID &image_id, ETexListType tex_type);
     LLViewerFetchedTexture *findImage(const LLTextureKey &search_key);
 
-    void dirtyImage(LLViewerFetchedTexture *image);
-
     // Using image stats, determine what images are necessary, and perform image updates.
     void updateImages(F32 max_time);
     void forceImmediateUpdate(LLViewerFetchedTexture* imagep) ;
@@ -142,7 +140,6 @@ public:
     void doPrefetchImages();
 
     void clearFetchingRequests();
-    void setDebugFetching(LLViewerFetchedTexture* tex, S32 debug_level);
 
     // do some book keeping on the specified texture
     // - updates decode priority
@@ -223,9 +220,6 @@ public:
     image_list_t mCallbackList;
     image_list_t mFastCacheList;
 
-    // Note: just raw pointers because they are never referenced, just compared against
-    std::set<LLViewerFetchedTexture*> mDirtyTextureList;
-
     bool mForceResetTextureStats;
 
     // to make "for (auto& imagep : gTextureList)" work
-- 
cgit v1.2.3


From 37dcb67d4204beb79c6eae9f38ffecd0d0d49f6f Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 20 Aug 2024 13:54:11 +0300
Subject: viewer#2338 Don't allow pasting into library from My Environments

---
 indra/newview/llfloatermyenvironment.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra')

diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index df4526e69d..891e16a8ef 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -335,6 +335,8 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)
     {
         if (!LLClipboard::instance().hasContents())
             return false;
+        if (gInventory.isObjectDescendentOf(selected.front(), gInventory.getLibraryRootFolderID()))
+            return false;
 
         std::vector<LLUUID> ids;
         LLClipboard::instance().pasteFromClipboard(ids);
-- 
cgit v1.2.3


From 9f7dd0177201fe080c287144b99a70125be1fb2b Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Tue, 20 Aug 2024 17:41:48 +0200
Subject: Clean up boost includes and remove compiler warning pragma for
 unreachable code in PCH (#2361)

---
 indra/llappearance/lllocaltextureobject.h       |  2 -
 indra/llcommon/lldoubledispatch.h               |  1 -
 indra/llcommon/llerrorcontrol.h                 |  1 -
 indra/llcommon/llinitparam.h                    |  1 -
 indra/llcommon/llprocess.h                      |  1 -
 indra/llcommon/llrun.h                          |  1 -
 indra/llcommon/tests/lleventcoro_test.cpp       |  2 -
 indra/llcommon/tests/llinstancetracker_test.cpp |  2 -
 indra/llcorehttp/bufferarray.h                  |  1 -
 indra/llcorehttp/httpcommon.h                   |  6 +--
 indra/llimage/llimagej2c.cpp                    |  1 -
 indra/llimage/llimagej2c.h                      |  1 -
 indra/llmessage/lliopipe.h                      |  1 -
 indra/llmessage/llservice.h                     | 64 -------------------------
 indra/llmessage/llstoredmessage.h               |  1 -
 indra/llui/llnotifications.h                    |  1 +
 indra/newview/llagent.h                         |  1 -
 indra/newview/llagentwearables.cpp              |  2 -
 indra/newview/llchannelmanager.h                |  1 -
 indra/newview/llfloateruipreview.cpp            |  1 -
 indra/newview/llinventorybridge.cpp             |  2 -
 indra/newview/lllogininstance.cpp               |  1 -
 indra/newview/lllogininstance.h                 |  1 -
 indra/newview/llpanellogin.h                    |  1 -
 indra/newview/llpathfindingmanager.cpp          |  1 -
 indra/newview/llpathfindingnavmesh.h            |  1 -
 indra/newview/llpathfindingnavmeshzone.cpp      | 11 -----
 indra/newview/llpathfindingnavmeshzone.h        |  1 -
 indra/newview/llpathfindingobject.h             |  1 -
 indra/newview/llpathfindingobjectlist.h         |  2 -
 indra/newview/llscreenchannel.h                 |  1 -
 indra/newview/llviewerprecompiledheaders.h      |  5 +-
 indra/newview/llviewerwindow.h                  |  1 -
 indra/newview/llvoiceclient.h                   |  1 -
 indra/newview/llwindowlistener.cpp              |  1 -
 indra/newview/llxmlrpclistener.cpp              |  6 +--
 indra/test/llevents_tut.cpp                     |  1 -
 indra/test/test.cpp                             |  4 --
 38 files changed, 4 insertions(+), 130 deletions(-)

(limited to 'indra')

diff --git a/indra/llappearance/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h
index 5505ef205a..a1b1178dee 100644
--- a/indra/llappearance/lllocaltextureobject.h
+++ b/indra/llappearance/lllocaltextureobject.h
@@ -27,8 +27,6 @@
 #ifndef LL_LOCALTEXTUREOBJECT_H
 #define LL_LOCALTEXTUREOBJECT_H
 
-#include <boost/shared_ptr.hpp>
-
 #include "llpointer.h"
 #include "llgltexture.h"
 
diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h
index c8c566205a..25039c3e9c 100644
--- a/indra/llcommon/lldoubledispatch.h
+++ b/indra/llcommon/lldoubledispatch.h
@@ -30,7 +30,6 @@
 #define LL_LLDOUBLEDISPATCH_H
 
 #include <list>
-#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/bind.hpp>
 #include <boost/ref.hpp>
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 1845fc42db..0a7b3d2046 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -32,7 +32,6 @@
 #include "llpointer.h"
 #include "llrefcount.h"
 #include "boost/function.hpp"
-#include "boost/shared_ptr.hpp"
 #include <string>
 
 class LLSD;
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 206aa51ba3..32d7b17034 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -31,7 +31,6 @@
 #include <vector>
 #include <list>
 #include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/is_enum.hpp>
 #include <boost/unordered_map.hpp>
diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h
index 166da8f424..39ed29c1b4 100644
--- a/indra/llcommon/llprocess.h
+++ b/indra/llcommon/llprocess.h
@@ -32,7 +32,6 @@
 #include "llwin32headerslean.h"
 #include "llexception.h"
 #include "apr_thread_proc.h"
-#include <boost/shared_ptr.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/optional.hpp>
 #include <boost/noncopyable.hpp>
diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h
index 8061117ad5..70767572ff 100644
--- a/indra/llcommon/llrun.h
+++ b/indra/llcommon/llrun.h
@@ -30,7 +30,6 @@
 #define LL_LLRUN_H
 
 #include <vector>
-#include <boost/shared_ptr.hpp>
 
 class LLRunnable;
 
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index a3c54ffaa2..ab174a8bde 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -30,8 +30,6 @@
 #include <boost/bind.hpp>
 #include <boost/range.hpp>
 #include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
 
 #include "linden_common.h"
 
diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp
index c6eb0fdf75..bf661dc051 100644
--- a/indra/llcommon/tests/llinstancetracker_test.cpp
+++ b/indra/llcommon/tests/llinstancetracker_test.cpp
@@ -37,8 +37,6 @@
 #include <algorithm>                // std::sort()
 #include <stdexcept>
 // std headers
-// external library headers
-#include <boost/scoped_ptr.hpp>
 // other Linden headers
 #include "../test/lltut.h"
 
diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h
index 0269d1785e..5105dbc4f7 100644
--- a/indra/llcorehttp/bufferarray.h
+++ b/indra/llcorehttp/bufferarray.h
@@ -30,7 +30,6 @@
 
 #include <cstdlib>
 #include <vector>
-#include "boost/intrusive_ptr.hpp"
 
 #include "_refcounted.h"
 
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index 0a1c5ed101..511a17e000 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -189,13 +189,9 @@
 
 #include "linden_common.h"      // Modifies curl/curl.h interfaces
 #include "llsd.h"
-#include "boost/intrusive_ptr.hpp"
-#include "boost/shared_ptr.hpp"
-#include "boost/weak_ptr.hpp"
-#include "boost/function.hpp"
-#include "boost/noncopyable.hpp"
 #include <string>
 #include <curl/curl.h>
+#include "boost/noncopyable.hpp"
 
 namespace LLCore
 {
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 42f3e92257..4ec95bbcc3 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -31,7 +31,6 @@
 #include "llmath.h"
 #include "llmemory.h"
 #include "llsd.h"
-#include <boost/scoped_ptr.hpp>
 
 // Declare the prototype for this factory function here. It is implemented in
 // other files which define a LLImageJ2CImpl subclass, but only ONE static
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index 2a32e10bac..19744a7f87 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -30,7 +30,6 @@
 #include "llimage.h"
 #include "llassettype.h"
 #include "llmetricperformancetester.h"
-#include <boost/scoped_ptr.hpp>
 
 // JPEG2000 : compression rate used in j2c conversion.
 const F32 DEFAULT_COMPRESSION_RATE = 1.f/8.f;
diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h
index a58ee045c2..1887b5cd9a 100644
--- a/indra/llmessage/lliopipe.h
+++ b/indra/llmessage/lliopipe.h
@@ -30,7 +30,6 @@
 #define LL_LLIOPIPE_H
 
 #include <boost/intrusive_ptr.hpp>
-#include <boost/shared_ptr.hpp>
 #include "llwin32headerslean.h"
 #include "apr_poll.h"
 
diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h
index 6c32fa8102..7853e357f9 100644
--- a/indra/llmessage/llservice.h
+++ b/indra/llmessage/llservice.h
@@ -31,72 +31,10 @@
 
 #include <string>
 #include <map>
-//#include <boost/intrusive_ptr.hpp>
-//#include <boost/shared_ptr.hpp>
 
-//#include "llframetimer.h"
 #include "lliopipe.h"
 #include "llchainio.h"
 
-#if 0
-class LLServiceCreator;
-/**
- * intrusive pointer support
- */
-namespace boost
-{
-    void intrusive_ptr_add_ref(LLServiceCreator* p);
-    void intrusive_ptr_release(LLServiceCreator* p);
-};
-#endif
-
-/**
- * @class LLServiceCreator
- * @brief This class is an abstract base class for classes which create
- * new <code>LLService</code> instances.
- *
- * Derive classes from this class which appropriately implement the
- * <code>operator()</code> and destructor.
- * @see LLService
- */
-#if 0
-class LLServiceCreator
-{
-public:
-    typedef boost::intrusive_ptr<LLService> service_t;
-    virtual ~LLServiceCreator() {}
-    virtual service_t activate() = 0;
-    virtual void discard() = 0;
-
-protected:
-    LLServiceCreator() : mReferenceCount(0)
-    {
-    }
-
-private:
-    friend void boost::intrusive_ptr_add_ref(LLServiceCreator* p);
-    friend void boost::intrusive_ptr_release(LLServiceCreator* p);
-    U32 mReferenceCount;
-};
-#endif
-
-#if 0
-namespace boost
-{
-    inline void intrusive_ptr_add_ref(LLServiceCreator* p)
-    {
-        ++p->mReferenceCount;
-    }
-    inline void intrusive_ptr_release(LLServiceCreator* p)
-    {
-        if(p && 0 == --p->mReferenceCount)
-        {
-            delete p;
-        }
-    }
-};
-#endif
-
 /**
  * @class LLService
  * @brief This class is the base class for the service classes.
@@ -114,8 +52,6 @@ namespace boost
 class LLService : public LLIOPipe
 {
 public:
-    //typedef boost::intrusive_ptr<LLServiceCreator> creator_t;
-    //typedef boost::intrusive_ptr<LLService> service_t;
     typedef std::shared_ptr<LLChainIOFactory> creator_t;
 
     /**
diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h
index 178b75ab04..2bd64fafd7 100644
--- a/indra/llmessage/llstoredmessage.h
+++ b/indra/llmessage/llstoredmessage.h
@@ -29,7 +29,6 @@
 
 #include "linden_common.h"
 #include "llsd.h"
-#include <boost/shared_ptr.hpp>
 #include <string>
 
 
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 1a197f8a17..46286457cf 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -87,6 +87,7 @@
 #include <boost/type_traits.hpp>
 #include <boost/signals2.hpp>
 #include <boost/range.hpp>
+#include <boost/intrusive_ptr.hpp>
 
 #include "llevents.h"
 #include "llfunctorregistry.h"
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 9cd3e80f69..8f892025c9 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -40,7 +40,6 @@
 #include "llcorehttputil.h"
 
 #include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
 
 extern const bool   ANIMATE;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index faa5d801dd..cd4222dddf 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -52,8 +52,6 @@
 #include "llwearablelist.h"
 #include "llfloaterperms.h"
 
-#include <boost/scoped_ptr.hpp>
-
 LLAgentWearables gAgentWearables;
 
 bool LLAgentWearables::mInitialWearablesUpdateReceived = false;
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index 7a4899f1f3..4db7f32b10 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -33,7 +33,6 @@
 #include "lluuid.h"
 
 #include <map>
-#include <boost/shared_ptr.hpp>
 
 namespace LLNotificationsUI
 {
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 7c49db9c54..990a299c50 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -64,7 +64,6 @@
 
 // Boost (for linux/unix command-line execv)
 #include <boost/tokenizer.hpp>
-#include <boost/shared_ptr.hpp>
 
 // External utility
 #include <string>
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 8f3dc3ce16..c86492f005 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -85,8 +85,6 @@
 
 #include "llenvironment.h"
 
-#include <boost/shared_ptr.hpp>
-
 void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
 
 const F32 SOUND_GAIN = 1.0f;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index f37926a938..c54d2c080f 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -57,7 +57,6 @@
 #include "llsdserialize.h"
 #include "lltrans.h"
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/regex.hpp>
 #include <sstream>
 
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 0ec7b3bb24..624408d46d 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -29,7 +29,6 @@
 
 #include "lleventdispatcher.h"
 #include "lleventapi.h"
-#include <boost/scoped_ptr.hpp>
 #include <boost/function.hpp>
 #include <memory>                   // std::shared_ptr
 #include "llsecapi.h"
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 00fd17badf..a1bf25fb05 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -30,7 +30,6 @@
 #include "llpanel.h"
 #include "llpointer.h"          // LLPointer<>
 #include "llmediactrl.h"    // LLMediaCtrlObserver
-#include <boost/scoped_ptr.hpp>
 
 class LLLineEditor;
 class LLUIImage;
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 5e7bc4fb3b..84a62b3cbf 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -35,7 +35,6 @@
 
 #include <boost/bind.hpp>
 #include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
 
 #include "llagent.h"
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index 18b6a31845..d838a1a51c 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -29,7 +29,6 @@
 
 #include <string>
 
-#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/signals2.hpp>
 
diff --git a/indra/newview/llpathfindingnavmeshzone.cpp b/indra/newview/llpathfindingnavmeshzone.cpp
index 012cc11eee..e9ef170176 100644
--- a/indra/newview/llpathfindingnavmeshzone.cpp
+++ b/indra/newview/llpathfindingnavmeshzone.cpp
@@ -30,20 +30,9 @@
 
 #include "llpathfindingnavmeshzone.h"
 
-#include <vector>
-
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/signals2.hpp>
-
 #include "llagent.h"
 #include "llpathfindingmanager.h"
-#include "llpathfindingnavmesh.h"
-#include "llpathfindingnavmeshstatus.h"
 #include "llpathinglib.h"
-#include "llsd.h"
-#include "lluuid.h"
 #include "llviewercontrol.h"
 #include "llviewerregion.h"
 
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index a2c8691391..e770efa0d0 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -29,7 +29,6 @@
 
 #include <vector>
 
-#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/signals2.hpp>
 
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 17f12efd83..79a796dd60 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -29,7 +29,6 @@
 
 #include <string>
 
-#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/signals2.hpp>
 
diff --git a/indra/newview/llpathfindingobjectlist.h b/indra/newview/llpathfindingobjectlist.h
index 654423183e..cfcd43dc1d 100644
--- a/indra/newview/llpathfindingobjectlist.h
+++ b/indra/newview/llpathfindingobjectlist.h
@@ -30,8 +30,6 @@
 #include <string>
 #include <map>
 
-#include <boost/shared_ptr.hpp>
-
 #include "llpathfindingobject.h"
 
 class LLPathfindingObjectList;
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 22fb41e559..651483dbe3 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -30,7 +30,6 @@
 #include "lltoast.h"
 
 #include <map>
-#include <boost/shared_ptr.hpp>
 
 namespace LLNotificationsUI
 {
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 7c8067ede3..a857887247 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -42,10 +42,7 @@
 #include <functional>
 #include <map>
 #include <set>
-
-#ifdef LL_WINDOWS
-#pragma warning (3 : 4702) // we like level 3, not 4
-#endif
+#include <vector>
 
 // Library headers from llcommon project:
 #include "indra_constants.h"
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 395d8c78da..1b995ea650 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -50,7 +50,6 @@
 
 #include <boost/function.hpp>
 #include <boost/signals2.hpp>
-#include <boost/scoped_ptr.hpp>
 
 class LLView;
 class LLViewerObject;
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 2221bc6df4..3476571ca4 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -38,7 +38,6 @@ class LLVOAvatar;
 #include "llcallingcard.h"   // for LLFriendObserver
 #include "llsecapi.h"
 #include "llcontrol.h"
-#include <boost/shared_ptr.hpp>
 
 // devices
 
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index 6221d67b26..ebcdd537a5 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -43,7 +43,6 @@
 #include "stringize.h"
 #include <typeinfo>
 #include <map>
-#include <boost/scoped_ptr.hpp>
 #include <boost/bind.hpp>
 
 LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 7c7bd98bcd..92e6c88752 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -34,10 +34,6 @@
 // STL headers
 #include <map>
 #include <set>
-// std headers
-// external library headers
-#include <boost/scoped_ptr.hpp>
-#include <boost/range.hpp>          // boost::begin(), boost::end()
 
 #include "curl/curl.h"
 
@@ -334,7 +330,7 @@ public:
         // need to wake up the loginCoro now
         llcoro::suspend();
 
-        // Because mTransaction is a boost::scoped_ptr, deleting this object
+        // Because mTransaction is a std::unique_ptr, deleting this object
         // frees our LLXMLRPCTransaction object.
         // Because mBoundListener is an LLTempBoundListener, deleting this
         // object disconnects it from "mainloop".
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index 875ca9ad89..bf5cd3f853 100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
@@ -44,7 +44,6 @@
 #include <typeinfo>
 // external library headers
 #include <boost/bind.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/assign/list_of.hpp>
 // other Linden headers
 #include "tests/listener.h"             // must PRECEDE lltut.h
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 233eee5c31..172b6e3542 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -55,10 +55,6 @@
 
 #include <boost/iostreams/tee.hpp>
 #include <boost/iostreams/stream.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-#include <boost/foreach.hpp>
 
 #include <fstream>
 
-- 
cgit v1.2.3


From a469bd0ee5a5c62efa1798b4ef5e1d13b5eeac8d Mon Sep 17 00:00:00 2001
From: Brad Linden <brad@lindenlab.com>
Date: Tue, 20 Aug 2024 11:12:57 -0700
Subject: Increment viewer version in preparation for 2024.08-d RC

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 5978ab1324..346a7e3aa1 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.1.9
+7.1.10
-- 
cgit v1.2.3


From 552d1d421b4c67dfdf3fe14316116b34b54e97d7 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 20 Aug 2024 23:23:55 +0300
Subject: viewer#2363 Region Day Offset error with Time of Day

When we have a 23h day cycle and 23h offset, doing a 24h flip will
result in -1h. Flip by day length instead so that 23h-23h will result
in 0h.

This has a negative side effect of values not being saved exactly as
users specified them, so a -1h offset will turn to 4h on next load
with a 5h long day. But it is nature of a day to 'loop', so I decided
there is no point to translate -1 into 14 or something like that.
---
 indra/newview/llpanelenvironment.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 51e2c05070..2a4323d3e6 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -296,7 +296,7 @@ void LLPanelEnvironmentInfo::refresh()
     F32Hours dayoffset(mCurrentEnvironment->mDayOffset);
 
     if (dayoffset.value() > 12.0f)
-        dayoffset -= F32Hours(24.0);
+        dayoffset -= daylength;
 
     mSliderDayLength->setValue(daylength.value());
     mSliderDayOffset->setValue(dayoffset.value());
@@ -723,6 +723,11 @@ void LLPanelEnvironmentInfo::onSldDayLengthChanged(F32 value)
         F32Hours daylength(value);
 
         mCurrentEnvironment->mDayLength = daylength;
+        F32 offset = (F32)mSliderDayOffset->getValue().asReal();
+        if (offset <= 0.0f)
+        {
+            onSldDayOffsetChanged(offset);
+        }
         setDirtyFlag(DIRTY_FLAG_DAYLENGTH);
 
         udpateApparentTimeOfDay();
@@ -736,7 +741,8 @@ void LLPanelEnvironmentInfo::onSldDayOffsetChanged(F32 value)
         F32Hours dayoffset(value);
 
         if (dayoffset.value() <= 0.0f)
-            dayoffset += F32Hours(24.0);
+            // if day cycle is 5 hours long, we want -1h offset to result in 4h
+            dayoffset += mCurrentEnvironment->mDayLength;
 
         mCurrentEnvironment->mDayOffset = dayoffset;
         setDirtyFlag(DIRTY_FLAG_DAYOFFSET);
@@ -929,7 +935,7 @@ void LLPanelEnvironmentInfo::udpateApparentTimeOfDay()
 {
     static const F32 SECONDSINDAY(24.0 * 60.0 * 60.0);
 
-    if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0) || (mCurrentEnvironment->mDayOffset.value() < 1.0))
+    if ((!mCurrentEnvironment) || (mCurrentEnvironment->mDayLength.value() < 1.0))
     {
         mLabelApparentTime->setVisible(false);
         return;
-- 
cgit v1.2.3


From db84bf9567c27e266ccc6b1b6aed089c6022fe91 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 21 Aug 2024 10:47:31 -0400
Subject: Improve accuracy of texture memory tracking (#2371)

* Fix alloc_tex_image to account for more missing texture memory
Change alloc_tex_image calls to pass internal format to properly account for used image type

* Fix scaleDown passing primary format in place of internal format to glTexImage2D

* Make texture debug view and texture bias calculation consistent and remove double accounting for render target textures
---
 indra/llrender/llcubemaparray.cpp        | 14 ++++++--------
 indra/llrender/llimagegl.cpp             | 19 ++++++++++++-------
 indra/llrender/llimagegl.h               |  2 +-
 indra/newview/llreflectionmapmanager.cpp |  3 +++
 indra/newview/lltextureview.cpp          |  8 ++++----
 indra/newview/llviewertexture.cpp        |  3 +--
 6 files changed, 27 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp
index be69b997da..4f5e13765a 100644
--- a/indra/llrender/llcubemaparray.cpp
+++ b/indra/llrender/llcubemaparray.cpp
@@ -125,27 +125,25 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool us
     mImage->setHasMipMaps(use_mips);
 
     bind(0);
+    free_cur_tex_image();
 
     U32 format = components == 4 ? GL_RGBA16F : GL_RGB16F;
-
     U32 mip = 0;
-
-    free_cur_tex_image();
-
-    while (resolution >= 1)
+    U32 mip_resolution = resolution;
+    while (mip_resolution >= 1)
     {
-        glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, format, resolution, resolution, count * 6, 0,
+        glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, format, mip_resolution, mip_resolution, count * 6, 0,
             GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
 
         if (!use_mips)
         {
             break;
         }
-        resolution /= 2;
+        mip_resolution /= 2;
         ++mip;
     }
 
-    alloc_tex_image(resolution * 6, resolution, format);
+    alloc_tex_image(resolution, resolution, format, count * 6);
 
     mImage->setAddressMode(LLTexUnit::TAM_CLAMP);
 
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 058afa0cf2..0746e21079 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -67,11 +67,12 @@ static U64 sTextureBytes = 0;
 
 // track a texture alloc on the currently bound texture.
 // asserts that no currently tracked alloc exists
-void LLImageGLMemory::alloc_tex_image(U32 width, U32 height, U32 pixformat)
+void LLImageGLMemory::alloc_tex_image(U32 width, U32 height, U32 intformat, U32 count)
 {
     U32 texUnit = gGL.getCurrentTexUnitIndex();
     U32 texName = gGL.getTexUnit(texUnit)->getCurrTexture();
-    U64 size = LLImageGL::dataFormatBytes(pixformat, width, height);
+    U64 size = LLImageGL::dataFormatBytes(intformat, width, height);
+    size *= count;
 
     llassert(size >= 0);
 
@@ -291,9 +292,13 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
     case GL_SRGB:                                   return 24;
     case GL_RGB8:                                   return 24;
     case GL_RGBA:                                   return 32;
+    case GL_RGBA8:                                  return 32;
     case GL_SRGB_ALPHA:                             return 32;
     case GL_BGRA:                                   return 32;      // Used for QuickTime media textures on the Mac
     case GL_DEPTH_COMPONENT:                        return 24;
+    case GL_DEPTH_COMPONENT24:                      return 24;
+    case GL_R16F:                                   return 16;
+    case GL_RG16F:                                  return 32;
     case GL_RGB16F:                                 return 48;
     case GL_RGBA16F:                                return 64;
     default:
@@ -1384,7 +1389,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
                 sub_image_lines(target, miplevel, 0, 0, width, height, pixformat, pixtype, src, width);
             }
         }
-        alloc_tex_image(width, height, pixformat);
+        alloc_tex_image(width, height, intformat, 1);
     }
     stop_glerror();
 
@@ -2370,11 +2375,11 @@ bool LLImageGL::scaleDown(S32 desired_discard)
         gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, temp_texname, true);
         {
             LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("scaleDown - glTexImage2D");
-            glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, NULL);
+            glTexImage2D(mTarget, 0, mFormatInternal, desired_width, desired_height, 0, mFormatPrimary, mFormatType, NULL);
         }
 
         // account for new texture getting created
-        alloc_tex_image(desired_width, desired_height, mFormatPrimary);
+        alloc_tex_image(desired_width, desired_height, mFormatInternal, 1);
 
         // Use render-to-texture to scale down the texture
         {
@@ -2428,10 +2433,10 @@ bool LLImageGL::scaleDown(S32 desired_discard)
         glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
 
         glBindBuffer(GL_PIXEL_UNPACK_BUFFER, sScratchPBO);
-        glTexImage2D(mTarget, 0, mFormatPrimary, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
+        glTexImage2D(mTarget, 0, mFormatInternal, desired_width, desired_height, 0, mFormatPrimary, mFormatType, nullptr);
         glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
 
-        alloc_tex_image(desired_width, desired_height, mFormatPrimary);
+        alloc_tex_image(desired_width, desired_height, mFormatInternal, 1);
 
         if (mHasMipMaps)
         {
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 5073701c30..9a8d935b89 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -50,7 +50,7 @@ class LLWindow;
 
 namespace LLImageGLMemory
 {
-    void alloc_tex_image(U32 width, U32 height, U32 pixformat);
+    void alloc_tex_image(U32 width, U32 height, U32 intformat, U32 count);
     void free_tex_image(U32 texName);
     void free_tex_images(U32 count, const U32* texNames);
     void free_cur_tex_image();
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 3526004071..f083747bfe 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -80,6 +80,9 @@ void load_exr(const std::string& filename)
         gGL.getTexUnit(0)->bind(gEXRImage);
 
         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGBA, GL_FLOAT, out);
+
+        LLImageGLMemory::alloc_tex_image(width, height, GL_RGB16F, 1);
+
         free(out); // release memory of image data
 
         glGenerateMipmap(GL_TEXTURE_2D);
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index ca3386948d..bda53f66eb 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -525,9 +525,9 @@ void LLGLTexMemBar::draw()
    F64 raw_image_bytes_MB = raw_image_bytes / (1024.0 * 1024.0);
    F64 saved_raw_image_bytes_MB = saved_raw_image_bytes / (1024.0 * 1024.0);
    F64 aux_raw_image_bytes_MB = aux_raw_image_bytes / (1024.0 * 1024.0);
-   F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 1024.0 * 1.3333f; // add 33% for mipmaps
-   F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 1024.0;
-   F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 1024.0;
+   F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0;
+   F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0;
+   F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 512.0;
 
     //----------------------------------------------------------------------------
     LLGLSUIDefault gls_ui;
@@ -579,7 +579,7 @@ void LLGLTexMemBar::draw()
                     texture_bytes_alloc,
                     vertex_bytes_alloc,
                     render_bytes_alloc,
-        texture_bytes_alloc+vertex_bytes_alloc+render_bytes_alloc);
+        texture_bytes_alloc+vertex_bytes_alloc);
     LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height * 6,
         text_color, LLFontGL::LEFT, LLFontGL::TOP);
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index eab564a856..4922df6738 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -497,11 +497,10 @@ void LLViewerTexture::updateClass()
 
     F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0;
     F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0;
-    F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 512.0;
 
     // get an estimate of how much video memory we're using
     // NOTE: our metrics miss about half the vram we use, so this biases high but turns out to typically be within 5% of the real number
-    F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc + render_bytes_alloc);
+    F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);
 
     F32 budget = max_vram_budget == 0 ? (F32)gGLManager.mVRAM : (F32)max_vram_budget;
 
-- 
cgit v1.2.3


From 40e93e9f4d9059a298e16009483cf531eccd7c82 Mon Sep 17 00:00:00 2001
From: Ansariel <ansariel.hiller@phoenixviewer.com>
Date: Wed, 21 Aug 2024 14:15:07 +0200
Subject: Fix formatting and add some more constexpr

---
 indra/llinventory/llpermissionsflags.h | 34 ++++++++++-----------
 indra/newview/llpanelprofile.cpp       | 56 ++++++++++++++++++----------------
 2 files changed, 47 insertions(+), 43 deletions(-)

(limited to 'indra')

diff --git a/indra/llinventory/llpermissionsflags.h b/indra/llinventory/llpermissionsflags.h
index aaf1fd3afb..0ab4de0ab2 100644
--- a/indra/llinventory/llpermissionsflags.h
+++ b/indra/llinventory/llpermissionsflags.h
@@ -37,48 +37,48 @@ typedef U32 PermissionBit;
 // Do you have permission to transfer ownership of the object or
 // item. Fair use rules dictate that if you cannot copy, you can
 // always transfer.
-const PermissionBit PERM_TRANSFER           = (1 << 13); // 0x00002000
+constexpr PermissionBit PERM_TRANSFER           = (1 << 13); // 0x00002000
 
 // objects, scale or change textures
 // parcels, allow building on it
-const PermissionBit PERM_MODIFY             = (1 << 14); // 0x00004000
+constexpr PermissionBit PERM_MODIFY             = (1 << 14); // 0x00004000
 
 // objects, allow copy
-const PermissionBit PERM_COPY               = (1 << 15); // 0x00008000
+constexpr PermissionBit PERM_COPY               = (1 << 15); // 0x00008000
 
 // parcels, allow entry, deprecated
-//const PermissionBit PERM_ENTER            = (1 << 16); // 0x00010000
+//constexpr PermissionBit PERM_ENTER            = (1 << 16); // 0x00010000
 
 // parcels, allow terraform, deprecated
-//const PermissionBit PERM_TERRAFORM        = (1 << 17); // 0x00020000
+//constexpr PermissionBit PERM_TERRAFORM        = (1 << 17); // 0x00020000
 
 // NOTA BENE: This flag is NO LONGER USED!!! However, it is possible that some
 // objects in the universe have it set so DON"T USE IT going forward.
-//const PermissionBit PERM_OWNER_DEBIT      = (1 << 18); // 0x00040000
+//constexpr PermissionBit PERM_OWNER_DEBIT      = (1 << 18); // 0x00040000
 
 // objects, can grab/translate/rotate
-const PermissionBit PERM_MOVE               = (1 << 19); // 0x00080000
+constexpr PermissionBit PERM_MOVE               = (1 << 19); // 0x00080000
 
 // parcels, avatars take damage, deprecated
 //const PermissionBit   PERM_DAMAGE         = (1 << 20); // 0x00100000
 
 // don't use bit 31 -- printf/scanf with "%x" assume signed numbers
-const PermissionBit PERM_RESERVED           = ((U32)1) << 31;
+constexpr PermissionBit PERM_RESERVED           = ((U32)1) << 31;
 
-const PermissionMask PERM_NONE              = 0x00000000;
-const PermissionMask PERM_ALL               = 0x7FFFFFFF;
-//const PermissionMask PERM_ALL_PARCEL      = PERM_MODIFY | PERM_ENTER | PERM_TERRAFORM | PERM_DAMAGE;
-const PermissionMask PERM_ITEM_UNRESTRICTED =  PERM_MODIFY | PERM_COPY | PERM_TRANSFER;
+constexpr PermissionMask PERM_NONE              = 0x00000000;
+constexpr PermissionMask PERM_ALL               = 0x7FFFFFFF;
+//constexpr PermissionMask PERM_ALL_PARCEL      = PERM_MODIFY | PERM_ENTER | PERM_TERRAFORM | PERM_DAMAGE;
+constexpr PermissionMask PERM_ITEM_UNRESTRICTED =  PERM_MODIFY | PERM_COPY | PERM_TRANSFER;
 
 
 // Useful stuff for transmission.
 // Which permissions field are we trying to change?
-const U8 PERM_BASE      = 0x01;
+constexpr U8 PERM_BASE      = 0x01;
 // TODO: Add another PERM_OWNER operation type for allowOperationBy  DK 04/03/06
-const U8 PERM_OWNER     = 0x02;
-const U8 PERM_GROUP     = 0x04;
-const U8 PERM_EVERYONE  = 0x08;
-const U8 PERM_NEXT_OWNER = 0x10;
+constexpr U8 PERM_OWNER     = 0x02;
+constexpr U8 PERM_GROUP     = 0x04;
+constexpr U8 PERM_EVERYONE  = 0x08;
+constexpr U8 PERM_NEXT_OWNER = 0x10;
 
 // This is just a quickie debugging key
 // no modify: PERM_ALL & ~PERM_MODIFY                  = 0x7fffbfff
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 9711729498..08605f7cf4 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1017,7 +1017,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
 
     setDescriptionText(avatar_data->about_text);
 
-        mSecondLifePic->setValue(avatar_data->image_id);
+    mSecondLifePic->setValue(avatar_data->image_id);
 
     if (getSelfProfile())
     {
@@ -1052,7 +1052,7 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
     std::string caption_text = getString("CaptionTextAcctInfo", args);
     getChild<LLUICtrl>("account_info")->setValue(caption_text);
 
-    const S32 LINDEN_EMPLOYEE_INDEX = 3;
+    constexpr S32 LINDEN_EMPLOYEE_INDEX = 3;
     LLDate sl_release;
     sl_release.fromYMDHMS(2003, 6, 23, 0, 0, 0);
     std::string customer_lower = avatar_data->customer_type;
@@ -1117,7 +1117,7 @@ void LLPanelProfileSecondLife::fillRightsData()
     // If true - we are viewing friend's profile, enable check boxes and set values.
     if (relation)
     {
-        S32 rights = relation->getRightsGrantedTo();
+        const S32 rights = relation->getRightsGrantedTo();
         bool can_see_online = LLRelationship::GRANT_ONLINE_STATUS & rights;
         bool can_see_on_map = LLRelationship::GRANT_MAP_LOCATION & rights;
         bool can_edit_objects = LLRelationship::GRANT_MODIFY_OBJECTS & rights;
@@ -1165,10 +1165,10 @@ void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)
     }
     else
     {
-    std::string register_date = getString("age_format");
-    LLSD args_age;
+        std::string register_date = getString("age_format");
+        LLSD args_age;
         args_age["[AGE]"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now());
-    LLStringUtil::format(register_date, args_age);
+        LLStringUtil::format(register_date, args_age);
         userAgeCtrl->setValue(register_date);
     }
 
@@ -1247,7 +1247,7 @@ void LLPanelProfileSecondLife::setAvatarId(const LLUUID& avatar_id)
 void LLPanelProfileSecondLife::updateOnlineStatus()
 {
     const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
-    if (relationship != NULL)
+    if (relationship)
     {
         // For friend let check if he allowed me to see his status
         bool online = relationship->isOnline();
@@ -1328,7 +1328,7 @@ void LLProfileImagePicker::notify(const std::vector<std::string>& filenames)
     // generate a temp texture file for coroutine
     std::string temp_file = gDirUtilp->getTempFilename();
     U32 codec = LLImageBase::getCodecFromExtension(gDirUtilp->getExtension(file_path));
-    const S32 MAX_DIM = 256;
+    constexpr S32 MAX_DIM = 256;
     if (!LLViewerTextureList::createUploadFile(file_path, temp_file, codec, MAX_DIM))
     {
         LLSD notif_args;
@@ -1611,12 +1611,12 @@ void LLPanelProfileSecondLife::onShowInSearchCallback()
     if (value == mAllowPublish)
         return;
 
-        mAllowPublish = value;
+    mAllowPublish = value;
     saveAgentUserInfoCoro("allow_publish", value);
-    }
+}
 
 void LLPanelProfileSecondLife::onHideAgeCallback()
-    {
+{
     bool value = mHideAgeCombo->getValue().asInteger();
     if (value == mHideAge)
         return;
@@ -1642,7 +1642,7 @@ void LLPanelProfileSecondLife::onDiscardDescriptionChanges()
 
 void LLPanelProfileSecondLife::onShowAgentPermissionsDialog()
 {
-    LLFloater *floater = mFloaterPermissionsHandle.get();
+    LLFloater* floater = mFloaterPermissionsHandle.get();
     if (!floater)
     {
         LLFloater* parent_floater = gFloaterView->getParentFloater(this);
@@ -1670,7 +1670,7 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture()
         return;
     }
 
-    LLFloater *floater = mFloaterProfileTextureHandle.get();
+    LLFloater* floater = mFloaterProfileTextureHandle.get();
     if (!floater)
     {
         LLFloater* parent_floater = gFloaterView->getParentFloater(this);
@@ -1765,43 +1765,47 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)
     if (mSecondLifePic->getImageAssetId() == id)
         return;
 
-        std::function<void(bool)> callback = [id](bool result)
+    std::function<void(bool)> callback = [id](bool result)
+    {
+        if (result)
         {
-            if (result)
-            {
-                LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
+            LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
             // Should trigger callbacks in icon controls (or request Legacy)
-                LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
-            }
-        };
+            LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
+        }
+    };
 
     if (!saveAgentUserInfoCoro("sl_image_id", id, callback))
         return;
 
     mSecondLifePic->setValue(id);
 
-        LLFloater *floater = mFloaterProfileTextureHandle.get();
-        if (floater)
+    LLFloater* floater = mFloaterProfileTextureHandle.get();
+    if (floater)
+    {
+        LLFloaterProfileTexture* texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
+        if (texture_view)
         {
-            LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
-        if (id == LLUUID::null)
+            if (id.isNull())
             {
                 texture_view->resetAsset();
             }
             else
             {
-            texture_view->loadAsset(id);
+                texture_view->loadAsset(id);
             }
         }
     }
+}
 
 //////////////////////////////////////////////////////////////////////////
 // LLPanelProfileWeb
 
 LLPanelProfileWeb::LLPanelProfileWeb()
  : LLPanelProfileTab()
- , mWebBrowser(NULL)
+ , mWebBrowser(nullptr)
  , mAvatarNameCacheConnection()
+ , mFirstNavigate(false)
 {
 }
 
-- 
cgit v1.2.3


From 0e59ed204fdf84c5323837e5c91cfa7da0a9e89b Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 21 Aug 2024 14:36:18 -0500
Subject: Fix crash on Intel GPUs (or anywhere OpenGL compatibility profile is
 used). (#2387)

---
 indra/llrender/llimagegl.cpp | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'indra')

diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 0746e21079..be30807e7f 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -284,10 +284,13 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
     case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:          return 8;
     case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:    return 8;
     case GL_LUMINANCE:                              return 8;
+    case GL_LUMINANCE8:                             return 8;
     case GL_ALPHA:                                  return 8;
+    case GL_ALPHA8:                                 return 8;
     case GL_RED:                                    return 8;
     case GL_COLOR_INDEX:                            return 8;
     case GL_LUMINANCE_ALPHA:                        return 16;
+    case GL_LUMINANCE8_ALPHA8:                      return 16;
     case GL_RGB:                                    return 24;
     case GL_SRGB:                                   return 24;
     case GL_RGB8:                                   return 24;
-- 
cgit v1.2.3


From 8fef55b3b22678729d7dbd07933c0600ec7f4db8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 22 Aug 2024 00:43:50 -0400
Subject: Remove or suppress left over debug messages in hot paths (#2392)

---
 indra/llcommon/llcallstack.h         |  4 ++++
 indra/llprimitive/llprimitive.cpp    |  2 --
 indra/newview/llface.cpp             | 12 ------------
 indra/newview/llspatialpartition.cpp |  8 --------
 indra/newview/llvovolume.cpp         | 38 ------------------------------------
 5 files changed, 4 insertions(+), 60 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
index ad10a9dbf7..33f2b507b8 100644
--- a/indra/llcommon/llcallstack.h
+++ b/indra/llcommon/llcallstack.h
@@ -79,9 +79,13 @@ struct LLContextStatus
 
 LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
 
+#ifndef LL_RELEASE_FOR_DOWNLOAD
 #define dumpStack(tag)                          \
     LL_DEBUGS(tag) << "STACK:\n"                \
                    << "====================\n"  \
                    << LLCallStack()             \
                    << "===================="    \
                    << LL_ENDL;
+#else
+#define dumpStack(tag)
+#endif
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 644476460c..c5d6076b98 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -1126,8 +1126,6 @@ namespace
     {
         const size_t size(sizeof(T));
 
-        LL_DEBUGS("TEXTUREENTRY") << "Request to read items of size " << size << " with swizzle " << type << " froum buffer sized " << (source_end - source) << LL_ENDL;
-
         if ((source + size + 1) > source_end)
         {
             // we add 1 above to take into account the byte that we know must follow the value.
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4dec4d5641..8a6596eb1c 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -828,11 +828,6 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 
         const LLVolumeFace &face = volume.getVolumeFace(f);
 
-        LL_DEBUGS("RiggedBox") << "updating extents for face " << f
-                               << " starting extents " << mExtents[0] << ", " << mExtents[1]
-                               << " starting vf extents " << face.mExtents[0] << ", " << face.mExtents[1]
-                               << " num verts " << face.mNumVertices << LL_ENDL;
-
         // MAINT-8264 - stray vertices, especially in low LODs, cause bounding box errors.
         if (face.mNumVertices < 3)
         {
@@ -851,21 +846,14 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 
         matMulBoundBox(mat_vert, face.mExtents, mExtents);
 
-        LL_DEBUGS("RiggedBox") << "updated extents for face " << f
-                               << " bbox gave extents " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
-
         if (!mDrawablep->isActive())
         {   // Shift position for region
             LLVector4a offset;
             offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
             mExtents[0].add(offset);
             mExtents[1].add(offset);
-            LL_DEBUGS("RiggedBox") << "updating extents for face " << f
-                                   << " not active, added offset " << offset << LL_ENDL;
         }
 
-        LL_DEBUGS("RiggedBox") << "updated extents for face " << f
-                               << " to " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
         LLVector4a t;
         t.setAdd(mExtents[0],mExtents[1]);
         t.mul(0.5f);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index b1f80e48af..8ae6073a53 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -755,14 +755,6 @@ bool LLSpatialGroup::changeLOD()
 
         if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio)
         {
-            LL_DEBUGS("RiggedBox") << "changeLOD true because of ratio compare "
-                                   << fabsf(ratio) << " " << getSpatialPartition()->mSlopRatio << LL_ENDL;
-            LL_DEBUGS("RiggedBox") << "sg " << this << "\nmDistance " << mDistance
-                                   << " mLastUpdateDistance " << mLastUpdateDistance
-                                   << " mRadius " << mRadius
-                                   << " fab ratio " << fabsf(ratio)
-                                   << " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL;
-
             return true;
         }
     }
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7a7d88327b..65ed34d1ff 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1448,7 +1448,6 @@ bool LLVOVolume::calcLOD()
             const LLVector3* box = avatar->getLastAnimExtents();
             LLVector3 diag = box[1] - box[0];
             radius = diag.magVec() * 0.5f;
-            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
         }
         else
         {
@@ -1459,11 +1458,9 @@ bool LLVOVolume::calcLOD()
             const LLVector3* box = avatar->getLastAnimExtents();
             LLVector3 diag = box[1] - box[0];
             radius = diag.magVec(); // preserve old BinRadius behavior - 2x off
-            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
         }
         if (distance <= 0.f || radius <= 0.f)
         {
-            LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL;
             return false;
         }
     }
@@ -1473,7 +1470,6 @@ bool LLVOVolume::calcLOD()
         radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
         if (distance <= 0.f || radius <= 0.f)
         {
-            LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL;
             return false;
         }
     }
@@ -1554,13 +1550,6 @@ bool LLVOVolume::calcLOD()
 
     if (cur_detail != mLOD)
     {
-        LL_DEBUGS("DynamicBox","CalcLOD") << "new LOD " << cur_detail << " change from " << mLOD
-                             << " distance " << distance << " radius " << radius << " rampDist " << rampDist
-                             << " drawable rigged? " << (mDrawable ? (S32) mDrawable->isState(LLDrawable::RIGGED) : (S32) -1)
-                             << " mRiggedVolume " << (void*)getRiggedVolume()
-                             << " distanceWRTCamera " << (mDrawable ? mDrawable->mDistanceWRTCamera : -1.f)
-                             << LL_ENDL;
-
         mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
         mLOD = cur_detail;
 
@@ -1760,11 +1749,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
 
     bool any_valid_boxes = false;
 
-    if (getRiggedVolume())
-    {
-        LL_DEBUGS("RiggedBox") << "rebuilding box, volume face count " << getVolume()->getNumVolumeFaces() << " drawable face count " << mDrawable->getNumFaces() << LL_ENDL;
-    }
-
     // There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces()
     for (S32 i = 0;
         i < getVolume()->getNumVolumeFaces() && i < mDrawable->getNumFaces() && i < getNumTEs();
@@ -1788,10 +1772,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
         }
         if (rebuild)
         {
-            if (getRiggedVolume())
-            {
-                LL_DEBUGS("RiggedBox") << "rebuilding box, face " << i << " extents " << face->mExtents[0] << ", " << face->mExtents[1] << LL_ENDL;
-            }
             if (!any_valid_boxes)
             {
                 min = face->mExtents[0];
@@ -5655,8 +5635,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
             // apply any pending material overrides
             gGLTFMaterialList.applyQueuedOverrides(vobj);
 
-            std::string vobj_name = llformat("Vol%p", vobj);
-
             bool is_mesh = vobj->isMesh();
             if (is_mesh)
             {
@@ -5681,24 +5659,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                 group->mSurfaceArea += volume->getSurfaceArea() * llmax(llmax(scale.mV[0], scale.mV[1]), scale.mV[2]);
             }
 
-
-            F32 est_tris = vobj->getEstTrianglesMax();
-
             vobj->updateControlAvatar();
 
-            LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " rebuilding, isAttachment: " << (U32) vobj->isAttachment()
-                                                << " is_mesh " << is_mesh
-                                                << " est_tris " << est_tris
-                                                << " is_animated " << vobj->isAnimatedObject()
-                                                << " can_animate " << vobj->canBeAnimatedObject()
-                                                << " cav " << vobj->getControlAvatar()
-                                                << " lod " << vobj->getLOD()
-                                                << " drawable rigged " << (drawablep->isState(LLDrawable::RIGGED))
-                                                << " drawable state " << drawablep->getState()
-                                                << " playing " << (U32) (vobj->getControlAvatar() ? vobj->getControlAvatar()->mPlaying : false)
-                                                << " frame " << LLFrameTimer::getFrameCount()
-                                                << LL_ENDL;
-
             llassert_always(vobj);
             vobj->updateTextureVirtualSize(true);
             vobj->preRebuild();
-- 
cgit v1.2.3


From f7bb097247e5ccbd699a76e872913e557c545d3a Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 21 Aug 2024 18:04:28 +0200
Subject: #2325 WebRTC: p2p voice calling option sometimes becomes disabled
 after calling another agent back too soon

---
 indra/newview/llfloaterimsession.cpp    | 19 ------------
 indra/newview/llfloaterimsession.h      |  2 --
 indra/newview/llfloaterimsessiontab.cpp | 55 ++++++++++++++++++++++++++++-----
 indra/newview/llfloaterimsessiontab.h   |  7 +++++
 indra/newview/llvoicechannel.cpp        | 10 ++++++
 5 files changed, 64 insertions(+), 29 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 557b3f27c5..97e0d01b52 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -368,8 +368,6 @@ bool LLFloaterIMSession::postBuild()
     add_btn->setEnabled(isInviteAllowed());
     add_btn->setClickedCallback(boost::bind(&LLFloaterIMSession::onAddButtonClicked, this));
 
-    childSetAction("voice_call_btn", boost::bind(&LLFloaterIMSession::onCallButtonClicked, this));
-
     LLVoiceClient::addObserver(this);
 
     //*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla"
@@ -551,23 +549,6 @@ void LLFloaterIMSession::boundVoiceChannel()
     }
 }
 
-void LLFloaterIMSession::onCallButtonClicked()
-{
-    LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
-    if (voice_channel)
-    {
-        bool is_call_active = voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED;
-        if (is_call_active)
-        {
-            gIMMgr->endCall(mSessionID);
-        }
-        else
-        {
-            gIMMgr->startCall(mSessionID);
-        }
-    }
-}
-
 void LLFloaterIMSession::onChange(EStatusType status, const LLSD& channelInfo, bool proximal)
 {
     if(status != STATUS_JOINING && status != STATUS_LEFT_CHANNEL)
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index 7bc54cf3da..a442099ad1 100644
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -159,8 +159,6 @@ private:
     void sendParticipantsAddedNotification(const uuid_vec_t& uuids);
     bool canAddSelectedToChat(const uuid_vec_t& uuids);
 
-    void onCallButtonClicked();
-
     void onVoiceChannelChanged(const LLUUID &session_id);
 
     void boundVoiceChannel();
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 2621ce576c..00e7dae657 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -302,6 +302,7 @@ bool LLFloaterIMSessionTab::postBuild()
     mGearBtn = getChild<LLButton>("gear_btn");
     mAddBtn = getChild<LLButton>("add_btn");
     mVoiceButton = getChild<LLButton>("voice_call_btn");
+    mVoiceButton->setClickedCallback([this](LLUICtrl*, const LLSD&) { onCallButtonClicked(); });
 
     mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel");
     mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder");
@@ -434,16 +435,34 @@ void LLFloaterIMSessionTab::draw()
 
 void LLFloaterIMSessionTab::enableDisableCallBtn()
 {
-    if (LLVoiceClient::instanceExists() && mVoiceButton)
+    if (!mVoiceButton)
+        return;
+
+    bool enable = false;
+
+    if (mSessionID.notNull() && mSession && mSession->mSessionInitialized && mSession->mCallBackEnabled)
     {
-        mVoiceButton->setEnabled(
-            mSessionID.notNull()
-            && mSession
-            && mSession->mSessionInitialized
-            && LLVoiceClient::getInstance()->voiceEnabled()
-            && LLVoiceClient::getInstance()->isVoiceWorking()
-            && mSession->mCallBackEnabled);
+        if (mVoiceButtonHangUpMode)
+        {
+            // We allow to hang up from any state
+            enable = true;
+        }
+        else
+        {
+            // We allow to start call from this state only
+            if (mSession->mVoiceChannel->getState() == LLVoiceChannel::STATE_NO_CHANNEL_INFO &&
+                LLVoiceClient::instanceExists())
+            {
+                LLVoiceClient* client = LLVoiceClient::getInstance();
+                if (client->voiceEnabled() && client->isVoiceWorking())
+                {
+                    enable = true;
+                }
+            }
+        }
     }
+
+    mVoiceButton->setEnabled(enable);
 }
 
 // virtual
@@ -466,6 +485,25 @@ void LLFloaterIMSessionTab::onFocusLost()
     super::onFocusLost();
 }
 
+void LLFloaterIMSessionTab::onCallButtonClicked()
+{
+    if (mVoiceButtonHangUpMode)
+    {
+        // We allow to hang up from any state
+        gIMMgr->endCall(mSessionID);
+    }
+    else
+    {
+        LLVoiceChannel::EState channel_state = mSession && mSession->mVoiceChannel ?
+            mSession->mVoiceChannel->getState() : LLVoiceChannel::STATE_NO_CHANNEL_INFO;
+        // We allow to start call from this state only
+        if (channel_state == LLVoiceChannel::STATE_NO_CHANNEL_INFO)
+        {
+            gIMMgr->startCall(mSessionID);
+        }
+    }
+}
+
 void LLFloaterIMSessionTab::onInputEditorClicked()
 {
     LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance();
@@ -1040,6 +1078,7 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive)
 {
     mVoiceButton->setImageOverlay(callIsActive? getString("call_btn_stop") : getString("call_btn_start"));
     mVoiceButton->setToolTip(callIsActive? getString("end_call_button_tooltip") : getString("start_call_button_tooltip"));
+    mVoiceButtonHangUpMode = callIsActive;
 
     enableDisableCallBtn();
 }
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 6dd8e62482..bee5c8c2c4 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -198,6 +198,11 @@ protected:
     LLButton* mAddBtn;
     LLButton* mVoiceButton;
 
+    // Since mVoiceButton can work in one of two modes, "Start call" or "Hang up",
+    // (with different images and tooltips depending on the currently chosen mode)
+    // we should track the mode we're currently using to react on click accordingly
+    bool mVoiceButtonHangUpMode { false };
+
 private:
     // Handling selection and contextual menu
     void doToSelected(const LLSD& userdata);
@@ -216,6 +221,8 @@ private:
      */
     void reshapeChatLayoutPanel();
 
+    void onCallButtonClicked();
+
     void onInputEditorClicked();
 
     void onEmojiRecentPanelToggleBtnClicked();
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index eb1cd00940..55769f567b 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -328,6 +328,16 @@ void LLVoiceChannel::setState(EState state)
 
 void LLVoiceChannel::doSetState(const EState& new_state)
 {
+    LL_DEBUGS("Voice") << "session '" << mSessionName << "' state " << mState << ", new_state " << new_state << ": "
+        << (new_state == STATE_ERROR ? "ERROR" :
+            new_state == STATE_HUNG_UP ? "HUNG_UP" :
+            new_state == STATE_READY ? "READY" :
+            new_state == STATE_CALL_STARTED ? "CALL_STARTED" :
+            new_state == STATE_RINGING ? "RINGING" :
+            new_state == STATE_CONNECTED ? "CONNECTED" :
+            "NO_INFO")
+        << LL_ENDL;
+
     EState old_state = mState;
     mState = new_state;
 
-- 
cgit v1.2.3


From 28331b2385a8de2a0fde67329127c1694e3f219f Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 22 Aug 2024 11:25:25 -0400
Subject: Do deprecated texture swizzle on GPU using GL texture swizzling
 functions (#2389)

* Use GL texture swizzling instead of scratch buffer for deprecated formats when GL 3.3 is available
Fix crash when GL texture compression is enabled

* Fix UI font atlas being eligible for texture compression
---
 indra/llrender/llfontbitmapcache.cpp |   2 +-
 indra/llrender/llimagegl.cpp         | 216 +++++++++++++++++++++--------------
 indra/llrender/llimagegl.h           |   8 +-
 3 files changed, 135 insertions(+), 91 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp
index 46c2e89797..ee9cfd0719 100644
--- a/indra/llrender/llfontbitmapcache.cpp
+++ b/indra/llrender/llfontbitmapcache.cpp
@@ -117,7 +117,7 @@ bool LLFontBitmapCache::nextOpenPos(S32 width, S32& pos_x, S32& pos_y, EFontGlyp
             }
 
             // Make corresponding GL image.
-            mImageGLVec[bitmap_idx].push_back(new LLImageGL(image_raw, false));
+            mImageGLVec[bitmap_idx].push_back(new LLImageGL(image_raw, false, false));
             LLImageGL* image_gl = getImageGL(bitmap_type, bitmap_num);
 
             // Start at beginning of the new image.
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index be30807e7f..d5f7949051 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -277,6 +277,15 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
 {
     switch (dataformat)
     {
+    case GL_COMPRESSED_RED:                         return 8;
+    case GL_COMPRESSED_RG:                          return 16;
+    case GL_COMPRESSED_RGB:                         return 24;
+    case GL_COMPRESSED_SRGB:                        return 32;
+    case GL_COMPRESSED_RGBA:                        return 32;
+    case GL_COMPRESSED_SRGB_ALPHA:                  return 32;
+    case GL_COMPRESSED_LUMINANCE:                   return 8;
+    case GL_COMPRESSED_LUMINANCE_ALPHA:             return 16;
+    case GL_COMPRESSED_ALPHA:                       return 8;
     case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:          return 4;
     case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:    return 4;
     case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:          return 8;
@@ -288,9 +297,12 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
     case GL_ALPHA:                                  return 8;
     case GL_ALPHA8:                                 return 8;
     case GL_RED:                                    return 8;
+    case GL_R8:                                     return 8;
     case GL_COLOR_INDEX:                            return 8;
     case GL_LUMINANCE_ALPHA:                        return 16;
     case GL_LUMINANCE8_ALPHA8:                      return 16;
+    case GL_RG:                                     return 16;
+    case GL_RG8:                                    return 16;
     case GL_RGB:                                    return 24;
     case GL_SRGB:                                   return 24;
     case GL_RGB8:                                   return 24;
@@ -348,6 +360,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
       case GL_RED:                              return 1;
       case GL_COLOR_INDEX:                      return 1;
       case GL_LUMINANCE_ALPHA:                  return 2;
+      case GL_RG:                               return 2;
       case GL_RGB:                              return 3;
       case GL_SRGB:                             return 3;
       case GL_RGBA:                             return 4;
@@ -415,29 +428,29 @@ bool LLImageGL::create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, b
 
 //----------------------------------------------------------------------------
 
-LLImageGL::LLImageGL(bool usemipmaps)
+LLImageGL::LLImageGL(bool usemipmaps/* = true*/, bool allow_compression/* = true*/)
 :   mSaveData(0), mExternalTexture(false)
 {
-    init(usemipmaps);
+    init(usemipmaps, allow_compression);
     setSize(0, 0, 0);
     sImageList.insert(this);
     sCount++;
 }
 
-LLImageGL::LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps)
+LLImageGL::LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps/* = true*/, bool allow_compression/* = true*/)
 :   mSaveData(0), mExternalTexture(false)
 {
     llassert( components <= 4 );
-    init(usemipmaps);
+    init(usemipmaps, allow_compression);
     setSize(width, height, components);
     sImageList.insert(this);
     sCount++;
 }
 
-LLImageGL::LLImageGL(const LLImageRaw* imageraw, bool usemipmaps)
+LLImageGL::LLImageGL(const LLImageRaw* imageraw, bool usemipmaps/* = true*/, bool allow_compression/* = true*/)
 :   mSaveData(0), mExternalTexture(false)
 {
-    init(usemipmaps);
+    init(usemipmaps, allow_compression);
     setSize(0, 0, 0);
     sImageList.insert(this);
     sCount++;
@@ -454,7 +467,7 @@ LLImageGL::LLImageGL(
     LLGLenum formatType,
     LLTexUnit::eTextureAddressMode addressMode)
 {
-    init(false);
+    init(false, true);
     mTexName = texName;
     mTarget = target;
     mComponents = components;
@@ -476,7 +489,7 @@ LLImageGL::~LLImageGL()
     }
 }
 
-void LLImageGL::init(bool usemipmaps)
+void LLImageGL::init(bool usemipmaps, bool allow_compression)
 {
 #if LL_IMAGEGL_THREAD_CHECK
     mActiveThread = LLThread::currentID();
@@ -506,7 +519,7 @@ void LLImageGL::init(bool usemipmaps)
     mHeight = 0;
     mCurrentDiscardLevel = -1;
 
-    mAllowCompression = true;
+    mAllowCompression = allow_compression;
 
     mTarget = GL_TEXTURE_2D;
     mBindTarget = LLTexUnit::TT_TEXTURE;
@@ -1234,90 +1247,122 @@ void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
 void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void* pixels, bool allow_compression)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    bool use_scratch = false;
-    U32* scratch = NULL;
+    std::unique_ptr<U32[]> scratch;
     if (LLRender::sGLCoreProfile)
     {
-        if (pixformat == GL_ALPHA && pixtype == GL_UNSIGNED_BYTE)
-        { //GL_ALPHA is deprecated, convert to RGBA
-            if (pixels != nullptr)
-            {
-                use_scratch = true;
-                scratch = new(std::nothrow) U32[width * height];
-                if (!scratch)
-                {
-                    LLError::LLUserWarningMsg::showOutOfMemory();
-                    LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
-                              << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
-                }
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+        if (gGLManager.mGLVersion >= 3.29f)
+        {
+            if (pixformat == GL_ALPHA)
+            { //GL_ALPHA is deprecated, convert to RGBA
+                const GLint mask[] = { GL_ZERO, GL_ZERO, GL_ZERO, GL_RED };
+                glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, mask);
+                pixformat = GL_RED;
+                intformat = GL_R8;
+            }
 
-                U32 pixel_count = (U32)(width * height);
-                for (U32 i = 0; i < pixel_count; i++)
-                {
-                    U8* pix = (U8*)&scratch[i];
-                    pix[0] = pix[1] = pix[2] = 0;
-                    pix[3] = ((U8*)pixels)[i];
-                }
+            if (pixformat == GL_LUMINANCE)
+            { //GL_LUMINANCE is deprecated, convert to GL_RGBA
+                const GLint mask[] = { GL_RED, GL_RED, GL_RED, GL_ONE };
+                glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, mask);
+                pixformat = GL_RED;
+                intformat = GL_R8;
             }
 
-            pixformat = GL_RGBA;
-            intformat = GL_RGBA8;
+            if (pixformat == GL_LUMINANCE_ALPHA)
+            { //GL_LUMINANCE_ALPHA is deprecated, convert to RGBA
+                const GLint mask[] = { GL_RED, GL_RED, GL_RED, GL_GREEN };
+                glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, mask);
+                pixformat = GL_RG;
+                intformat = GL_RG8;
+            }
         }
-
-        if (pixformat == GL_LUMINANCE_ALPHA && pixtype == GL_UNSIGNED_BYTE)
-        { //GL_LUMINANCE_ALPHA is deprecated, convert to RGBA
-            if (pixels != nullptr)
-            {
-                use_scratch = true;
-                scratch = new(std::nothrow) U32[width * height];
-                if (!scratch)
+        else
+        {
+            if (pixformat == GL_ALPHA && pixtype == GL_UNSIGNED_BYTE)
+            { //GL_ALPHA is deprecated, convert to RGBA
+                if (pixels != nullptr)
                 {
-                    LLError::LLUserWarningMsg::showOutOfMemory();
-                    LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
-                        << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
-                }
+                    scratch.reset(new(std::nothrow) U32[width * height]);
+                    if (!scratch)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
+                            << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
+                    }
 
-                U32 pixel_count = (U32)(width * height);
-                for (U32 i = 0; i < pixel_count; i++)
-                {
-                    U8 lum = ((U8*)pixels)[i * 2 + 0];
-                    U8 alpha = ((U8*)pixels)[i * 2 + 1];
+                    U32 pixel_count = (U32)(width * height);
+                    for (U32 i = 0; i < pixel_count; i++)
+                    {
+                        U8* pix = (U8*)&scratch[i];
+                        pix[0] = pix[1] = pix[2] = 0;
+                        pix[3] = ((U8*)pixels)[i];
+                    }
 
-                    U8* pix = (U8*)&scratch[i];
-                    pix[0] = pix[1] = pix[2] = lum;
-                    pix[3] = alpha;
+                    pixels = scratch.get();
                 }
-            }
 
-            pixformat = GL_RGBA;
-            intformat = GL_RGBA8;
-        }
+                pixformat = GL_RGBA;
+                intformat = GL_RGBA8;
+            }
 
-        if (pixformat == GL_LUMINANCE && pixtype == GL_UNSIGNED_BYTE)
-        { //GL_LUMINANCE_ALPHA is deprecated, convert to RGB
-            if (pixels != nullptr)
-            {
-                use_scratch = true;
-                scratch = new(std::nothrow) U32[width * height];
-                if (!scratch)
+            if (pixformat == GL_LUMINANCE_ALPHA && pixtype == GL_UNSIGNED_BYTE)
+            { //GL_LUMINANCE_ALPHA is deprecated, convert to RGBA
+                if (pixels != nullptr)
                 {
-                    LLError::LLUserWarningMsg::showOutOfMemory();
-                    LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
-                        << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
+                    scratch.reset(new(std::nothrow) U32[width * height]);
+                    if (!scratch)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
+                            << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
+                    }
+
+                    U32 pixel_count = (U32)(width * height);
+                    for (U32 i = 0; i < pixel_count; i++)
+                    {
+                        U8 lum = ((U8*)pixels)[i * 2 + 0];
+                        U8 alpha = ((U8*)pixels)[i * 2 + 1];
+
+                        U8* pix = (U8*)&scratch[i];
+                        pix[0] = pix[1] = pix[2] = lum;
+                        pix[3] = alpha;
+                    }
+
+                    pixels = scratch.get();
                 }
 
-                U32 pixel_count = (U32)(width * height);
-                for (U32 i = 0; i < pixel_count; i++)
+                pixformat = GL_RGBA;
+                intformat = GL_RGBA8;
+            }
+
+            if (pixformat == GL_LUMINANCE && pixtype == GL_UNSIGNED_BYTE)
+            { //GL_LUMINANCE_ALPHA is deprecated, convert to RGB
+                if (pixels != nullptr)
                 {
-                    U8 lum = ((U8*)pixels)[i];
+                    scratch.reset(new(std::nothrow) U32[width * height]);
+                    if (!scratch)
+                    {
+                        LLError::LLUserWarningMsg::showOutOfMemory();
+                        LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
+                            << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
+                    }
+
+                    U32 pixel_count = (U32)(width * height);
+                    for (U32 i = 0; i < pixel_count; i++)
+                    {
+                        U8 lum = ((U8*)pixels)[i];
+
+                        U8* pix = (U8*)&scratch[i];
+                        pix[0] = pix[1] = pix[2] = lum;
+                        pix[3] = 255;
+                    }
 
-                    U8* pix = (U8*)&scratch[i];
-                    pix[0] = pix[1] = pix[2] = lum;
-                    pix[3] = 255;
+                    pixels = scratch.get();
                 }
+                pixformat = GL_RGBA;
+                intformat = GL_RGB8;
             }
-            pixformat = GL_RGBA;
-            intformat = GL_RGB8;
         }
     }
 
@@ -1326,6 +1371,14 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
     {
         switch (intformat)
         {
+        case GL_RED:
+        case GL_R8:
+            intformat = GL_COMPRESSED_RED;
+            break;
+        case GL_RG:
+        case GL_RG8:
+            intformat = GL_COMPRESSED_RG;
+            break;
         case GL_RGB:
         case GL_RGB8:
             intformat = GL_COMPRESSED_RGB;
@@ -1354,12 +1407,8 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
         case GL_ALPHA8:
             intformat = GL_COMPRESSED_ALPHA;
             break;
-        case GL_RED:
-        case GL_R8:
-            intformat = GL_COMPRESSED_RED;
-            break;
         default:
-            LL_WARNS() << "Could not compress format: " << std::hex << intformat << LL_ENDL;
+            LL_WARNS() << "Could not compress format: " << std::hex << intformat << std::dec << LL_ENDL;
             break;
         }
     }
@@ -1375,7 +1424,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
         if (!use_sub_image)
         {
             LL_PROFILE_ZONE_NAMED("glTexImage2D alloc + copy");
-            glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, use_scratch ? scratch : pixels);
+            glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, pixels);
         }
         else
         {
@@ -1385,7 +1434,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
                 glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, nullptr);
             }
 
-            U8* src = (U8*)(use_scratch ? scratch : pixels);
+            U8* src = (U8*)(pixels);
             if (src)
             {
                 LL_PROFILE_ZONE_NAMED("glTexImage2D copy");
@@ -1395,11 +1444,6 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
         alloc_tex_image(width, height, intformat, 1);
     }
     stop_glerror();
-
-    if (use_scratch)
-    {
-        delete[] scratch;
-    }
 }
 
 //create an empty GL texture: just create a texture name
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 9a8d935b89..a8b94bd5b0 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -101,9 +101,9 @@ public:
     static bool create(LLPointer<LLImageGL>& dest, const LLImageRaw* imageraw, bool usemipmaps = true);
 
 public:
-    LLImageGL(bool usemipmaps = true);
-    LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps = true);
-    LLImageGL(const LLImageRaw* imageraw, bool usemipmaps = true);
+    LLImageGL(bool usemipmaps = true, bool allow_compression = true);
+    LLImageGL(U32 width, U32 height, U8 components, bool usemipmaps = true, bool allow_compression = true);
+    LLImageGL(const LLImageRaw* imageraw, bool usemipmaps = true, bool allow_compression = true);
 
     // For wrapping textures created via GL elsewhere with our API only. Use with caution.
     LLImageGL(LLGLuint mTexName, U32 components, LLGLenum target, LLGLint  formatInternal, LLGLenum formatPrimary, LLGLenum formatType, LLTexUnit::eTextureAddressMode addressMode);
@@ -203,7 +203,7 @@ public:
 
     LLGLenum getTexTarget()const { return mTarget; }
 
-    void init(bool usemipmaps);
+    void init(bool usemipmaps, bool allow_compression);
     virtual void cleanup(); // Clean up the LLImageGL so it can be reinitialized.  Be careful when using this in derived class destructors
 
     void setNeedsAlphaAndPickMask(bool need_mask);
-- 
cgit v1.2.3


From 1743fe92d6c6ed2615d3336ab86062fbe845c1be Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Thu, 22 Aug 2024 09:11:28 -0700
Subject: secondlife/viewer#2391: Remove avatar rigging "callstack" logging

---
 indra/llappearance/llpolyskeletaldistortion.cpp |   6 -
 indra/llcharacter/lljoint.cpp                   |  13 --
 indra/llcommon/CMakeLists.txt                   |   2 -
 indra/llcommon/llcallstack.cpp                  | 188 ------------------------
 indra/llcommon/llcallstack.h                    |  91 ------------
 indra/newview/llspatialpartition.cpp            |   1 -
 indra/newview/llstartup.cpp                     |   1 -
 indra/newview/llviewerobject.cpp                |   3 -
 indra/newview/llviewerobjectlist.cpp            |   9 --
 indra/newview/llviewerregion.cpp                |   4 -
 indra/newview/llvoavatar.cpp                    |  18 ---
 indra/newview/llvoavatarself.cpp                |   1 -
 indra/newview/llvovolume.cpp                    |   2 -
 13 files changed, 339 deletions(-)
 delete mode 100644 indra/llcommon/llcallstack.cpp
 delete mode 100644 indra/llcommon/llcallstack.h

(limited to 'indra')

diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index 18c64282f1..7d62bb3a04 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -34,7 +34,6 @@
 #include "llpolymorph.h"
 #include "llwearable.h"
 #include "llfasttimer.h"
-#include "llcallstack.h"
 
 #include "llpolyskeletaldistortion.h"
 
@@ -204,11 +203,6 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
         // needed?
         // joint->storeScaleForReset( newScale );
 
-        // BENTO for detailed stack tracing of params.
-        std::stringstream ostr;
-        ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset;
-        LLScopedContextString str(ostr.str());
-
         joint->setScale(newScale, true);
     }
 
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index c2a10d969f..f31aa5d4c9 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -32,7 +32,6 @@
 #include "lljoint.h"
 
 #include "llmath.h"
-#include "llcallstack.h"
 #include <boost/algorithm/string.hpp>
 
 S32 LLJoint::sNumUpdates = 0;
@@ -342,7 +341,6 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
     {
         if (pos != active_override && do_debug_joint(getName()))
         {
-            LLScopedContextString str("setPosition");
             LL_DEBUGS("Avatar") << " joint " << getName() << " requested_pos " << requested_pos
                                 << " overriden by attachment " << active_override << LL_ENDL;
         }
@@ -350,12 +348,7 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
     }
     if ((pos != getPosition()) && do_debug_joint(getName()))
     {
-        LLScopedContextString str("setPosition");
-        LLCallStack cs;
-        LLContextStatus con_status;
         LL_DEBUGS("Avatar") << " joint " << getName() << " set pos " << pos << LL_ENDL;
-        LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << "====================" << LL_ENDL;
-        LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
     }
     if (pos != getPosition())
     {
@@ -879,7 +872,6 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
     {
         if (scale != active_override && do_debug_joint(getName()))
         {
-            LLScopedContextString str("setScale");
             LL_DEBUGS("Avatar") << " joint " << getName() << " requested_scale " << requested_scale
                                 << " overriden by attachment " << active_override << LL_ENDL;
         }
@@ -887,12 +879,7 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
     }
     if ((mXform.getScale() != scale) && do_debug_joint(getName()))
     {
-        LLScopedContextString str("setScale");
-        LLCallStack cs;
-        LLContextStatus con_status;
         LL_DEBUGS("Avatar") << " joint " << getName() << " set scale " << scale << LL_ENDL;
-        LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << LL_ENDL;
-        LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
     }
     mXform.setScale(scale);
     touch();
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index c4041f0c79..437b8d0168 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -26,7 +26,6 @@ set(llcommon_SOURCE_FILES
     llbase64.cpp
     llbitpack.cpp
     llcallbacklist.cpp
-    llcallstack.cpp
     llcleanup.cpp
     llcommon.cpp
     llcommonutils.cpp
@@ -134,7 +133,6 @@ set(llcommon_HEADER_FILES
     llbitpack.h
     llboost.h
     llcallbacklist.h
-    llcallstack.h
     llcleanup.h
     llcommon.h
     llcommonutils.h
diff --git a/indra/llcommon/llcallstack.cpp b/indra/llcommon/llcallstack.cpp
deleted file mode 100644
index c0be4f598e..0000000000
--- a/indra/llcommon/llcallstack.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * @file llcallstack.cpp
- * @brief run-time extraction of the current callstack
- *
- * $LicenseInfo:firstyear=2016&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2016, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-
-#include "llcommon.h"
-#include "llcallstack.h"
-#include "StackWalker.h"
-#include "llthreadlocalstorage.h"
-
-#if LL_WINDOWS
-class LLCallStackImpl: public StackWalker
-{
-public:
-    LLCallStackImpl():
-        StackWalker(false,0) // non-verbose, options = 0
-    {
-    }
-    ~LLCallStackImpl()
-    {
-    }
-    void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
-    {
-        m_stack.clear();
-        ShowCallstack(verbose);
-        // Skip the first few lines because they're just bookkeeping for LLCallStack,
-        // plus any additional lines requested to skip.
-        S32 first_line = skip_count + 3;
-        for (S32 i=first_line; i<m_stack.size(); ++i)
-        {
-            stack.push_back(m_stack[i]);
-        }
-    }
-protected:
-    virtual void OnOutput(LPCSTR szText)
-    {
-        m_stack.push_back(szText);
-    }
-    std::vector<std::string> m_stack;
-};
-#else
-// Stub - not implemented currently on other platforms.
-class LLCallStackImpl
-{
-public:
-    LLCallStackImpl() {}
-    ~LLCallStackImpl() {}
-    void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
-    {
-        stack.clear();
-    }
-};
-#endif
-
-LLCallStackImpl *LLCallStack::s_impl = NULL;
-
-LLCallStack::LLCallStack(S32 skip_count, bool verbose):
-    m_skipCount(skip_count),
-    m_verbose(verbose)
-{
-    if (!s_impl)
-    {
-        s_impl = new LLCallStackImpl;
-    }
-    LLTimer t;
-    s_impl->getStack(m_strings, m_skipCount, m_verbose);
-}
-
-bool LLCallStack::contains(const std::string& str)
-{
-    for (const std::string& src_str : m_strings)
-    {
-        if (src_str.find(str) != std::string::npos)
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack)
-{
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-    for (const std::string& str : call_stack.m_strings)
-    {
-        s << str;
-    }
-#else
-    s << "UNAVAILABLE IN RELEASE";
-#endif
-    return s;
-}
-
-LLContextStrings::LLContextStrings()
-{
-}
-
-// static
-LLContextStrings* LLContextStrings::getThreadLocalInstance()
-{
-    LLContextStrings *cons = LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
-    if (!cons)
-    {
-        LLThreadLocalSingletonPointer<LLContextStrings>::setInstance(new LLContextStrings);
-    }
-    return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
-}
-
-// static
-void LLContextStrings::addContextString(const std::string& str)
-{
-    LLContextStrings *cons = getThreadLocalInstance();
-    //LL_INFOS() << "CTX " << (S32)cons << " ADD " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
-    cons->m_contextStrings[str]++;
-}
-
-// static
-void LLContextStrings::removeContextString(const std::string& str)
-{
-    LLContextStrings *cons = getThreadLocalInstance();
-    cons->m_contextStrings[str]--;
-    //LL_INFOS() << "CTX " << (S32)cons << " REMOVE " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
-    if (cons->m_contextStrings[str] == 0)
-    {
-        cons->m_contextStrings.erase(str);
-    }
-}
-
-// static
-bool LLContextStrings::contains(const std::string& str)
-{
-    const std::map<std::string,S32>& strings =
-        LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
-    for (const std::map<std::string,S32>::value_type& str_pair : strings)
-    {
-        if (str_pair.first.find(str) != std::string::npos)
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-// static
-void LLContextStrings::output(std::ostream& os)
-{
-    const std::map<std::string,S32>& strings =
-        LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
-    for (const std::map<std::string,S32>::value_type& str_pair : strings)
-    {
-        os << str_pair.first << "[" << str_pair.second << "]" << "\n";
-    }
-}
-
-// static
-std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status)
-{
-    LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->output(s);
-    return s;
-}
-
-bool LLContextStatus::contains(const std::string& str)
-{
-    return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->contains(str);
-}
diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
deleted file mode 100644
index 33f2b507b8..0000000000
--- a/indra/llcommon/llcallstack.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * @file llcallstack.h
- * @brief run-time extraction of the current callstack
- *
- * $LicenseInfo:firstyear=2016&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2016, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include <map>
-
-class LLCallStackImpl;
-
-class LLCallStack
-{
-public:
-    LLCallStack(S32 skip_count=0, bool verbose=false);
-    std::vector<std::string> m_strings;
-    bool m_verbose;
-    bool contains(const std::string& str);
-private:
-    static LLCallStackImpl *s_impl;
-    S32 m_skipCount;
-};
-
-LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack);
-
-class LLContextStrings
-{
-public:
-    LLContextStrings();
-    static void addContextString(const std::string& str);
-    static void removeContextString(const std::string& str);
-    static void output(std::ostream& os);
-    static LLContextStrings* getThreadLocalInstance();
-    static bool contains(const std::string& str);
-private:
-    std::map<std::string,S32> m_contextStrings;
-};
-
-class LLScopedContextString
-{
-public:
-    LLScopedContextString(const std::string& str):
-        m_str(str)
-    {
-        LLContextStrings::addContextString(m_str);
-    }
-    ~LLScopedContextString()
-    {
-        LLContextStrings::removeContextString(m_str);
-    }
-private:
-    std::string m_str;
-};
-
-// Mostly exists as a class to hook an ostream override to.
-struct LLContextStatus
-{
-    bool contains(const std::string& str);
-};
-
-LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
-
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-#define dumpStack(tag)                          \
-    LL_DEBUGS(tag) << "STACK:\n"                \
-                   << "====================\n"  \
-                   << LLCallStack()             \
-                   << "===================="    \
-                   << LL_ENDL;
-#else
-#define dumpStack(tag)
-#endif
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 8ae6073a53..c2cce8c5ec 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -29,7 +29,6 @@
 #include "llspatialpartition.h"
 
 #include "llappviewer.h"
-#include "llcallstack.h"
 #include "lltexturecache.h"
 #include "lltexturefetch.h"
 #include "llimageworker.h"
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 7cefa21125..b32b80331a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -28,7 +28,6 @@
 
 #include "llappviewer.h"
 #include "llstartup.h"
-#include "llcallstack.h"
 
 #if LL_WINDOWS
 #   include <process.h>     // _spawnl()
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a2abd1d930..5d33db591a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -103,7 +103,6 @@
 #include "llfloaterperms.h"
 #include "llvocache.h"
 #include "llcleanup.h"
-#include "llcallstack.h"
 #include "llmeshrepository.h"
 #include "llgltfmateriallist.h"
 #include "llgl.h"
@@ -151,7 +150,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
 {
     LL_PROFILE_ZONE_SCOPED;
     LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *res = NULL;
 
@@ -1165,7 +1163,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
     LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
 
     LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     // The new OBJECTDATA_FIELD_SIZE_124, OBJECTDATA_FIELD_SIZE_140, OBJECTDATA_FIELD_SIZE_80
     // and OBJECTDATA_FIELD_SIZE_64 lengths should be supported in the existing cases below.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 435bd60917..9e1d86faac 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -68,7 +68,6 @@
 #include "u64.h"
 #include "llviewertexturelist.h"
 #include "lldatapacker.h"
-#include "llcallstack.h"
 #ifdef LL_USESYSTEMLIBS
 #include <zlib.h>
 #else
@@ -245,7 +244,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
     // ignore returned flags
     LL_DEBUGS("ObjectUpdate") << "uuid " << objectp->mID << " calling processUpdateMessage "
                               << objectp << " just_created " << just_created << " from_cache " << from_cache << " msg " << msg << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
 
@@ -362,7 +360,6 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
         objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
 
         LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " created objectp " << objectp << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         if (!objectp)
         {
@@ -557,7 +554,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
         LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " objectp " << objectp
                                      << " update_cache " << (S32) update_cache << " compressed " << compressed
                                      << " update_type "  << update_type << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         if(update_cache)
         {
@@ -635,7 +631,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
             objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
 
             LL_DEBUGS("ObjectUpdate") << "creating object " << fullid << " result " << objectp << LL_ENDL;
-            dumpStack("ObjectUpdateStack");
 
             if (!objectp)
             {
@@ -729,7 +724,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
         mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
 
         LL_DEBUGS("ObjectUpdate") << "got probe for id " << id << " crc " << crc << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         // Lookup data packer and add this id to cache miss lists if necessary.
         U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@@ -1305,7 +1299,6 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
     // Remove from object map so noone can look it up.
 
     LL_DEBUGS("ObjectUpdate") << " dereferencing id " << objectp->mID << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     mUUIDObjectMap.erase(objectp->mID);
 
@@ -1857,7 +1850,6 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
     llassert_always(uuid.notNull());
 
     LL_DEBUGS("ObjectUpdate") << "creating " << uuid << " local_id " << local_id << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp);
     if (!objectp)
@@ -1893,7 +1885,6 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
     }
 
     LL_DEBUGS("ObjectUpdate") << "createObject creating " << fullid << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
     if (!objectp)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index ac64c47abe..115db57a06 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -81,7 +81,6 @@
 #include "llcoros.h"
 #include "lleventcoro.h"
 #include "llcorehttputil.h"
-#include "llcallstack.h"
 #include "llsettingsdaycycle.h"
 
 #include <boost/regex.hpp>
@@ -2716,7 +2715,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
         if (entry->getCRC() == crc)
         {
             LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL;
-            dumpStack("AnimatedObjectsStack");
 
             // Record a hit
             entry->recordDupe();
@@ -2725,7 +2723,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
         else //CRC changed
         {
             LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL;
-            dumpStack("AnimatedObjectsStack");
 
             // Update the cache entry
             entry->updateEntry(crc, dp);
@@ -2738,7 +2735,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
     else
     {
         LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL;
-        dumpStack("AnimatedObjectsStack");
 
         // we haven't seen this object before
         // Create new entry and add to map
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 09375a6930..e638e5b8c3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -109,7 +109,6 @@
 #include "llsdutil.h"
 #include "llscenemonitor.h"
 #include "llsdserialize.h"
-#include "llcallstack.h"
 #include "llrendersphere.h"
 #include "llskinningutil.h"
 
@@ -2666,8 +2665,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
         mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
     }
 
-    LLScopedContextString str("avatar_idle_update " + getFullname());
-
     checkTextureLoading() ;
 
     // force immediate pixel area update on avatars using last frames data (before drawable or camera updates)
@@ -4689,10 +4686,6 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
         is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects
     }
 
-    LLScopedContextString str("updateCharacter " + getFullname() + " is_control_avatar "
-                              + boost::lexical_cast<std::string>(is_control_avatar)
-                              + " is_attachment " + boost::lexical_cast<std::string>(is_attachment));
-
     // For fading out the names above heads, only let the timer
     // run if we're visible.
     if (mDrawable.notNull() && !visible)
@@ -6358,8 +6351,6 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const
 
 void LLVOAvatar::clearAttachmentOverrides()
 {
-    LLScopedContextString str("clearAttachmentOverrides " + getFullname());
-
     for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
     {
         LLJoint *pJoint = getJoint(i);
@@ -6390,10 +6381,7 @@ void LLVOAvatar::clearAttachmentOverrides()
 //-----------------------------------------------------------------------------
 void LLVOAvatar::rebuildAttachmentOverrides()
 {
-    LLScopedContextString str("rebuildAttachmentOverrides " + getFullname());
-
     LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     clearAttachmentOverrides();
 
@@ -6441,10 +6429,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
 // -----------------------------------------------------------------------------
 void LLVOAvatar::updateAttachmentOverrides()
 {
-    LLScopedContextString str("updateAttachmentOverrides " + getFullname());
-
     LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     std::set<LLUUID> meshes_seen;
 
@@ -6573,15 +6558,12 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
         return;
     }
 
-    LLScopedContextString str("addAttachmentOverridesForObject " + getFullname());
-
     if (getOverallAppearance() != AOA_NORMAL)
     {
         return;
     }
 
     LL_DEBUGS("AnimatedObjects") << "adding" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     // Process all children
     if (recursive)
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 00a7325db2..49859bb585 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -59,7 +59,6 @@
 #include "llsdutil.h"
 #include "llstartup.h"
 #include "llsdserialize.h"
-#include "llcallstack.h"
 #include "llcorehttputil.h"
 #include "lluiusage.h"
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 65ed34d1ff..dcaf85b894 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -85,7 +85,6 @@
 #include "llanimationstates.h"
 #include "llinventorytype.h"
 #include "llviewerinventory.h"
-#include "llcallstack.h"
 #include "llsculptidsize.h"
 #include "llavatarappearancedefines.h"
 #include "llgltfmateriallist.h"
@@ -357,7 +356,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
         sculpt_type = sculpt_params->getSculptType();
 
         LL_DEBUGS("ObjectUpdate") << "uuid " << mID << " set sculpt_id " << sculpt_id << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
     }
 
     if (!dp)
-- 
cgit v1.2.3


From 1cc1872c76de0d5f5d6c04c4b510367f9f002d97 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 22 Aug 2024 15:59:15 +0200
Subject: #2393 BugSplat Crash #1504586: LLRenderTarget::getTexture(483)

---
 indra/llrender/llrendertarget.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index f700201ace..21a0820d32 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -475,12 +475,10 @@ void LLRenderTarget::clear(U32 mask_in)
 
 U32 LLRenderTarget::getTexture(U32 attachment) const
 {
-    if (attachment > mTex.size()-1)
-    {
-        LL_ERRS() << "Invalid attachment index." << LL_ENDL;
-    }
-    if (mTex.empty())
+    if (attachment >= mTex.size())
     {
+        LL_WARNS() << "Invalid attachment index " << attachment << " for size " << mTex.size() << LL_ENDL;
+        llassert(false);
         return 0;
     }
     return mTex[attachment];
-- 
cgit v1.2.3


From 9b0010b5d5a00eb59b71487701b98b50992f8a8e Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Thu, 22 Aug 2024 10:56:20 -0700
Subject: Incremented viewer version after release/2024.08-DeltaFPS branch
 creation (#2369)

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 346a7e3aa1..e0eaaa0bbc 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.1.10
+7.1.11
-- 
cgit v1.2.3


From 2c4fe4ff454490454d0bb71c1e5359747524048a Mon Sep 17 00:00:00 2001
From: cosmic-linden <111533034+cosmic-linden@users.noreply.github.com>
Date: Thu, 22 Aug 2024 11:45:14 -0700
Subject: secondlife/viewer#2349: Avatar/animesh rendering correctness pass
 (#2364)

* secondlife/viewer#2349: Blinn-Phong avatar/animesh rendering optimization/correctness pass
* secondlife/viewer#2349: General avatar/animesh rendering optimization/correctness pass
---
 indra/newview/lldrawpool.cpp          | 162 ++++++++++++++++++++++------------
 indra/newview/lldrawpool.h            |   7 +-
 indra/newview/lldrawpoolalpha.cpp     |  91 +++++--------------
 indra/newview/lldrawpoolalpha.h       |   1 -
 indra/newview/lldrawpoolbump.cpp      |  29 +++---
 indra/newview/lldrawpoolmaterials.cpp |  22 ++---
 indra/newview/llspatialpartition.cpp  |  13 +--
 indra/newview/pipeline.cpp            |  18 ++--
 8 files changed, 164 insertions(+), 179 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 739975eab4..7bd5206453 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -407,22 +407,19 @@ void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, bool textu
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
     LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
     {
         LLDrawInfo* pparams = *k;
         if (pparams)
         {
-            if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)
+            if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
             {
-                uploadMatrixPalette(*pparams);
-                lastAvatar = pparams->mAvatar;
-                lastMeshId = pparams->mSkinInfo->mHash;
+                pushBatch(*pparams, texture);
             }
-
-            pushBatch(*pparams, texture);
         }
     }
 }
@@ -468,8 +465,9 @@ void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures
 
     if (texture)
     {
-        LLVOAvatar* lastAvatar = nullptr;
+        const LLVOAvatar* lastAvatar = nullptr;
         U64 lastMeshId = 0;
+        bool skipLastSkin = false;
         auto* begin = gPipeline.beginRenderMap(type);
         auto* end = gPipeline.endRenderMap(type);
         for (LLCullResult::drawinfo_iterator i = begin; i != end; )
@@ -477,14 +475,10 @@ void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures
             LLDrawInfo* pparams = *i;
             LLCullResult::increment_iterator(i, end);
 
-            if (pparams->mAvatar.notNull() && (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash))
+            if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
             {
-                uploadMatrixPalette(*pparams);
-                lastAvatar = pparams->mAvatar;
-                lastMeshId = pparams->mSkinInfo->mHash;
+                pushBatch(*pparams, texture, batch_textures);
             }
-
-            pushBatch(*pparams, texture, batch_textures);
         }
     }
     else
@@ -496,8 +490,9 @@ void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures
 void LLRenderPass::pushUntexturedRiggedBatches(U32 type)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
     auto* begin = gPipeline.beginRenderMap(type);
     auto* end = gPipeline.endRenderMap(type);
     for (LLCullResult::drawinfo_iterator i = begin; i != end; )
@@ -505,14 +500,10 @@ void LLRenderPass::pushUntexturedRiggedBatches(U32 type)
         LLDrawInfo* pparams = *i;
         LLCullResult::increment_iterator(i, end);
 
-        if (pparams->mAvatar.notNull() && (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash))
+        if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
         {
-            uploadMatrixPalette(*pparams);
-            lastAvatar = pparams->mAvatar;
-            lastMeshId = pparams->mSkinInfo->mHash;
+            pushUntexturedBatch(*pparams);
         }
-
-        pushUntexturedBatch(*pparams);
     }
 }
 
@@ -533,8 +524,9 @@ void LLRenderPass::pushMaskBatches(U32 type, bool texture, bool batch_textures)
 void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_textures)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
     auto* begin = gPipeline.beginRenderMap(type);
     auto* end = gPipeline.endRenderMap(type);
     for (LLCullResult::drawinfo_iterator i = begin; i != end; )
@@ -545,23 +537,12 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_text
 
         llassert(pparams);
 
-        if (LLGLSLShader::sCurBoundShaderPtr)
-        {
-            LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff);
-        }
-        else
-        {
-            gGL.flush();
-        }
+        LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff);
 
-        if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)
+        if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
         {
-            uploadMatrixPalette(*pparams);
-            lastAvatar = pparams->mAvatar;
-            lastMeshId = pparams->mSkinInfo->mHash;
+            pushBatch(*pparams, texture, batch_textures);
         }
-
-        pushBatch(*pparams, texture, batch_textures);
     }
 }
 
@@ -667,6 +648,8 @@ bool LLRenderPass::uploadMatrixPalette(LLDrawInfo& params)
 //static
 bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
+
     if (!avatar)
     {
         return false;
@@ -688,6 +671,81 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI
     return true;
 }
 
+// Returns true if rendering should proceed
+//static
+bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin)
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
+
+    llassert(skinInfo);
+    llassert(LLGLSLShader::sCurBoundShaderPtr);
+
+    if (!avatar)
+    {
+        return false;
+    }
+
+    if (avatar == lastAvatar && skinInfo->mHash == lastMeshId)
+    {
+        return !skipLastSkin;
+    }
+
+    const LLVOAvatar::MatrixPaletteCache& mpc = avatar->updateSkinInfoMatrixPalette(skinInfo);
+    U32 count = static_cast<U32>(mpc.mMatrixPalette.size());
+    // skipLastSkin -> skin info not loaded yet, don't render
+    skipLastSkin = !bool(count);
+    lastAvatar = avatar;
+    lastMeshId = skinInfo->mHash;
+
+    if (!skipLastSkin)
+    {
+        LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
+            count,
+            false,
+            (GLfloat*)&(mpc.mGLMp[0]));
+    }
+
+    return !skipLastSkin;
+}
+
+// Returns true if rendering should proceed
+//static
+bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo, const LLVOAvatar*& lastAvatar, U64& lastMeshId, const LLGLSLShader*& lastAvatarShader, bool& skipLastSkin)
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
+
+    llassert(skinInfo);
+    llassert(LLGLSLShader::sCurBoundShaderPtr);
+
+    if (!avatar)
+    {
+        return false;
+    }
+
+    if (avatar == lastAvatar && skinInfo->mHash == lastMeshId && lastAvatarShader == LLGLSLShader::sCurBoundShaderPtr)
+    {
+        return !skipLastSkin;
+    }
+
+    const LLVOAvatar::MatrixPaletteCache& mpc = avatar->updateSkinInfoMatrixPalette(skinInfo);
+    U32 count = static_cast<U32>(mpc.mMatrixPalette.size());
+    // skipLastSkin -> skin info not loaded yet, don't render
+    skipLastSkin = !bool(count);
+    lastAvatar = avatar;
+    lastMeshId = skinInfo->mHash;
+    lastAvatarShader = LLGLSLShader::sCurBoundShaderPtr;
+
+    if (!skipLastSkin)
+    {
+        LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
+            count,
+            false,
+            (GLfloat*)&(mpc.mGLMp[0]));
+    }
+
+    return !skipLastSkin;
+}
+
 void setup_texture_matrix(LLDrawInfo& params)
 {
     if (params.mTextureMatrix)
@@ -717,7 +775,7 @@ void LLRenderPass::pushGLTFBatches(U32 type, bool textured)
     }
     else
     {
-        pushRiggedGLTFBatches(type);
+        pushUntexturedGLTFBatches(type);
     }
 }
 
@@ -801,8 +859,9 @@ void LLRenderPass::pushRiggedGLTFBatches(U32 type, bool textured)
 void LLRenderPass::pushRiggedGLTFBatches(U32 type)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     auto* begin = gPipeline.beginRenderMap(type);
     auto* end = gPipeline.endRenderMap(type);
@@ -812,15 +871,16 @@ void LLRenderPass::pushRiggedGLTFBatches(U32 type)
         LLDrawInfo& params = **i;
         LLCullResult::increment_iterator(i, end);
 
-        pushRiggedGLTFBatch(params, lastAvatar, lastMeshId);
+        pushRiggedGLTFBatch(params, lastAvatar, lastMeshId, skipLastSkin);
     }
 }
 
 void LLRenderPass::pushUntexturedRiggedGLTFBatches(U32 type)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     auto* begin = gPipeline.beginRenderMap(type);
     auto* end = gPipeline.endRenderMap(type);
@@ -830,34 +890,26 @@ void LLRenderPass::pushUntexturedRiggedGLTFBatches(U32 type)
         LLDrawInfo& params = **i;
         LLCullResult::increment_iterator(i, end);
 
-        pushUntexturedRiggedGLTFBatch(params, lastAvatar, lastMeshId);
+        pushUntexturedRiggedGLTFBatch(params, lastAvatar, lastMeshId, skipLastSkin);
     }
 }
 
 
 // static
-void LLRenderPass::pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId)
+void LLRenderPass::pushRiggedGLTFBatch(LLDrawInfo& params, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin)
 {
-    if (params.mAvatar.notNull() && (lastAvatar != params.mAvatar || lastMeshId != params.mSkinInfo->mHash))
+    if (uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
     {
-        uploadMatrixPalette(params);
-        lastAvatar = params.mAvatar;
-        lastMeshId = params.mSkinInfo->mHash;
+        pushGLTFBatch(params);
     }
-
-    pushGLTFBatch(params);
 }
 
 // static
-void LLRenderPass::pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId)
+void LLRenderPass::pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin)
 {
-    if (params.mAvatar.notNull() && (lastAvatar != params.mAvatar || lastMeshId != params.mSkinInfo->mHash))
+    if (uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
     {
-        uploadMatrixPalette(params);
-        lastAvatar = params.mAvatar;
-        lastMeshId = params.mSkinInfo->mHash;
+        pushUntexturedGLTFBatch(params);
     }
-
-    pushUntexturedGLTFBatch(params);
 }
 
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 01a29f71a0..bc412214c7 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -38,6 +38,7 @@ class LLViewerFetchedTexture;
 class LLSpatialGroup;
 class LLDrawInfo;
 class LLVOAvatar;
+class LLGLSLShader;
 class LLMeshSkinInfo;
 
 class LLDrawPool
@@ -375,9 +376,9 @@ public:
 
     // push a single GLTF draw call
     static void pushGLTFBatch(LLDrawInfo& params);
-    static void pushRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
+    static void pushRiggedGLTFBatch(LLDrawInfo& params, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin);
     static void pushUntexturedGLTFBatch(LLDrawInfo& params);
-    static void pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, LLVOAvatar*& lastAvatar, U64& lastMeshId);
+    static void pushUntexturedRiggedGLTFBatch(LLDrawInfo& params, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin);
 
     void pushMaskBatches(U32 type, bool texture = true, bool batch_textures = false);
     void pushRiggedMaskBatches(U32 type, bool texture = true, bool batch_textures = false);
@@ -386,6 +387,8 @@ public:
     void pushBumpBatch(LLDrawInfo& params, bool texture, bool batch_textures = false);
     static bool uploadMatrixPalette(LLDrawInfo& params);
     static bool uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo);
+    static bool uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo, const LLVOAvatar*& lastAvatar, U64& lastMeshId, bool& skipLastSkin);
+    static bool uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo, const LLVOAvatar*& lastAvatar, U64& lastMeshId, const LLGLSLShader*& lastAvatarShader, bool& skipLastSkin);
     virtual void renderGroup(LLSpatialGroup* group, U32 type, bool texture = true);
     virtual void renderRiggedGroup(LLSpatialGroup* group, U32 type, bool texture = true);
 };
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index cb1439b403..b4d14e22f3 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -327,8 +327,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight()
 {
     for (int pass = 0; pass < 2; ++pass)
     { //two passes, one rigged and one not
-        LLVOAvatar* lastAvatar = nullptr;
+        const LLVOAvatar* lastAvatar = nullptr;
         U64 lastMeshId = 0;
+        bool skipLastSkin = false;
 
         LLCullResult::sg_iterator begin = pass == 0 ? gPipeline.beginAlphaGroups() : gPipeline.beginRiggedAlphaGroups();
         LLCullResult::sg_iterator end = pass == 0 ? gPipeline.endAlphaGroups() : gPipeline.endRiggedAlphaGroups();
@@ -347,22 +348,16 @@ void LLDrawPoolAlpha::renderAlphaHighlight()
 
                     bool rigged = (params.mAvatar != nullptr);
                     gHighlightProgram.bind(rigged);
-                    gGL.diffuseColor4f(1, 0, 0, 1);
 
                     if (rigged)
                     {
-                        if (lastAvatar != params.mAvatar ||
-                            lastMeshId != params.mSkinInfo->mHash)
-                        {
-                            if (!uploadMatrixPalette(params))
-                            {
-                                continue;
-                            }
-                            lastAvatar = params.mAvatar;
-                            lastMeshId = params.mSkinInfo->mHash;
+                        if (!uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
+                        { // failed to upload matrix palette, skip rendering
+                            continue;
                         }
                     }
 
+                    gGL.diffuseColor4f(1, 0, 0, 1);
                     LLRenderPass::applyModelMatrix(params);
                     params.mVertexBuffer->setBuffer();
                     params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
@@ -526,25 +521,20 @@ void LLDrawPoolAlpha::renderRiggedEmissives(std::vector<LLDrawInfo*>& emissives)
     shader->bind();
     shader->uniform1f(LLShaderMgr::EMISSIVE_BRIGHTNESS, 1.f);
 
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     for (LLDrawInfo* draw : emissives)
     {
         LL_PROFILE_ZONE_NAMED_CATEGORY_DRAWPOOL("Emissives");
 
-        bool tex_setup = TexSetup(draw, false);
-        if (lastAvatar != draw->mAvatar || lastMeshId != draw->mSkinInfo->mHash)
+        if (uploadMatrixPalette(draw->mAvatar, draw->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
         {
-            if (!uploadMatrixPalette(*draw))
-            { // failed to upload matrix palette, skip rendering
-                continue;
-            }
-            lastAvatar = draw->mAvatar;
-            lastMeshId = draw->mSkinInfo->mHash;
+            bool tex_setup = TexSetup(draw, false);
+            drawEmissive(draw);
+            RestoreTexSetup(tex_setup);
         }
-        drawEmissive(draw);
-        RestoreTexSetup(tex_setup);
     }
 }
 
@@ -553,19 +543,15 @@ void LLDrawPoolAlpha::renderRiggedPbrEmissives(std::vector<LLDrawInfo*>& emissiv
     LLGLDepthTest depth(GL_TRUE, GL_FALSE); //disable depth writes since "emissive" is additive so sorting doesn't matter
     pbr_emissive_shader->bind(true);
 
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     for (LLDrawInfo* draw : emissives)
     {
-        if (lastAvatar != draw->mAvatar || lastMeshId != draw->mSkinInfo->mHash)
-        {
-            if (!uploadMatrixPalette(*draw))
-            { // failed to upload matrix palette, skip rendering
-                continue;
-            }
-            lastAvatar = draw->mAvatar;
-            lastMeshId = draw->mSkinInfo->mHash;
+        if (!uploadMatrixPalette(draw->mAvatar, draw->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
+        { // failed to upload matrix palette, skip rendering
+            continue;
         }
 
         LLGLDisable cull_face(draw->mGLTFMaterial->mDoubleSided ? GL_CULL_FACE : 0);
@@ -581,9 +567,10 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
     bool initialized_lighting = false;
     bool light_enabled = true;
 
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
-    LLGLSLShader* lastAvatarShader = nullptr;
+    const LLGLSLShader* lastAvatarShader = nullptr;
+    bool skipLastSkin = false;
 
     LLCullResult::sg_iterator begin;
     LLCullResult::sg_iterator end;
@@ -776,20 +763,9 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
                     }
                 }
 
-                if (params.mAvatar != nullptr)
+                if (params.mAvatar && !uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, lastAvatarShader, skipLastSkin))
                 {
-                    if (lastAvatar != params.mAvatar ||
-                        lastMeshId != params.mSkinInfo->mHash ||
-                        lastAvatarShader != LLGLSLShader::sCurBoundShaderPtr)
-                    {
-                        if (!uploadMatrixPalette(params))
-                        {
-                            continue;
-                        }
-                        lastAvatar = params.mAvatar;
-                        lastMeshId = params.mSkinInfo->mHash;
-                        lastAvatarShader = LLGLSLShader::sCurBoundShaderPtr;
-                    }
+                    continue;
                 }
 
                 bool tex_setup = TexSetup(&params, (mat != nullptr));
@@ -912,26 +888,3 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
         gPipeline.enableLightsDynamic();
     }
 }
-
-bool LLDrawPoolAlpha::uploadMatrixPalette(const LLDrawInfo& params)
-{
-    if (params.mAvatar.isNull())
-    {
-        return false;
-    }
-    const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar.get()->updateSkinInfoMatrixPalette(params.mSkinInfo);
-    U32 count = static_cast<U32>(mpc.mMatrixPalette.size());
-
-    if (count == 0)
-    {
-        //skin info not loaded yet, don't render
-        return false;
-    }
-
-    LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
-        count,
-        false,
-        (GLfloat*)&(mpc.mGLMp[0]));
-
-    return true;
-}
diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h
index 0abe001714..25044beda0 100644
--- a/indra/newview/lldrawpoolalpha.h
+++ b/indra/newview/lldrawpoolalpha.h
@@ -66,7 +66,6 @@ public:
     void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, bool texture = true);
     void renderAlpha(U32 mask, bool depth_only = false, bool rigged = false);
     void renderAlphaHighlight();
-    bool uploadMatrixPalette(const LLDrawInfo& params);
 
     static bool sShowDebugAlpha;
 
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 7289e95b6e..bf593bff07 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -558,8 +558,9 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
         LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
         LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
 
-        LLVOAvatar* avatar = nullptr;
-        U64 skin = 0;
+        const LLVOAvatar* lastAvatar = nullptr;
+        U64 lastMeshId = 0;
+        bool skipLastSkin = false;
 
         for (LLCullResult::drawinfo_iterator i = begin; i != end; )
         {
@@ -572,13 +573,10 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
 
             if (rigged)
             {
-                if (avatar != params.mAvatar || skin != params.mSkinInfo->mHash)
+                if (uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
                 {
-                    uploadMatrixPalette(params);
-                    avatar = params.mAvatar;
-                    skin = params.mSkinInfo->mHash;
+                    pushBumpBatch(params, true, false);
                 }
-                pushBumpBatch(params, true, false);
             }
             else
             {
@@ -974,8 +972,9 @@ void LLBumpImageList::onSourceUpdated(LLViewerTexture* src, EBumpEffect bump_cod
 
 void LLDrawPoolBump::pushBumpBatches(U32 type)
 {
-    LLVOAvatar* avatar = nullptr;
-    U64 skin = 0;
+    const LLVOAvatar* lastAvatar = nullptr;
+    U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     if (mRigged)
     { // nudge type enum and include skinweights for rigged pass
@@ -993,17 +992,9 @@ void LLDrawPoolBump::pushBumpBatches(U32 type)
         {
             if (mRigged)
             {
-                if (avatar != params.mAvatar || skin != params.mSkinInfo->mHash)
+                if (!uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
                 {
-                    if (uploadMatrixPalette(params))
-                    {
-                        avatar = params.mAvatar;
-                        skin = params.mSkinInfo->mHash;
-                    }
-                    else
-                    {
-                        continue;
-                    }
+                    continue;
                 }
             }
             pushBumpBatch(params, false);
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index bbc93c2af9..e7ec2022d2 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -183,7 +183,9 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
         glUniform4fv(specular, 1, lastSpecular.mV);
     }
 
-    LLVOAvatar* lastAvatar = nullptr;
+    const LLVOAvatar* lastAvatar = nullptr;
+    U64 lastMeshId = 0;
+    bool skipLastSkin = false;
 
     for (LLCullResult::drawinfo_iterator i = begin; i != end; )
     {
@@ -245,23 +247,11 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
         }
 
         // upload matrix palette to shader
-        if (rigged && params.mAvatar.notNull())
+        if (rigged)
         {
-            if (params.mAvatar != lastAvatar)
+            if (!uploadMatrixPalette(params.mAvatar, params.mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
             {
-                const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar->updateSkinInfoMatrixPalette(params.mSkinInfo);
-                U32 count = static_cast<U32>(mpc.mMatrixPalette.size());
-
-                if (count == 0)
-                {
-                    //skin info not loaded yet, don't render
-                    return;
-                }
-
-                mShader->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX,
-                    count,
-                    false,
-                    (GLfloat*)&(mpc.mGLMp[0]));
+                continue;
             }
         }
 
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index c2cce8c5ec..e517d009f5 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1667,8 +1667,9 @@ void renderOctree(LLSpatialGroup* group)
             glLineWidth(1.f);
             gGL.flush();
 
-            LLVOAvatar* lastAvatar = nullptr;
+            const LLVOAvatar* lastAvatar = nullptr;
             U64 lastMeshId = 0;
+            bool skipLastSkin = false;
 
             for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
             {
@@ -1697,15 +1698,9 @@ void renderOctree(LLSpatialGroup* group)
                 {
                     gGL.pushMatrix();
                     gGL.loadMatrix(gGLModelView);
-                    if (lastAvatar != face->mAvatar ||
-                        lastMeshId != face->mSkinInfo->mHash)
+                    if (!LLRenderPass::uploadMatrixPalette(face->mAvatar, face->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
                     {
-                        if (!LLRenderPass::uploadMatrixPalette(face->mAvatar, face->mSkinInfo))
-                        {
-                            continue;
-                        }
-                        lastAvatar = face->mAvatar;
-                        lastMeshId = face->mSkinInfo->mHash;
+                        continue;
                     }
                 }
                 for (S32 j = 0; j < drawable->getNumFaces(); j++)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 98fdb68222..5bc880ea44 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6624,8 +6624,14 @@ void LLPipeline::renderAlphaObjects(bool rigged)
     S32 sun_up = LLEnvironment::instance().getIsSunUp() ? 1 : 0;
     U32 target_width = LLRenderTarget::sCurResX;
     U32 type = LLRenderPass::PASS_ALPHA;
-    LLVOAvatar* lastAvatar = nullptr;
+    // for gDeferredShadowAlphaMaskProgram
+    const LLVOAvatar* lastAvatar = nullptr;
     U64 lastMeshId = 0;
+    bool skipLastSkin;
+    // for gDeferredShadowGLTFAlphaBlendProgram
+    const LLVOAvatar* lastAvatarGLTF = nullptr;
+    U64 lastMeshIdGLTF = 0;
+    bool skipLastSkinGLTF;
     auto* begin = gPipeline.beginRenderMap(type);
     auto* end = gPipeline.endRenderMap(type);
 
@@ -6649,7 +6655,7 @@ void LLPipeline::renderAlphaObjects(bool rigged)
                 LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_up);
                 LLGLSLShader::sCurBoundShaderPtr->uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
                 LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(ALPHA_BLEND_CUTOFF);
-                LLRenderPass::pushRiggedGLTFBatch(*pparams, lastAvatar, lastMeshId);
+                LLRenderPass::pushRiggedGLTFBatch(*pparams, lastAvatarGLTF, lastMeshIdGLTF, skipLastSkinGLTF);
             }
             else
             {
@@ -6657,14 +6663,10 @@ void LLPipeline::renderAlphaObjects(bool rigged)
                 LLGLSLShader::sCurBoundShaderPtr->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_up);
                 LLGLSLShader::sCurBoundShaderPtr->uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
                 LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(ALPHA_BLEND_CUTOFF);
-                if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)
+                if (mSimplePool->uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin))
                 {
-                    mSimplePool->uploadMatrixPalette(*pparams);
-                    lastAvatar = pparams->mAvatar;
-                    lastMeshId = pparams->mSkinInfo->mHash;
+                    mSimplePool->pushBatch(*pparams, true, true);
                 }
-
-                mSimplePool->pushBatch(*pparams, true, true);
             }
         }
         else
-- 
cgit v1.2.3


From 45b2d69446a68f5b104bd61055214d17da920fae Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@lindenlab.com>
Date: Fri, 23 Aug 2024 11:50:20 -0700
Subject: Add dedicated sun probe shader and remove SSAO and shadow smoothing
 from probe generation passes (#2405)

* Add dedicated sun probe shader and remove SSAO and shadow smoothing from probe generation passes (#2398)

* Fix usage of removed sunLightNoFragCoordV in shader manager
---
 indra/newview/llviewershadermgr.cpp | 26 ++++++++++++++++++--------
 indra/newview/llviewershadermgr.h   |  1 +
 indra/newview/pipeline.cpp          | 14 ++++++++------
 3 files changed, 27 insertions(+), 14 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 073a1787d5..993e8742e0 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -158,6 +158,7 @@ LLGLSLShader            gDeferredMultiLightProgram[16];
 LLGLSLShader            gDeferredSpotLightProgram;
 LLGLSLShader            gDeferredMultiSpotLightProgram;
 LLGLSLShader            gDeferredSunProgram;
+LLGLSLShader            gDeferredSunProbeProgram;
 LLGLSLShader            gHazeProgram;
 LLGLSLShader            gHazeWaterProgram;
 LLGLSLShader            gDeferredBlurLightProgram;
@@ -400,6 +401,7 @@ void LLViewerShaderMgr::finalizeShaderList()
     mShaderList.push_back(&gObjectAlphaMaskNoColorProgram);
     mShaderList.push_back(&gUnderWaterProgram);
     mShaderList.push_back(&gDeferredSunProgram);
+    mShaderList.push_back(&gDeferredSunProbeProgram);
     mShaderList.push_back(&gHazeProgram);
     mShaderList.push_back(&gHazeWaterProgram);
     mShaderList.push_back(&gDeferredSoftenProgram);
@@ -1600,10 +1602,7 @@ bool LLViewerShaderMgr::loadShadersDeferred()
     if (success)
     {
         std::string fragment;
-        std::string vertex = "deferred/sunLightV.glsl";
-
         bool use_ao = gSavedSettings.getBOOL("RenderDeferredSSAO");
-
         if (use_ao)
         {
             fragment = "deferred/sunLightSSAOF.glsl";
@@ -1611,10 +1610,6 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         else
         {
             fragment = "deferred/sunLightF.glsl";
-            if (mShaderLevel[SHADER_DEFERRED] == 1)
-            { //no shadows, no SSAO, no frag coord
-                vertex = "deferred/sunLightNoFragCoordV.glsl";
-            }
         }
 
         gDeferredSunProgram.mName = "Deferred Sun Shader";
@@ -1623,7 +1618,7 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         gDeferredSunProgram.mFeatures.hasAmbientOcclusion = use_ao;
 
         gDeferredSunProgram.mShaderFiles.clear();
-        gDeferredSunProgram.mShaderFiles.push_back(make_pair(vertex, GL_VERTEX_SHADER));
+        gDeferredSunProgram.mShaderFiles.push_back(make_pair("deferred/sunLightV.glsl", GL_VERTEX_SHADER));
         gDeferredSunProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER));
         gDeferredSunProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
 
@@ -1631,6 +1626,21 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         llassert(success);
     }
 
+    if (success)
+    {
+        gDeferredSunProbeProgram.mName = "Deferred Sun Probe Shader";
+        gDeferredSunProbeProgram.mFeatures.isDeferred = true;
+        gDeferredSunProbeProgram.mFeatures.hasShadows = true;
+
+        gDeferredSunProbeProgram.mShaderFiles.clear();
+        gDeferredSunProbeProgram.mShaderFiles.push_back(make_pair("deferred/sunLightV.glsl", GL_VERTEX_SHADER));
+        gDeferredSunProbeProgram.mShaderFiles.push_back(make_pair("deferred/sunLightF.glsl", GL_FRAGMENT_SHADER));
+        gDeferredSunProbeProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+
+        success = gDeferredSunProbeProgram.createShader();
+        llassert(success);
+    }
+
     if (success)
     {
         gDeferredBlurLightProgram.mName = "Deferred Blur Light Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index af47014a43..59b613b7ea 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -230,6 +230,7 @@ extern LLGLSLShader         gDeferredMultiLightProgram[LL_DEFERRED_MULTI_LIGHT_C
 extern LLGLSLShader         gDeferredSpotLightProgram;
 extern LLGLSLShader         gDeferredMultiSpotLightProgram;
 extern LLGLSLShader         gDeferredSunProgram;
+extern LLGLSLShader         gDeferredSunProbeProgram;
 extern LLGLSLShader         gHazeProgram;
 extern LLGLSLShader         gHazeWaterProgram;
 extern LLGLSLShader         gDeferredBlurLightProgram;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5bc880ea44..57cabcd18f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7930,13 +7930,15 @@ void LLPipeline::renderDeferredLighting()
         mat.mult_matrix_vec(tc_moon);
         mTransformedMoonDir.set(tc_moon.v);
 
-        if (RenderDeferredSSAO || RenderShadowDetail > 0)
+        if ((RenderDeferredSSAO && !gCubeSnapshot) || RenderShadowDetail > 0)
         {
             LL_PROFILE_GPU_ZONE("sun program");
             deferred_light_target->bindTarget();
             {  // paint shadow/SSAO light map (direct lighting lightmap)
                 LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - sun shadow");
-                bindDeferredShader(gDeferredSunProgram, deferred_light_target);
+
+                LLGLSLShader& sun_shader = gCubeSnapshot ? gDeferredSunProbeProgram : gDeferredSunProgram;
+                bindDeferredShader(sun_shader, deferred_light_target);
                 mScreenTriangleVB->setBuffer();
                 glClearColor(1, 1, 1, 1);
                 deferred_light_target->clear(GL_COLOR_BUFFER_BIT);
@@ -7961,8 +7963,8 @@ void LLPipeline::renderDeferredLighting()
                     }
                 }
 
-                gDeferredSunProgram.uniform3fv(sOffset, slice, offset);
-                gDeferredSunProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
+                sun_shader.uniform3fv(sOffset, slice, offset);
+                sun_shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES,
                                               (GLfloat)deferred_light_target->getWidth(),
                                               (GLfloat)deferred_light_target->getHeight());
 
@@ -7972,12 +7974,12 @@ void LLPipeline::renderDeferredLighting()
                     mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
                 }
 
-                unbindDeferredShader(gDeferredSunProgram);
+                unbindDeferredShader(sun_shader);
             }
             deferred_light_target->flush();
         }
 
-        if (RenderDeferredSSAO)
+        if (RenderDeferredSSAO && !gCubeSnapshot)
         {
             // soften direct lighting lightmap
             LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("renderDeferredLighting - soften shadow");
-- 
cgit v1.2.3


From 0edf6e230e4580fc61917bc823f82d983d807ccf Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 23 Aug 2024 16:35:52 -0500
Subject: #2388 Texture downrezzing tune up. (#2414)

- Hold onto unreferenced textures for 30 seconds.
- Don't downres unless memory is low
- Downres when viewer is backgrounded.
---
 indra/newview/llface.cpp              |  7 -----
 indra/newview/llviewertexture.cpp     | 32 ++++++++++++++++++++-
 indra/newview/llviewertexture.h       | 11 +++----
 indra/newview/llviewertexturelist.cpp | 54 ++++++++++++++++++++++++++++-------
 4 files changed, 78 insertions(+), 26 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4dec4d5641..c69d74ad1b 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2212,13 +2212,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
 
     F32 dist = lookAt.getLength3().getF32();
     dist = llmax(dist-size.getLength3().getF32(), 0.001f);
-    //ramp down distance for nearby objects
-    if (dist < 16.f)
-    {
-        dist /= 16.f;
-        dist *= dist;
-        dist *= 16.f;
-    }
 
     lookAt.normalize3fast() ;
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index eab564a856..452d6f2c04 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -548,7 +548,37 @@ void LLViewerTexture::updateClass()
 
     was_low = is_low;
 
-    sDesiredDiscardBias = llclamp(sDesiredDiscardBias, 1.f, 3.f);
+
+    // set to max discard bias if the window has been backgrounded for a while
+    static bool was_backgrounded = false;
+    static LLFrameTimer backgrounded_timer;
+
+    bool in_background = (gViewerWindow && !gViewerWindow->getWindow()->getVisible()) || !gFocusMgr.getAppHasFocus();
+
+    if (in_background)
+    {
+        if (backgrounded_timer.getElapsedTimeF32() > 10.f)
+        {
+            if (!was_backgrounded)
+            {
+                LL_INFOS() << "Viewer is backgrounded, freeing up video memory." << LL_ENDL;
+            }
+            was_backgrounded = true;
+            sDesiredDiscardBias = 4.f;
+        }
+    }
+    else
+    {
+        backgrounded_timer.reset();
+        if (was_backgrounded)
+        { // if the viewer was backgrounded
+            LL_INFOS() << "Viewer is no longer backgrounded, resuming normal texture usage." << LL_ENDL;
+            was_backgrounded = false;
+            sDesiredDiscardBias = 1.f;
+        }
+    }
+
+    sDesiredDiscardBias = llclamp(sDesiredDiscardBias, 1.f, 4.f);
 
     LLViewerTexture::sFreezeImageUpdates = false;
 }
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 9046daeab2..3866c898a6 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -146,6 +146,8 @@ public:
 
     virtual F32  getMaxVirtualSize() ;
 
+    LLFrameTimer* getLastReferencedTimer() { return &mLastReferencedTimer; }
+
     S32 getFullWidth() const { return mFullWidth; }
     S32 getFullHeight() const { return mFullHeight; }
     /*virtual*/ void setKnownDrawSize(S32 width, S32 height);
@@ -195,6 +197,7 @@ protected:
     mutable F32 mMaxVirtualSize = 0.f;  // The largest virtual size of the image, in pixels - how much data to we need?
     mutable S32  mMaxVirtualSizeResetCounter;
     mutable S32  mMaxVirtualSizeResetInterval;
+    LLFrameTimer mLastReferencedTimer;
 
     ll_face_list_t    mFaceList[LLRender::NUM_TEXTURE_CHANNELS]; //reverse pointer pointing to the faces using this image as texture
     U32               mNumFaces[LLRender::NUM_TEXTURE_CHANNELS];
@@ -571,10 +574,7 @@ public:
     /*virtual*/ void addFace(U32 ch, LLFace* facep) ;
     /*virtual*/ void removeFace(U32 ch, LLFace* facep) ;
 
-    /*virtual*/ F32  getMaxVirtualSize() ;
-
-    // get the timer that tracks the last time reinit was called
-    LLFrameTimer* getLastReferencedTimer() { return &mLastReferencedTimer; }
+    /*virtual*/ F32  getMaxVirtualSize();
 
 private:
     void switchTexture(U32 ch, LLFace* facep) ;
@@ -596,9 +596,6 @@ private:
     bool mIsPlaying ;
     U32  mUpdateVirtualSizeTime ;
 
-    // tracks last time reinit was called
-    LLFrameTimer mLastReferencedTimer;
-
 public:
     static void updateClass() ;
     static void cleanUpClass() ;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 1ac97a20cf..a5700ab264 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -889,12 +889,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
     static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
 
-    if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
-    { // reset max virtual size for unboosted LOD_TEXTURES
-        // this is an alternative to decaying mMaxVirtualSize over time
-        // that keeps textures from continously downrezzing and uprezzing in the background
-        imagep->mMaxVirtualSize = 0.f;
-    }
+
+    F32 max_vsize = 0.f;
+    bool on_screen = false;
 
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
     for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
@@ -911,6 +908,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                 F32 vsize = face->getPixelArea();
                 bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
 
+                on_screen = in_frustum;
+
                 // Scale desired texture resolution higher or lower depending on texture scale
                 //
                 // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
@@ -936,15 +935,40 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
                 if (apply_bias)
                 {
                     F32 bias = powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f);
-                    bias = (F32)llround(bias);
+                    bias = (F32) llround(bias);
                     vsize /= bias;
                 }
 
-                imagep->addTextureStats(vsize);
+                max_vsize = llmax(max_vsize, vsize);
             }
         }
     }
 
+    if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
+    { // conditionally reset max virtual size for unboosted LOD_TEXTURES
+      // this is an alternative to decaying mMaxVirtualSize over time
+      // that keeps textures from continously downrezzing and uprezzing in the background
+
+        if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
+            (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
+        {
+            imagep->mMaxVirtualSize = 0.f;
+        }
+    }
+
+
+    imagep->addTextureStats(max_vsize);
+
+#if 0
+    imagep->setDebugText(llformat("%d/%d - %d/%d -- %d/%d",
+        (S32)sqrtf(max_vsize),
+        (S32)sqrtf(imagep->mMaxVirtualSize),
+        imagep->getDiscardLevel(),
+        imagep->getDesiredDiscardLevel(),
+        imagep->getWidth(),
+        imagep->getFullWidth()));
+#endif
+
     // make sure to addTextureStats for any spotlights that are using this texture
     for (S32 vi = 0; vi < imagep->getNumVolumes(LLRender::LIGHT_TEX); ++vi)
     {
@@ -955,18 +979,26 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
     F32 max_inactive_time = 20.f; // inactive time before deleting saved raw image
     S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, and 1 for "entries" in updateImagesFetchTextures
 
+    F32 lazy_flush_timeout = 30.f; // delete unused images after 30 seconds
+
     //
     // Flush formatted images using a lazy flush
     //
     S32 num_refs = imagep->getNumRefs();
     if (num_refs <= min_refs && flush_images)
     {
-        // Remove the unused image from the image list
-        deleteImage(imagep);
-        return;
+        if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
+        {
+            // Remove the unused image from the image list
+            deleteImage(imagep);
+            return;
+        }
     }
     else
     {
+        // still referenced outside of image list, reset timer
+        imagep->getLastReferencedTimer()->reset();
+
         if (imagep->hasSavedRawImage())
         {
             if (imagep->getElapsedLastReferencedSavedRawImageTime() > max_inactive_time)
-- 
cgit v1.2.3


From 17f515cd3e4239d3c6e1958d998e455a8300da90 Mon Sep 17 00:00:00 2001
From: TommyTheTerrible <81168766+TommyTheTerrible@users.noreply.github.com>
Date: Sat, 24 Aug 2024 00:21:03 -0400
Subject: Update LLImageJ2C::calcDataSizeJ2C for better 2k image support
 (#2406)

Adjusted calculations based on dimensions and assumed maximum block size so that higher discards (4-5) of 2048x2048 images can be decoded with aux/alpha.

(It should also work for dimensions larger than 2048.)

This function will now return a reliable discard 5 data size for unknown dimensions (w and/or h equals 0), which could be used in LLTextureFetch::createRequest to skip the header fetch and go right to a discard 5 decode.

Tested on OpenJPEG 2.5 with partial decode support (opj_decoder_set_strict_mode set to false).

Should work on KDU fine but might be a good idea to test.
---
 indra/llimage/llimagej2c.cpp | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 4ec95bbcc3..753e5d24df 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -276,16 +276,20 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
     // Estimate the number of layers. This is consistent with what's done for j2c encoding in LLImageJ2CKDU::encodeImpl().
     constexpr S32 precision = 8; // assumed bitrate per component channel, might change in future for HDR support
     constexpr S32 max_components = 4; // assumed the file has four components; three color and alpha
-    S32 nb_layers = 1;
-    const S32 surface = w*h;
-    S32 s = 64*64;
-    S32 totalbytes = (S32)(s * max_components * precision * rate); // first level computed before loop
-    while (surface > s)
+    // Use MAX_IMAGE_SIZE_DEFAULT (currently 2048) if either dimension is unknown (zero)
+    S32 width  = (w > 0) ? w : 2048;
+    S32 height = (h > 0) ? h : 2048;
+    S32 max_dimension = llmax(width, height); // Find largest dimension
+    S32 block_area = MAX_BLOCK_SIZE * MAX_BLOCK_SIZE; // Calculated initial block area from established max block size (currently 64)
+    block_area *= (max_dimension / MAX_BLOCK_SIZE / max_components); // Adjust initial block area by ratio of largest dimension to block size per component
+    S32 totalbytes = (S32) (block_area * max_components * precision); // First block layer computed before loop without compression rate
+    S32 block_layers = 1; // Start at layer 1 since first block layer is computed outside loop
+    while (block_layers < 6) // Walk five layers for the five discards in JPEG2000
     {
-        if (nb_layers <= (5 - discard_level))
-            totalbytes += (S32)(s * max_components * precision * rate);
-        nb_layers++;
-        s *= 4;
+        if (block_layers <= (5 - discard_level))  // Walk backwards from discard 5 to required discard layer.
+            totalbytes += (S32) (block_area * max_components * precision * rate); // Add each block layer reduced by assumed compression rate
+        block_layers++; // Move to next layer
+        block_area *= 4; // Increase block area by power of four
     }
 
     totalbytes /= 8; // to bytes
-- 
cgit v1.2.3


From cbca17825614d18a96994c94ec0c38e9d8e812cf Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 24 Aug 2024 00:55:32 -0400
Subject: Add Contrast Adaptive Sharpening post process effect(#2399)

---
 indra/llrender/llglslshader.cpp                    |   46 +
 indra/llrender/llglslshader.h                      |    2 +
 indra/newview/app_settings/settings.xml            |   11 +
 .../app_settings/shaders/class1/deferred/CASF.glsl | 2558 ++++++++++++++++++++
 indra/newview/featuretable.txt                     |    8 +
 indra/newview/featuretable_mac.txt                 |    8 +
 indra/newview/llviewershadermgr.cpp                |   12 +
 indra/newview/llviewershadermgr.h                  |    1 +
 indra/newview/pipeline.cpp                         |   68 +-
 indra/newview/pipeline.h                           |    2 +
 .../en/floater_preferences_graphics_advanced.xml   |   21 +-
 11 files changed, 2732 insertions(+), 5 deletions(-)
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/CASF.glsl

(limited to 'indra')

diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index e76a30a954..daa768e8ab 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -1552,6 +1552,34 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
     }
 }
 
+void LLGLSLShader::uniform4uiv(U32 index, U32 count, const GLuint* v)
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
+    llassert(sCurBoundShaderPtr == this);
+
+    if (mProgramObject)
+    {
+        if (mUniform.size() <= index)
+        {
+            LL_WARNS_ONCE("Shader") << "Uniform index out of bounds. Size: " << (S32)mUniform.size() << " index: " << index << LL_ENDL;
+            llassert(false);
+            return;
+        }
+
+        if (mUniform[index] >= 0)
+        {
+            const auto& iter = mValue.find(mUniform[index]);
+            LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
+            if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
+            {
+                LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
+                glUniform4uiv(mUniform[index], count, v);
+                mValue[mUniform[index]] = vec;
+            }
+        }
+    }
+}
+
 void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat* v)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
@@ -1886,6 +1914,24 @@ void LLGLSLShader::uniform4fv(const LLStaticHashedString& uniform, U32 count, co
     }
 }
 
+void LLGLSLShader::uniform4uiv(const LLStaticHashedString& uniform, U32 count, const GLuint* v)
+{
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
+    GLint location = getUniformLocation(uniform);
+
+    if (location >= 0)
+    {
+        LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
+        const auto& iter = mValue.find(location);
+        if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
+        {
+            LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
+            glUniform4uiv(location, count, v);
+            mValue[location] = vec;
+        }
+    }
+}
+
 void LLGLSLShader::uniformMatrix4fv(const LLStaticHashedString& uniform, U32 count, GLboolean transpose, const GLfloat* v)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 86e5625dca..f3c41cd819 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -208,6 +208,7 @@ public:
     void uniform2fv(U32 index, U32 count, const GLfloat* v);
     void uniform3fv(U32 index, U32 count, const GLfloat* v);
     void uniform4fv(U32 index, U32 count, const GLfloat* v);
+    void uniform4uiv(U32 index, U32 count, const GLuint* v);
     void uniform2i(const LLStaticHashedString& uniform, GLint i, GLint j);
     void uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat* v);
     void uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat* v);
@@ -223,6 +224,7 @@ public:
     void uniform2fv(const LLStaticHashedString& uniform, U32 count, const GLfloat* v);
     void uniform3fv(const LLStaticHashedString& uniform, U32 count, const GLfloat* v);
     void uniform4fv(const LLStaticHashedString& uniform, U32 count, const GLfloat* v);
+    void uniform4uiv(const LLStaticHashedString& uniform, U32 count, const GLuint* v);
     void uniformMatrix4fv(const LLStaticHashedString& uniform, U32 count, GLboolean transpose, const GLfloat* v);
 
     void setMinimumAlpha(F32 minimum);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 483c8774a7..c5fea2786c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9810,6 +9810,17 @@
       <key>Value</key>
       <string>00000000-0000-0000-0000-000000000000</string>
     </map>
+    <key>RenderCASSharpness</key>
+    <map>
+        <key>Comment</key>
+        <string>Level of sharpening to apply via Contrast Adaptive Sharpening (0.0(off) - 1.0)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>F32</string>
+        <key>Value</key>
+        <real>0.4</real>
+    </map>
     <key>ReplaySession</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
new file mode 100644
index 0000000000..96d08058cf
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
@@ -0,0 +1,2558 @@
+/**
+ * @file CASF.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+#ifndef A_CPU
+#define A_GPU
+#define A_GLSL
+#define CAS_BETTER_DIAGONALS
+#define CAS_SLOW
+
+out vec4 frag_color;
+in vec2 vary_fragcoord;
+
+uniform sampler2D diffuseRect;
+uniform vec2 out_screen_res;
+uniform uvec4 cas_param_0;
+uniform uvec4 cas_param_1;
+
+vec3 srgb_to_linear(vec3 cs);
+vec3 linear_to_srgb(vec3 cl);
+#endif
+
+#ifndef SHADER_PORTABILITY
+//==============================================================================================================================
+//
+//                                               [A] SHADER PORTABILITY 1.20210629
+//
+//==============================================================================================================================
+// FidelityFX Super Resolution Sample
+//
+// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files(the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions :
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//------------------------------------------------------------------------------------------------------------------------------
+// MIT LICENSE
+// ===========
+// Copyright (c) 2014 Michal Drobot (for concepts used in "FLOAT APPROXIMATIONS").
+// -----------
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+// -----------
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
+// Software.
+// -----------
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//------------------------------------------------------------------------------------------------------------------------------
+#define A_2PI 6.28318530718
+#ifdef A_CPU
+ // Supporting user defined overrides.
+ #ifndef A_RESTRICT
+  #define A_RESTRICT __restrict
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifndef A_STATIC
+  #define A_STATIC static
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ // Same types across CPU and GPU.
+ // Predicate uses 32-bit integer (C friendly bool).
+ typedef uint32_t AP1;
+ typedef float AF1;
+ typedef double AD1;
+ typedef uint8_t AB1;
+ typedef uint16_t AW1;
+ typedef uint32_t AU1;
+ typedef uint64_t AL1;
+ typedef int8_t ASB1;
+ typedef int16_t ASW1;
+ typedef int32_t ASU1;
+ typedef int64_t ASL1;
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AD1_(a) ((AD1)(a))
+ #define AF1_(a) ((AF1)(a))
+ #define AL1_(a) ((AL1)(a))
+ #define AU1_(a) ((AU1)(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ASL1_(a) ((ASL1)(a))
+ #define ASU1_(a) ((ASU1)(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AU1 AU1_AF1(AF1 a){union{AF1 f;AU1 u;}bits;bits.f=a;return bits.u;}
+//------------------------------------------------------------------------------------------------------------------------------
+ #define A_TRUE 1
+ #define A_FALSE 0
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//                                                       CPU/GPU PORTING
+//
+//------------------------------------------------------------------------------------------------------------------------------
+// Get CPU and GPU to share all setup code, without duplicate code paths.
+// This uses a lower-case prefix for special vector constructs.
+//  - In C restrict pointers are used.
+//  - In the shading language, in/inout/out arguments are used.
+// This depends on the ability to access a vector value in both languages via array syntax (aka color[2]).
+//==============================================================================================================================
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                     VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY
+//==============================================================================================================================
+ #define retAD2 AD1 *A_RESTRICT
+ #define retAD3 AD1 *A_RESTRICT
+ #define retAD4 AD1 *A_RESTRICT
+ #define retAF2 AF1 *A_RESTRICT
+ #define retAF3 AF1 *A_RESTRICT
+ #define retAF4 AF1 *A_RESTRICT
+ #define retAL2 AL1 *A_RESTRICT
+ #define retAL3 AL1 *A_RESTRICT
+ #define retAL4 AL1 *A_RESTRICT
+ #define retAU2 AU1 *A_RESTRICT
+ #define retAU3 AU1 *A_RESTRICT
+ #define retAU4 AU1 *A_RESTRICT
+//------------------------------------------------------------------------------------------------------------------------------
+ #define inAD2 AD1 *A_RESTRICT
+ #define inAD3 AD1 *A_RESTRICT
+ #define inAD4 AD1 *A_RESTRICT
+ #define inAF2 AF1 *A_RESTRICT
+ #define inAF3 AF1 *A_RESTRICT
+ #define inAF4 AF1 *A_RESTRICT
+ #define inAL2 AL1 *A_RESTRICT
+ #define inAL3 AL1 *A_RESTRICT
+ #define inAL4 AL1 *A_RESTRICT
+ #define inAU2 AU1 *A_RESTRICT
+ #define inAU3 AU1 *A_RESTRICT
+ #define inAU4 AU1 *A_RESTRICT
+//------------------------------------------------------------------------------------------------------------------------------
+ #define inoutAD2 AD1 *A_RESTRICT
+ #define inoutAD3 AD1 *A_RESTRICT
+ #define inoutAD4 AD1 *A_RESTRICT
+ #define inoutAF2 AF1 *A_RESTRICT
+ #define inoutAF3 AF1 *A_RESTRICT
+ #define inoutAF4 AF1 *A_RESTRICT
+ #define inoutAL2 AL1 *A_RESTRICT
+ #define inoutAL3 AL1 *A_RESTRICT
+ #define inoutAL4 AL1 *A_RESTRICT
+ #define inoutAU2 AU1 *A_RESTRICT
+ #define inoutAU3 AU1 *A_RESTRICT
+ #define inoutAU4 AU1 *A_RESTRICT
+//------------------------------------------------------------------------------------------------------------------------------
+ #define outAD2 AD1 *A_RESTRICT
+ #define outAD3 AD1 *A_RESTRICT
+ #define outAD4 AD1 *A_RESTRICT
+ #define outAF2 AF1 *A_RESTRICT
+ #define outAF3 AF1 *A_RESTRICT
+ #define outAF4 AF1 *A_RESTRICT
+ #define outAL2 AL1 *A_RESTRICT
+ #define outAL3 AL1 *A_RESTRICT
+ #define outAL4 AL1 *A_RESTRICT
+ #define outAU2 AU1 *A_RESTRICT
+ #define outAU3 AU1 *A_RESTRICT
+ #define outAU4 AU1 *A_RESTRICT
+//------------------------------------------------------------------------------------------------------------------------------
+ #define varAD2(x) AD1 x[2]
+ #define varAD3(x) AD1 x[3]
+ #define varAD4(x) AD1 x[4]
+ #define varAF2(x) AF1 x[2]
+ #define varAF3(x) AF1 x[3]
+ #define varAF4(x) AF1 x[4]
+ #define varAL2(x) AL1 x[2]
+ #define varAL3(x) AL1 x[3]
+ #define varAL4(x) AL1 x[4]
+ #define varAU2(x) AU1 x[2]
+ #define varAU3(x) AU1 x[3]
+ #define varAU4(x) AU1 x[4]
+//------------------------------------------------------------------------------------------------------------------------------
+ #define initAD2(x,y) {x,y}
+ #define initAD3(x,y,z) {x,y,z}
+ #define initAD4(x,y,z,w) {x,y,z,w}
+ #define initAF2(x,y) {x,y}
+ #define initAF3(x,y,z) {x,y,z}
+ #define initAF4(x,y,z,w) {x,y,z,w}
+ #define initAL2(x,y) {x,y}
+ #define initAL3(x,y,z) {x,y,z}
+ #define initAL4(x,y,z,w) {x,y,z,w}
+ #define initAU2(x,y) {x,y}
+ #define initAU3(x,y,z) {x,y,z}
+ #define initAU4(x,y,z,w) {x,y,z,w}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                     SCALAR RETURN OPS
+//------------------------------------------------------------------------------------------------------------------------------
+// TODO
+// ====
+//  - Replace transcendentals with manual versions.
+//==============================================================================================================================
+ #ifdef A_GCC
+  A_STATIC AD1 AAbsD1(AD1 a){return __builtin_fabs(a);}
+  A_STATIC AF1 AAbsF1(AF1 a){return __builtin_fabsf(a);}
+  A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(__builtin_abs(ASU1_(a)));}
+  A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(__builtin_llabs(ASL1_(a)));}
+ #else
+  A_STATIC AD1 AAbsD1(AD1 a){return fabs(a);}
+  A_STATIC AF1 AAbsF1(AF1 a){return fabsf(a);}
+  A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(abs(ASU1_(a)));}
+  A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(labs((long)ASL1_(a)));}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 ACosD1(AD1 a){return __builtin_cos(a);}
+  A_STATIC AF1 ACosF1(AF1 a){return __builtin_cosf(a);}
+ #else
+  A_STATIC AD1 ACosD1(AD1 a){return cos(a);}
+  A_STATIC AF1 ACosF1(AF1 a){return cosf(a);}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 ADotD2(inAD2 a,inAD2 b){return a[0]*b[0]+a[1]*b[1];}
+ A_STATIC AD1 ADotD3(inAD3 a,inAD3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];}
+ A_STATIC AD1 ADotD4(inAD4 a,inAD4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];}
+ A_STATIC AF1 ADotF2(inAF2 a,inAF2 b){return a[0]*b[0]+a[1]*b[1];}
+ A_STATIC AF1 ADotF3(inAF3 a,inAF3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];}
+ A_STATIC AF1 ADotF4(inAF4 a,inAF4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];}
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 AExp2D1(AD1 a){return __builtin_exp2(a);}
+  A_STATIC AF1 AExp2F1(AF1 a){return __builtin_exp2f(a);}
+ #else
+  A_STATIC AD1 AExp2D1(AD1 a){return exp2(a);}
+  A_STATIC AF1 AExp2F1(AF1 a){return exp2f(a);}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 AFloorD1(AD1 a){return __builtin_floor(a);}
+  A_STATIC AF1 AFloorF1(AF1 a){return __builtin_floorf(a);}
+ #else
+  A_STATIC AD1 AFloorD1(AD1 a){return floor(a);}
+  A_STATIC AF1 AFloorF1(AF1 a){return floorf(a);}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 ALerpD1(AD1 a,AD1 b,AD1 c){return b*c+(-a*c+a);}
+ A_STATIC AF1 ALerpF1(AF1 a,AF1 b,AF1 c){return b*c+(-a*c+a);}
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 ALog2D1(AD1 a){return __builtin_log2(a);}
+  A_STATIC AF1 ALog2F1(AF1 a){return __builtin_log2f(a);}
+ #else
+  A_STATIC AD1 ALog2D1(AD1 a){return log2(a);}
+  A_STATIC AF1 ALog2F1(AF1 a){return log2f(a);}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 AMaxD1(AD1 a,AD1 b){return a>b?a:b;}
+ A_STATIC AF1 AMaxF1(AF1 a,AF1 b){return a>b?a:b;}
+ A_STATIC AL1 AMaxL1(AL1 a,AL1 b){return a>b?a:b;}
+ A_STATIC AU1 AMaxU1(AU1 a,AU1 b){return a>b?a:b;}
+//------------------------------------------------------------------------------------------------------------------------------
+ // These follow the convention that A integer types don't have signage, until they are operated on.
+ A_STATIC AL1 AMaxSL1(AL1 a,AL1 b){return (ASL1_(a)>ASL1_(b))?a:b;}
+ A_STATIC AU1 AMaxSU1(AU1 a,AU1 b){return (ASU1_(a)>ASU1_(b))?a:b;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 AMinD1(AD1 a,AD1 b){return a<b?a:b;}
+ A_STATIC AF1 AMinF1(AF1 a,AF1 b){return a<b?a:b;}
+ A_STATIC AL1 AMinL1(AL1 a,AL1 b){return a<b?a:b;}
+ A_STATIC AU1 AMinU1(AU1 a,AU1 b){return a<b?a:b;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AL1 AMinSL1(AL1 a,AL1 b){return (ASL1_(a)<ASL1_(b))?a:b;}
+ A_STATIC AU1 AMinSU1(AU1 a,AU1 b){return (ASU1_(a)<ASU1_(b))?a:b;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 ARcpD1(AD1 a){return 1.0/a;}
+ A_STATIC AF1 ARcpF1(AF1 a){return 1.0f/a;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AL1 AShrSL1(AL1 a,AL1 b){return AL1_(ASL1_(a)>>ASL1_(b));}
+ A_STATIC AU1 AShrSU1(AU1 a,AU1 b){return AU1_(ASU1_(a)>>ASU1_(b));}
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 ASinD1(AD1 a){return __builtin_sin(a);}
+  A_STATIC AF1 ASinF1(AF1 a){return __builtin_sinf(a);}
+ #else
+  A_STATIC AD1 ASinD1(AD1 a){return sin(a);}
+  A_STATIC AF1 ASinF1(AF1 a){return sinf(a);}
+ #endif
+//------------------------------------------------------------------------------------------------------------------------------
+ #ifdef A_GCC
+  A_STATIC AD1 ASqrtD1(AD1 a){return __builtin_sqrt(a);}
+  A_STATIC AF1 ASqrtF1(AF1 a){return __builtin_sqrtf(a);}
+ #else
+  A_STATIC AD1 ASqrtD1(AD1 a){return sqrt(a);}
+  A_STATIC AF1 ASqrtF1(AF1 a){return sqrtf(a);}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                               SCALAR RETURN OPS - DEPENDENT
+//==============================================================================================================================
+ A_STATIC AD1 AClampD1(AD1 x,AD1 n,AD1 m){return AMaxD1(n,AMinD1(x,m));}
+ A_STATIC AF1 AClampF1(AF1 x,AF1 n,AF1 m){return AMaxF1(n,AMinF1(x,m));}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 AFractD1(AD1 a){return a-AFloorD1(a);}
+ A_STATIC AF1 AFractF1(AF1 a){return a-AFloorF1(a);}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 APowD1(AD1 a,AD1 b){return AExp2D1(b*ALog2D1(a));}
+ A_STATIC AF1 APowF1(AF1 a,AF1 b){return AExp2F1(b*ALog2F1(a));}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 ARsqD1(AD1 a){return ARcpD1(ASqrtD1(a));}
+ A_STATIC AF1 ARsqF1(AF1 a){return ARcpF1(ASqrtF1(a));}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC AD1 ASatD1(AD1 a){return AMinD1(1.0,AMaxD1(0.0,a));}
+ A_STATIC AF1 ASatF1(AF1 a){return AMinF1(1.0f,AMaxF1(0.0f,a));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                         VECTOR OPS
+//------------------------------------------------------------------------------------------------------------------------------
+// These are added as needed for production or prototyping, so not necessarily a complete set.
+// They follow a convention of taking in a destination and also returning the destination value to increase utility.
+//==============================================================================================================================
+ A_STATIC retAD2 opAAbsD2(outAD2 d,inAD2 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);return d;}
+ A_STATIC retAD3 opAAbsD3(outAD3 d,inAD3 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);return d;}
+ A_STATIC retAD4 opAAbsD4(outAD4 d,inAD4 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);d[3]=AAbsD1(a[3]);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAAbsF2(outAF2 d,inAF2 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);return d;}
+ A_STATIC retAF3 opAAbsF3(outAF3 d,inAF3 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);return d;}
+ A_STATIC retAF4 opAAbsF4(outAF4 d,inAF4 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);d[3]=AAbsF1(a[3]);return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;}
+ A_STATIC retAD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;}
+ A_STATIC retAD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;}
+ A_STATIC retAF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;}
+ A_STATIC retAF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;}
+ A_STATIC retAD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;}
+ A_STATIC retAD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;}
+ A_STATIC retAF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;}
+ A_STATIC retAF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opACpyD2(outAD2 d,inAD2 a){d[0]=a[0];d[1]=a[1];return d;}
+ A_STATIC retAD3 opACpyD3(outAD3 d,inAD3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;}
+ A_STATIC retAD4 opACpyD4(outAD4 d,inAD4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opACpyF2(outAF2 d,inAF2 a){d[0]=a[0];d[1]=a[1];return d;}
+ A_STATIC retAF3 opACpyF3(outAF3 d,inAF3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;}
+ A_STATIC retAF4 opACpyF4(outAF4 d,inAF4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);return d;}
+ A_STATIC retAD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);return d;}
+ A_STATIC retAD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);d[3]=ALerpD1(a[3],b[3],c[3]);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);return d;}
+ A_STATIC retAF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);return d;}
+ A_STATIC retAF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);d[3]=ALerpF1(a[3],b[3],c[3]);return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);return d;}
+ A_STATIC retAD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);return d;}
+ A_STATIC retAD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);d[3]=ALerpD1(a[3],b[3],c);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);return d;}
+ A_STATIC retAF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);return d;}
+ A_STATIC retAF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);d[3]=ALerpF1(a[3],b[3],c);return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);return d;}
+ A_STATIC retAD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);return d;}
+ A_STATIC retAD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);d[3]=AMaxD1(a[3],b[3]);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);return d;}
+ A_STATIC retAF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);return d;}
+ A_STATIC retAF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);d[3]=AMaxF1(a[3],b[3]);return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);return d;}
+ A_STATIC retAD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);return d;}
+ A_STATIC retAD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);d[3]=AMinD1(a[3],b[3]);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);return d;}
+ A_STATIC retAF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);return d;}
+ A_STATIC retAF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);d[3]=AMinF1(a[3],b[3]);return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;}
+ A_STATIC retAD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;}
+ A_STATIC retAD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;}
+ A_STATIC retAF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;}
+ A_STATIC retAF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;}
+ A_STATIC retAD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;}
+ A_STATIC retAD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;}
+ A_STATIC retAF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;}
+ A_STATIC retAF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opANegD2(outAD2 d,inAD2 a){d[0]=-a[0];d[1]=-a[1];return d;}
+ A_STATIC retAD3 opANegD3(outAD3 d,inAD3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;}
+ A_STATIC retAD4 opANegD4(outAD4 d,inAD4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opANegF2(outAF2 d,inAF2 a){d[0]=-a[0];d[1]=-a[1];return d;}
+ A_STATIC retAF3 opANegF3(outAF3 d,inAF3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;}
+ A_STATIC retAF4 opANegF4(outAF4 d,inAF4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;}
+//==============================================================================================================================
+ A_STATIC retAD2 opARcpD2(outAD2 d,inAD2 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);return d;}
+ A_STATIC retAD3 opARcpD3(outAD3 d,inAD3 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);return d;}
+ A_STATIC retAD4 opARcpD4(outAD4 d,inAD4 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);d[3]=ARcpD1(a[3]);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ A_STATIC retAF2 opARcpF2(outAF2 d,inAF2 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);return d;}
+ A_STATIC retAF3 opARcpF3(outAF3 d,inAF3 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);return d;}
+ A_STATIC retAF4 opARcpF4(outAF4 d,inAF4 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);d[3]=ARcpF1(a[3]);return d;}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                     HALF FLOAT PACKING
+//==============================================================================================================================
+ // Convert float to half (in lower 16-bits of output).
+ // Same fast technique as documented here: ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf
+ // Supports denormals.
+ // Conversion rules are to make computations possibly "safer" on the GPU,
+ //  -INF & -NaN -> -65504
+ //  +INF & +NaN -> +65504
+ A_STATIC AU1 AU1_AH1_AF1(AF1 f){
+  static AW1 base[512]={
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
+   0x0200,0x0400,0x0800,0x0c00,0x1000,0x1400,0x1800,0x1c00,0x2000,0x2400,0x2800,0x2c00,0x3000,0x3400,0x3800,0x3c00,
+   0x4000,0x4400,0x4800,0x4c00,0x5000,0x5400,0x5800,0x5c00,0x6000,0x6400,0x6800,0x6c00,0x7000,0x7400,0x7800,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,
+   0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8001,0x8002,0x8004,0x8008,0x8010,0x8020,0x8040,0x8080,0x8100,
+   0x8200,0x8400,0x8800,0x8c00,0x9000,0x9400,0x9800,0x9c00,0xa000,0xa400,0xa800,0xac00,0xb000,0xb400,0xb800,0xbc00,
+   0xc000,0xc400,0xc800,0xcc00,0xd000,0xd400,0xd800,0xdc00,0xe000,0xe400,0xe800,0xec00,0xf000,0xf400,0xf800,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,
+   0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff};
+  static AB1 shift[512]={
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f,
+   0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+   0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f,
+   0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+   0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18};
+  union{AF1 f;AU1 u;}bits;bits.f=f;AU1 u=bits.u;AU1 i=u>>23;return (AU1)(base[i])+((u&0x7fffff)>>shift[i]);}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Used to output packed constant.
+ A_STATIC AU1 AU1_AH2_AF2(inAF2 a){return AU1_AH1_AF1(a[0])+(AU1_AH1_AF1(a[1])<<16);}
+#endif
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                            GLSL
+//==============================================================================================================================
+#if defined(A_GLSL) && defined(A_GPU)
+ #ifndef A_SKIP_EXT
+  #ifdef A_LONG
+   #extension GL_ARB_gpu_shader_int64:require
+   #extension GL_NV_shader_atomic_int64:require
+  #endif
+//------------------------------------------------------------------------------------------------------------------------------
+  #ifdef A_WAVE
+   #extension GL_KHR_shader_subgroup_arithmetic:require
+   #extension GL_KHR_shader_subgroup_ballot:require
+   #extension GL_KHR_shader_subgroup_quad:require
+   #extension GL_KHR_shader_subgroup_shuffle:require
+  #endif
+ #endif
+//==============================================================================================================================
+ #define AP1 bool
+ #define AP2 bvec2
+ #define AP3 bvec3
+ #define AP4 bvec4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AF1 float
+ #define AF2 vec2
+ #define AF3 vec3
+ #define AF4 vec4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AU1 uint
+ #define AU2 uvec2
+ #define AU3 uvec3
+ #define AU4 uvec4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ASU1 int
+ #define ASU2 ivec2
+ #define ASU3 ivec3
+ #define ASU4 ivec4
+//==============================================================================================================================
+ #define AF1_AU1(x) uintBitsToFloat(AU1(x))
+ #define AF2_AU2(x) uintBitsToFloat(AU2(x))
+ #define AF3_AU3(x) uintBitsToFloat(AU3(x))
+ #define AF4_AU4(x) uintBitsToFloat(AU4(x))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AU1_AF1(x) floatBitsToUint(AF1(x))
+ #define AU2_AF2(x) floatBitsToUint(AF2(x))
+ #define AU3_AF3(x) floatBitsToUint(AF3(x))
+ #define AU4_AF4(x) floatBitsToUint(AF4(x))
+//==============================================================================================================================
+ AF1 AF1_x(AF1 a){return AF1(a);}
+ AF2 AF2_x(AF1 a){return AF2(a,a);}
+ AF3 AF3_x(AF1 a){return AF3(a,a,a);}
+ AF4 AF4_x(AF1 a){return AF4(a,a,a,a);}
+ #define AF1_(a) AF1_x(AF1(a))
+ #define AF2_(a) AF2_x(AF1(a))
+ #define AF3_(a) AF3_x(AF1(a))
+ #define AF4_(a) AF4_x(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AU1_x(AU1 a){return AU1(a);}
+ AU2 AU2_x(AU1 a){return AU2(a,a);}
+ AU3 AU3_x(AU1 a){return AU3(a,a,a);}
+ AU4 AU4_x(AU1 a){return AU4(a,a,a,a);}
+ #define AU1_(a) AU1_x(AU1(a))
+ #define AU2_(a) AU2_x(AU1(a))
+ #define AU3_(a) AU3_x(AU1(a))
+ #define AU4_(a) AU4_x(AU1(a))
+//==============================================================================================================================
+ AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));}
+ AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));}
+ AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));}
+ AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 ABfe(AU1 src,AU1 off,AU1 bits){return bitfieldExtract(src,ASU1(off),ASU1(bits));}
+ AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));}
+ // Proxy for V_BFI_B32 where the 'mask' is set as 'bits', 'mask=(1<<bits)-1', and 'bits' needs to be an immediate.
+ AU1 ABfiM(AU1 src,AU1 ins,AU1 bits){return bitfieldInsert(src,ins,0,ASU1(bits));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // V_MED3_F32.
+ AF1 AClampF1(AF1 x,AF1 n,AF1 m){return clamp(x,n,m);}
+ AF2 AClampF2(AF2 x,AF2 n,AF2 m){return clamp(x,n,m);}
+ AF3 AClampF3(AF3 x,AF3 n,AF3 m){return clamp(x,n,m);}
+ AF4 AClampF4(AF4 x,AF4 n,AF4 m){return clamp(x,n,m);}
+//------------------------------------------------------------------------------------------------------------------------------
+ // V_FRACT_F32 (note DX frac() is different).
+ AF1 AFractF1(AF1 x){return fract(x);}
+ AF2 AFractF2(AF2 x){return fract(x);}
+ AF3 AFractF3(AF3 x){return fract(x);}
+ AF4 AFractF4(AF4 x){return fract(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ALerpF1(AF1 x,AF1 y,AF1 a){return mix(x,y,a);}
+ AF2 ALerpF2(AF2 x,AF2 y,AF2 a){return mix(x,y,a);}
+ AF3 ALerpF3(AF3 x,AF3 y,AF3 a){return mix(x,y,a);}
+ AF4 ALerpF4(AF4 x,AF4 y,AF4 a){return mix(x,y,a);}
+//------------------------------------------------------------------------------------------------------------------------------
+ // V_MAX3_F32.
+ AF1 AMax3F1(AF1 x,AF1 y,AF1 z){return max(x,max(y,z));}
+ AF2 AMax3F2(AF2 x,AF2 y,AF2 z){return max(x,max(y,z));}
+ AF3 AMax3F3(AF3 x,AF3 y,AF3 z){return max(x,max(y,z));}
+ AF4 AMax3F4(AF4 x,AF4 y,AF4 z){return max(x,max(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMax3SU1(AU1 x,AU1 y,AU1 z){return AU1(max(ASU1(x),max(ASU1(y),ASU1(z))));}
+ AU2 AMax3SU2(AU2 x,AU2 y,AU2 z){return AU2(max(ASU2(x),max(ASU2(y),ASU2(z))));}
+ AU3 AMax3SU3(AU3 x,AU3 y,AU3 z){return AU3(max(ASU3(x),max(ASU3(y),ASU3(z))));}
+ AU4 AMax3SU4(AU4 x,AU4 y,AU4 z){return AU4(max(ASU4(x),max(ASU4(y),ASU4(z))));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMax3U1(AU1 x,AU1 y,AU1 z){return max(x,max(y,z));}
+ AU2 AMax3U2(AU2 x,AU2 y,AU2 z){return max(x,max(y,z));}
+ AU3 AMax3U3(AU3 x,AU3 y,AU3 z){return max(x,max(y,z));}
+ AU4 AMax3U4(AU4 x,AU4 y,AU4 z){return max(x,max(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMaxSU1(AU1 a,AU1 b){return AU1(max(ASU1(a),ASU1(b)));}
+ AU2 AMaxSU2(AU2 a,AU2 b){return AU2(max(ASU2(a),ASU2(b)));}
+ AU3 AMaxSU3(AU3 a,AU3 b){return AU3(max(ASU3(a),ASU3(b)));}
+ AU4 AMaxSU4(AU4 a,AU4 b){return AU4(max(ASU4(a),ASU4(b)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Clamp has an easier pattern match for med3 when some ordering is known.
+ // V_MED3_F32.
+ AF1 AMed3F1(AF1 x,AF1 y,AF1 z){return max(min(x,y),min(max(x,y),z));}
+ AF2 AMed3F2(AF2 x,AF2 y,AF2 z){return max(min(x,y),min(max(x,y),z));}
+ AF3 AMed3F3(AF3 x,AF3 y,AF3 z){return max(min(x,y),min(max(x,y),z));}
+ AF4 AMed3F4(AF4 x,AF4 y,AF4 z){return max(min(x,y),min(max(x,y),z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // V_MIN3_F32.
+ AF1 AMin3F1(AF1 x,AF1 y,AF1 z){return min(x,min(y,z));}
+ AF2 AMin3F2(AF2 x,AF2 y,AF2 z){return min(x,min(y,z));}
+ AF3 AMin3F3(AF3 x,AF3 y,AF3 z){return min(x,min(y,z));}
+ AF4 AMin3F4(AF4 x,AF4 y,AF4 z){return min(x,min(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMin3SU1(AU1 x,AU1 y,AU1 z){return AU1(min(ASU1(x),min(ASU1(y),ASU1(z))));}
+ AU2 AMin3SU2(AU2 x,AU2 y,AU2 z){return AU2(min(ASU2(x),min(ASU2(y),ASU2(z))));}
+ AU3 AMin3SU3(AU3 x,AU3 y,AU3 z){return AU3(min(ASU3(x),min(ASU3(y),ASU3(z))));}
+ AU4 AMin3SU4(AU4 x,AU4 y,AU4 z){return AU4(min(ASU4(x),min(ASU4(y),ASU4(z))));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMin3U1(AU1 x,AU1 y,AU1 z){return min(x,min(y,z));}
+ AU2 AMin3U2(AU2 x,AU2 y,AU2 z){return min(x,min(y,z));}
+ AU3 AMin3U3(AU3 x,AU3 y,AU3 z){return min(x,min(y,z));}
+ AU4 AMin3U4(AU4 x,AU4 y,AU4 z){return min(x,min(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMinSU1(AU1 a,AU1 b){return AU1(min(ASU1(a),ASU1(b)));}
+ AU2 AMinSU2(AU2 a,AU2 b){return AU2(min(ASU2(a),ASU2(b)));}
+ AU3 AMinSU3(AU3 a,AU3 b){return AU3(min(ASU3(a),ASU3(b)));}
+ AU4 AMinSU4(AU4 a,AU4 b){return AU4(min(ASU4(a),ASU4(b)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Normalized trig. Valid input domain is {-256 to +256}. No GLSL compiler intrinsic exists to map to this currently.
+ // V_COS_F32.
+ AF1 ANCosF1(AF1 x){return cos(x*AF1_(A_2PI));}
+ AF2 ANCosF2(AF2 x){return cos(x*AF2_(A_2PI));}
+ AF3 ANCosF3(AF3 x){return cos(x*AF3_(A_2PI));}
+ AF4 ANCosF4(AF4 x){return cos(x*AF4_(A_2PI));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Normalized trig. Valid input domain is {-256 to +256}. No GLSL compiler intrinsic exists to map to this currently.
+ // V_SIN_F32.
+ AF1 ANSinF1(AF1 x){return sin(x*AF1_(A_2PI));}
+ AF2 ANSinF2(AF2 x){return sin(x*AF2_(A_2PI));}
+ AF3 ANSinF3(AF3 x){return sin(x*AF3_(A_2PI));}
+ AF4 ANSinF4(AF4 x){return sin(x*AF4_(A_2PI));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ARcpF1(AF1 x){return AF1_(1.0)/x;}
+ AF2 ARcpF2(AF2 x){return AF2_(1.0)/x;}
+ AF3 ARcpF3(AF3 x){return AF3_(1.0)/x;}
+ AF4 ARcpF4(AF4 x){return AF4_(1.0)/x;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ARsqF1(AF1 x){return AF1_(1.0)/sqrt(x);}
+ AF2 ARsqF2(AF2 x){return AF2_(1.0)/sqrt(x);}
+ AF3 ARsqF3(AF3 x){return AF3_(1.0)/sqrt(x);}
+ AF4 ARsqF4(AF4 x){return AF4_(1.0)/sqrt(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ASatF1(AF1 x){return clamp(x,AF1_(0.0),AF1_(1.0));}
+ AF2 ASatF2(AF2 x){return clamp(x,AF2_(0.0),AF2_(1.0));}
+ AF3 ASatF3(AF3 x){return clamp(x,AF3_(0.0),AF3_(1.0));}
+ AF4 ASatF4(AF4 x){return clamp(x,AF4_(0.0),AF4_(1.0));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AShrSU1(AU1 a,AU1 b){return AU1(ASU1(a)>>ASU1(b));}
+ AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));}
+ AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));}
+ AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                          GLSL BYTE
+//==============================================================================================================================
+ #ifdef A_BYTE
+  #define AB1 uint8_t
+  #define AB2 u8vec2
+  #define AB3 u8vec3
+  #define AB4 u8vec4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define ASB1 int8_t
+  #define ASB2 i8vec2
+  #define ASB3 i8vec3
+  #define ASB4 i8vec4
+//------------------------------------------------------------------------------------------------------------------------------
+  AB1 AB1_x(AB1 a){return AB1(a);}
+  AB2 AB2_x(AB1 a){return AB2(a,a);}
+  AB3 AB3_x(AB1 a){return AB3(a,a,a);}
+  AB4 AB4_x(AB1 a){return AB4(a,a,a,a);}
+  #define AB1_(a) AB1_x(AB1(a))
+  #define AB2_(a) AB2_x(AB1(a))
+  #define AB3_(a) AB3_x(AB1(a))
+  #define AB4_(a) AB4_x(AB1(a))
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                         GLSL DOUBLE
+//==============================================================================================================================
+ #ifdef A_DUBL
+  #define AD1 double
+  #define AD2 dvec2
+  #define AD3 dvec3
+  #define AD4 dvec4
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 AD1_x(AD1 a){return AD1(a);}
+  AD2 AD2_x(AD1 a){return AD2(a,a);}
+  AD3 AD3_x(AD1 a){return AD3(a,a,a);}
+  AD4 AD4_x(AD1 a){return AD4(a,a,a,a);}
+  #define AD1_(a) AD1_x(AD1(a))
+  #define AD2_(a) AD2_x(AD1(a))
+  #define AD3_(a) AD3_x(AD1(a))
+  #define AD4_(a) AD4_x(AD1(a))
+//==============================================================================================================================
+  AD1 AFractD1(AD1 x){return fract(x);}
+  AD2 AFractD2(AD2 x){return fract(x);}
+  AD3 AFractD3(AD3 x){return fract(x);}
+  AD4 AFractD4(AD4 x){return fract(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return mix(x,y,a);}
+  AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return mix(x,y,a);}
+  AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return mix(x,y,a);}
+  AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return mix(x,y,a);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ARcpD1(AD1 x){return AD1_(1.0)/x;}
+  AD2 ARcpD2(AD2 x){return AD2_(1.0)/x;}
+  AD3 ARcpD3(AD3 x){return AD3_(1.0)/x;}
+  AD4 ARcpD4(AD4 x){return AD4_(1.0)/x;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ARsqD1(AD1 x){return AD1_(1.0)/sqrt(x);}
+  AD2 ARsqD2(AD2 x){return AD2_(1.0)/sqrt(x);}
+  AD3 ARsqD3(AD3 x){return AD3_(1.0)/sqrt(x);}
+  AD4 ARsqD4(AD4 x){return AD4_(1.0)/sqrt(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ASatD1(AD1 x){return clamp(x,AD1_(0.0),AD1_(1.0));}
+  AD2 ASatD2(AD2 x){return clamp(x,AD2_(0.0),AD2_(1.0));}
+  AD3 ASatD3(AD3 x){return clamp(x,AD3_(0.0),AD3_(1.0));}
+  AD4 ASatD4(AD4 x){return clamp(x,AD4_(0.0),AD4_(1.0));}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                         GLSL LONG
+//==============================================================================================================================
+ #ifdef A_LONG
+  #define AL1 uint64_t
+  #define AL2 u64vec2
+  #define AL3 u64vec3
+  #define AL4 u64vec4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define ASL1 int64_t
+  #define ASL2 i64vec2
+  #define ASL3 i64vec3
+  #define ASL4 i64vec4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define AL1_AU2(x) packUint2x32(AU2(x))
+  #define AU2_AL1(x) unpackUint2x32(AL1(x))
+//------------------------------------------------------------------------------------------------------------------------------
+  AL1 AL1_x(AL1 a){return AL1(a);}
+  AL2 AL2_x(AL1 a){return AL2(a,a);}
+  AL3 AL3_x(AL1 a){return AL3(a,a,a);}
+  AL4 AL4_x(AL1 a){return AL4(a,a,a,a);}
+  #define AL1_(a) AL1_x(AL1(a))
+  #define AL2_(a) AL2_x(AL1(a))
+  #define AL3_(a) AL3_x(AL1(a))
+  #define AL4_(a) AL4_x(AL1(a))
+//==============================================================================================================================
+  AL1 AAbsSL1(AL1 a){return AL1(abs(ASL1(a)));}
+  AL2 AAbsSL2(AL2 a){return AL2(abs(ASL2(a)));}
+  AL3 AAbsSL3(AL3 a){return AL3(abs(ASL3(a)));}
+  AL4 AAbsSL4(AL4 a){return AL4(abs(ASL4(a)));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AL1 AMaxSL1(AL1 a,AL1 b){return AL1(max(ASU1(a),ASU1(b)));}
+  AL2 AMaxSL2(AL2 a,AL2 b){return AL2(max(ASU2(a),ASU2(b)));}
+  AL3 AMaxSL3(AL3 a,AL3 b){return AL3(max(ASU3(a),ASU3(b)));}
+  AL4 AMaxSL4(AL4 a,AL4 b){return AL4(max(ASU4(a),ASU4(b)));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AL1 AMinSL1(AL1 a,AL1 b){return AL1(min(ASU1(a),ASU1(b)));}
+  AL2 AMinSL2(AL2 a,AL2 b){return AL2(min(ASU2(a),ASU2(b)));}
+  AL3 AMinSL3(AL3 a,AL3 b){return AL3(min(ASU3(a),ASU3(b)));}
+  AL4 AMinSL4(AL4 a,AL4 b){return AL4(min(ASU4(a),ASU4(b)));}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                      WAVE OPERATIONS
+//==============================================================================================================================
+ #ifdef A_WAVE
+  // Where 'x' must be a compile time literal.
+  AF1 AWaveXorF1(AF1 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AF2 AWaveXorF2(AF2 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AF3 AWaveXorF3(AF3 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AF4 AWaveXorF4(AF4 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AU1 AWaveXorU1(AU1 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AU2 AWaveXorU2(AU2 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AU3 AWaveXorU3(AU3 v,AU1 x){return subgroupShuffleXor(v,x);}
+  AU4 AWaveXorU4(AU4 v,AU1 x){return subgroupShuffleXor(v,x);}
+ #endif
+//==============================================================================================================================
+#endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//
+//                                                            HLSL
+//
+//
+//==============================================================================================================================
+#if defined(A_HLSL) && defined(A_GPU)
+ #ifdef A_HLSL_6_2
+  #define AP1 bool
+  #define AP2 bool2
+  #define AP3 bool3
+  #define AP4 bool4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define AF1 float32_t
+  #define AF2 float32_t2
+  #define AF3 float32_t3
+  #define AF4 float32_t4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define AU1 uint32_t
+  #define AU2 uint32_t2
+  #define AU3 uint32_t3
+  #define AU4 uint32_t4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define ASU1 int32_t
+  #define ASU2 int32_t2
+  #define ASU3 int32_t3
+  #define ASU4 int32_t4
+ #else
+  #define AP1 bool
+  #define AP2 bool2
+  #define AP3 bool3
+  #define AP4 bool4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define AF1 float
+  #define AF2 float2
+  #define AF3 float3
+  #define AF4 float4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define AU1 uint
+  #define AU2 uint2
+  #define AU3 uint3
+  #define AU4 uint4
+//------------------------------------------------------------------------------------------------------------------------------
+  #define ASU1 int
+  #define ASU2 int2
+  #define ASU3 int3
+  #define ASU4 int4
+ #endif
+//==============================================================================================================================
+ #define AF1_AU1(x) asfloat(AU1(x))
+ #define AF2_AU2(x) asfloat(AU2(x))
+ #define AF3_AU3(x) asfloat(AU3(x))
+ #define AF4_AU4(x) asfloat(AU4(x))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AU1_AF1(x) asuint(AF1(x))
+ #define AU2_AF2(x) asuint(AF2(x))
+ #define AU3_AF3(x) asuint(AF3(x))
+ #define AU4_AF4(x) asuint(AF4(x))
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AU1_AH1_AF1_x(AF1 a){return f32tof16(a);}
+ #define AU1_AH1_AF1(a) AU1_AH1_AF1_x(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AU1_AH2_AF2_x(AF2 a){return f32tof16(a.x)|(f32tof16(a.y)<<16);}
+ #define AU1_AH2_AF2(a) AU1_AH2_AF2_x(AF2(a))
+ #define AU1_AB4Unorm_AF4(x) D3DCOLORtoUBYTE4(AF4(x))
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 AF2_AH2_AU1_x(AU1 x){return AF2(f16tof32(x&0xFFFF),f16tof32(x>>16));}
+ #define AF2_AH2_AU1(x) AF2_AH2_AU1_x(AU1(x))
+//==============================================================================================================================
+ AF1 AF1_x(AF1 a){return AF1(a);}
+ AF2 AF2_x(AF1 a){return AF2(a,a);}
+ AF3 AF3_x(AF1 a){return AF3(a,a,a);}
+ AF4 AF4_x(AF1 a){return AF4(a,a,a,a);}
+ #define AF1_(a) AF1_x(AF1(a))
+ #define AF2_(a) AF2_x(AF1(a))
+ #define AF3_(a) AF3_x(AF1(a))
+ #define AF4_(a) AF4_x(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AU1_x(AU1 a){return AU1(a);}
+ AU2 AU2_x(AU1 a){return AU2(a,a);}
+ AU3 AU3_x(AU1 a){return AU3(a,a,a);}
+ AU4 AU4_x(AU1 a){return AU4(a,a,a,a);}
+ #define AU1_(a) AU1_x(AU1(a))
+ #define AU2_(a) AU2_x(AU1(a))
+ #define AU3_(a) AU3_x(AU1(a))
+ #define AU4_(a) AU4_x(AU1(a))
+//==============================================================================================================================
+ AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));}
+ AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));}
+ AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));}
+ AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 ABfe(AU1 src,AU1 off,AU1 bits){AU1 mask=(1u<<bits)-1;return (src>>off)&mask;}
+ AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));}
+ AU1 ABfiM(AU1 src,AU1 ins,AU1 bits){AU1 mask=(1u<<bits)-1;return (ins&mask)|(src&(~mask));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AClampF1(AF1 x,AF1 n,AF1 m){return max(n,min(x,m));}
+ AF2 AClampF2(AF2 x,AF2 n,AF2 m){return max(n,min(x,m));}
+ AF3 AClampF3(AF3 x,AF3 n,AF3 m){return max(n,min(x,m));}
+ AF4 AClampF4(AF4 x,AF4 n,AF4 m){return max(n,min(x,m));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AFractF1(AF1 x){return x-floor(x);}
+ AF2 AFractF2(AF2 x){return x-floor(x);}
+ AF3 AFractF3(AF3 x){return x-floor(x);}
+ AF4 AFractF4(AF4 x){return x-floor(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ALerpF1(AF1 x,AF1 y,AF1 a){return lerp(x,y,a);}
+ AF2 ALerpF2(AF2 x,AF2 y,AF2 a){return lerp(x,y,a);}
+ AF3 ALerpF3(AF3 x,AF3 y,AF3 a){return lerp(x,y,a);}
+ AF4 ALerpF4(AF4 x,AF4 y,AF4 a){return lerp(x,y,a);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AMax3F1(AF1 x,AF1 y,AF1 z){return max(x,max(y,z));}
+ AF2 AMax3F2(AF2 x,AF2 y,AF2 z){return max(x,max(y,z));}
+ AF3 AMax3F3(AF3 x,AF3 y,AF3 z){return max(x,max(y,z));}
+ AF4 AMax3F4(AF4 x,AF4 y,AF4 z){return max(x,max(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMax3SU1(AU1 x,AU1 y,AU1 z){return AU1(max(ASU1(x),max(ASU1(y),ASU1(z))));}
+ AU2 AMax3SU2(AU2 x,AU2 y,AU2 z){return AU2(max(ASU2(x),max(ASU2(y),ASU2(z))));}
+ AU3 AMax3SU3(AU3 x,AU3 y,AU3 z){return AU3(max(ASU3(x),max(ASU3(y),ASU3(z))));}
+ AU4 AMax3SU4(AU4 x,AU4 y,AU4 z){return AU4(max(ASU4(x),max(ASU4(y),ASU4(z))));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMax3U1(AU1 x,AU1 y,AU1 z){return max(x,max(y,z));}
+ AU2 AMax3U2(AU2 x,AU2 y,AU2 z){return max(x,max(y,z));}
+ AU3 AMax3U3(AU3 x,AU3 y,AU3 z){return max(x,max(y,z));}
+ AU4 AMax3U4(AU4 x,AU4 y,AU4 z){return max(x,max(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMaxSU1(AU1 a,AU1 b){return AU1(max(ASU1(a),ASU1(b)));}
+ AU2 AMaxSU2(AU2 a,AU2 b){return AU2(max(ASU2(a),ASU2(b)));}
+ AU3 AMaxSU3(AU3 a,AU3 b){return AU3(max(ASU3(a),ASU3(b)));}
+ AU4 AMaxSU4(AU4 a,AU4 b){return AU4(max(ASU4(a),ASU4(b)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AMed3F1(AF1 x,AF1 y,AF1 z){return max(min(x,y),min(max(x,y),z));}
+ AF2 AMed3F2(AF2 x,AF2 y,AF2 z){return max(min(x,y),min(max(x,y),z));}
+ AF3 AMed3F3(AF3 x,AF3 y,AF3 z){return max(min(x,y),min(max(x,y),z));}
+ AF4 AMed3F4(AF4 x,AF4 y,AF4 z){return max(min(x,y),min(max(x,y),z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AMin3F1(AF1 x,AF1 y,AF1 z){return min(x,min(y,z));}
+ AF2 AMin3F2(AF2 x,AF2 y,AF2 z){return min(x,min(y,z));}
+ AF3 AMin3F3(AF3 x,AF3 y,AF3 z){return min(x,min(y,z));}
+ AF4 AMin3F4(AF4 x,AF4 y,AF4 z){return min(x,min(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMin3SU1(AU1 x,AU1 y,AU1 z){return AU1(min(ASU1(x),min(ASU1(y),ASU1(z))));}
+ AU2 AMin3SU2(AU2 x,AU2 y,AU2 z){return AU2(min(ASU2(x),min(ASU2(y),ASU2(z))));}
+ AU3 AMin3SU3(AU3 x,AU3 y,AU3 z){return AU3(min(ASU3(x),min(ASU3(y),ASU3(z))));}
+ AU4 AMin3SU4(AU4 x,AU4 y,AU4 z){return AU4(min(ASU4(x),min(ASU4(y),ASU4(z))));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMin3U1(AU1 x,AU1 y,AU1 z){return min(x,min(y,z));}
+ AU2 AMin3U2(AU2 x,AU2 y,AU2 z){return min(x,min(y,z));}
+ AU3 AMin3U3(AU3 x,AU3 y,AU3 z){return min(x,min(y,z));}
+ AU4 AMin3U4(AU4 x,AU4 y,AU4 z){return min(x,min(y,z));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AMinSU1(AU1 a,AU1 b){return AU1(min(ASU1(a),ASU1(b)));}
+ AU2 AMinSU2(AU2 a,AU2 b){return AU2(min(ASU2(a),ASU2(b)));}
+ AU3 AMinSU3(AU3 a,AU3 b){return AU3(min(ASU3(a),ASU3(b)));}
+ AU4 AMinSU4(AU4 a,AU4 b){return AU4(min(ASU4(a),ASU4(b)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ANCosF1(AF1 x){return cos(x*AF1_(A_2PI));}
+ AF2 ANCosF2(AF2 x){return cos(x*AF2_(A_2PI));}
+ AF3 ANCosF3(AF3 x){return cos(x*AF3_(A_2PI));}
+ AF4 ANCosF4(AF4 x){return cos(x*AF4_(A_2PI));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ANSinF1(AF1 x){return sin(x*AF1_(A_2PI));}
+ AF2 ANSinF2(AF2 x){return sin(x*AF2_(A_2PI));}
+ AF3 ANSinF3(AF3 x){return sin(x*AF3_(A_2PI));}
+ AF4 ANSinF4(AF4 x){return sin(x*AF4_(A_2PI));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ARcpF1(AF1 x){return rcp(x);}
+ AF2 ARcpF2(AF2 x){return rcp(x);}
+ AF3 ARcpF3(AF3 x){return rcp(x);}
+ AF4 ARcpF4(AF4 x){return rcp(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ARsqF1(AF1 x){return rsqrt(x);}
+ AF2 ARsqF2(AF2 x){return rsqrt(x);}
+ AF3 ARsqF3(AF3 x){return rsqrt(x);}
+ AF4 ARsqF4(AF4 x){return rsqrt(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 ASatF1(AF1 x){return saturate(x);}
+ AF2 ASatF2(AF2 x){return saturate(x);}
+ AF3 ASatF3(AF3 x){return saturate(x);}
+ AF4 ASatF4(AF4 x){return saturate(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+ AU1 AShrSU1(AU1 a,AU1 b){return AU1(ASU1(a)>>ASU1(b));}
+ AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));}
+ AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));}
+ AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                          HLSL BYTE
+//==============================================================================================================================
+ #ifdef A_BYTE
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                         HLSL DOUBLE
+//==============================================================================================================================
+ #ifdef A_DUBL
+  #ifdef A_HLSL_6_2
+   #define AD1 float64_t
+   #define AD2 float64_t2
+   #define AD3 float64_t3
+   #define AD4 float64_t4
+  #else
+   #define AD1 double
+   #define AD2 double2
+   #define AD3 double3
+   #define AD4 double4
+  #endif
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 AD1_x(AD1 a){return AD1(a);}
+  AD2 AD2_x(AD1 a){return AD2(a,a);}
+  AD3 AD3_x(AD1 a){return AD3(a,a,a);}
+  AD4 AD4_x(AD1 a){return AD4(a,a,a,a);}
+  #define AD1_(a) AD1_x(AD1(a))
+  #define AD2_(a) AD2_x(AD1(a))
+  #define AD3_(a) AD3_x(AD1(a))
+  #define AD4_(a) AD4_x(AD1(a))
+//==============================================================================================================================
+  AD1 AFractD1(AD1 a){return a-floor(a);}
+  AD2 AFractD2(AD2 a){return a-floor(a);}
+  AD3 AFractD3(AD3 a){return a-floor(a);}
+  AD4 AFractD4(AD4 a){return a-floor(a);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return lerp(x,y,a);}
+  AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return lerp(x,y,a);}
+  AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return lerp(x,y,a);}
+  AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return lerp(x,y,a);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ARcpD1(AD1 x){return rcp(x);}
+  AD2 ARcpD2(AD2 x){return rcp(x);}
+  AD3 ARcpD3(AD3 x){return rcp(x);}
+  AD4 ARcpD4(AD4 x){return rcp(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ARsqD1(AD1 x){return rsqrt(x);}
+  AD2 ARsqD2(AD2 x){return rsqrt(x);}
+  AD3 ARsqD3(AD3 x){return rsqrt(x);}
+  AD4 ARsqD4(AD4 x){return rsqrt(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD1 ASatD1(AD1 x){return saturate(x);}
+  AD2 ASatD2(AD2 x){return saturate(x);}
+  AD3 ASatD3(AD3 x){return saturate(x);}
+  AD4 ASatD4(AD4 x){return saturate(x);}
+ #endif
+//==============================================================================================================================
+//                                                         HLSL WAVE
+//==============================================================================================================================
+ #ifdef A_WAVE
+  // Where 'x' must be a compile time literal.
+  AF1 AWaveXorF1(AF1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AF2 AWaveXorF2(AF2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AF3 AWaveXorF3(AF3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AF4 AWaveXorF4(AF4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AU1 AWaveXorU1(AU1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AU2 AWaveXorU1(AU2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AU3 AWaveXorU1(AU3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+  AU4 AWaveXorU1(AU4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);}
+ #endif
+//==============================================================================================================================
+#endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//
+//                                                          GPU COMMON
+//
+//
+//==============================================================================================================================
+#ifdef A_GPU
+ // Negative and positive infinity.
+ #define A_INFP_F AF1_AU1(0x7f800000u)
+ #define A_INFN_F AF1_AU1(0xff800000u)
+//------------------------------------------------------------------------------------------------------------------------------
+ // Copy sign from 's' to positive 'd'.
+ AF1 ACpySgnF1(AF1 d,AF1 s){return AF1_AU1(AU1_AF1(d)|(AU1_AF1(s)&AU1_(0x80000000u)));}
+ AF2 ACpySgnF2(AF2 d,AF2 s){return AF2_AU2(AU2_AF2(d)|(AU2_AF2(s)&AU2_(0x80000000u)));}
+ AF3 ACpySgnF3(AF3 d,AF3 s){return AF3_AU3(AU3_AF3(d)|(AU3_AF3(s)&AU3_(0x80000000u)));}
+ AF4 ACpySgnF4(AF4 d,AF4 s){return AF4_AU4(AU4_AF4(d)|(AU4_AF4(s)&AU4_(0x80000000u)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Single operation to return (useful to create a mask to use in lerp for branch free logic),
+ //  m=NaN := 0
+ //  m>=0  := 0
+ //  m<0   := 1
+ // Uses the following useful floating point logic,
+ //  saturate(+a*(-INF)==-INF) := 0
+ //  saturate( 0*(-INF)== NaN) := 0
+ //  saturate(-a*(-INF)==+INF) := 1
+ AF1 ASignedF1(AF1 m){return ASatF1(m*AF1_(A_INFN_F));}
+ AF2 ASignedF2(AF2 m){return ASatF2(m*AF2_(A_INFN_F));}
+ AF3 ASignedF3(AF3 m){return ASatF3(m*AF3_(A_INFN_F));}
+ AF4 ASignedF4(AF4 m){return ASatF4(m*AF4_(A_INFN_F));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF1 AGtZeroF1(AF1 m){return ASatF1(m*AF1_(A_INFP_F));}
+ AF2 AGtZeroF2(AF2 m){return ASatF2(m*AF2_(A_INFP_F));}
+ AF3 AGtZeroF3(AF3 m){return ASatF3(m*AF3_(A_INFP_F));}
+ AF4 AGtZeroF4(AF4 m){return ASatF4(m*AF4_(A_INFP_F));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                [FIS] FLOAT INTEGER SORTABLE
+//------------------------------------------------------------------------------------------------------------------------------
+// Float to integer sortable.
+//  - If sign bit=0, flip the sign bit (positives).
+//  - If sign bit=1, flip all bits     (negatives).
+// Integer sortable to float.
+//  - If sign bit=1, flip the sign bit (positives).
+//  - If sign bit=0, flip all bits     (negatives).
+// Has nice side effects.
+//  - Larger integers are more positive values.
+//  - Float zero is mapped to center of integers (so clear to integer zero is a nice default for atomic max usage).
+// Burns 3 ops for conversion {shift,or,xor}.
+//==============================================================================================================================
+ AU1 AFisToU1(AU1 x){return x^(( AShrSU1(x,AU1_(31)))|AU1_(0x80000000));}
+ AU1 AFisFromU1(AU1 x){return x^((~AShrSU1(x,AU1_(31)))|AU1_(0x80000000));}
+//------------------------------------------------------------------------------------------------------------------------------
+ // Just adjust high 16-bit value (useful when upper part of 32-bit word is a 16-bit float value).
+ AU1 AFisToHiU1(AU1 x){return x^(( AShrSU1(x,AU1_(15)))|AU1_(0x80000000));}
+ AU1 AFisFromHiU1(AU1 x){return x^((~AShrSU1(x,AU1_(15)))|AU1_(0x80000000));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                               [BUC] BYTE UNSIGNED CONVERSION
+//------------------------------------------------------------------------------------------------------------------------------
+// Designed to use the optimal conversion, enables the scaling to possibly be factored into other computation.
+// Works on a range of {0 to A_BUC_<32,16>}, for <32-bit, and 16-bit> respectively.
+//------------------------------------------------------------------------------------------------------------------------------
+// OPCODE NOTES
+// ============
+// GCN does not do UNORM or SNORM for bytes in opcodes.
+//  - V_CVT_F32_UBYTE{0,1,2,3} - Unsigned byte to float.
+//  - V_CVT_PKACC_U8_F32 - Float to unsigned byte (does bit-field insert into 32-bit integer).
+// V_PERM_B32 does byte packing with ability to zero fill bytes as well.
+//  - Can pull out byte values from two sources, and zero fill upper 8-bits of packed hi and lo.
+//------------------------------------------------------------------------------------------------------------------------------
+// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U1() - Designed for V_CVT_F32_UBYTE* and V_CVT_PKACCUM_U8_F32 ops.
+// ====   =====
+//    0 : 0
+//    1 : 1
+//     ...
+//  255 : 255
+//      : 256 (just outside the encoding range)
+//------------------------------------------------------------------------------------------------------------------------------
+// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32.
+// ====   =====
+//    0 : 0
+//    1 : 1/512
+//    2 : 1/256
+//     ...
+//   64 : 1/8
+//  128 : 1/4
+//  255 : 255/512
+//      : 1/2 (just outside the encoding range)
+//------------------------------------------------------------------------------------------------------------------------------
+// OPTIMAL IMPLEMENTATIONS ON AMD ARCHITECTURES
+// ============================================
+// r=ABuc0FromU1(i)
+//   V_CVT_F32_UBYTE0 r,i
+// --------------------------------------------
+// r=ABuc0ToU1(d,i)
+//   V_CVT_PKACCUM_U8_F32 r,i,0,d
+// --------------------------------------------
+// d=ABuc0FromU2(i)
+//   Where 'k0' is an SGPR with 0x0E0A
+//   Where 'k1' is an SGPR with {32768.0} packed into the lower 16-bits
+//   V_PERM_B32 d,i.x,i.y,k0
+//   V_PK_FMA_F16 d,d,k1.x,0
+// --------------------------------------------
+// r=ABuc0ToU2(d,i)
+//   Where 'k0' is an SGPR with {1.0/32768.0} packed into the lower 16-bits
+//   Where 'k1' is an SGPR with 0x????
+//   Where 'k2' is an SGPR with 0x????
+//   V_PK_FMA_F16 i,i,k0.x,0
+//   V_PERM_B32 r.x,i,i,k1
+//   V_PERM_B32 r.y,i,i,k2
+//==============================================================================================================================
+ // Peak range for 32-bit and 16-bit operations.
+ #define A_BUC_32 (255.0)
+ #define A_BUC_16 (255.0/512.0)
+//==============================================================================================================================
+ #if 1
+  // Designed to be one V_CVT_PKACCUM_U8_F32.
+  // The extra min is required to pattern match to V_CVT_PKACCUM_U8_F32.
+  AU1 ABuc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i),255u)    )&(0x000000ffu));}
+  AU1 ABuc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i),255u)<< 8)&(0x0000ff00u));}
+  AU1 ABuc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i),255u)<<16)&(0x00ff0000u));}
+  AU1 ABuc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i),255u)<<24)&(0xff000000u));}
+//------------------------------------------------------------------------------------------------------------------------------
+  // Designed to be one V_CVT_F32_UBYTE*.
+  AF1 ABuc0FromU1(AU1 i){return AF1((i    )&255u);}
+  AF1 ABuc1FromU1(AU1 i){return AF1((i>> 8)&255u);}
+  AF1 ABuc2FromU1(AU1 i){return AF1((i>>16)&255u);}
+  AF1 ABuc3FromU1(AU1 i){return AF1((i>>24)&255u);}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                 [BSC] BYTE SIGNED CONVERSION
+//------------------------------------------------------------------------------------------------------------------------------
+// Similar to [BUC].
+// Works on a range of {-/+ A_BSC_<32,16>}, for <32-bit, and 16-bit> respectively.
+//------------------------------------------------------------------------------------------------------------------------------
+// ENCODING (without zero-based encoding)
+// ========
+//   0 = unused (can be used to mean something else)
+//   1 = lowest value
+// 128 = exact zero center (zero based encoding
+// 255 = highest value
+//------------------------------------------------------------------------------------------------------------------------------
+// Zero-based [Zb] flips the MSB bit of the byte (making 128 "exact zero" actually zero).
+// This is useful if there is a desire for cleared values to decode as zero.
+//------------------------------------------------------------------------------------------------------------------------------
+// BYTE : FLOAT - ABsc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32.
+// ====   =====
+//    0 : -127/512 (unused)
+//    1 : -126/512
+//    2 : -125/512
+//     ...
+//  128 : 0
+//     ...
+//  255 : 127/512
+//      : 1/4 (just outside the encoding range)
+//==============================================================================================================================
+ // Peak range for 32-bit and 16-bit operations.
+ #define A_BSC_32 (127.0)
+ #define A_BSC_16 (127.0/512.0)
+//==============================================================================================================================
+ #if 1
+  AU1 ABsc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i+128.0),255u)    )&(0x000000ffu));}
+  AU1 ABsc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i+128.0),255u)<< 8)&(0x0000ff00u));}
+  AU1 ABsc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i+128.0),255u)<<16)&(0x00ff0000u));}
+  AU1 ABsc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i+128.0),255u)<<24)&(0xff000000u));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AU1 ABsc0ToZbU1(AU1 d,AF1 i){return ((d&0xffffff00u)|((min(AU1(trunc(i)+128.0),255u)    )&(0x000000ffu)))^0x00000080u;}
+  AU1 ABsc1ToZbU1(AU1 d,AF1 i){return ((d&0xffff00ffu)|((min(AU1(trunc(i)+128.0),255u)<< 8)&(0x0000ff00u)))^0x00008000u;}
+  AU1 ABsc2ToZbU1(AU1 d,AF1 i){return ((d&0xff00ffffu)|((min(AU1(trunc(i)+128.0),255u)<<16)&(0x00ff0000u)))^0x00800000u;}
+  AU1 ABsc3ToZbU1(AU1 d,AF1 i){return ((d&0x00ffffffu)|((min(AU1(trunc(i)+128.0),255u)<<24)&(0xff000000u)))^0x80000000u;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 ABsc0FromU1(AU1 i){return AF1((i    )&255u)-128.0;}
+  AF1 ABsc1FromU1(AU1 i){return AF1((i>> 8)&255u)-128.0;}
+  AF1 ABsc2FromU1(AU1 i){return AF1((i>>16)&255u)-128.0;}
+  AF1 ABsc3FromU1(AU1 i){return AF1((i>>24)&255u)-128.0;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 ABsc0FromZbU1(AU1 i){return AF1(((i    )&255u)^0x80u)-128.0;}
+  AF1 ABsc1FromZbU1(AU1 i){return AF1(((i>> 8)&255u)^0x80u)-128.0;}
+  AF1 ABsc2FromZbU1(AU1 i){return AF1(((i>>16)&255u)^0x80u)-128.0;}
+  AF1 ABsc3FromZbU1(AU1 i){return AF1(((i>>24)&255u)^0x80u)-128.0;}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                    FLOAT APPROXIMATIONS
+//------------------------------------------------------------------------------------------------------------------------------
+// Michal Drobot has an excellent presentation on these: "Low Level Optimizations For GCN",
+//  - Idea dates back to SGI, then to Quake 3, etc.
+//  - https://michaldrobot.files.wordpress.com/2014/05/gcn_alu_opt_digitaldragons2014.pdf
+//     - sqrt(x)=rsqrt(x)*x
+//     - rcp(x)=rsqrt(x)*rsqrt(x) for positive x
+//  - https://github.com/michaldrobot/ShaderFastLibs/blob/master/ShaderFastMathLib.h
+//------------------------------------------------------------------------------------------------------------------------------
+// These below are from perhaps less complete searching for optimal.
+// Used FP16 normal range for testing with +4096 32-bit step size for sampling error.
+// So these match up well with the half approximations.
+//==============================================================================================================================
+ AF1 APrxLoSqrtF1(AF1 a){return AF1_AU1((AU1_AF1(a)>>AU1_(1))+AU1_(0x1fbc4639));}
+ AF1 APrxLoRcpF1(AF1 a){return AF1_AU1(AU1_(0x7ef07ebb)-AU1_AF1(a));}
+ AF1 APrxMedRcpF1(AF1 a){AF1 b=AF1_AU1(AU1_(0x7ef19fff)-AU1_AF1(a));return b*(-b*a+AF1_(2.0));}
+ AF1 APrxLoRsqF1(AF1 a){return AF1_AU1(AU1_(0x5f347d74)-(AU1_AF1(a)>>AU1_(1)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 APrxLoSqrtF2(AF2 a){return AF2_AU2((AU2_AF2(a)>>AU2_(1))+AU2_(0x1fbc4639));}
+ AF2 APrxLoRcpF2(AF2 a){return AF2_AU2(AU2_(0x7ef07ebb)-AU2_AF2(a));}
+ AF2 APrxMedRcpF2(AF2 a){AF2 b=AF2_AU2(AU2_(0x7ef19fff)-AU2_AF2(a));return b*(-b*a+AF2_(2.0));}
+ AF2 APrxLoRsqF2(AF2 a){return AF2_AU2(AU2_(0x5f347d74)-(AU2_AF2(a)>>AU2_(1)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF3 APrxLoSqrtF3(AF3 a){return AF3_AU3((AU3_AF3(a)>>AU3_(1))+AU3_(0x1fbc4639));}
+ AF3 APrxLoRcpF3(AF3 a){return AF3_AU3(AU3_(0x7ef07ebb)-AU3_AF3(a));}
+ AF3 APrxMedRcpF3(AF3 a){AF3 b=AF3_AU3(AU3_(0x7ef19fff)-AU3_AF3(a));return b*(-b*a+AF3_(2.0));}
+ AF3 APrxLoRsqF3(AF3 a){return AF3_AU3(AU3_(0x5f347d74)-(AU3_AF3(a)>>AU3_(1)));}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF4 APrxLoSqrtF4(AF4 a){return AF4_AU4((AU4_AF4(a)>>AU4_(1))+AU4_(0x1fbc4639));}
+ AF4 APrxLoRcpF4(AF4 a){return AF4_AU4(AU4_(0x7ef07ebb)-AU4_AF4(a));}
+ AF4 APrxMedRcpF4(AF4 a){AF4 b=AF4_AU4(AU4_(0x7ef19fff)-AU4_AF4(a));return b*(-b*a+AF4_(2.0));}
+ AF4 APrxLoRsqF4(AF4 a){return AF4_AU4(AU4_(0x5f347d74)-(AU4_AF4(a)>>AU4_(1)));}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                    PQ APPROXIMATIONS
+//------------------------------------------------------------------------------------------------------------------------------
+// PQ is very close to x^(1/8). The functions below Use the fast float approximation method to do
+// PQ<~>Gamma2 (4th power and fast 4th root) and PQ<~>Linear (8th power and fast 8th root). Maximum error is ~0.2%.
+//==============================================================================================================================
+// Helpers
+ AF1 Quart(AF1 a) { a = a * a; return a * a;}
+ AF1 Oct(AF1 a) { a = a * a; a = a * a; return a * a; }
+ AF2 Quart(AF2 a) { a = a * a; return a * a; }
+ AF2 Oct(AF2 a) { a = a * a; a = a * a; return a * a; }
+ AF3 Quart(AF3 a) { a = a * a; return a * a; }
+ AF3 Oct(AF3 a) { a = a * a; a = a * a; return a * a; }
+ AF4 Quart(AF4 a) { a = a * a; return a * a; }
+ AF4 Oct(AF4 a) { a = a * a; a = a * a; return a * a; }
+ //------------------------------------------------------------------------------------------------------------------------------
+ AF1 APrxPQToGamma2(AF1 a) { return Quart(a); }
+ AF1 APrxPQToLinear(AF1 a) { return Oct(a); }
+ AF1 APrxLoGamma2ToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); }
+ AF1 APrxMedGamma2ToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); AF1 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); }
+ AF1 APrxHighGamma2ToPQ(AF1 a) { return sqrt(sqrt(a)); }
+ AF1 APrxLoLinearToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); }
+ AF1 APrxMedLinearToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); AF1 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); }
+ AF1 APrxHighLinearToPQ(AF1 a) { return sqrt(sqrt(sqrt(a))); }
+ //------------------------------------------------------------------------------------------------------------------------------
+ AF2 APrxPQToGamma2(AF2 a) { return Quart(a); }
+ AF2 APrxPQToLinear(AF2 a) { return Oct(a); }
+ AF2 APrxLoGamma2ToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); }
+ AF2 APrxMedGamma2ToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); AF2 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); }
+ AF2 APrxHighGamma2ToPQ(AF2 a) { return sqrt(sqrt(a)); }
+ AF2 APrxLoLinearToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); }
+ AF2 APrxMedLinearToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); AF2 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); }
+ AF2 APrxHighLinearToPQ(AF2 a) { return sqrt(sqrt(sqrt(a))); }
+ //------------------------------------------------------------------------------------------------------------------------------
+ AF3 APrxPQToGamma2(AF3 a) { return Quart(a); }
+ AF3 APrxPQToLinear(AF3 a) { return Oct(a); }
+ AF3 APrxLoGamma2ToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); }
+ AF3 APrxMedGamma2ToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); AF3 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); }
+ AF3 APrxHighGamma2ToPQ(AF3 a) { return sqrt(sqrt(a)); }
+ AF3 APrxLoLinearToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); }
+ AF3 APrxMedLinearToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); AF3 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); }
+ AF3 APrxHighLinearToPQ(AF3 a) { return sqrt(sqrt(sqrt(a))); }
+ //------------------------------------------------------------------------------------------------------------------------------
+ AF4 APrxPQToGamma2(AF4 a) { return Quart(a); }
+ AF4 APrxPQToLinear(AF4 a) { return Oct(a); }
+ AF4 APrxLoGamma2ToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); }
+ AF4 APrxMedGamma2ToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); AF4 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); }
+ AF4 APrxHighGamma2ToPQ(AF4 a) { return sqrt(sqrt(a)); }
+ AF4 APrxLoLinearToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); }
+ AF4 APrxMedLinearToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); AF4 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); }
+ AF4 APrxHighLinearToPQ(AF4 a) { return sqrt(sqrt(sqrt(a))); }
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                    PARABOLIC SIN & COS
+//------------------------------------------------------------------------------------------------------------------------------
+// Approximate answers to transcendental questions.
+//------------------------------------------------------------------------------------------------------------------------------
+//==============================================================================================================================
+ #if 1
+  // Valid input range is {-1 to 1} representing {0 to 2 pi}.
+  // Output range is {-1/4 to 1/4} representing {-1 to 1}.
+  AF1 APSinF1(AF1 x){return x*abs(x)-x;} // MAD.
+  AF2 APSinF2(AF2 x){return x*abs(x)-x;}
+  AF1 APCosF1(AF1 x){x=AFractF1(x*AF1_(0.5)+AF1_(0.75));x=x*AF1_(2.0)-AF1_(1.0);return APSinF1(x);} // 3x MAD, FRACT
+  AF2 APCosF2(AF2 x){x=AFractF2(x*AF2_(0.5)+AF2_(0.75));x=x*AF2_(2.0)-AF2_(1.0);return APSinF2(x);}
+  AF2 APSinCosF1(AF1 x){AF1 y=AFractF1(x*AF1_(0.5)+AF1_(0.75));y=y*AF1_(2.0)-AF1_(1.0);return APSinF2(AF2(x,y));}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                     [ZOL] ZERO ONE LOGIC
+//------------------------------------------------------------------------------------------------------------------------------
+// Conditional free logic designed for easy 16-bit packing, and backwards porting to 32-bit.
+//------------------------------------------------------------------------------------------------------------------------------
+// 0 := false
+// 1 := true
+//------------------------------------------------------------------------------------------------------------------------------
+// AndNot(x,y)   -> !(x&y) .... One op.
+// AndOr(x,y,z)  -> (x&y)|z ... One op.
+// GtZero(x)     -> x>0.0 ..... One op.
+// Sel(x,y,z)    -> x?y:z ..... Two ops, has no precision loss.
+// Signed(x)     -> x<0.0 ..... One op.
+// ZeroPass(x,y) -> x?0:y ..... Two ops, 'y' is a pass through safe for aliasing as integer.
+//------------------------------------------------------------------------------------------------------------------------------
+// OPTIMIZATION NOTES
+// ==================
+// - On Vega to use 2 constants in a packed op, pass in as one AW2 or one AH2 'k.xy' and use as 'k.xx' and 'k.yy'.
+//   For example 'a.xy*k.xx+k.yy'.
+//==============================================================================================================================
+ #if 1
+  AU1 AZolAndU1(AU1 x,AU1 y){return min(x,y);}
+  AU2 AZolAndU2(AU2 x,AU2 y){return min(x,y);}
+  AU3 AZolAndU3(AU3 x,AU3 y){return min(x,y);}
+  AU4 AZolAndU4(AU4 x,AU4 y){return min(x,y);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AU1 AZolNotU1(AU1 x){return x^AU1_(1);}
+  AU2 AZolNotU2(AU2 x){return x^AU2_(1);}
+  AU3 AZolNotU3(AU3 x){return x^AU3_(1);}
+  AU4 AZolNotU4(AU4 x){return x^AU4_(1);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AU1 AZolOrU1(AU1 x,AU1 y){return max(x,y);}
+  AU2 AZolOrU2(AU2 x,AU2 y){return max(x,y);}
+  AU3 AZolOrU3(AU3 x,AU3 y){return max(x,y);}
+  AU4 AZolOrU4(AU4 x,AU4 y){return max(x,y);}
+//==============================================================================================================================
+  AU1 AZolF1ToU1(AF1 x){return AU1(x);}
+  AU2 AZolF2ToU2(AF2 x){return AU2(x);}
+  AU3 AZolF3ToU3(AF3 x){return AU3(x);}
+  AU4 AZolF4ToU4(AF4 x){return AU4(x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  // 2 ops, denormals don't work in 32-bit on PC (and if they are enabled, OMOD is disabled).
+  AU1 AZolNotF1ToU1(AF1 x){return AU1(AF1_(1.0)-x);}
+  AU2 AZolNotF2ToU2(AF2 x){return AU2(AF2_(1.0)-x);}
+  AU3 AZolNotF3ToU3(AF3 x){return AU3(AF3_(1.0)-x);}
+  AU4 AZolNotF4ToU4(AF4 x){return AU4(AF4_(1.0)-x);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolU1ToF1(AU1 x){return AF1(x);}
+  AF2 AZolU2ToF2(AU2 x){return AF2(x);}
+  AF3 AZolU3ToF3(AU3 x){return AF3(x);}
+  AF4 AZolU4ToF4(AU4 x){return AF4(x);}
+//==============================================================================================================================
+  AF1 AZolAndF1(AF1 x,AF1 y){return min(x,y);}
+  AF2 AZolAndF2(AF2 x,AF2 y){return min(x,y);}
+  AF3 AZolAndF3(AF3 x,AF3 y){return min(x,y);}
+  AF4 AZolAndF4(AF4 x,AF4 y){return min(x,y);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 ASolAndNotF1(AF1 x,AF1 y){return (-x)*y+AF1_(1.0);}
+  AF2 ASolAndNotF2(AF2 x,AF2 y){return (-x)*y+AF2_(1.0);}
+  AF3 ASolAndNotF3(AF3 x,AF3 y){return (-x)*y+AF3_(1.0);}
+  AF4 ASolAndNotF4(AF4 x,AF4 y){return (-x)*y+AF4_(1.0);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolAndOrF1(AF1 x,AF1 y,AF1 z){return ASatF1(x*y+z);}
+  AF2 AZolAndOrF2(AF2 x,AF2 y,AF2 z){return ASatF2(x*y+z);}
+  AF3 AZolAndOrF3(AF3 x,AF3 y,AF3 z){return ASatF3(x*y+z);}
+  AF4 AZolAndOrF4(AF4 x,AF4 y,AF4 z){return ASatF4(x*y+z);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolGtZeroF1(AF1 x){return ASatF1(x*AF1_(A_INFP_F));}
+  AF2 AZolGtZeroF2(AF2 x){return ASatF2(x*AF2_(A_INFP_F));}
+  AF3 AZolGtZeroF3(AF3 x){return ASatF3(x*AF3_(A_INFP_F));}
+  AF4 AZolGtZeroF4(AF4 x){return ASatF4(x*AF4_(A_INFP_F));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolNotF1(AF1 x){return AF1_(1.0)-x;}
+  AF2 AZolNotF2(AF2 x){return AF2_(1.0)-x;}
+  AF3 AZolNotF3(AF3 x){return AF3_(1.0)-x;}
+  AF4 AZolNotF4(AF4 x){return AF4_(1.0)-x;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolOrF1(AF1 x,AF1 y){return max(x,y);}
+  AF2 AZolOrF2(AF2 x,AF2 y){return max(x,y);}
+  AF3 AZolOrF3(AF3 x,AF3 y){return max(x,y);}
+  AF4 AZolOrF4(AF4 x,AF4 y){return max(x,y);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolSelF1(AF1 x,AF1 y,AF1 z){AF1 r=(-x)*z+z;return x*y+r;}
+  AF2 AZolSelF2(AF2 x,AF2 y,AF2 z){AF2 r=(-x)*z+z;return x*y+r;}
+  AF3 AZolSelF3(AF3 x,AF3 y,AF3 z){AF3 r=(-x)*z+z;return x*y+r;}
+  AF4 AZolSelF4(AF4 x,AF4 y,AF4 z){AF4 r=(-x)*z+z;return x*y+r;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolSignedF1(AF1 x){return ASatF1(x*AF1_(A_INFN_F));}
+  AF2 AZolSignedF2(AF2 x){return ASatF2(x*AF2_(A_INFN_F));}
+  AF3 AZolSignedF3(AF3 x){return ASatF3(x*AF3_(A_INFN_F));}
+  AF4 AZolSignedF4(AF4 x){return ASatF4(x*AF4_(A_INFN_F));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AZolZeroPassF1(AF1 x,AF1 y){return AF1_AU1((AU1_AF1(x)!=AU1_(0))?AU1_(0):AU1_AF1(y));}
+  AF2 AZolZeroPassF2(AF2 x,AF2 y){return AF2_AU2((AU2_AF2(x)!=AU2_(0))?AU2_(0):AU2_AF2(y));}
+  AF3 AZolZeroPassF3(AF3 x,AF3 y){return AF3_AU3((AU3_AF3(x)!=AU3_(0))?AU3_(0):AU3_AF3(y));}
+  AF4 AZolZeroPassF4(AF4 x,AF4 y){return AF4_AU4((AU4_AF4(x)!=AU4_(0))?AU4_(0):AU4_AF4(y));}
+ #endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                      COLOR CONVERSIONS
+//------------------------------------------------------------------------------------------------------------------------------
+// These are all linear to/from some other space (where 'linear' has been shortened out of the function name).
+// So 'ToGamma' is 'LinearToGamma', and 'FromGamma' is 'LinearFromGamma'.
+// These are branch free implementations.
+// The AToSrgbF1() function is useful for stores for compute shaders for GPUs without hardware linear->sRGB store conversion.
+//------------------------------------------------------------------------------------------------------------------------------
+// TRANSFER FUNCTIONS
+// ==================
+// 709 ..... Rec709 used for some HDTVs
+// Gamma ... Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native
+// Pq ...... PQ native for HDR10
+// Srgb .... The sRGB output, typical of PC displays, useful for 10-bit output, or storing to 8-bit UNORM without SRGB type
+// Two ..... Gamma 2.0, fastest conversion (useful for intermediate pass approximations)
+// Three ... Gamma 3.0, less fast, but good for HDR.
+//------------------------------------------------------------------------------------------------------------------------------
+// KEEPING TO SPEC
+// ===============
+// Both Rec.709 and sRGB have a linear segment which as spec'ed would intersect the curved segment 2 times.
+//  (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range).
+//  (b.) For 8-bit  709, steps {0 to 20.7} are in the linear region (8% of the encoding range).
+// Also there is a slight step in the transition regions.
+// Precision of the coefficients in the spec being the likely cause.
+// Main usage case of the sRGB code is to do the linear->sRGB converstion in a compute shader before store.
+// This is to work around lack of hardware (typically only ROP does the conversion for free).
+// To "correct" the linear segment, would be to introduce error, because hardware decode of sRGB->linear is fixed (and free).
+// So this header keeps with the spec.
+// For linear->sRGB transforms, the linear segment in some respects reduces error, because rounding in that region is linear.
+// Rounding in the curved region in hardware (and fast software code) introduces error due to rounding in non-linear.
+//------------------------------------------------------------------------------------------------------------------------------
+// FOR PQ
+// ======
+// Both input and output is {0.0-1.0}, and where output 1.0 represents 10000.0 cd/m^2.
+// All constants are only specified to FP32 precision.
+// External PQ source reference,
+//  - https://github.com/ampas/aces-dev/blob/master/transforms/ctl/utilities/ACESlib.Utilities_Color.a1.0.1.ctl
+//------------------------------------------------------------------------------------------------------------------------------
+// PACKED VERSIONS
+// ===============
+// These are the A*H2() functions.
+// There is no PQ functions as FP16 seemed to not have enough precision for the conversion.
+// The remaining functions are "good enough" for 8-bit, and maybe 10-bit if not concerned about a few 1-bit errors.
+// Precision is lowest in the 709 conversion, higher in sRGB, higher still in Two and Gamma (when using 2.2 at least).
+//------------------------------------------------------------------------------------------------------------------------------
+// NOTES
+// =====
+// Could be faster for PQ conversions to be in ALU or a texture lookup depending on usage case.
+//==============================================================================================================================
+ #if 1
+  AF1 ATo709F1(AF1 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099);
+   return clamp(j.x  ,c*j.y  ,pow(c,j.z  )*k.x  +k.y  );}
+  AF2 ATo709F2(AF2 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099);
+   return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );}
+  AF3 ATo709F3(AF3 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099);
+   return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);}
+//------------------------------------------------------------------------------------------------------------------------------
+  // Note 'rcpX' is '1/x', where the 'x' is what would be used in AFromGamma().
+  AF1 AToGammaF1(AF1 c,AF1 rcpX){return pow(c,AF1_(rcpX));}
+  AF2 AToGammaF2(AF2 c,AF1 rcpX){return pow(c,AF2_(rcpX));}
+  AF3 AToGammaF3(AF3 c,AF1 rcpX){return pow(c,AF3_(rcpX));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AToPqF1(AF1 x){AF1 p=pow(x,AF1_(0.159302));
+   return pow((AF1_(0.835938)+AF1_(18.8516)*p)/(AF1_(1.0)+AF1_(18.6875)*p),AF1_(78.8438));}
+  AF2 AToPqF1(AF2 x){AF2 p=pow(x,AF2_(0.159302));
+   return pow((AF2_(0.835938)+AF2_(18.8516)*p)/(AF2_(1.0)+AF2_(18.6875)*p),AF2_(78.8438));}
+  AF3 AToPqF1(AF3 x){AF3 p=pow(x,AF3_(0.159302));
+   return pow((AF3_(0.835938)+AF3_(18.8516)*p)/(AF3_(1.0)+AF3_(18.6875)*p),AF3_(78.8438));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AToSrgbF1(AF1 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055);
+   return clamp(j.x  ,c*j.y  ,pow(c,j.z  )*k.x  +k.y  );}
+  AF2 AToSrgbF2(AF2 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055);
+   return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );}
+  AF3 AToSrgbF3(AF3 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055);
+   return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AToTwoF1(AF1 c){return sqrt(c);}
+  AF2 AToTwoF2(AF2 c){return sqrt(c);}
+  AF3 AToTwoF3(AF3 c){return sqrt(c);}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AToThreeF1(AF1 c){return pow(c,AF1_(1.0/3.0));}
+  AF2 AToThreeF2(AF2 c){return pow(c,AF2_(1.0/3.0));}
+  AF3 AToThreeF3(AF3 c){return pow(c,AF3_(1.0/3.0));}
+ #endif
+//==============================================================================================================================
+ #if 1
+  // Unfortunately median won't work here.
+  AF1 AFrom709F1(AF1 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099);
+   return AZolSelF1(AZolSignedF1(c-j.x  ),c*j.y  ,pow(c*k.x  +k.y  ,j.z  ));}
+  AF2 AFrom709F2(AF2 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099);
+   return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));}
+  AF3 AFrom709F3(AF3 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099);
+   return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AFromGammaF1(AF1 c,AF1 x){return pow(c,AF1_(x));}
+  AF2 AFromGammaF2(AF2 c,AF1 x){return pow(c,AF2_(x));}
+  AF3 AFromGammaF3(AF3 c,AF1 x){return pow(c,AF3_(x));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AFromPqF1(AF1 x){AF1 p=pow(x,AF1_(0.0126833));
+   return pow(ASatF1(p-AF1_(0.835938))/(AF1_(18.8516)-AF1_(18.6875)*p),AF1_(6.27739));}
+  AF2 AFromPqF1(AF2 x){AF2 p=pow(x,AF2_(0.0126833));
+   return pow(ASatF2(p-AF2_(0.835938))/(AF2_(18.8516)-AF2_(18.6875)*p),AF2_(6.27739));}
+  AF3 AFromPqF1(AF3 x){AF3 p=pow(x,AF3_(0.0126833));
+   return pow(ASatF3(p-AF3_(0.835938))/(AF3_(18.8516)-AF3_(18.6875)*p),AF3_(6.27739));}
+//------------------------------------------------------------------------------------------------------------------------------
+  // Unfortunately median won't work here.
+  AF1 AFromSrgbF1(AF1 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055);
+   return AZolSelF1(AZolSignedF1(c-j.x  ),c*j.y  ,pow(c*k.x  +k.y  ,j.z  ));}
+  AF2 AFromSrgbF2(AF2 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055);
+   return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));}
+  AF3 AFromSrgbF3(AF3 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055);
+   return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AFromTwoF1(AF1 c){return c*c;}
+  AF2 AFromTwoF2(AF2 c){return c*c;}
+  AF3 AFromTwoF3(AF3 c){return c*c;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AF1 AFromThreeF1(AF1 c){return c*c*c;}
+  AF2 AFromThreeF2(AF2 c){return c*c*c;}
+  AF3 AFromThreeF3(AF3 c){return c*c*c;}
+ #endif
+//==============================================================================================================================
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                          CS REMAP
+//==============================================================================================================================
+ // Simple remap 64x1 to 8x8 with rotated 2x2 pixel quads in quad linear.
+ //  543210
+ //  ======
+ //  ..xxx.
+ //  yy...y
+ AU2 ARmp8x8(AU1 a){return AU2(ABfe(a,1u,3u),ABfiM(ABfe(a,3u,3u),a,1u));}
+//==============================================================================================================================
+ // More complex remap 64x1 to 8x8 which is necessary for 2D wave reductions.
+ //  543210
+ //  ======
+ //  .xx..x
+ //  y..yy.
+ // Details,
+ //  LANE TO 8x8 MAPPING
+ //  ===================
+ //  00 01 08 09 10 11 18 19
+ //  02 03 0a 0b 12 13 1a 1b
+ //  04 05 0c 0d 14 15 1c 1d
+ //  06 07 0e 0f 16 17 1e 1f
+ //  20 21 28 29 30 31 38 39
+ //  22 23 2a 2b 32 33 3a 3b
+ //  24 25 2c 2d 34 35 3c 3d
+ //  26 27 2e 2f 36 37 3e 3f
+ AU2 ARmpRed8x8(AU1 a){return AU2(ABfiM(ABfe(a,2u,3u),a,1u),ABfiM(ABfe(a,3u,3u),ABfe(a,1u,2u),2u));}
+//==============================================================================================================================
+#endif
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//                                                          REFERENCE
+//
+//------------------------------------------------------------------------------------------------------------------------------
+// IEEE FLOAT RULES
+// ================
+//  - saturate(NaN)=0, saturate(-INF)=0, saturate(+INF)=1
+//  - {+/-}0 * {+/-}INF = NaN
+//  - -INF + (+INF) = NaN
+//  - {+/-}0 / {+/-}0 = NaN
+//  - {+/-}INF / {+/-}INF = NaN
+//  - a<(-0) := sqrt(a) = NaN (a=-0.0 won't NaN)
+//  - 0 == -0
+//  - 4/0 = +INF
+//  - 4/-0 = -INF
+//  - 4+INF = +INF
+//  - 4-INF = -INF
+//  - 4*(+INF) = +INF
+//  - 4*(-INF) = -INF
+//  - -4*(+INF) = -INF
+//  - sqrt(+INF) = +INF
+//------------------------------------------------------------------------------------------------------------------------------
+// FP16 ENCODING
+// =============
+// fedcba9876543210
+// ----------------
+// ......mmmmmmmmmm  10-bit mantissa (encodes 11-bit 0.5 to 1.0 except for denormals)
+// .eeeee..........  5-bit exponent
+// .00000..........  denormals
+// .00001..........  -14 exponent
+// .11110..........   15 exponent
+// .111110000000000  infinity
+// .11111nnnnnnnnnn  NaN with n!=0
+// s...............  sign
+//------------------------------------------------------------------------------------------------------------------------------
+// FP16/INT16 ALIASING DENORMAL
+// ============================
+// 11-bit unsigned integers alias with half float denormal/normal values,
+//     1 = 2^(-24) = 1/16777216 ....................... first denormal value
+//     2 = 2^(-23)
+//   ...
+//  1023 = 2^(-14)*(1-2^(-10)) = 2^(-14)*(1-1/1024) ... last denormal value
+//  1024 = 2^(-14) = 1/16384 .......................... first normal value that still maps to integers
+//  2047 .............................................. last normal value that still maps to integers
+// Scaling limits,
+//  2^15 = 32768 ...................................... largest power of 2 scaling
+// Largest pow2 conversion mapping is at *32768,
+//     1 : 2^(-9) = 1/512
+//     2 : 1/256
+//     4 : 1/128
+//     8 : 1/64
+//    16 : 1/32
+//    32 : 1/16
+//    64 : 1/8
+//   128 : 1/4
+//   256 : 1/2
+//   512 : 1
+//  1024 : 2
+//  2047 : a little less than 4
+//==============================================================================================================================
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//
+//                                                     GPU/CPU PORTABILITY
+//
+//
+//------------------------------------------------------------------------------------------------------------------------------
+// This is the GPU implementation.
+// See the CPU implementation for docs.
+//==============================================================================================================================
+#ifdef A_GPU
+ #define A_TRUE true
+ #define A_FALSE false
+ #define A_STATIC
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                     VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY
+//==============================================================================================================================
+ #define retAD2 AD2
+ #define retAD3 AD3
+ #define retAD4 AD4
+ #define retAF2 AF2
+ #define retAF3 AF3
+ #define retAF4 AF4
+ #define retAL2 AL2
+ #define retAL3 AL3
+ #define retAL4 AL4
+ #define retAU2 AU2
+ #define retAU3 AU3
+ #define retAU4 AU4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define inAD2 in AD2
+ #define inAD3 in AD3
+ #define inAD4 in AD4
+ #define inAF2 in AF2
+ #define inAF3 in AF3
+ #define inAF4 in AF4
+ #define inAL2 in AL2
+ #define inAL3 in AL3
+ #define inAL4 in AL4
+ #define inAU2 in AU2
+ #define inAU3 in AU3
+ #define inAU4 in AU4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define inoutAD2 inout AD2
+ #define inoutAD3 inout AD3
+ #define inoutAD4 inout AD4
+ #define inoutAF2 inout AF2
+ #define inoutAF3 inout AF3
+ #define inoutAF4 inout AF4
+ #define inoutAL2 inout AL2
+ #define inoutAL3 inout AL3
+ #define inoutAL4 inout AL4
+ #define inoutAU2 inout AU2
+ #define inoutAU3 inout AU3
+ #define inoutAU4 inout AU4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define outAD2 out AD2
+ #define outAD3 out AD3
+ #define outAD4 out AD4
+ #define outAF2 out AF2
+ #define outAF3 out AF3
+ #define outAF4 out AF4
+ #define outAL2 out AL2
+ #define outAL3 out AL3
+ #define outAL4 out AL4
+ #define outAU2 out AU2
+ #define outAU3 out AU3
+ #define outAU4 out AU4
+//------------------------------------------------------------------------------------------------------------------------------
+ #define varAD2(x) AD2 x
+ #define varAD3(x) AD3 x
+ #define varAD4(x) AD4 x
+ #define varAF2(x) AF2 x
+ #define varAF3(x) AF3 x
+ #define varAF4(x) AF4 x
+ #define varAL2(x) AL2 x
+ #define varAL3(x) AL3 x
+ #define varAL4(x) AL4 x
+ #define varAU2(x) AU2 x
+ #define varAU3(x) AU3 x
+ #define varAU4(x) AU4 x
+//------------------------------------------------------------------------------------------------------------------------------
+ #define initAD2(x,y) AD2(x,y)
+ #define initAD3(x,y,z) AD3(x,y,z)
+ #define initAD4(x,y,z,w) AD4(x,y,z,w)
+ #define initAF2(x,y) AF2(x,y)
+ #define initAF3(x,y,z) AF3(x,y,z)
+ #define initAF4(x,y,z,w) AF4(x,y,z,w)
+ #define initAL2(x,y) AL2(x,y)
+ #define initAL3(x,y,z) AL3(x,y,z)
+ #define initAL4(x,y,z,w) AL4(x,y,z,w)
+ #define initAU2(x,y) AU2(x,y)
+ #define initAU3(x,y,z) AU3(x,y,z)
+ #define initAU4(x,y,z,w) AU4(x,y,z,w)
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                     SCALAR RETURN OPS
+//==============================================================================================================================
+ #define AAbsD1(a) abs(AD1(a))
+ #define AAbsF1(a) abs(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ACosD1(a) cos(AD1(a))
+ #define ACosF1(a) cos(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ADotD2(a,b) dot(AD2(a),AD2(b))
+ #define ADotD3(a,b) dot(AD3(a),AD3(b))
+ #define ADotD4(a,b) dot(AD4(a),AD4(b))
+ #define ADotF2(a,b) dot(AF2(a),AF2(b))
+ #define ADotF3(a,b) dot(AF3(a),AF3(b))
+ #define ADotF4(a,b) dot(AF4(a),AF4(b))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AExp2D1(a) exp2(AD1(a))
+ #define AExp2F1(a) exp2(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AFloorD1(a) floor(AD1(a))
+ #define AFloorF1(a) floor(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ALog2D1(a) log2(AD1(a))
+ #define ALog2F1(a) log2(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AMaxD1(a,b) max(a,b)
+ #define AMaxF1(a,b) max(a,b)
+ #define AMaxL1(a,b) max(a,b)
+ #define AMaxU1(a,b) max(a,b)
+//------------------------------------------------------------------------------------------------------------------------------
+ #define AMinD1(a,b) min(a,b)
+ #define AMinF1(a,b) min(a,b)
+ #define AMinL1(a,b) min(a,b)
+ #define AMinU1(a,b) min(a,b)
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ASinD1(a) sin(AD1(a))
+ #define ASinF1(a) sin(AF1(a))
+//------------------------------------------------------------------------------------------------------------------------------
+ #define ASqrtD1(a) sqrt(AD1(a))
+ #define ASqrtF1(a) sqrt(AF1(a))
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                               SCALAR RETURN OPS - DEPENDENT
+//==============================================================================================================================
+ #define APowD1(a,b) pow(AD1(a),AF1(b))
+ #define APowF1(a,b) pow(AF1(a),AF1(b))
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                         VECTOR OPS
+//------------------------------------------------------------------------------------------------------------------------------
+// These are added as needed for production or prototyping, so not necessarily a complete set.
+// They follow a convention of taking in a destination and also returning the destination value to increase utility.
+//==============================================================================================================================
+ #ifdef A_DUBL
+  AD2 opAAbsD2(outAD2 d,inAD2 a){d=abs(a);return d;}
+  AD3 opAAbsD3(outAD3 d,inAD3 a){d=abs(a);return d;}
+  AD4 opAAbsD4(outAD4 d,inAD4 a){d=abs(a);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d=a+b;return d;}
+  AD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d=a+b;return d;}
+  AD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d=a+b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d=a+AD2_(b);return d;}
+  AD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d=a+AD3_(b);return d;}
+  AD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d=a+AD4_(b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opACpyD2(outAD2 d,inAD2 a){d=a;return d;}
+  AD3 opACpyD3(outAD3 d,inAD3 a){d=a;return d;}
+  AD4 opACpyD4(outAD4 d,inAD4 a){d=a;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d=ALerpD2(a,b,c);return d;}
+  AD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d=ALerpD3(a,b,c);return d;}
+  AD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d=ALerpD4(a,b,c);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d=ALerpD2(a,b,AD2_(c));return d;}
+  AD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d=ALerpD3(a,b,AD3_(c));return d;}
+  AD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d=ALerpD4(a,b,AD4_(c));return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d=max(a,b);return d;}
+  AD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d=max(a,b);return d;}
+  AD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d=max(a,b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d=min(a,b);return d;}
+  AD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d=min(a,b);return d;}
+  AD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d=min(a,b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d=a*b;return d;}
+  AD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d=a*b;return d;}
+  AD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d=a*b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d=a*AD2_(b);return d;}
+  AD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d=a*AD3_(b);return d;}
+  AD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d=a*AD4_(b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opANegD2(outAD2 d,inAD2 a){d=-a;return d;}
+  AD3 opANegD3(outAD3 d,inAD3 a){d=-a;return d;}
+  AD4 opANegD4(outAD4 d,inAD4 a){d=-a;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+  AD2 opARcpD2(outAD2 d,inAD2 a){d=ARcpD2(a);return d;}
+  AD3 opARcpD3(outAD3 d,inAD3 a){d=ARcpD3(a);return d;}
+  AD4 opARcpD4(outAD4 d,inAD4 a){d=ARcpD4(a);return d;}
+ #endif
+//==============================================================================================================================
+ AF2 opAAbsF2(outAF2 d,inAF2 a){d=abs(a);return d;}
+ AF3 opAAbsF3(outAF3 d,inAF3 a){d=abs(a);return d;}
+ AF4 opAAbsF4(outAF4 d,inAF4 a){d=abs(a);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d=a+b;return d;}
+ AF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d=a+b;return d;}
+ AF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d=a+b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d=a+AF2_(b);return d;}
+ AF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d=a+AF3_(b);return d;}
+ AF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d=a+AF4_(b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opACpyF2(outAF2 d,inAF2 a){d=a;return d;}
+ AF3 opACpyF3(outAF3 d,inAF3 a){d=a;return d;}
+ AF4 opACpyF4(outAF4 d,inAF4 a){d=a;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d=ALerpF2(a,b,c);return d;}
+ AF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d=ALerpF3(a,b,c);return d;}
+ AF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d=ALerpF4(a,b,c);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d=ALerpF2(a,b,AF2_(c));return d;}
+ AF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d=ALerpF3(a,b,AF3_(c));return d;}
+ AF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d=ALerpF4(a,b,AF4_(c));return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d=max(a,b);return d;}
+ AF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d=max(a,b);return d;}
+ AF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d=max(a,b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d=min(a,b);return d;}
+ AF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d=min(a,b);return d;}
+ AF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d=min(a,b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d=a*b;return d;}
+ AF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d=a*b;return d;}
+ AF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d=a*b;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d=a*AF2_(b);return d;}
+ AF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d=a*AF3_(b);return d;}
+ AF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d=a*AF4_(b);return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opANegF2(outAF2 d,inAF2 a){d=-a;return d;}
+ AF3 opANegF3(outAF3 d,inAF3 a){d=-a;return d;}
+ AF4 opANegF4(outAF4 d,inAF4 a){d=-a;return d;}
+//------------------------------------------------------------------------------------------------------------------------------
+ AF2 opARcpF2(outAF2 d,inAF2 a){d=ARcpF2(a);return d;}
+ AF3 opARcpF3(outAF3 d,inAF3 a){d=ARcpF3(a);return d;}
+ AF4 opARcpF4(outAF4 d,inAF4 a){d=ARcpF4(a);return d;}
+#endif
+
+#endif
+
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//
+//                                 [CAS] FIDELITY FX - CONSTRAST ADAPTIVE SHARPENING 1.20190610
+//
+//==============================================================================================================================
+// LICENSE
+// =======
+// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved.
+// -------
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
+// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+// -------
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
+// Software.
+// -------
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//------------------------------------------------------------------------------------------------------------------------------
+#define CAS_AREA_LIMIT 4.0
+//------------------------------------------------------------------------------------------------------------------------------
+// Pass in output and input resolution in pixels.
+// This returns true if CAS supports scaling in the given configuration.
+AP1 CasSupportScaling(AF1 outX,AF1 outY,AF1 inX,AF1 inY){return ((outX*outY)*ARcpF1(inX*inY))<=CAS_AREA_LIMIT;}
+//==============================================================================================================================
+// Call to setup required constant values (works on CPU or GPU).
+#ifndef A_GPU
+A_STATIC void CasSetup(
+ outAU4 const0,
+ outAU4 const1,
+ AF1 sharpness, // 0 := default (lower ringing), 1 := maximum (higest ringing)
+ AF1 inputSizeInPixelsX,
+ AF1 inputSizeInPixelsY,
+ AF1 outputSizeInPixelsX,
+ AF1 outputSizeInPixelsY){
+  // Scaling terms.
+  const0[0]=AU1_AF1(inputSizeInPixelsX*ARcpF1(outputSizeInPixelsX));
+  const0[1]=AU1_AF1(inputSizeInPixelsY*ARcpF1(outputSizeInPixelsY));
+  const0[2]=AU1_AF1(AF1_(0.5)*inputSizeInPixelsX*ARcpF1(outputSizeInPixelsX)-AF1_(0.5));
+  const0[3]=AU1_AF1(AF1_(0.5)*inputSizeInPixelsY*ARcpF1(outputSizeInPixelsY)-AF1_(0.5));
+  // Sharpness value.
+  AF1 sharp=-ARcpF1(ALerpF1(8.0,5.0,ASatF1(sharpness)));
+  varAF2(hSharp)=initAF2(sharp,0.0);
+  const1[0]=AU1_AF1(sharp);
+  const1[1]=AU1_AH2_AF2(hSharp);
+  const1[2]=AU1_AF1(AF1_(8.0)*inputSizeInPixelsX*ARcpF1(outputSizeInPixelsX));
+  const1[3]=0;}
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//_____________________________________________________________/\_______________________________________________________________
+//==============================================================================================================================
+//                                                     NON-PACKED VERSION
+//==============================================================================================================================
+#ifdef A_GPU
+ AF3 CasLoad(ASU2 p) { return texelFetch(diffuseRect, p, 0).rgb; }
+ void CasInput(inout AF1 r,inout AF1 g,inout AF1 b)
+ {
+    r = AFromSrgbF1(r);
+    g = AFromSrgbF1(g);
+    b = AFromSrgbF1(b);
+ }
+
+//------------------------------------------------------------------------------------------------------------------------------
+ void CasFilter(
+ out AF1 pixR, // Output values, non-vector so port between CasFilter() and CasFilterH() is easy.
+ out AF1 pixG,
+ out AF1 pixB,
+ AU2 ip, // Integer pixel position in output.
+ AU4 const0, // Constants generated by CasSetup().
+ AU4 const1,
+ AP1 noScaling){ // Must be a compile-time literal value, true = sharpen only (no resize).
+//------------------------------------------------------------------------------------------------------------------------------
+  // Debug a checker pattern of on/off tiles for visual inspection.
+  #ifdef CAS_DEBUG_CHECKER
+   if((((ip.x^ip.y)>>8u)&1u)==0u){AF3 pix0=CasLoad(ASU2(ip));
+    pixR=pix0.r;pixG=pix0.g;pixB=pix0.b;CasInput(pixR,pixG,pixB);return;}
+  #endif
+//------------------------------------------------------------------------------------------------------------------------------
+  // No scaling algorithm uses minimal 3x3 pixel neighborhood.
+  if(noScaling){
+   // a b c
+   // d e f
+   // g h i
+   ASU2 sp=ASU2(ip);
+   AF3 a=CasLoad(sp+ASU2(-1,-1));
+   AF3 b=CasLoad(sp+ASU2( 0,-1));
+   AF3 c=CasLoad(sp+ASU2( 1,-1));
+   AF3 d=CasLoad(sp+ASU2(-1, 0));
+   AF3 e=CasLoad(sp);
+   AF3 f=CasLoad(sp+ASU2( 1, 0));
+   AF3 g=CasLoad(sp+ASU2(-1, 1));
+   AF3 h=CasLoad(sp+ASU2( 0, 1));
+   AF3 i=CasLoad(sp+ASU2( 1, 1));
+   // Run optional input transform.
+   CasInput(a.r,a.g,a.b);
+   CasInput(b.r,b.g,b.b);
+   CasInput(c.r,c.g,c.b);
+   CasInput(d.r,d.g,d.b);
+   CasInput(e.r,e.g,e.b);
+   CasInput(f.r,f.g,f.b);
+   CasInput(g.r,g.g,g.b);
+   CasInput(h.r,h.g,h.b);
+   CasInput(i.r,i.g,i.b);
+   // Soft min and max.
+   //  a b c             b
+   //  d e f * 0.5  +  d e f * 0.5
+   //  g h i             h
+   // These are 2.0x bigger (factored out the extra multiply).
+   AF1 mnR=AMin3F1(AMin3F1(d.r,e.r,f.r),b.r,h.r);
+   AF1 mnG=AMin3F1(AMin3F1(d.g,e.g,f.g),b.g,h.g);
+   AF1 mnB=AMin3F1(AMin3F1(d.b,e.b,f.b),b.b,h.b);
+   #ifdef CAS_BETTER_DIAGONALS
+    AF1 mnR2=AMin3F1(AMin3F1(mnR,a.r,c.r),g.r,i.r);
+    AF1 mnG2=AMin3F1(AMin3F1(mnG,a.g,c.g),g.g,i.g);
+    AF1 mnB2=AMin3F1(AMin3F1(mnB,a.b,c.b),g.b,i.b);
+    mnR=mnR+mnR2;
+    mnG=mnG+mnG2;
+    mnB=mnB+mnB2;
+   #endif
+   AF1 mxR=AMax3F1(AMax3F1(d.r,e.r,f.r),b.r,h.r);
+   AF1 mxG=AMax3F1(AMax3F1(d.g,e.g,f.g),b.g,h.g);
+   AF1 mxB=AMax3F1(AMax3F1(d.b,e.b,f.b),b.b,h.b);
+   #ifdef CAS_BETTER_DIAGONALS
+    AF1 mxR2=AMax3F1(AMax3F1(mxR,a.r,c.r),g.r,i.r);
+    AF1 mxG2=AMax3F1(AMax3F1(mxG,a.g,c.g),g.g,i.g);
+    AF1 mxB2=AMax3F1(AMax3F1(mxB,a.b,c.b),g.b,i.b);
+    mxR=mxR+mxR2;
+    mxG=mxG+mxG2;
+    mxB=mxB+mxB2;
+   #endif
+   // Smooth minimum distance to signal limit divided by smooth max.
+   #ifdef CAS_GO_SLOWER
+    AF1 rcpMR=ARcpF1(mxR);
+    AF1 rcpMG=ARcpF1(mxG);
+    AF1 rcpMB=ARcpF1(mxB);
+   #else
+    AF1 rcpMR=APrxLoRcpF1(mxR);
+    AF1 rcpMG=APrxLoRcpF1(mxG);
+    AF1 rcpMB=APrxLoRcpF1(mxB);
+   #endif
+   #ifdef CAS_BETTER_DIAGONALS
+    AF1 ampR=ASatF1(min(mnR,AF1_(2.0)-mxR)*rcpMR);
+    AF1 ampG=ASatF1(min(mnG,AF1_(2.0)-mxG)*rcpMG);
+    AF1 ampB=ASatF1(min(mnB,AF1_(2.0)-mxB)*rcpMB);
+   #else
+    AF1 ampR=ASatF1(min(mnR,AF1_(1.0)-mxR)*rcpMR);
+    AF1 ampG=ASatF1(min(mnG,AF1_(1.0)-mxG)*rcpMG);
+    AF1 ampB=ASatF1(min(mnB,AF1_(1.0)-mxB)*rcpMB);
+   #endif
+   // Shaping amount of sharpening.
+   #ifdef CAS_GO_SLOWER
+    ampR=sqrt(ampR);
+    ampG=sqrt(ampG);
+    ampB=sqrt(ampB);
+   #else
+    ampR=APrxLoSqrtF1(ampR);
+    ampG=APrxLoSqrtF1(ampG);
+    ampB=APrxLoSqrtF1(ampB);
+   #endif
+   // Filter shape.
+   //  0 w 0
+   //  w 1 w
+   //  0 w 0
+   AF1 peak=AF1_AU1(const1.x);
+   AF1 wR=ampR*peak;
+   AF1 wG=ampG*peak;
+   AF1 wB=ampB*peak;
+   // Filter.
+   #ifndef CAS_SLOW
+    // Using green coef only, depending on dead code removal to strip out the extra overhead.
+    #ifdef CAS_GO_SLOWER
+     AF1 rcpWeight=ARcpF1(AF1_(1.0)+AF1_(4.0)*wG);
+    #else
+     AF1 rcpWeight=APrxMedRcpF1(AF1_(1.0)+AF1_(4.0)*wG);
+    #endif
+    pixR=ASatF1((b.r*wG+d.r*wG+f.r*wG+h.r*wG+e.r)*rcpWeight);
+    pixG=ASatF1((b.g*wG+d.g*wG+f.g*wG+h.g*wG+e.g)*rcpWeight);
+    pixB=ASatF1((b.b*wG+d.b*wG+f.b*wG+h.b*wG+e.b)*rcpWeight);
+   #else
+    #ifdef CAS_GO_SLOWER
+     AF1 rcpWeightR=ARcpF1(AF1_(1.0)+AF1_(4.0)*wR);
+     AF1 rcpWeightG=ARcpF1(AF1_(1.0)+AF1_(4.0)*wG);
+     AF1 rcpWeightB=ARcpF1(AF1_(1.0)+AF1_(4.0)*wB);
+    #else
+     AF1 rcpWeightR=APrxMedRcpF1(AF1_(1.0)+AF1_(4.0)*wR);
+     AF1 rcpWeightG=APrxMedRcpF1(AF1_(1.0)+AF1_(4.0)*wG);
+     AF1 rcpWeightB=APrxMedRcpF1(AF1_(1.0)+AF1_(4.0)*wB);
+    #endif
+    pixR=ASatF1((b.r*wR+d.r*wR+f.r*wR+h.r*wR+e.r)*rcpWeightR);
+    pixG=ASatF1((b.g*wG+d.g*wG+f.g*wG+h.g*wG+e.g)*rcpWeightG);
+    pixB=ASatF1((b.b*wB+d.b*wB+f.b*wB+h.b*wB+e.b)*rcpWeightB);
+   #endif
+   return;}
+//------------------------------------------------------------------------------------------------------------------------------
+  // Scaling algorithm adaptively interpolates between nearest 4 results of the non-scaling algorithm.
+  //  a b c d
+  //  e f g h
+  //  i j k l
+  //  m n o p
+  // Working these 4 results.
+  //  +-----+-----+
+  //  |     |     |
+  //  |  f..|..g  |
+  //  |  .  |  .  |
+  //  +-----+-----+
+  //  |  .  |  .  |
+  //  |  j..|..k  |
+  //  |     |     |
+  //  +-----+-----+
+  AF2 pp=AF2(ip)*AF2_AU2(const0.xy)+AF2_AU2(const0.zw);
+  AF2 fp=floor(pp);
+  pp-=fp;
+  ASU2 sp=ASU2(fp);
+  AF3 a=CasLoad(sp+ASU2(-1,-1));
+  AF3 b=CasLoad(sp+ASU2( 0,-1));
+  AF3 e=CasLoad(sp+ASU2(-1, 0));
+  AF3 f=CasLoad(sp);
+  AF3 c=CasLoad(sp+ASU2( 1,-1));
+  AF3 d=CasLoad(sp+ASU2( 2,-1));
+  AF3 g=CasLoad(sp+ASU2( 1, 0));
+  AF3 h=CasLoad(sp+ASU2( 2, 0));
+  AF3 i=CasLoad(sp+ASU2(-1, 1));
+  AF3 j=CasLoad(sp+ASU2( 0, 1));
+  AF3 m=CasLoad(sp+ASU2(-1, 2));
+  AF3 n=CasLoad(sp+ASU2( 0, 2));
+  AF3 k=CasLoad(sp+ASU2( 1, 1));
+  AF3 l=CasLoad(sp+ASU2( 2, 1));
+  AF3 o=CasLoad(sp+ASU2( 1, 2));
+  AF3 p=CasLoad(sp+ASU2( 2, 2));
+  // Run optional input transform.
+  CasInput(a.r,a.g,a.b);
+  CasInput(b.r,b.g,b.b);
+  CasInput(c.r,c.g,c.b);
+  CasInput(d.r,d.g,d.b);
+  CasInput(e.r,e.g,e.b);
+  CasInput(f.r,f.g,f.b);
+  CasInput(g.r,g.g,g.b);
+  CasInput(h.r,h.g,h.b);
+  CasInput(i.r,i.g,i.b);
+  CasInput(j.r,j.g,j.b);
+  CasInput(k.r,k.g,k.b);
+  CasInput(l.r,l.g,l.b);
+  CasInput(m.r,m.g,m.b);
+  CasInput(n.r,n.g,n.b);
+  CasInput(o.r,o.g,o.b);
+  CasInput(p.r,p.g,p.b);
+  // Soft min and max.
+  // These are 2.0x bigger (factored out the extra multiply).
+  //  a b c             b
+  //  e f g * 0.5  +  e f g * 0.5  [F]
+  //  i j k             j
+  AF1 mnfR=AMin3F1(AMin3F1(b.r,e.r,f.r),g.r,j.r);
+  AF1 mnfG=AMin3F1(AMin3F1(b.g,e.g,f.g),g.g,j.g);
+  AF1 mnfB=AMin3F1(AMin3F1(b.b,e.b,f.b),g.b,j.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mnfR2=AMin3F1(AMin3F1(mnfR,a.r,c.r),i.r,k.r);
+   AF1 mnfG2=AMin3F1(AMin3F1(mnfG,a.g,c.g),i.g,k.g);
+   AF1 mnfB2=AMin3F1(AMin3F1(mnfB,a.b,c.b),i.b,k.b);
+   mnfR=mnfR+mnfR2;
+   mnfG=mnfG+mnfG2;
+   mnfB=mnfB+mnfB2;
+  #endif
+  AF1 mxfR=AMax3F1(AMax3F1(b.r,e.r,f.r),g.r,j.r);
+  AF1 mxfG=AMax3F1(AMax3F1(b.g,e.g,f.g),g.g,j.g);
+  AF1 mxfB=AMax3F1(AMax3F1(b.b,e.b,f.b),g.b,j.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mxfR2=AMax3F1(AMax3F1(mxfR,a.r,c.r),i.r,k.r);
+   AF1 mxfG2=AMax3F1(AMax3F1(mxfG,a.g,c.g),i.g,k.g);
+   AF1 mxfB2=AMax3F1(AMax3F1(mxfB,a.b,c.b),i.b,k.b);
+   mxfR=mxfR+mxfR2;
+   mxfG=mxfG+mxfG2;
+   mxfB=mxfB+mxfB2;
+  #endif
+  //  b c d             c
+  //  f g h * 0.5  +  f g h * 0.5  [G]
+  //  j k l             k
+  AF1 mngR=AMin3F1(AMin3F1(c.r,f.r,g.r),h.r,k.r);
+  AF1 mngG=AMin3F1(AMin3F1(c.g,f.g,g.g),h.g,k.g);
+  AF1 mngB=AMin3F1(AMin3F1(c.b,f.b,g.b),h.b,k.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mngR2=AMin3F1(AMin3F1(mngR,b.r,d.r),j.r,l.r);
+   AF1 mngG2=AMin3F1(AMin3F1(mngG,b.g,d.g),j.g,l.g);
+   AF1 mngB2=AMin3F1(AMin3F1(mngB,b.b,d.b),j.b,l.b);
+   mngR=mngR+mngR2;
+   mngG=mngG+mngG2;
+   mngB=mngB+mngB2;
+  #endif
+  AF1 mxgR=AMax3F1(AMax3F1(c.r,f.r,g.r),h.r,k.r);
+  AF1 mxgG=AMax3F1(AMax3F1(c.g,f.g,g.g),h.g,k.g);
+  AF1 mxgB=AMax3F1(AMax3F1(c.b,f.b,g.b),h.b,k.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mxgR2=AMax3F1(AMax3F1(mxgR,b.r,d.r),j.r,l.r);
+   AF1 mxgG2=AMax3F1(AMax3F1(mxgG,b.g,d.g),j.g,l.g);
+   AF1 mxgB2=AMax3F1(AMax3F1(mxgB,b.b,d.b),j.b,l.b);
+   mxgR=mxgR+mxgR2;
+   mxgG=mxgG+mxgG2;
+   mxgB=mxgB+mxgB2;
+  #endif
+  //  e f g             f
+  //  i j k * 0.5  +  i j k * 0.5  [J]
+  //  m n o             n
+  AF1 mnjR=AMin3F1(AMin3F1(f.r,i.r,j.r),k.r,n.r);
+  AF1 mnjG=AMin3F1(AMin3F1(f.g,i.g,j.g),k.g,n.g);
+  AF1 mnjB=AMin3F1(AMin3F1(f.b,i.b,j.b),k.b,n.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mnjR2=AMin3F1(AMin3F1(mnjR,e.r,g.r),m.r,o.r);
+   AF1 mnjG2=AMin3F1(AMin3F1(mnjG,e.g,g.g),m.g,o.g);
+   AF1 mnjB2=AMin3F1(AMin3F1(mnjB,e.b,g.b),m.b,o.b);
+   mnjR=mnjR+mnjR2;
+   mnjG=mnjG+mnjG2;
+   mnjB=mnjB+mnjB2;
+  #endif
+  AF1 mxjR=AMax3F1(AMax3F1(f.r,i.r,j.r),k.r,n.r);
+  AF1 mxjG=AMax3F1(AMax3F1(f.g,i.g,j.g),k.g,n.g);
+  AF1 mxjB=AMax3F1(AMax3F1(f.b,i.b,j.b),k.b,n.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mxjR2=AMax3F1(AMax3F1(mxjR,e.r,g.r),m.r,o.r);
+   AF1 mxjG2=AMax3F1(AMax3F1(mxjG,e.g,g.g),m.g,o.g);
+   AF1 mxjB2=AMax3F1(AMax3F1(mxjB,e.b,g.b),m.b,o.b);
+   mxjR=mxjR+mxjR2;
+   mxjG=mxjG+mxjG2;
+   mxjB=mxjB+mxjB2;
+  #endif
+  //  f g h             g
+  //  j k l * 0.5  +  j k l * 0.5  [K]
+  //  n o p             o
+  AF1 mnkR=AMin3F1(AMin3F1(g.r,j.r,k.r),l.r,o.r);
+  AF1 mnkG=AMin3F1(AMin3F1(g.g,j.g,k.g),l.g,o.g);
+  AF1 mnkB=AMin3F1(AMin3F1(g.b,j.b,k.b),l.b,o.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mnkR2=AMin3F1(AMin3F1(mnkR,f.r,h.r),n.r,p.r);
+   AF1 mnkG2=AMin3F1(AMin3F1(mnkG,f.g,h.g),n.g,p.g);
+   AF1 mnkB2=AMin3F1(AMin3F1(mnkB,f.b,h.b),n.b,p.b);
+   mnkR=mnkR+mnkR2;
+   mnkG=mnkG+mnkG2;
+   mnkB=mnkB+mnkB2;
+  #endif
+  AF1 mxkR=AMax3F1(AMax3F1(g.r,j.r,k.r),l.r,o.r);
+  AF1 mxkG=AMax3F1(AMax3F1(g.g,j.g,k.g),l.g,o.g);
+  AF1 mxkB=AMax3F1(AMax3F1(g.b,j.b,k.b),l.b,o.b);
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 mxkR2=AMax3F1(AMax3F1(mxkR,f.r,h.r),n.r,p.r);
+   AF1 mxkG2=AMax3F1(AMax3F1(mxkG,f.g,h.g),n.g,p.g);
+   AF1 mxkB2=AMax3F1(AMax3F1(mxkB,f.b,h.b),n.b,p.b);
+   mxkR=mxkR+mxkR2;
+   mxkG=mxkG+mxkG2;
+   mxkB=mxkB+mxkB2;
+  #endif
+  // Smooth minimum distance to signal limit divided by smooth max.
+  #ifdef CAS_GO_SLOWER
+   AF1 rcpMfR=ARcpF1(mxfR);
+   AF1 rcpMfG=ARcpF1(mxfG);
+   AF1 rcpMfB=ARcpF1(mxfB);
+   AF1 rcpMgR=ARcpF1(mxgR);
+   AF1 rcpMgG=ARcpF1(mxgG);
+   AF1 rcpMgB=ARcpF1(mxgB);
+   AF1 rcpMjR=ARcpF1(mxjR);
+   AF1 rcpMjG=ARcpF1(mxjG);
+   AF1 rcpMjB=ARcpF1(mxjB);
+   AF1 rcpMkR=ARcpF1(mxkR);
+   AF1 rcpMkG=ARcpF1(mxkG);
+   AF1 rcpMkB=ARcpF1(mxkB);
+  #else
+   AF1 rcpMfR=APrxLoRcpF1(mxfR);
+   AF1 rcpMfG=APrxLoRcpF1(mxfG);
+   AF1 rcpMfB=APrxLoRcpF1(mxfB);
+   AF1 rcpMgR=APrxLoRcpF1(mxgR);
+   AF1 rcpMgG=APrxLoRcpF1(mxgG);
+   AF1 rcpMgB=APrxLoRcpF1(mxgB);
+   AF1 rcpMjR=APrxLoRcpF1(mxjR);
+   AF1 rcpMjG=APrxLoRcpF1(mxjG);
+   AF1 rcpMjB=APrxLoRcpF1(mxjB);
+   AF1 rcpMkR=APrxLoRcpF1(mxkR);
+   AF1 rcpMkG=APrxLoRcpF1(mxkG);
+   AF1 rcpMkB=APrxLoRcpF1(mxkB);
+  #endif
+  #ifdef CAS_BETTER_DIAGONALS
+   AF1 ampfR=ASatF1(min(mnfR,AF1_(2.0)-mxfR)*rcpMfR);
+   AF1 ampfG=ASatF1(min(mnfG,AF1_(2.0)-mxfG)*rcpMfG);
+   AF1 ampfB=ASatF1(min(mnfB,AF1_(2.0)-mxfB)*rcpMfB);
+   AF1 ampgR=ASatF1(min(mngR,AF1_(2.0)-mxgR)*rcpMgR);
+   AF1 ampgG=ASatF1(min(mngG,AF1_(2.0)-mxgG)*rcpMgG);
+   AF1 ampgB=ASatF1(min(mngB,AF1_(2.0)-mxgB)*rcpMgB);
+   AF1 ampjR=ASatF1(min(mnjR,AF1_(2.0)-mxjR)*rcpMjR);
+   AF1 ampjG=ASatF1(min(mnjG,AF1_(2.0)-mxjG)*rcpMjG);
+   AF1 ampjB=ASatF1(min(mnjB,AF1_(2.0)-mxjB)*rcpMjB);
+   AF1 ampkR=ASatF1(min(mnkR,AF1_(2.0)-mxkR)*rcpMkR);
+   AF1 ampkG=ASatF1(min(mnkG,AF1_(2.0)-mxkG)*rcpMkG);
+   AF1 ampkB=ASatF1(min(mnkB,AF1_(2.0)-mxkB)*rcpMkB);
+  #else
+   AF1 ampfR=ASatF1(min(mnfR,AF1_(1.0)-mxfR)*rcpMfR);
+   AF1 ampfG=ASatF1(min(mnfG,AF1_(1.0)-mxfG)*rcpMfG);
+   AF1 ampfB=ASatF1(min(mnfB,AF1_(1.0)-mxfB)*rcpMfB);
+   AF1 ampgR=ASatF1(min(mngR,AF1_(1.0)-mxgR)*rcpMgR);
+   AF1 ampgG=ASatF1(min(mngG,AF1_(1.0)-mxgG)*rcpMgG);
+   AF1 ampgB=ASatF1(min(mngB,AF1_(1.0)-mxgB)*rcpMgB);
+   AF1 ampjR=ASatF1(min(mnjR,AF1_(1.0)-mxjR)*rcpMjR);
+   AF1 ampjG=ASatF1(min(mnjG,AF1_(1.0)-mxjG)*rcpMjG);
+   AF1 ampjB=ASatF1(min(mnjB,AF1_(1.0)-mxjB)*rcpMjB);
+   AF1 ampkR=ASatF1(min(mnkR,AF1_(1.0)-mxkR)*rcpMkR);
+   AF1 ampkG=ASatF1(min(mnkG,AF1_(1.0)-mxkG)*rcpMkG);
+   AF1 ampkB=ASatF1(min(mnkB,AF1_(1.0)-mxkB)*rcpMkB);
+  #endif
+  // Shaping amount of sharpening.
+  #ifdef CAS_GO_SLOWER
+   ampfR=sqrt(ampfR);
+   ampfG=sqrt(ampfG);
+   ampfB=sqrt(ampfB);
+   ampgR=sqrt(ampgR);
+   ampgG=sqrt(ampgG);
+   ampgB=sqrt(ampgB);
+   ampjR=sqrt(ampjR);
+   ampjG=sqrt(ampjG);
+   ampjB=sqrt(ampjB);
+   ampkR=sqrt(ampkR);
+   ampkG=sqrt(ampkG);
+   ampkB=sqrt(ampkB);
+  #else
+   ampfR=APrxLoSqrtF1(ampfR);
+   ampfG=APrxLoSqrtF1(ampfG);
+   ampfB=APrxLoSqrtF1(ampfB);
+   ampgR=APrxLoSqrtF1(ampgR);
+   ampgG=APrxLoSqrtF1(ampgG);
+   ampgB=APrxLoSqrtF1(ampgB);
+   ampjR=APrxLoSqrtF1(ampjR);
+   ampjG=APrxLoSqrtF1(ampjG);
+   ampjB=APrxLoSqrtF1(ampjB);
+   ampkR=APrxLoSqrtF1(ampkR);
+   ampkG=APrxLoSqrtF1(ampkG);
+   ampkB=APrxLoSqrtF1(ampkB);
+  #endif
+  // Filter shape.
+  //  0 w 0
+  //  w 1 w
+  //  0 w 0
+  AF1 peak=AF1_AU1(const1.x);
+  AF1 wfR=ampfR*peak;
+  AF1 wfG=ampfG*peak;
+  AF1 wfB=ampfB*peak;
+  AF1 wgR=ampgR*peak;
+  AF1 wgG=ampgG*peak;
+  AF1 wgB=ampgB*peak;
+  AF1 wjR=ampjR*peak;
+  AF1 wjG=ampjG*peak;
+  AF1 wjB=ampjB*peak;
+  AF1 wkR=ampkR*peak;
+  AF1 wkG=ampkG*peak;
+  AF1 wkB=ampkB*peak;
+  // Blend between 4 results.
+  //  s t
+  //  u v
+  AF1 s=(AF1_(1.0)-pp.x)*(AF1_(1.0)-pp.y);
+  AF1 t=           pp.x *(AF1_(1.0)-pp.y);
+  AF1 u=(AF1_(1.0)-pp.x)*           pp.y ;
+  AF1 v=           pp.x *           pp.y ;
+  // Thin edges to hide bilinear interpolation (helps diagonals).
+  AF1 thinB=1.0/32.0;
+  #ifdef CAS_GO_SLOWER
+   s*=ARcpF1(thinB+(mxfG-mnfG));
+   t*=ARcpF1(thinB+(mxgG-mngG));
+   u*=ARcpF1(thinB+(mxjG-mnjG));
+   v*=ARcpF1(thinB+(mxkG-mnkG));
+  #else
+   s*=APrxLoRcpF1(thinB+(mxfG-mnfG));
+   t*=APrxLoRcpF1(thinB+(mxgG-mngG));
+   u*=APrxLoRcpF1(thinB+(mxjG-mnjG));
+   v*=APrxLoRcpF1(thinB+(mxkG-mnkG));
+  #endif
+  // Final weighting.
+  //    b c
+  //  e f g h
+  //  i j k l
+  //    n o
+  //  _____  _____  _____  _____
+  //         fs        gt
+  //
+  //  _____  _____  _____  _____
+  //  fs      s gt  fs  t     gt
+  //         ju        kv
+  //  _____  _____  _____  _____
+  //         fs        gt
+  //  ju      u kv  ju  v     kv
+  //  _____  _____  _____  _____
+  //
+  //         ju        kv
+  AF1 qbeR=wfR*s;
+  AF1 qbeG=wfG*s;
+  AF1 qbeB=wfB*s;
+  AF1 qchR=wgR*t;
+  AF1 qchG=wgG*t;
+  AF1 qchB=wgB*t;
+  AF1 qfR=wgR*t+wjR*u+s;
+  AF1 qfG=wgG*t+wjG*u+s;
+  AF1 qfB=wgB*t+wjB*u+s;
+  AF1 qgR=wfR*s+wkR*v+t;
+  AF1 qgG=wfG*s+wkG*v+t;
+  AF1 qgB=wfB*s+wkB*v+t;
+  AF1 qjR=wfR*s+wkR*v+u;
+  AF1 qjG=wfG*s+wkG*v+u;
+  AF1 qjB=wfB*s+wkB*v+u;
+  AF1 qkR=wgR*t+wjR*u+v;
+  AF1 qkG=wgG*t+wjG*u+v;
+  AF1 qkB=wgB*t+wjB*u+v;
+  AF1 qinR=wjR*u;
+  AF1 qinG=wjG*u;
+  AF1 qinB=wjB*u;
+  AF1 qloR=wkR*v;
+  AF1 qloG=wkG*v;
+  AF1 qloB=wkB*v;
+  // Filter.
+  #ifndef CAS_SLOW
+   // Using green coef only, depending on dead code removal to strip out the extra overhead.
+   #ifdef CAS_GO_SLOWER
+    AF1 rcpWG=ARcpF1(AF1_(2.0)*qbeG+AF1_(2.0)*qchG+AF1_(2.0)*qinG+AF1_(2.0)*qloG+qfG+qgG+qjG+qkG);
+   #else
+    AF1 rcpWG=APrxMedRcpF1(AF1_(2.0)*qbeG+AF1_(2.0)*qchG+AF1_(2.0)*qinG+AF1_(2.0)*qloG+qfG+qgG+qjG+qkG);
+   #endif
+   pixR=ASatF1((b.r*qbeG+e.r*qbeG+c.r*qchG+h.r*qchG+i.r*qinG+n.r*qinG+l.r*qloG+o.r*qloG+f.r*qfG+g.r*qgG+j.r*qjG+k.r*qkG)*rcpWG);
+   pixG=ASatF1((b.g*qbeG+e.g*qbeG+c.g*qchG+h.g*qchG+i.g*qinG+n.g*qinG+l.g*qloG+o.g*qloG+f.g*qfG+g.g*qgG+j.g*qjG+k.g*qkG)*rcpWG);
+   pixB=ASatF1((b.b*qbeG+e.b*qbeG+c.b*qchG+h.b*qchG+i.b*qinG+n.b*qinG+l.b*qloG+o.b*qloG+f.b*qfG+g.b*qgG+j.b*qjG+k.b*qkG)*rcpWG);
+  #else
+   #ifdef CAS_GO_SLOWER
+    AF1 rcpWR=ARcpF1(AF1_(2.0)*qbeR+AF1_(2.0)*qchR+AF1_(2.0)*qinR+AF1_(2.0)*qloR+qfR+qgR+qjR+qkR);
+    AF1 rcpWG=ARcpF1(AF1_(2.0)*qbeG+AF1_(2.0)*qchG+AF1_(2.0)*qinG+AF1_(2.0)*qloG+qfG+qgG+qjG+qkG);
+    AF1 rcpWB=ARcpF1(AF1_(2.0)*qbeB+AF1_(2.0)*qchB+AF1_(2.0)*qinB+AF1_(2.0)*qloB+qfB+qgB+qjB+qkB);
+   #else
+    AF1 rcpWR=APrxMedRcpF1(AF1_(2.0)*qbeR+AF1_(2.0)*qchR+AF1_(2.0)*qinR+AF1_(2.0)*qloR+qfR+qgR+qjR+qkR);
+    AF1 rcpWG=APrxMedRcpF1(AF1_(2.0)*qbeG+AF1_(2.0)*qchG+AF1_(2.0)*qinG+AF1_(2.0)*qloG+qfG+qgG+qjG+qkG);
+    AF1 rcpWB=APrxMedRcpF1(AF1_(2.0)*qbeB+AF1_(2.0)*qchB+AF1_(2.0)*qinB+AF1_(2.0)*qloB+qfB+qgB+qjB+qkB);
+   #endif
+   pixR=ASatF1((b.r*qbeR+e.r*qbeR+c.r*qchR+h.r*qchR+i.r*qinR+n.r*qinR+l.r*qloR+o.r*qloR+f.r*qfR+g.r*qgR+j.r*qjR+k.r*qkR)*rcpWR);
+   pixG=ASatF1((b.g*qbeG+e.g*qbeG+c.g*qchG+h.g*qchG+i.g*qinG+n.g*qinG+l.g*qloG+o.g*qloG+f.g*qfG+g.g*qgG+j.g*qjG+k.g*qkG)*rcpWG);
+   pixB=ASatF1((b.b*qbeB+e.b*qbeB+c.b*qchB+h.b*qchB+i.b*qinB+n.b*qinB+l.b*qloB+o.b*qloB+f.b*qfB+g.b*qgB+j.b*qjB+k.b*qkB)*rcpWB);
+  #endif
+ }
+#endif
+
+#ifdef A_GPU
+void main()
+{
+    vec4 diff = vec4(0.f);
+    uvec2 point = uvec2(vary_fragcoord * out_screen_res.xy);
+    CasFilter(diff.r, diff.g, diff.b, point, cas_param_0, cas_param_1, true);
+    frag_color = vec4(linear_to_srgb(diff.rgb), 1.0);
+}
+#endif
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 213f0ab845..9be7254a7a 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -79,6 +79,7 @@ RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	4
 RenderHeroProbeConservativeUpdateMultiplier 1 16
 RenderDownScaleMethod       1   1
+RenderCASSharpness          1   1
 
 
 //
@@ -115,6 +116,7 @@ RenderHeroProbeResolution	1	256
 RenderHeroProbeDistance		1	4
 RenderHeroProbeUpdateRate	1	6
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium Low Graphics Settings
@@ -150,6 +152,7 @@ RenderHeroProbeResolution	1	256
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	3
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium Graphics Settings (standard)
@@ -185,6 +188,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	3
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium High Graphics Settings
@@ -220,6 +224,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	2
 RenderHeroProbeConservativeUpdateMultiplier 1 8
+RenderCASSharpness          1   0
 
 //
 // High Graphics Settings (SSAO + sun shadows)
@@ -255,6 +260,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	8
 RenderHeroProbeUpdateRate	1	2
 RenderHeroProbeConservativeUpdateMultiplier 1 8
+RenderCASSharpness          1   0.4
 
 //
 // High Ultra Graphics Settings (deferred + SSAO + all shadows)
@@ -290,6 +296,7 @@ RenderHeroProbeResolution	1	1024
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
 RenderHeroProbeConservativeUpdateMultiplier 1 4
+RenderCASSharpness          1   0.4
 
 //
 // Ultra graphics (REALLY PURTY!)
@@ -325,6 +332,7 @@ RenderHeroProbeResolution	1	2048
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
 RenderHeroProbeConservativeUpdateMultiplier 1 4
+RenderCASSharpness          1   0.4
 
 //
 // Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 008e4c8882..8eaf5894ab 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -77,6 +77,7 @@ RenderHeroProbeResolution	1	2048
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	4
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   1
 
 //
 // Low Graphics Settings
@@ -112,6 +113,7 @@ RenderHeroProbeResolution	1	256
 RenderHeroProbeDistance		1	4
 RenderHeroProbeUpdateRate	1   6
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium Low Graphics Settings
@@ -147,6 +149,7 @@ RenderHeroProbeResolution	1	256
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	3
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium Graphics Settings (standard)
@@ -182,6 +185,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	3
 RenderHeroProbeConservativeUpdateMultiplier 1 16
+RenderCASSharpness          1   0
 
 //
 // Medium High Graphics Settings
@@ -217,6 +221,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	6
 RenderHeroProbeUpdateRate	1	2
 RenderHeroProbeConservativeUpdateMultiplier 1 8
+RenderCASSharpness          1   0
 
 //
 // High Graphics Settings (SSAO + sun shadows)
@@ -252,6 +257,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	8
 RenderHeroProbeUpdateRate	1	2
 RenderHeroProbeConservativeUpdateMultiplier 1 8
+RenderCASSharpness          1   0
 
 //
 // High Ultra Graphics Settings (SSAO + all shadows)
@@ -287,6 +293,7 @@ RenderHeroProbeResolution	1	512
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
 RenderHeroProbeConservativeUpdateMultiplier 1 4
+RenderCASSharpness          1   0.4
 
 //
 // Ultra graphics (REALLY PURTY!)
@@ -322,6 +329,7 @@ RenderHeroProbeResolution	1	1024
 RenderHeroProbeDistance		1	16
 RenderHeroProbeUpdateRate	1	1
 RenderHeroProbeConservativeUpdateMultiplier 1 4
+RenderCASSharpness          1   0.4
 
 //
 // Class Unknown Hardware (unknown)
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 993e8742e0..680a519e12 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -201,6 +201,7 @@ LLGLSLShader            gExposureProgram;
 LLGLSLShader            gExposureProgramNoFade;
 LLGLSLShader            gLuminanceProgram;
 LLGLSLShader            gFXAAProgram;
+LLGLSLShader            gCASProgram;
 LLGLSLShader            gDeferredPostNoDoFProgram;
 LLGLSLShader            gDeferredWLSkyProgram;
 LLGLSLShader            gEnvironmentMapProgram;
@@ -2349,6 +2350,17 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         llassert(success);
     }
 
+    if (success)
+    {
+        gCASProgram.mName = "Contrast Adaptive Sharpening Shader";
+        gCASProgram.mFeatures.hasSrgb = true;
+        gCASProgram.mShaderFiles.clear();
+        gCASProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
+        gCASProgram.mShaderFiles.push_back(make_pair("deferred/CASF.glsl", GL_FRAGMENT_SHADER));
+        gCASProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+        gCASProgram.createShader();
+    }
+
     if (success)
     {
         gDeferredPostProgram.mName = "Deferred Post Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 59b613b7ea..b858530c3e 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -246,6 +246,7 @@ extern LLGLSLShader         gDeferredPostProgram;
 extern LLGLSLShader         gDeferredCoFProgram;
 extern LLGLSLShader         gDeferredDoFCombineProgram;
 extern LLGLSLShader         gFXAAProgram;
+extern LLGLSLShader         gCASProgram;
 extern LLGLSLShader         gDeferredPostNoDoFProgram;
 extern LLGLSLShader         gDeferredPostGammaCorrectProgram;
 extern LLGLSLShader         gNoPostGammaCorrectProgram;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 57cabcd18f..46d9c07828 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -117,6 +117,17 @@
 #include "llenvironment.h"
 #include "llsettingsvo.h"
 
+#ifndef LL_WINDOWS
+#define A_GCC 1
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#if LL_LINUX
+#pragma GCC diagnostic ignored "-Wrestrict"
+#endif
+#endif
+#define A_CPU 1
+#include "app_settings/shaders/class1/deferred/CASF.glsl" // This is also C++
+
 extern bool gSnapshot;
 bool gShiftFrame = false;
 
@@ -202,6 +213,7 @@ S32 LLPipeline::RenderBufferVisualization;
 bool LLPipeline::RenderMirrors;
 S32 LLPipeline::RenderHeroProbeUpdateRate;
 S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier;
+F32 LLPipeline::RenderCASSharpness;
 LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
 
 const U32 LLPipeline::MAX_BAKE_WIDTH = 512;
@@ -564,6 +576,7 @@ void LLPipeline::init()
     connectRefreshCachedSettingsSafe("RenderMirrors");
     connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate");
     connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier");
+    connectRefreshCachedSettingsSafe("RenderCASSharpness");
     gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
 }
 
@@ -1081,6 +1094,7 @@ void LLPipeline::refreshCachedSettings()
     RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
     RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
     RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
+    RenderCASSharpness = gSavedSettings.getF32("RenderCASSharpness");
 
     sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled");
     RenderSpotLight = nullptr;
@@ -7133,6 +7147,50 @@ void LLPipeline::generateGlow(LLRenderTarget* src)
     }
 }
 
+void LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst)
+{
+    if (RenderCASSharpness == 0.0)
+    {
+        gPipeline.copyRenderTarget(src, dst);
+        return;
+    }
+
+    LLGLSLShader* sharpen_shader = &gCASProgram;
+
+    // Bind setup:
+    dst->bindTarget();
+
+    sharpen_shader->bind();
+
+    {
+        static LLStaticHashedString cas_param_0("cas_param_0");
+        static LLStaticHashedString cas_param_1("cas_param_1");
+        static LLStaticHashedString out_screen_res("out_screen_res");
+
+        varAU4(const0);
+        varAU4(const1);
+        CasSetup(const0, const1,
+            RenderCASSharpness,             // Sharpness tuning knob (0.0 to 1.0).
+            (AF1)src->getWidth(), (AF1)src->getHeight(),  // Input size.
+            (AF1)dst->getWidth(), (AF1)dst->getHeight()); // Output size.
+
+        sharpen_shader->uniform4uiv(cas_param_0, 1, const0);
+        sharpen_shader->uniform4uiv(cas_param_1, 1, const1);
+
+        sharpen_shader->uniform2f(out_screen_res, (AF1)dst->getWidth(), (AF1)dst->getHeight());
+    }
+
+    sharpen_shader->bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT);
+
+    // Draw
+    gPipeline.mScreenTriangleVB->setBuffer();
+    gPipeline.mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+    sharpen_shader->unbind();
+
+    dst->flush();
+}
+
 void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
 {
     {
@@ -7502,13 +7560,15 @@ void LLPipeline::renderFinalize()
     gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
     glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
 
-    renderDoF(&mRT->screen, &mPostMap);
+    applyCAS(&mRT->screen, &mPostMap);
+
+    renderDoF(&mPostMap, &mRT->screen);
 
-    applyFXAA(&mPostMap, &mRT->screen);
-    LLRenderTarget* finalBuffer = &mRT->screen;
+    applyFXAA(&mRT->screen, &mPostMap);
+    LLRenderTarget* finalBuffer = &mPostMap;
     if (RenderBufferVisualization > -1)
     {
-        finalBuffer = &mPostMap;
+        finalBuffer = &mRT->screen;
         switch (RenderBufferVisualization)
         {
         case 0:
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 024303d5f0..a58b7850ea 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -157,6 +157,7 @@ public:
     void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true);
     void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst);
     void generateGlow(LLRenderTarget* src);
+    void applyCAS(LLRenderTarget* src, LLRenderTarget* dst);
     void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst);
     void renderDoF(LLRenderTarget* src, LLRenderTarget* dst);
     void copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst);
@@ -1067,6 +1068,7 @@ public:
     static bool RenderMirrors;
     static S32 RenderHeroProbeUpdateRate;
     static S32 RenderHeroProbeConservativeUpdateMultiplier;
+    static F32 RenderCASSharpness;
 };
 
 void render_bbox(const LLVector3 &min, const LLVector3 &max);
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index 7bc81a1f79..3e578e94f4 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -881,7 +881,26 @@
       value="1"/>
   </combo_box>
   <!-- End of mirror settings -->
-
+  <!-- Sharpening Settings -->
+  <slider
+    control_name="RenderCASSharpness"
+    decimal_digits="1"
+    follows="left|top"
+    height="16"
+    increment="0.1"
+    initial_value="160"
+    label="Sharpening:"
+    label_width="145"
+    layout="topleft"
+    left="420"
+    min_val="0.0"
+    max_val="1.0"
+    name="RenderSharpness"
+    show_text="true"
+    top_delta="24"
+    width="260">
+  </slider>
+  <!-- End of Sharpening Settings-->
   <!-- End of Advanced Settings block -->
 	<view_border
       bevel_style="in"
-- 
cgit v1.2.3


From 2ca193ce468cd4420e0ed47a7991661d1b1ca635 Mon Sep 17 00:00:00 2001
From: Rye Cogtail <rye@lindenlab.com>
Date: Fri, 23 Aug 2024 22:06:28 -0400
Subject: Improve FXAA quality and performance when GL version is greater then
 4 Adds gather4 support under GLSL 4.0+

---
 indra/llrender/llshadermgr.cpp                       |  2 --
 .../app_settings/shaders/class1/deferred/fxaaF.glsl  | 20 +++++++++++++++++---
 indra/newview/llviewershadermgr.cpp                  | 10 ++++++++++
 3 files changed, 27 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 512ef340f9..e9608491a4 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -595,8 +595,6 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
                 extra_code_text[extra_code_count++] = strdup("precision highp float;\n");
             }
         }
-
-        extra_code_text[extra_code_count++] = strdup("#define FXAA_GLSL_130 1\n");
     }
 
     // Use alpha float to store bit flags
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index 94dac7e5a9..16e23a3da7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -256,6 +256,10 @@ A. Or use FXAA_GREEN_AS_LUMA.
     #define FXAA_GLSL_130 0
 #endif
 /*--------------------------------------------------------------------------*/
+#ifndef FXAA_GLSL_400
+    #define FXAA_GLSL_400 0
+#endif
+/*--------------------------------------------------------------------------*/
 #ifndef FXAA_HLSL_3
     #define FXAA_HLSL_3 0
 #endif
@@ -342,8 +346,8 @@ A. Or use FXAA_GREEN_AS_LUMA.
     // 1 = API supports gather4 on alpha channel.
     // 0 = API does not support gather4 on alpha channel.
     //
-    #if (FXAA_GLSL_130 == 0)
-        #define FXAA_GATHER4_ALPHA 0
+    #if (FXAA_GLSL_400 == 1)
+        #define FXAA_GATHER4_ALPHA 1
     #endif
     #if (FXAA_HLSL_5 == 1)
         #define FXAA_GATHER4_ALPHA 1
@@ -652,7 +656,7 @@ NOTE the other tuning knobs are now in the shader function inputs!
                                 API PORTING
 
 ============================================================================*/
-#if (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)
+#if (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1) || (FXAA_GLSL_400 == 1)
     #define FxaaBool bool
     #define FxaaDiscard discard
     #define FxaaFloat float
@@ -714,6 +718,16 @@ NOTE the other tuning knobs are now in the shader function inputs!
     #endif
 #endif
 /*--------------------------------------------------------------------------*/
+#if (FXAA_GLSL_400 == 1)
+    // Requires "#version 400" or better
+    #define FxaaTexTop(t, p) textureLod(t, p, 0.0)
+    #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)
+    #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)
+    #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)
+    #define FxaaTexGreen4(t, p) textureGather(t, p, 1)
+    #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)
+#endif
+/*--------------------------------------------------------------------------*/
 #if (FXAA_HLSL_3 == 1) || (FXAA_360 == 1) || (FXAA_PS3 == 1)
     #define FxaaInt2 float2
     #define FxaaTex sampler2D
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 680a519e12..d1dea16bc0 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2345,6 +2345,16 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         gFXAAProgram.mShaderFiles.clear();
         gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER));
         gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER));
+
+        if (gGLManager.mGLVersion > 3.9)
+        {
+            gFXAAProgram.addPermutation("FXAA_GLSL_400", "1");
+        }
+        else
+        {
+            gFXAAProgram.addPermutation("FXAA_GLSL_130", "1");
+        }
+
         gFXAAProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
         success = gFXAAProgram.createShader();
         llassert(success);
-- 
cgit v1.2.3


From 436e986893d6eb9de1c4531540e6e2afe8ec06cb Mon Sep 17 00:00:00 2001
From: Rye Cogtail <rye@lindenlab.com>
Date: Fri, 23 Aug 2024 22:05:34 -0400
Subject: Fix mac crash on startup due to missing types from enum

---
 indra/llrender/llimagegl.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index d5f7949051..03ac10c00a 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -316,8 +316,12 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
     case GL_RG16F:                                  return 32;
     case GL_RGB16F:                                 return 48;
     case GL_RGBA16F:                                return 64;
+    case GL_R32F:                                   return 32;
+    case GL_RG32F:                                  return 64;
+    case GL_RGB32F:                                 return 96;
+    case GL_RGBA32F:                                return 128;
     default:
-        LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL;
+        LL_ERRS() << "LLImageGL::Unknown format: " << std::hex << dataformat << std::dec << LL_ENDL;
         return 0;
     }
 }
@@ -367,7 +371,7 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
       case GL_SRGB_ALPHA:                       return 4;
       case GL_BGRA:                             return 4;       // Used for QuickTime media textures on the Mac
       default:
-        LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL;
+        LL_ERRS() << "LLImageGL::Unknown format: " << std::hex << dataformat << std::dec << LL_ENDL;
         return 0;
     }
 }
-- 
cgit v1.2.3


From ca115671d6310798ac512a9a6baa71a06f14e9ce Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 26 Aug 2024 15:42:57 -0400
Subject: Replaced refreshCachedSetting for sharpening with cached control

---
 indra/newview/pipeline.cpp | 8 +++-----
 indra/newview/pipeline.h   | 1 -
 2 files changed, 3 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 46d9c07828..eaf54356a2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -213,7 +213,6 @@ S32 LLPipeline::RenderBufferVisualization;
 bool LLPipeline::RenderMirrors;
 S32 LLPipeline::RenderHeroProbeUpdateRate;
 S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier;
-F32 LLPipeline::RenderCASSharpness;
 LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
 
 const U32 LLPipeline::MAX_BAKE_WIDTH = 512;
@@ -576,7 +575,6 @@ void LLPipeline::init()
     connectRefreshCachedSettingsSafe("RenderMirrors");
     connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate");
     connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier");
-    connectRefreshCachedSettingsSafe("RenderCASSharpness");
     gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
 }
 
@@ -1094,7 +1092,6 @@ void LLPipeline::refreshCachedSettings()
     RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
     RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
     RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
-    RenderCASSharpness = gSavedSettings.getF32("RenderCASSharpness");
 
     sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled");
     RenderSpotLight = nullptr;
@@ -7149,7 +7146,8 @@ void LLPipeline::generateGlow(LLRenderTarget* src)
 
 void LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst)
 {
-    if (RenderCASSharpness == 0.0)
+    static LLCachedControl<F32> cas_sharpness(gSavedSettings, "RenderCASSharpness", 0.4f);
+    if (cas_sharpness == 0.0f)
     {
         gPipeline.copyRenderTarget(src, dst);
         return;
@@ -7170,7 +7168,7 @@ void LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst)
         varAU4(const0);
         varAU4(const1);
         CasSetup(const0, const1,
-            RenderCASSharpness,             // Sharpness tuning knob (0.0 to 1.0).
+            cas_sharpness(),             // Sharpness tuning knob (0.0 to 1.0).
             (AF1)src->getWidth(), (AF1)src->getHeight(),  // Input size.
             (AF1)dst->getWidth(), (AF1)dst->getHeight()); // Output size.
 
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index a58b7850ea..1c87b71d06 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -1068,7 +1068,6 @@ public:
     static bool RenderMirrors;
     static S32 RenderHeroProbeUpdateRate;
     static S32 RenderHeroProbeConservativeUpdateMultiplier;
-    static F32 RenderCASSharpness;
 };
 
 void render_bbox(const LLVector3 &min, const LLVector3 &max);
-- 
cgit v1.2.3


From 3e2866f876696b149cee248e1e9bf5343dff0de6 Mon Sep 17 00:00:00 2001
From: Brad Linden <brad@lindenlab.com>
Date: Mon, 26 Aug 2024 14:49:11 -0700
Subject: secondlife/viewer#2395 fix start location coordinates getting double
 escaped

---
 indra/newview/lllogininstance.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index c54d2c080f..ad04c11cc6 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -602,13 +602,14 @@ std::string construct_start_string()
         {
             // a startup URL was specified
             LLVector3 position = start_slurl.getPosition();
-            std::string unescaped_start =
+            // NOTE - do not xml escape here, will get escaped properly later by LLSD::asXMLRPCValue()
+            // see secondlife/viewer#2395
+            start =
             STRINGIZE(  "uri:"
                       << start_slurl.getRegion() << "&"
                         << position[VX] << "&"
                         << position[VY] << "&"
                         << position[VZ]);
-            start = LLStringFn::xml_encode(unescaped_start, true);
             break;
         }
         case LLSLURL::HOME_LOCATION:
-- 
cgit v1.2.3


From e23f2f1cf7c5a3b34d1635c490e5c8871a4d9d5c Mon Sep 17 00:00:00 2001
From: Brad Linden <brad@lindenlab.com>
Date: Mon, 26 Aug 2024 15:01:04 -0700
Subject: defensively capture coroutine args by value

---
 indra/viewer_components/login/lllogin.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 53bf97a47e..feebecf4cb 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -128,7 +128,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params)
     // Launch a coroutine with our login_() method. Run the coroutine until
     // its first wait; at that point, return here.
     std::string coroname =
-        LLCoros::instance().launch("LLLogin::Impl::login_", [&]() { loginCoro(uri, login_params); });
+        LLCoros::instance().launch("LLLogin::Impl::login_", [=]() { loginCoro(uri, login_params); });
 
     LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL;
 }
-- 
cgit v1.2.3


From ef916bd3ae39fb6fd718428aa2a695bbea891940 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 22 Aug 2024 00:43:50 -0400
Subject: Remove or suppress left over debug messages in hot paths (#2392)

---
 indra/llcommon/llcallstack.h         |  4 ++++
 indra/llprimitive/llprimitive.cpp    |  2 --
 indra/newview/llface.cpp             | 12 ------------
 indra/newview/llspatialpartition.cpp |  8 --------
 indra/newview/llvovolume.cpp         | 38 ------------------------------------
 5 files changed, 4 insertions(+), 60 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
index ad10a9dbf7..33f2b507b8 100644
--- a/indra/llcommon/llcallstack.h
+++ b/indra/llcommon/llcallstack.h
@@ -79,9 +79,13 @@ struct LLContextStatus
 
 LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
 
+#ifndef LL_RELEASE_FOR_DOWNLOAD
 #define dumpStack(tag)                          \
     LL_DEBUGS(tag) << "STACK:\n"                \
                    << "====================\n"  \
                    << LLCallStack()             \
                    << "===================="    \
                    << LL_ENDL;
+#else
+#define dumpStack(tag)
+#endif
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 644476460c..c5d6076b98 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -1126,8 +1126,6 @@ namespace
     {
         const size_t size(sizeof(T));
 
-        LL_DEBUGS("TEXTUREENTRY") << "Request to read items of size " << size << " with swizzle " << type << " froum buffer sized " << (source_end - source) << LL_ENDL;
-
         if ((source + size + 1) > source_end)
         {
             // we add 1 above to take into account the byte that we know must follow the value.
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c69d74ad1b..a8001699fe 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -828,11 +828,6 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 
         const LLVolumeFace &face = volume.getVolumeFace(f);
 
-        LL_DEBUGS("RiggedBox") << "updating extents for face " << f
-                               << " starting extents " << mExtents[0] << ", " << mExtents[1]
-                               << " starting vf extents " << face.mExtents[0] << ", " << face.mExtents[1]
-                               << " num verts " << face.mNumVertices << LL_ENDL;
-
         // MAINT-8264 - stray vertices, especially in low LODs, cause bounding box errors.
         if (face.mNumVertices < 3)
         {
@@ -851,21 +846,14 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 
         matMulBoundBox(mat_vert, face.mExtents, mExtents);
 
-        LL_DEBUGS("RiggedBox") << "updated extents for face " << f
-                               << " bbox gave extents " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
-
         if (!mDrawablep->isActive())
         {   // Shift position for region
             LLVector4a offset;
             offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
             mExtents[0].add(offset);
             mExtents[1].add(offset);
-            LL_DEBUGS("RiggedBox") << "updating extents for face " << f
-                                   << " not active, added offset " << offset << LL_ENDL;
         }
 
-        LL_DEBUGS("RiggedBox") << "updated extents for face " << f
-                               << " to " << mExtents[0] << ", " << mExtents[1] << LL_ENDL;
         LLVector4a t;
         t.setAdd(mExtents[0],mExtents[1]);
         t.mul(0.5f);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index b1f80e48af..8ae6073a53 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -755,14 +755,6 @@ bool LLSpatialGroup::changeLOD()
 
         if (fabsf(ratio) >= getSpatialPartition()->mSlopRatio)
         {
-            LL_DEBUGS("RiggedBox") << "changeLOD true because of ratio compare "
-                                   << fabsf(ratio) << " " << getSpatialPartition()->mSlopRatio << LL_ENDL;
-            LL_DEBUGS("RiggedBox") << "sg " << this << "\nmDistance " << mDistance
-                                   << " mLastUpdateDistance " << mLastUpdateDistance
-                                   << " mRadius " << mRadius
-                                   << " fab ratio " << fabsf(ratio)
-                                   << " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL;
-
             return true;
         }
     }
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7a7d88327b..65ed34d1ff 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1448,7 +1448,6 @@ bool LLVOVolume::calcLOD()
             const LLVector3* box = avatar->getLastAnimExtents();
             LLVector3 diag = box[1] - box[0];
             radius = diag.magVec() * 0.5f;
-            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
         }
         else
         {
@@ -1459,11 +1458,9 @@ bool LLVOVolume::calcLOD()
             const LLVector3* box = avatar->getLastAnimExtents();
             LLVector3 diag = box[1] - box[0];
             radius = diag.magVec(); // preserve old BinRadius behavior - 2x off
-            LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
         }
         if (distance <= 0.f || radius <= 0.f)
         {
-            LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL;
             return false;
         }
     }
@@ -1473,7 +1470,6 @@ bool LLVOVolume::calcLOD()
         radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
         if (distance <= 0.f || radius <= 0.f)
         {
-            LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL;
             return false;
         }
     }
@@ -1554,13 +1550,6 @@ bool LLVOVolume::calcLOD()
 
     if (cur_detail != mLOD)
     {
-        LL_DEBUGS("DynamicBox","CalcLOD") << "new LOD " << cur_detail << " change from " << mLOD
-                             << " distance " << distance << " radius " << radius << " rampDist " << rampDist
-                             << " drawable rigged? " << (mDrawable ? (S32) mDrawable->isState(LLDrawable::RIGGED) : (S32) -1)
-                             << " mRiggedVolume " << (void*)getRiggedVolume()
-                             << " distanceWRTCamera " << (mDrawable ? mDrawable->mDistanceWRTCamera : -1.f)
-                             << LL_ENDL;
-
         mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
         mLOD = cur_detail;
 
@@ -1760,11 +1749,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
 
     bool any_valid_boxes = false;
 
-    if (getRiggedVolume())
-    {
-        LL_DEBUGS("RiggedBox") << "rebuilding box, volume face count " << getVolume()->getNumVolumeFaces() << " drawable face count " << mDrawable->getNumFaces() << LL_ENDL;
-    }
-
     // There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces()
     for (S32 i = 0;
         i < getVolume()->getNumVolumeFaces() && i < mDrawable->getNumFaces() && i < getNumTEs();
@@ -1788,10 +1772,6 @@ bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds)
         }
         if (rebuild)
         {
-            if (getRiggedVolume())
-            {
-                LL_DEBUGS("RiggedBox") << "rebuilding box, face " << i << " extents " << face->mExtents[0] << ", " << face->mExtents[1] << LL_ENDL;
-            }
             if (!any_valid_boxes)
             {
                 min = face->mExtents[0];
@@ -5655,8 +5635,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
             // apply any pending material overrides
             gGLTFMaterialList.applyQueuedOverrides(vobj);
 
-            std::string vobj_name = llformat("Vol%p", vobj);
-
             bool is_mesh = vobj->isMesh();
             if (is_mesh)
             {
@@ -5681,24 +5659,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                 group->mSurfaceArea += volume->getSurfaceArea() * llmax(llmax(scale.mV[0], scale.mV[1]), scale.mV[2]);
             }
 
-
-            F32 est_tris = vobj->getEstTrianglesMax();
-
             vobj->updateControlAvatar();
 
-            LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " rebuilding, isAttachment: " << (U32) vobj->isAttachment()
-                                                << " is_mesh " << is_mesh
-                                                << " est_tris " << est_tris
-                                                << " is_animated " << vobj->isAnimatedObject()
-                                                << " can_animate " << vobj->canBeAnimatedObject()
-                                                << " cav " << vobj->getControlAvatar()
-                                                << " lod " << vobj->getLOD()
-                                                << " drawable rigged " << (drawablep->isState(LLDrawable::RIGGED))
-                                                << " drawable state " << drawablep->getState()
-                                                << " playing " << (U32) (vobj->getControlAvatar() ? vobj->getControlAvatar()->mPlaying : false)
-                                                << " frame " << LLFrameTimer::getFrameCount()
-                                                << LL_ENDL;
-
             llassert_always(vobj);
             vobj->updateTextureVirtualSize(true);
             vobj->preRebuild();
-- 
cgit v1.2.3


From 316f0f0b8cb05515068e2acb72740fbab2365ce0 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Thu, 22 Aug 2024 09:11:28 -0700
Subject: secondlife/viewer#2391: Remove avatar rigging "callstack" logging

---
 indra/llappearance/llpolyskeletaldistortion.cpp |   6 -
 indra/llcharacter/lljoint.cpp                   |  13 --
 indra/llcommon/CMakeLists.txt                   |   2 -
 indra/llcommon/llcallstack.cpp                  | 188 ------------------------
 indra/llcommon/llcallstack.h                    |  91 ------------
 indra/newview/llspatialpartition.cpp            |   1 -
 indra/newview/llstartup.cpp                     |   1 -
 indra/newview/llviewerobject.cpp                |   3 -
 indra/newview/llviewerobjectlist.cpp            |   9 --
 indra/newview/llviewerregion.cpp                |   4 -
 indra/newview/llvoavatar.cpp                    |  18 ---
 indra/newview/llvoavatarself.cpp                |   1 -
 indra/newview/llvovolume.cpp                    |   2 -
 13 files changed, 339 deletions(-)
 delete mode 100644 indra/llcommon/llcallstack.cpp
 delete mode 100644 indra/llcommon/llcallstack.h

(limited to 'indra')

diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index 18c64282f1..7d62bb3a04 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -34,7 +34,6 @@
 #include "llpolymorph.h"
 #include "llwearable.h"
 #include "llfasttimer.h"
-#include "llcallstack.h"
 
 #include "llpolyskeletaldistortion.h"
 
@@ -204,11 +203,6 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
         // needed?
         // joint->storeScaleForReset( newScale );
 
-        // BENTO for detailed stack tracing of params.
-        std::stringstream ostr;
-        ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset;
-        LLScopedContextString str(ostr.str());
-
         joint->setScale(newScale, true);
     }
 
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index c2a10d969f..f31aa5d4c9 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -32,7 +32,6 @@
 #include "lljoint.h"
 
 #include "llmath.h"
-#include "llcallstack.h"
 #include <boost/algorithm/string.hpp>
 
 S32 LLJoint::sNumUpdates = 0;
@@ -342,7 +341,6 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
     {
         if (pos != active_override && do_debug_joint(getName()))
         {
-            LLScopedContextString str("setPosition");
             LL_DEBUGS("Avatar") << " joint " << getName() << " requested_pos " << requested_pos
                                 << " overriden by attachment " << active_override << LL_ENDL;
         }
@@ -350,12 +348,7 @@ void LLJoint::setPosition( const LLVector3& requested_pos, bool apply_attachment
     }
     if ((pos != getPosition()) && do_debug_joint(getName()))
     {
-        LLScopedContextString str("setPosition");
-        LLCallStack cs;
-        LLContextStatus con_status;
         LL_DEBUGS("Avatar") << " joint " << getName() << " set pos " << pos << LL_ENDL;
-        LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << "====================" << LL_ENDL;
-        LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
     }
     if (pos != getPosition())
     {
@@ -879,7 +872,6 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
     {
         if (scale != active_override && do_debug_joint(getName()))
         {
-            LLScopedContextString str("setScale");
             LL_DEBUGS("Avatar") << " joint " << getName() << " requested_scale " << requested_scale
                                 << " overriden by attachment " << active_override << LL_ENDL;
         }
@@ -887,12 +879,7 @@ void LLJoint::setScale( const LLVector3& requested_scale, bool apply_attachment_
     }
     if ((mXform.getScale() != scale) && do_debug_joint(getName()))
     {
-        LLScopedContextString str("setScale");
-        LLCallStack cs;
-        LLContextStatus con_status;
         LL_DEBUGS("Avatar") << " joint " << getName() << " set scale " << scale << LL_ENDL;
-        LL_DEBUGS("Avatar") << "CONTEXT:\n" << "====================\n" << con_status << LL_ENDL;
-        LL_DEBUGS("Avatar") << "STACK:\n" << "====================\n" << cs << "====================" << LL_ENDL;
     }
     mXform.setScale(scale);
     touch();
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index c4041f0c79..437b8d0168 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -26,7 +26,6 @@ set(llcommon_SOURCE_FILES
     llbase64.cpp
     llbitpack.cpp
     llcallbacklist.cpp
-    llcallstack.cpp
     llcleanup.cpp
     llcommon.cpp
     llcommonutils.cpp
@@ -134,7 +133,6 @@ set(llcommon_HEADER_FILES
     llbitpack.h
     llboost.h
     llcallbacklist.h
-    llcallstack.h
     llcleanup.h
     llcommon.h
     llcommonutils.h
diff --git a/indra/llcommon/llcallstack.cpp b/indra/llcommon/llcallstack.cpp
deleted file mode 100644
index c0be4f598e..0000000000
--- a/indra/llcommon/llcallstack.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * @file llcallstack.cpp
- * @brief run-time extraction of the current callstack
- *
- * $LicenseInfo:firstyear=2016&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2016, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-
-#include "llcommon.h"
-#include "llcallstack.h"
-#include "StackWalker.h"
-#include "llthreadlocalstorage.h"
-
-#if LL_WINDOWS
-class LLCallStackImpl: public StackWalker
-{
-public:
-    LLCallStackImpl():
-        StackWalker(false,0) // non-verbose, options = 0
-    {
-    }
-    ~LLCallStackImpl()
-    {
-    }
-    void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
-    {
-        m_stack.clear();
-        ShowCallstack(verbose);
-        // Skip the first few lines because they're just bookkeeping for LLCallStack,
-        // plus any additional lines requested to skip.
-        S32 first_line = skip_count + 3;
-        for (S32 i=first_line; i<m_stack.size(); ++i)
-        {
-            stack.push_back(m_stack[i]);
-        }
-    }
-protected:
-    virtual void OnOutput(LPCSTR szText)
-    {
-        m_stack.push_back(szText);
-    }
-    std::vector<std::string> m_stack;
-};
-#else
-// Stub - not implemented currently on other platforms.
-class LLCallStackImpl
-{
-public:
-    LLCallStackImpl() {}
-    ~LLCallStackImpl() {}
-    void getStack(std::vector<std::string>& stack, S32 skip_count=0, bool verbose=false)
-    {
-        stack.clear();
-    }
-};
-#endif
-
-LLCallStackImpl *LLCallStack::s_impl = NULL;
-
-LLCallStack::LLCallStack(S32 skip_count, bool verbose):
-    m_skipCount(skip_count),
-    m_verbose(verbose)
-{
-    if (!s_impl)
-    {
-        s_impl = new LLCallStackImpl;
-    }
-    LLTimer t;
-    s_impl->getStack(m_strings, m_skipCount, m_verbose);
-}
-
-bool LLCallStack::contains(const std::string& str)
-{
-    for (const std::string& src_str : m_strings)
-    {
-        if (src_str.find(str) != std::string::npos)
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack)
-{
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-    for (const std::string& str : call_stack.m_strings)
-    {
-        s << str;
-    }
-#else
-    s << "UNAVAILABLE IN RELEASE";
-#endif
-    return s;
-}
-
-LLContextStrings::LLContextStrings()
-{
-}
-
-// static
-LLContextStrings* LLContextStrings::getThreadLocalInstance()
-{
-    LLContextStrings *cons = LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
-    if (!cons)
-    {
-        LLThreadLocalSingletonPointer<LLContextStrings>::setInstance(new LLContextStrings);
-    }
-    return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance();
-}
-
-// static
-void LLContextStrings::addContextString(const std::string& str)
-{
-    LLContextStrings *cons = getThreadLocalInstance();
-    //LL_INFOS() << "CTX " << (S32)cons << " ADD " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
-    cons->m_contextStrings[str]++;
-}
-
-// static
-void LLContextStrings::removeContextString(const std::string& str)
-{
-    LLContextStrings *cons = getThreadLocalInstance();
-    cons->m_contextStrings[str]--;
-    //LL_INFOS() << "CTX " << (S32)cons << " REMOVE " << str << " CNT " << cons->m_contextStrings[str] << LL_ENDL;
-    if (cons->m_contextStrings[str] == 0)
-    {
-        cons->m_contextStrings.erase(str);
-    }
-}
-
-// static
-bool LLContextStrings::contains(const std::string& str)
-{
-    const std::map<std::string,S32>& strings =
-        LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
-    for (const std::map<std::string,S32>::value_type& str_pair : strings)
-    {
-        if (str_pair.first.find(str) != std::string::npos)
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-// static
-void LLContextStrings::output(std::ostream& os)
-{
-    const std::map<std::string,S32>& strings =
-        LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->m_contextStrings;
-    for (const std::map<std::string,S32>::value_type& str_pair : strings)
-    {
-        os << str_pair.first << "[" << str_pair.second << "]" << "\n";
-    }
-}
-
-// static
-std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status)
-{
-    LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->output(s);
-    return s;
-}
-
-bool LLContextStatus::contains(const std::string& str)
-{
-    return LLThreadLocalSingletonPointer<LLContextStrings>::getInstance()->contains(str);
-}
diff --git a/indra/llcommon/llcallstack.h b/indra/llcommon/llcallstack.h
deleted file mode 100644
index 33f2b507b8..0000000000
--- a/indra/llcommon/llcallstack.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * @file llcallstack.h
- * @brief run-time extraction of the current callstack
- *
- * $LicenseInfo:firstyear=2016&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2016, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
- * $/LicenseInfo$
- */
-
-#include <map>
-
-class LLCallStackImpl;
-
-class LLCallStack
-{
-public:
-    LLCallStack(S32 skip_count=0, bool verbose=false);
-    std::vector<std::string> m_strings;
-    bool m_verbose;
-    bool contains(const std::string& str);
-private:
-    static LLCallStackImpl *s_impl;
-    S32 m_skipCount;
-};
-
-LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCallStack& call_stack);
-
-class LLContextStrings
-{
-public:
-    LLContextStrings();
-    static void addContextString(const std::string& str);
-    static void removeContextString(const std::string& str);
-    static void output(std::ostream& os);
-    static LLContextStrings* getThreadLocalInstance();
-    static bool contains(const std::string& str);
-private:
-    std::map<std::string,S32> m_contextStrings;
-};
-
-class LLScopedContextString
-{
-public:
-    LLScopedContextString(const std::string& str):
-        m_str(str)
-    {
-        LLContextStrings::addContextString(m_str);
-    }
-    ~LLScopedContextString()
-    {
-        LLContextStrings::removeContextString(m_str);
-    }
-private:
-    std::string m_str;
-};
-
-// Mostly exists as a class to hook an ostream override to.
-struct LLContextStatus
-{
-    bool contains(const std::string& str);
-};
-
-LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLContextStatus& context_status);
-
-#ifndef LL_RELEASE_FOR_DOWNLOAD
-#define dumpStack(tag)                          \
-    LL_DEBUGS(tag) << "STACK:\n"                \
-                   << "====================\n"  \
-                   << LLCallStack()             \
-                   << "===================="    \
-                   << LL_ENDL;
-#else
-#define dumpStack(tag)
-#endif
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 8ae6073a53..c2cce8c5ec 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -29,7 +29,6 @@
 #include "llspatialpartition.h"
 
 #include "llappviewer.h"
-#include "llcallstack.h"
 #include "lltexturecache.h"
 #include "lltexturefetch.h"
 #include "llimageworker.h"
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 7cefa21125..b32b80331a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -28,7 +28,6 @@
 
 #include "llappviewer.h"
 #include "llstartup.h"
-#include "llcallstack.h"
 
 #if LL_WINDOWS
 #   include <process.h>     // _spawnl()
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a2abd1d930..5d33db591a 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -103,7 +103,6 @@
 #include "llfloaterperms.h"
 #include "llvocache.h"
 #include "llcleanup.h"
-#include "llcallstack.h"
 #include "llmeshrepository.h"
 #include "llgltfmateriallist.h"
 #include "llgl.h"
@@ -151,7 +150,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
 {
     LL_PROFILE_ZONE_SCOPED;
     LL_DEBUGS("ObjectUpdate") << "creating " << id << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *res = NULL;
 
@@ -1165,7 +1163,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
     LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL;
 
     LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     // The new OBJECTDATA_FIELD_SIZE_124, OBJECTDATA_FIELD_SIZE_140, OBJECTDATA_FIELD_SIZE_80
     // and OBJECTDATA_FIELD_SIZE_64 lengths should be supported in the existing cases below.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 435bd60917..9e1d86faac 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -68,7 +68,6 @@
 #include "u64.h"
 #include "llviewertexturelist.h"
 #include "lldatapacker.h"
-#include "llcallstack.h"
 #ifdef LL_USESYSTEMLIBS
 #include <zlib.h>
 #else
@@ -245,7 +244,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
     // ignore returned flags
     LL_DEBUGS("ObjectUpdate") << "uuid " << objectp->mID << " calling processUpdateMessage "
                               << objectp << " just_created " << just_created << " from_cache " << from_cache << " msg " << msg << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
 
@@ -362,7 +360,6 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
         objectp = createObjectFromCache(pcode, regionp, fullid, entry->getLocalID());
 
         LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " created objectp " << objectp << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         if (!objectp)
         {
@@ -557,7 +554,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
         LL_DEBUGS("ObjectUpdate") << "uuid " << fullid << " objectp " << objectp
                                      << " update_cache " << (S32) update_cache << " compressed " << compressed
                                      << " update_type "  << update_type << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         if(update_cache)
         {
@@ -635,7 +631,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
             objectp = createObject(pcode, regionp, fullid, local_id, gMessageSystem->getSender());
 
             LL_DEBUGS("ObjectUpdate") << "creating object " << fullid << " result " << objectp << LL_ENDL;
-            dumpStack("ObjectUpdateStack");
 
             if (!objectp)
             {
@@ -729,7 +724,6 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
         mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, i);
 
         LL_DEBUGS("ObjectUpdate") << "got probe for id " << id << " crc " << crc << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
 
         // Lookup data packer and add this id to cache miss lists if necessary.
         U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE;
@@ -1305,7 +1299,6 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
     // Remove from object map so noone can look it up.
 
     LL_DEBUGS("ObjectUpdate") << " dereferencing id " << objectp->mID << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     mUUIDObjectMap.erase(objectp->mID);
 
@@ -1857,7 +1850,6 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
     llassert_always(uuid.notNull());
 
     LL_DEBUGS("ObjectUpdate") << "creating " << uuid << " local_id " << local_id << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *objectp = LLViewerObject::createObject(uuid, pcode, regionp);
     if (!objectp)
@@ -1893,7 +1885,6 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
     }
 
     LL_DEBUGS("ObjectUpdate") << "createObject creating " << fullid << LL_ENDL;
-    dumpStack("ObjectUpdateStack");
 
     LLViewerObject *objectp = LLViewerObject::createObject(fullid, pcode, regionp);
     if (!objectp)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index ac64c47abe..115db57a06 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -81,7 +81,6 @@
 #include "llcoros.h"
 #include "lleventcoro.h"
 #include "llcorehttputil.h"
-#include "llcallstack.h"
 #include "llsettingsdaycycle.h"
 
 #include <boost/regex.hpp>
@@ -2716,7 +2715,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
         if (entry->getCRC() == crc)
         {
             LL_DEBUGS("AnimatedObjects") << " got dupe for local_id " << local_id << LL_ENDL;
-            dumpStack("AnimatedObjectsStack");
 
             // Record a hit
             entry->recordDupe();
@@ -2725,7 +2723,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
         else //CRC changed
         {
             LL_DEBUGS("AnimatedObjects") << " got update for local_id " << local_id << LL_ENDL;
-            dumpStack("AnimatedObjectsStack");
 
             // Update the cache entry
             entry->updateEntry(crc, dp);
@@ -2738,7 +2735,6 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLDataPackerB
     else
     {
         LL_DEBUGS("AnimatedObjects") << " got first notification for local_id " << local_id << LL_ENDL;
-        dumpStack("AnimatedObjectsStack");
 
         // we haven't seen this object before
         // Create new entry and add to map
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 09375a6930..e638e5b8c3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -109,7 +109,6 @@
 #include "llsdutil.h"
 #include "llscenemonitor.h"
 #include "llsdserialize.h"
-#include "llcallstack.h"
 #include "llrendersphere.h"
 #include "llskinningutil.h"
 
@@ -2666,8 +2665,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
         mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
     }
 
-    LLScopedContextString str("avatar_idle_update " + getFullname());
-
     checkTextureLoading() ;
 
     // force immediate pixel area update on avatars using last frames data (before drawable or camera updates)
@@ -4689,10 +4686,6 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
         is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects
     }
 
-    LLScopedContextString str("updateCharacter " + getFullname() + " is_control_avatar "
-                              + boost::lexical_cast<std::string>(is_control_avatar)
-                              + " is_attachment " + boost::lexical_cast<std::string>(is_attachment));
-
     // For fading out the names above heads, only let the timer
     // run if we're visible.
     if (mDrawable.notNull() && !visible)
@@ -6358,8 +6351,6 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const
 
 void LLVOAvatar::clearAttachmentOverrides()
 {
-    LLScopedContextString str("clearAttachmentOverrides " + getFullname());
-
     for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
     {
         LLJoint *pJoint = getJoint(i);
@@ -6390,10 +6381,7 @@ void LLVOAvatar::clearAttachmentOverrides()
 //-----------------------------------------------------------------------------
 void LLVOAvatar::rebuildAttachmentOverrides()
 {
-    LLScopedContextString str("rebuildAttachmentOverrides " + getFullname());
-
     LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     clearAttachmentOverrides();
 
@@ -6441,10 +6429,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
 // -----------------------------------------------------------------------------
 void LLVOAvatar::updateAttachmentOverrides()
 {
-    LLScopedContextString str("updateAttachmentOverrides " + getFullname());
-
     LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     std::set<LLUUID> meshes_seen;
 
@@ -6573,15 +6558,12 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
         return;
     }
 
-    LLScopedContextString str("addAttachmentOverridesForObject " + getFullname());
-
     if (getOverallAppearance() != AOA_NORMAL)
     {
         return;
     }
 
     LL_DEBUGS("AnimatedObjects") << "adding" << LL_ENDL;
-    dumpStack("AnimatedObjectsStack");
 
     // Process all children
     if (recursive)
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 00a7325db2..49859bb585 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -59,7 +59,6 @@
 #include "llsdutil.h"
 #include "llstartup.h"
 #include "llsdserialize.h"
-#include "llcallstack.h"
 #include "llcorehttputil.h"
 #include "lluiusage.h"
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 65ed34d1ff..dcaf85b894 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -85,7 +85,6 @@
 #include "llanimationstates.h"
 #include "llinventorytype.h"
 #include "llviewerinventory.h"
-#include "llcallstack.h"
 #include "llsculptidsize.h"
 #include "llavatarappearancedefines.h"
 #include "llgltfmateriallist.h"
@@ -357,7 +356,6 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
         sculpt_type = sculpt_params->getSculptType();
 
         LL_DEBUGS("ObjectUpdate") << "uuid " << mID << " set sculpt_id " << sculpt_id << LL_ENDL;
-        dumpStack("ObjectUpdateStack");
     }
 
     if (!dp)
-- 
cgit v1.2.3


From 367c8f2363cebbcd6c37484d15e0863612bcc1c9 Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Mon, 26 Aug 2024 17:24:07 -0700
Subject: Improve safety of macOS available RAM calcuations at suggestion of
 Ansariel and Beq (#2423)

---
 indra/llcommon/llmemory.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 99c803e46f..ba48319a16 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -129,7 +129,7 @@ void LLMemory::updateMemoryInfo()
     {
         // Our Windows definition of PagefileUsage is documented by Microsoft as "the total amount of
         // memory that the memory manager has committed for a running process", which is rss.
-        sAllocatedPageSizeInKB = U32Bytes(info.resident_size);
+        sAllocatedPageSizeInKB = U32Kilobytes::convert(U64Bytes(info.resident_size));
 
         // Activity Monitor => Inspect Process => Real Memory Size appears to report resident_size
         // Activity monitor => main window memory column appears to report phys_footprint, which spot checks as at least 30% less.
@@ -139,7 +139,7 @@ void LLMemory::updateMemoryInfo()
         // reported for the app by the Memory Monitor in Instruments.' It is still about 8% bigger than phys_footprint.
         //
         // (On Windows, we use WorkingSetSize.)
-        sAllocatedMemInKB = U32Bytes(info.resident_size - info.reusable);
+        sAllocatedMemInKB = U32Kilobytes::convert(U64Bytes(info.resident_size - info.reusable));
      }
     else
     {
-- 
cgit v1.2.3


From 5c16ae13758bdfe8fe1f13d5f67eabbb6eaa30a1 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 27 Aug 2024 12:02:41 +0300
Subject: viewer#2413 Remove obsolete alert about expiring voice morphs

---
 indra/newview/app_settings/settings.xml            | 11 -------
 indra/newview/llvoicevivox.cpp                     | 34 ----------------------
 indra/newview/llvoicevivox.h                       |  1 -
 .../newview/skins/default/xui/da/notifications.xml |  4 ---
 .../newview/skins/default/xui/de/notifications.xml |  4 ---
 .../newview/skins/default/xui/en/notifications.xml | 15 ----------
 .../newview/skins/default/xui/es/notifications.xml |  4 ---
 .../newview/skins/default/xui/fr/notifications.xml |  4 ---
 .../newview/skins/default/xui/it/notifications.xml |  4 ---
 .../newview/skins/default/xui/ja/notifications.xml | 11 -------
 .../newview/skins/default/xui/pl/notifications.xml |  5 ----
 .../newview/skins/default/xui/pt/notifications.xml |  4 ---
 .../newview/skins/default/xui/ru/notifications.xml |  6 ----
 .../newview/skins/default/xui/tr/notifications.xml |  6 ----
 .../newview/skins/default/xui/zh/notifications.xml |  6 ----
 15 files changed, 119 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c5fea2786c..ec06582d90 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13158,17 +13158,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>VoiceEffectExpiryWarningTime</key>
-    <map>
-      <key>Comment</key>
-      <string>How much notice to give of Voice Morph subscriptions expiry, in seconds.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>259200</integer>
-    </map>
     <key>VoiceMorphingEnabled</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 2358c04236..d2a8b4e5cf 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -6459,7 +6459,6 @@ LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) :
     mIsNew(false)
 {
     mExpiryTimer.stop();
-    mExpiryWarningTimer.stop();
 }
 
 LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry()
@@ -6570,20 +6569,6 @@ void LLVivoxVoiceClient::addVoiceFont(const S32 font_index,
             font->mExpiryTimer.start();
             font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL);
 
-            // Set the warning timer to some interval before actual expiry.
-            S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime");
-            if (warning_time != 0)
-            {
-                font->mExpiryWarningTimer.start();
-                F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time);
-                font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL);
-            }
-            else
-            {
-                // Disable the warning timer.
-                font->mExpiryWarningTimer.stop();
-            }
-
              // Only flag new session fonts after the first time we have fetched the list.
             if (mVoiceFontsReceived)
             {
@@ -6625,7 +6610,6 @@ void LLVivoxVoiceClient::expireVoiceFonts()
     // than checking each font individually.
 
     bool have_expired = false;
-    bool will_expire = false;
     bool expired_in_use = false;
 
     LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault();
@@ -6635,7 +6619,6 @@ void LLVivoxVoiceClient::expireVoiceFonts()
     {
         voiceFontEntry* voice_font = iter->second;
         LLFrameTimer& expiry_timer  = voice_font->mExpiryTimer;
-        LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer;
 
         // Check for expired voice fonts
         if (expiry_timer.getStarted() && expiry_timer.hasExpired())
@@ -6652,14 +6635,6 @@ void LLVivoxVoiceClient::expireVoiceFonts()
             deleteVoiceFont(voice_font->mID);
             have_expired = true;
         }
-
-        // Check for voice fonts that will expire in less that the warning time
-        if (warning_timer.getStarted() && warning_timer.hasExpired())
-        {
-            LL_DEBUGS("VoiceFont") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL;
-            will_expire = true;
-            warning_timer.stop();
-        }
     }
 
     LLSD args;
@@ -6681,15 +6656,6 @@ void LLVivoxVoiceClient::expireVoiceFonts()
         // Refresh voice font lists in the UI.
         notifyVoiceFontObservers();
     }
-
-    // Give a warning notification if any voice fonts are due to expire.
-    if (will_expire)
-    {
-        S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime"));
-        args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value());
-
-        LLNotificationsUtil::add("VoiceEffectsWillExpire", args);
-    }
 }
 
 void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id)
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 7862e492b2..3167705528 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -880,7 +880,6 @@ private:
         bool        mIsNew;
 
         LLFrameTimer    mExpiryTimer;
-        LLFrameTimer    mExpiryWarningTimer;
     };
 
     bool mVoiceFontsReceived;
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 283a7b2a43..4a4b7269dc 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -1572,10 +1572,6 @@ Klik på Acceptér for at deltage eller Afvis for at afvise invitationen. Klik p
 	</notification>
 	<notification name="VoiceEffectsExpiredInUse">
 		Den aktive stemme &quot;morph&quot; er udløbet og din normale stemme opsætning er genaktiveret.
-[[URL] Click here] for at forny dit abbonnement.
-	</notification>
-	<notification name="VoiceEffectsWillExpire">
-		En eller flere af dine stemme &quot;morphs&quot; vil udløbe om mindre end [INTERVAL] dage.
 [[URL] Click here] for at forny dit abbonnement.
 	</notification>
 	<notification name="VoiceEffectsNew">
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index 6ad71e0ad1..76bebedeec 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -2465,10 +2465,6 @@ Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice
 	<notification name="VoiceEffectsExpiredInUse">Das aktive Voice-Morph-Abo ist abgelaufen. Ihre normalen Voice-Einstellungen werden angewendet. 
 [[URL] Klicken Sie hier], um Ihr Abo zu erneuern. 
 
-Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen.</notification>
-	<notification name="VoiceEffectsWillExpire">Ein oder mehrere Ihrer Voice-Morph-Abos laufen in weniger als [INTERVAL] Tagen ab. 
-[[URL] Klicken Sie hier], um Ihr Abo zu erneuern. 
-
 Wenn Sie Premium-Mitglied sind, [[PREMIUM_URL] klicken Sie hier], um Ihren Voice-Morphing-Vorteil zu nutzen.</notification>
 	<notification name="VoiceEffectsNew">Neue Voice-Morph-Effekte sind erhältlich!</notification>
 	<notification name="Cannot enter parcel: not a group member">Nur Mitglieder einer bestimmten Gruppe dürfen diesen Bereich betreten.</notification>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e539388735..4a9dd62666 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8858,21 +8858,6 @@ If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice mo
     <tag>voice</tag>
   </notification>
 
-  <notification
-   icon="notify.tga"
-   name="VoiceEffectsWillExpire"
-   sound="UISndAlert"
-   persist="true"
-   type="notify">
-    <unique/>    
-One or more of your Voice Morphs will expire in less than [INTERVAL] days.
-[[URL] Click here] to renew your subscription.
-
-If you are a Premium Member, [[PREMIUM_URL] click here] to receive your voice morphing perk.
-  <tag>fail</tag>
-    <tag>voice</tag>
-  </notification>
-
   <notification
    icon="notify.tga"
    name="VoiceEffectsNew"
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 739391b965..bf55e2c443 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -2451,10 +2451,6 @@ Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio
 	<notification name="VoiceEffectsExpiredInUse">La transformación de voz activa ha caducado y se ha aplicado tu configuración de voz normal. 
 [[URL] Pulsa aquí] para renovar la suscripción. 
 
-Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz.</notification>
-	<notification name="VoiceEffectsWillExpire">Una o más de tus transformaciones de voz caducarán en menos de [INTERVAL] días. 
-[[URL] Pulsa aquí] para renovar la suscripción 
-
 Si eres un miembro Premium [[PREMIUM_URL] pulsa aquí] para recibir tu beneficio de transformación de voz.</notification>
 	<notification name="VoiceEffectsNew">Están disponibles nuevas transformaciones de voz.</notification>
 	<notification name="Cannot enter parcel: not a group member">Sólo los miembros de un grupo determinado pueden visitar esta zona.</notification>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 587c88faad..17cf18633f 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -2451,10 +2451,6 @@ Si vous êtes un membre Premium,  [[PREMIUM_URL] cliquez ici] pour recevoir votr
 [[URL] Cliquez ici] pour renouveler votre abonnement. 
 
 Si vous êtes un membre Premium, [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix.</notification>
-	<notification name="VoiceEffectsWillExpire">Au moins l'un de vos effets de voix expirera dans moins de [INTERVAL] jours.  
-[[URL] Cliquez ici] pour renouveler votre abonnement. 
-
-Si vous êtes un membre Premium,  [[PREMIUM_URL] cliquez ici] pour recevoir votre effet de voix.</notification>
 	<notification name="VoiceEffectsNew">De nouveaux effets de voix sont disponibles !</notification>
 	<notification name="Cannot enter parcel: not a group member">Seuls les membres d'un certain groupe peuvent visiter cette zone.</notification>
 	<notification name="Cannot enter parcel: banned">Vous ne pouvez pas pénétrer sur ce terrain car l'accès vous y est interdit.</notification>
diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml
index f79cc1515b..1c40e7304a 100644
--- a/indra/newview/skins/default/xui/it/notifications.xml
+++ b/indra/newview/skins/default/xui/it/notifications.xml
@@ -2453,10 +2453,6 @@ Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la
 	<notification name="VoiceEffectsExpiredInUse">Poiché la manipolazione vocale attiva è scaduta, sono state applicate le tue impostazioni normali. 
 [[URL] Fai clic qui] per rinnovare l'abbonamento. 
 
-Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale.</notification>
-	<notification name="VoiceEffectsWillExpire">Almeno una delle tue manipolazioni vocali scadrà tra meno di [INTERVAL] giorni. 
-[[URL] Fai clic qui] per rinnovare l'abbonamento. 
-
 Se sei un membro Premium, [[PREMIUM_URL] fai clic qui] per ricevere in regalo la manipolazione vocale.</notification>
 	<notification name="VoiceEffectsNew">Sono disponibili nuove manipolazioni vocali.</notification>
 	<notification name="Cannot enter parcel: not a group member">Soltanto i membri di un determinato gruppo possono visitare questa zona.</notification>
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index 123e95df04..fbd56e118c 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -4655,17 +4655,6 @@ Webページにリンクすると、他人がこの場所に簡単にアクセ
 	<notification name="VoiceEffectsExpiredInUse">ボイスモーフィング効果の有効期限が終了したため、あなたの通常のボイス設定が適用されました。
 期限を延長・更新するには[[URL] ここ]をクリックしてください。
 
-プレミアム会員の方は、[[PREMIUM_URL] ここ]をクリックしてボイスモーフィング特典をお受け取りください。
-    <tag>
-			fail
-		</tag>
-		<tag>
-			voice
-		</tag>
-	</notification>
-	<notification name="VoiceEffectsWillExpire">ボイスモーフィング効果の1つ、または複数の有効期限が[INTERVAL]日以内に終了します。
-期限を延長・更新するには[[URL] ここ]をクリックしてください。
-
 プレミアム会員の方は、[[PREMIUM_URL] ここ]をクリックしてボイスモーフィング特典をお受け取りください。
     <tag>
 			fail
diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml
index e668c6cc20..17c11bc75f 100644
--- a/indra/newview/skins/default/xui/pl/notifications.xml
+++ b/indra/newview/skins/default/xui/pl/notifications.xml
@@ -3116,11 +3116,6 @@ Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrz
 	<notification name="VoiceEffectsExpiredInUse">
 		Czas aktywności Przekształcenia Głosu wygasł, normalne ustawienia Twojego głosu zostały zastosowane.
 [[URL] Kliknij tutaj] aby odnowić subskrypcję.
-Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu.
-	</notification>
-	<notification name="VoiceEffectsWillExpire">
-		Jedno lub więcej z Twoich Przekształceń Głosu wygaśnie za mniej niż [INTERVAL] dni.
-[[URL] Kliknij tutaj] aby odnowić subskrypcję.
 Jeśli jesteś użytkownikiem premium, to [[PREMIUM_URL] kliknij tutaj] aby otrzymać swój perk Przekształceń Głosu.
 	</notification>
 	<notification name="VoiceEffectsNew">
diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml
index a3220bca54..0390239669 100644
--- a/indra/newview/skins/default/xui/pt/notifications.xml
+++ b/indra/newview/skins/default/xui/pt/notifications.xml
@@ -2440,10 +2440,6 @@ Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu ap
 	<notification name="VoiceEffectsExpiredInUse">A Distorção de voz ativa expirou. Suas configurações de voz padrão foram ativadas. 
 [[URL] Clique aqui] para renovar o serviço. 
 
-Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz.</notification>
-	<notification name="VoiceEffectsWillExpire">Uma ou mais das suas distorções de voz tem vencimento em menos de [INTERVAL] dias. 
-[[URL] Clique aqui] para renovar o serviço. 
-
 Se você é um Membro Premium, [[PREMIUM_URL] clique aqui] para receber o seu app de distorção de voz.</notification>
 	<notification name="VoiceEffectsNew">Novas Distorções de voz!</notification>
 	<notification name="Cannot enter parcel: not a group member">Só membros de um grupo podem acessar esta área.</notification>
diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml
index e75fd1fd82..bde18edc23 100644
--- a/indra/newview/skins/default/xui/ru/notifications.xml
+++ b/indra/newview/skins/default/xui/ru/notifications.xml
@@ -3230,12 +3230,6 @@
 		Истек срок действия анимационного изменения голоса, действуют настройки вашего обычного голоса. 
 [[URL] Щелкните здесь], чтобы обновить подписку. 
 
-Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса.
-	</notification>
-	<notification name="VoiceEffectsWillExpire">
-		Срок действия одного или нескольких ваших типов анимационного изменения голоса истекает через [INTERVAL] дней или раньше. 
-[[URL] Щелкните здесь], чтобы обновить подписку. 
-
 Если вы - владелец премиум-аккаунта, [[PREMIUM_URL] щелкните здесь], чтобы получить право на анимационное изменение голоса.
 	</notification>
 	<notification name="VoiceEffectsNew">
diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml
index 17d2969d19..30aa0c0342 100644
--- a/indra/newview/skins/default/xui/tr/notifications.xml
+++ b/indra/newview/skins/default/xui/tr/notifications.xml
@@ -3230,12 +3230,6 @@ Aboneliğinizi yenilemek için [[URL] buraya tıklayın].
 		Etkin Ses Dönüşümünün süresi dolmuş, normal ses ayarlarınız uygulandı. 
 Aboneliğinizi yenilemek için [[URL] buraya tıklayın]. 
 
-Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın].
-	</notification>
-	<notification name="VoiceEffectsWillExpire">
-		Ses Dönüşümlerinizden birinin ya da daha fazlasının süresi [INTERVAL] günden daha az bir zamanda dolacak. 
-Aboneliğinizi yenilemek için [[URL] buraya tıklayın]. 
-
 Özel Üye iseniz, ses dönüştürme özelliğini almak için [[PREMIUM_URL] buraya tıklayın].
 	</notification>
 	<notification name="VoiceEffectsNew">
diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml
index 4d0f1cb85b..3ebea7dc27 100644
--- a/indra/newview/skins/default/xui/zh/notifications.xml
+++ b/indra/newview/skins/default/xui/zh/notifications.xml
@@ -3214,12 +3214,6 @@ SHA1 指紋:[MD5_DIGEST]
 		使用中的變聲效果已經過期,已用你平時的聲音設定取代。
 [[URL] 點按這裡]繼續訂用。
 
-付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。
-	</notification>
-	<notification name="VoiceEffectsWillExpire">
-		至少一個你訂用的變聲效果將在 [INTERVAL] 天後到期。
-[[URL] 點按這裡]繼續訂用。
-
 付費用戶請[[PREMIUM_URL] 點按這裡]領取免費變聲工具。
 	</notification>
 	<notification name="VoiceEffectsNew">
-- 
cgit v1.2.3


From 8406d1052c70d1d9f964ec86f6f5468aa9f57bb1 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 27 Aug 2024 11:53:54 -0500
Subject: #2428 Fix for crash when applying PBR material (#2430)

Also attempt to fix some occasional bad texture memory tracking.
---
 indra/llrender/llimagegl.cpp | 10 +++++++---
 indra/newview/llface.cpp     |  7 +++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 058afa0cf2..e4b176ff69 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -70,12 +70,15 @@ static U64 sTextureBytes = 0;
 void LLImageGLMemory::alloc_tex_image(U32 width, U32 height, U32 pixformat)
 {
     U32 texUnit = gGL.getCurrentTexUnitIndex();
+    llassert(texUnit == 0); // allocations should always be done on tex unit 0
     U32 texName = gGL.getTexUnit(texUnit)->getCurrTexture();
     U64 size = LLImageGL::dataFormatBytes(pixformat, width, height);
 
     llassert(size >= 0);
 
     sTexMemMutex.lock();
+
+    // it is a precondition that no existing allocation exists for this texture
     llassert(sTextureAllocs.find(texName) == sTextureAllocs.end());
 
     sTextureAllocs[texName] = size;
@@ -89,7 +92,7 @@ void LLImageGLMemory::free_tex_image(U32 texName)
 {
     sTexMemMutex.lock();
     auto iter = sTextureAllocs.find(texName);
-    if (iter != sTextureAllocs.end())
+    if (iter != sTextureAllocs.end()) // sometimes a texName will be "freed" before allocated (e.g. first call to setManualImage for a given texName)
     {
         llassert(iter->second <= sTextureBytes); // sTextureBytes MUST NOT go below zero
 
@@ -114,6 +117,7 @@ void LLImageGLMemory::free_tex_images(U32 count, const U32* texNames)
 void LLImageGLMemory::free_cur_tex_image()
 {
     U32 texUnit = gGL.getCurrentTexUnitIndex();
+    llassert(texUnit == 0); // frees should always be done on tex unit 0
     U32 texName = gGL.getTexUnit(texUnit)->getCurrTexture();
     free_tex_image(texName);
 }
@@ -1215,8 +1219,8 @@ void LLImageGL::deleteTextures(S32 numTextures, const U32 *textures)
 
         if (!sFreeList[idx].empty())
         {
-            glDeleteTextures((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
             free_tex_images((GLsizei) sFreeList[idx].size(), sFreeList[idx].data());
+            glDeleteTextures((GLsizei)sFreeList[idx].size(), sFreeList[idx].data());
             sFreeList[idx].resize(0);
         }
     }
@@ -2405,7 +2409,7 @@ bool LLImageGL::scaleDown(S32 desired_discard)
     { // use a PBO to downscale the texture
         U64 size = getBytes(desired_discard);
         llassert(size <= 2048 * 2048 * 4); // we shouldn't be using this method to downscale huge textures, but it'll work
-        gGL.getTexUnit(0)->bind(this);
+        gGL.getTexUnit(0)->bind(this, false, true);
 
         if (sScratchPBO == 0)
         {
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index a8001699fe..9e504402c8 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -577,8 +577,11 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
                 }
             }
             // Draw the selection marker using the correctly chosen vertex buffer
-            vertex_buffer->setBuffer();
-            vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
+            if (vertex_buffer)
+            {
+                vertex_buffer->setBuffer();
+                vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
+            }
         }
 
         gGL.popMatrix();
-- 
cgit v1.2.3


From feecf0957302b3bd7f6eb3e0908f95a39dd51f43 Mon Sep 17 00:00:00 2001
From: RunitaiLinden <davep@lindenlab.com>
Date: Tue, 27 Aug 2024 15:59:41 -0500
Subject: #2431 Fix for redundant searching for pixeismall.j2c causing frame
 stalls

---
 indra/llfilesystem/lldir.cpp          | 2 ++
 indra/newview/llviewerobject.cpp      | 7 +++++--
 indra/newview/llviewerpartsource.cpp  | 8 ++++----
 indra/newview/llviewertexture.cpp     | 1 +
 indra/newview/llviewertexture.h       | 1 +
 indra/newview/llviewertexturelist.cpp | 4 ++++
 6 files changed, 17 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index a18dc0a4f1..99d4850610 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -721,6 +721,8 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
                                                      const std::string& filename,
                                                      ESkinConstraint constraint) const
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
     // Recognize subdirs that have no localization.
     static const std::set<std::string> sUnlocalized = list_of
         ("")                        // top-level directory not localized
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 5d33db591a..e36a03a749 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6020,6 +6020,7 @@ bool LLViewerObject::isParticleSource() const
 
 void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
     if (mPartSourcep)
     {
         deleteParticleSource();
@@ -6051,6 +6052,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters,
 
 void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
     if (!mPartSourcep.isNull() && mPartSourcep->isDead())
     {
         mPartSourcep = NULL;
@@ -6086,7 +6088,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
             LLViewerTexture* image;
             if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
             {
-                image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+                image = LLViewerFetchedTexture::sDefaultParticleImagep;
             }
             else
             {
@@ -6099,6 +6101,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
 
 void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VIEWER;
     if (!mPartSourcep.isNull() && mPartSourcep->isDead())
     {
         mPartSourcep = NULL;
@@ -6133,7 +6136,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
             LLViewerTexture* image;
             if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
             {
-                image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+                image = LLViewerFetchedTexture::sDefaultParticleImagep;
             }
             else
             {
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index dd6a404836..54e0470604 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -114,7 +114,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
     llassert(source_objp);
     mSourceObjectp = source_objp;
     mPosAgent = mSourceObjectp->getPositionAgent();
-    mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+    mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
 
     mImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
 }
@@ -619,7 +619,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
 {
     if (!mImagep)
     {
-        mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+        mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
     }
 
     const F32 RATE = 0.025f;
@@ -789,7 +789,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
 
         if (!mImagep)
         {
-            mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+            mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
         }
 
         LLViewerPart* part = new LLViewerPart();
@@ -876,7 +876,7 @@ void LLViewerPartSourceChat::update(const F32 dt)
 {
     if (!mImagep)
     {
-        mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+        mImagep = LLViewerFetchedTexture::sDefaultParticleImagep;
     }
 
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index f221efae7e..bb16fec32a 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -70,6 +70,7 @@ LLPointer<LLViewerTexture>        LLViewerTexture::sBlackImagep = nullptr;
 LLPointer<LLViewerTexture>        LLViewerTexture::sCheckerBoardImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = nullptr;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultParticleImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = nullptr;
 LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sFlatNormalImagep = nullptr;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 3866c898a6..65fa633f81 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -507,6 +507,7 @@ public:
     static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local.
     static LLPointer<LLViewerFetchedTexture> sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface
     static LLPointer<LLViewerFetchedTexture> sDefaultIrradiancePBRp; // PBR: irradiance
+    static LLPointer<LLViewerFetchedTexture> sDefaultParticleImagep; // Default particle texture
 
     // not sure why, but something is iffy about the loading of this particular texture, use the accessor instead of accessing directly
     static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index a5700ab264..53b054cb24 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -123,6 +123,9 @@ void LLViewerTextureList::doPreloadImages()
     LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
     LLUIImageList* image_list = LLUIImageList::getInstance();
 
+    // Set default particle texture
+    LLViewerFetchedTexture::sDefaultParticleImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+
     // Set the default flat normal map
     // BLANK_OBJECT_NORMAL has a version on dataserver, but it has compression artifacts
     LLViewerFetchedTexture::sFlatNormalImagep =
@@ -403,6 +406,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
                                                    const LLUUID& force_id)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+    LL_PROFILE_ZONE_TEXT(filename.c_str(), filename.size());
     if(!mInitialized)
     {
         return NULL ;
-- 
cgit v1.2.3


From 00acf4fdb7e953726240f76f8b5103c82e0ce692 Mon Sep 17 00:00:00 2001
From: RunitaiLinden <davep@lindenlab.com>
Date: Tue, 27 Aug 2024 16:32:28 -0500
Subject: #2432 Make nametags default to "show briefly"

---
 indra/newview/app_settings/settings.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ec06582d90..1d8cae4e95 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10314,7 +10314,7 @@
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>2</integer>
     </map>
     <key>ShowAxes</key>
     <map>
-- 
cgit v1.2.3


From b281020b8150952f41f9424427d6bff76aa10126 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Wed, 28 Aug 2024 19:51:00 +0300
Subject: Clear unused metrics

---
 indra/newview/llviewerstats.cpp | 60 ++---------------------------------------
 indra/newview/llviewerstats.h   | 13 +--------
 2 files changed, 3 insertions(+), 70 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d1ee9ea17c..3641738d9d 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -137,7 +137,6 @@ LLTrace::CountStatHandle<>  FPS("FPS", "Frames rendered"),
                             UPLOAD_TEXTURE("uploadtexture", "Textures uploaded"),
                             EDIT_TEXTURE("edittexture", "Changes to textures on objects"),
                             KILLED("killed", "Number of times killed"),
-                            FRAMETIME_DOUBLED("frametimedoubled", "Ratio of frames 2x longer than previous"),
                             TEX_BAKES("texbakes", "Number of times avatar textures have been baked"),
                             TEX_REBAKES("texrebakes", "Number of times avatar textures have been forced to rebake"),
                             NUM_NEW_OBJECTS("numnewobjectsstat", "Number of objects in scene that were not previously in cache");
@@ -157,11 +156,6 @@ LLTrace::CountStatHandle<F64Kilobytes >
                             MESSAGE_SYSTEM_DATA_IN("messagedatain", "Incoming message system network data"),
                             MESSAGE_SYSTEM_DATA_OUT("messagedataout", "Outgoing message system network data");
 
-LLTrace::CountStatHandle<F64Seconds >
-                            SIM_20_FPS_TIME("sim20fpstime", "Seconds with sim FPS below 20"),
-                            SIM_PHYSICS_20_FPS_TIME("simphysics20fpstime", "Seconds with physics FPS below 20"),
-                            LOSS_5_PERCENT_TIME("loss5percenttime", "Seconds with packet loss > 5%");
-
 SimMeasurement<>            SIM_TIME_DILATION("simtimedilation", "Simulator time scale", LL_SIM_STAT_TIME_DILATION),
                             SIM_FPS("simfps", "Simulator framerate", LL_SIM_STAT_FPS),
                             SIM_PHYSICS_FPS("simphysicsfps", "Simulator physics framerate", LL_SIM_STAT_PHYSFPS),
@@ -205,9 +199,6 @@ static LLTrace::SampleStatHandle<bool>
                             CHAT_BUBBLES("chatbubbles", "Chat Bubbles Enabled");
 
 LLTrace::SampleStatHandle<F64Megabytes > FORMATTED_MEM("formattedmemstat");
-LLTrace::SampleStatHandle<F64Kilobytes >    DELTA_BANDWIDTH("deltabandwidth", "Increase/Decrease in bandwidth based on packet loss"),
-                                                            MAX_BANDWIDTH("maxbandwidth", "Max bandwidth setting");
-
 
 SimMeasurement<F64Milliseconds >    SIM_FRAME_TIME("simframemsec", "", LL_SIM_STAT_FRAMEMS),
                                                     SIM_NET_TIME("simnetmsec", "", LL_SIM_STAT_NETMS),
@@ -228,7 +219,6 @@ SimMeasurement<F64Kilobytes >   SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL
 SimMeasurement<F64Megabytes >   SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY);
 
 LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"),
-                                            FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
                                             FRAMETIME("frametime", "Measured frame time"),
                                             SIM_PING("simpingstat");
 
@@ -246,10 +236,7 @@ LLTrace::EventStatHandle<F64Milliseconds >  REGION_CROSSING_TIME("regioncrossing
 
 LLTrace::EventStatHandle<F64Seconds >   AVATAR_EDIT_TIME("avataredittime", "Seconds in Edit Appearance"),
                                                             TOOLBOX_TIME("toolboxtime", "Seconds using Toolbox"),
-                                                            MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook"),
-                                                            FPS_10_TIME("fps10time", "Seconds below 10 FPS"),
-                                                            FPS_8_TIME("fps8time", "Seconds below 8 FPS"),
-                                                            FPS_2_TIME("fps2time", "Seconds below 2 FPS");
+                                                            MOUSELOOK_TIME("mouselooktime", "Seconds in Mouselook");
 
 LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE("object_cache_hits");
 
@@ -279,55 +266,12 @@ void LLViewerStats::resetStats()
 
 void LLViewerStats::updateFrameStats(const F64Seconds time_diff)
 {
-    if (getRecording().getLastValue(LLStatViewer::PACKETS_LOST_PERCENT) > F32Percent(5.0))
-    {
-        add(LLStatViewer::LOSS_5_PERCENT_TIME, time_diff);
-    }
-
-    F32 sim_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_FPS);
-    if (0.f < sim_fps && sim_fps < 20.f)
-    {
-        add(LLStatViewer::SIM_20_FPS_TIME, time_diff);
-    }
-
-    F32 sim_physics_fps = (F32)getRecording().getLastValue(LLStatViewer::SIM_PHYSICS_FPS);
-
-    if (0.f < sim_physics_fps && sim_physics_fps < 20.f)
-    {
-        add(LLStatViewer::SIM_PHYSICS_20_FPS_TIME, time_diff);
-    }
-
-    if (time_diff >= (F64Seconds)0.5)
-    {
-        record(LLStatViewer::FPS_2_TIME, time_diff);
-    }
-    if (time_diff >= (F64Seconds)0.125)
-    {
-        record(LLStatViewer::FPS_8_TIME, time_diff);
-    }
-    if (time_diff >= (F64Seconds)0.1)
-    {
-        record(LLStatViewer::FPS_10_TIME, time_diff);
-    }
-
     if (gFrameCount && mLastTimeDiff > (F64Seconds)0.0)
     {
-        // new "stutter" meter
-        add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0);
-
         sample(LLStatViewer::FRAMETIME, time_diff);
-
         // old stats that were never really used
-        F64Seconds jit = (F64Seconds) std::fabs((mLastTimeDiff - time_diff));
+        F64Seconds jit = (F64Seconds)std::fabs((mLastTimeDiff - time_diff));
         sample(LLStatViewer::FRAMETIME_JITTER, jit);
-
-        F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
-        sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff));
-
-        F32 max_bandwidth = gViewerThrottle.getMaxBandwidth();
-        F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth;
-        sample(LLStatViewer::DELTA_BANDWIDTH, F64Bits(delta_bandwidth));
-        sample(LLStatViewer::MAX_BANDWIDTH, F64Bits(max_bandwidth));
     }
 
     mLastTimeDiff = time_diff;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index a857af53cc..8aed1c537e 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -135,7 +135,6 @@ extern LLTrace::CountStatHandle<>           FPS,
                                             UPLOAD_TEXTURE,
                                             EDIT_TEXTURE,
                                             KILLED,
-                                            FRAMETIME_DOUBLED,
                                             TEX_BAKES,
                                             TEX_REBAKES,
                                             NUM_NEW_OBJECTS;
@@ -150,10 +149,6 @@ extern LLTrace::CountStatHandle<F64Kilobytes >  ACTIVE_MESSAGE_DATA_RECEIVED,
                                                                     MESSAGE_SYSTEM_DATA_IN,
                                                                     MESSAGE_SYSTEM_DATA_OUT;
 
-extern LLTrace::CountStatHandle<F64Seconds >        SIM_20_FPS_TIME,
-                                                                    SIM_PHYSICS_20_FPS_TIME,
-                                                                    LOSS_5_PERCENT_TIME;
-
 extern SimMeasurement<>                     SIM_TIME_DILATION,
                                             SIM_FPS,
                                             SIM_PHYSICS_FPS,
@@ -194,8 +189,6 @@ extern LLTrace::SampleStatHandle<LLUnit<F32, LLUnits::Percent> > PACKETS_LOST_PE
 
 extern LLTrace::SampleStatHandle<F64Megabytes > FORMATTED_MEM;
 
-extern LLTrace::SampleStatHandle<F64Kilobytes > DELTA_BANDWIDTH,
-                                                                    MAX_BANDWIDTH;
 extern SimMeasurement<F64Milliseconds > SIM_FRAME_TIME,
                                                             SIM_NET_TIME,
                                                             SIM_OTHER_TIME,
@@ -216,7 +209,6 @@ extern SimMeasurement<F64Megabytes >    SIM_PHYSICS_MEM;
 
 
 extern LLTrace::SampleStatHandle<F64Milliseconds >  FRAMETIME_JITTER,
-                                                    FRAMETIME_SLEW,
                                                     SIM_PING;
 
 extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP;
@@ -233,10 +225,7 @@ extern LLTrace::EventStatHandle<F64Milliseconds >   REGION_CROSSING_TIME,
 
 extern LLTrace::EventStatHandle<F64Seconds >    AVATAR_EDIT_TIME,
                                                                 TOOLBOX_TIME,
-                                                                MOUSELOOK_TIME,
-                                                                FPS_10_TIME,
-                                                                FPS_8_TIME,
-                                                                FPS_2_TIME;
+                                                                MOUSELOOK_TIME;
 
 extern LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > OBJECT_CACHE_HIT_RATE;
 
-- 
cgit v1.2.3


From 1f58884db9c026c1a74f693fc84e37a2f66830e3 Mon Sep 17 00:00:00 2001
From: RunitaiLinden <davep@lindenlab.com>
Date: Wed, 28 Aug 2024 13:14:58 -0500
Subject: #2438 Address frame stalls in updateImageDecodePriority

---
 indra/newview/llface.cpp              |   4 +-
 indra/newview/llface.h                |   6 +-
 indra/newview/llviewertexturelist.cpp | 129 ++++++++++++++++++----------------
 indra/newview/llvovolume.cpp          |   1 +
 4 files changed, 78 insertions(+), 62 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index a8001699fe..df08dcf503 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2143,7 +2143,7 @@ F32 LLFace::getTextureVirtualSize()
         face_area =  mPixelArea / llclamp(texel_area, 0.015625f, 128.f);
     }
 
-    face_area = LLFace::adjustPixelArea(mImportanceToCamera, face_area) ;
+    face_area = LLFace::adjustPixelArea(mImportanceToCamera, face_area);
     if(face_area > LLViewerTexture::sMinLargeImageSize) //if is large image, shrink face_area by considering the partial overlapping.
     {
         if(mImportanceToCamera > LEAST_IMPORTANCE_FOR_LARGE_IMAGE && mTexture[LLRender::DIFFUSE_MAP].notNull() && mTexture[LLRender::DIFFUSE_MAP]->isLargeImage())
@@ -2161,7 +2161,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
 
-    //VECTORIZE THIS
     //get area of circle around face
 
     LLVector4a center;
@@ -2286,6 +2285,7 @@ const F32 FACE_IMPORTANCE_TO_CAMERA_OVER_ANGLE[FACE_IMPORTANCE_LEVEL][2] =    //
 //static
 F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
     F32 importance = 0.f ;
 
     if(cos_angle_to_view_dir > LLViewerCamera::getInstance()->getCosHalfFov() &&
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 7cf256f731..99642016f7 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -209,7 +209,6 @@ public:
     void        setDrawInfo(LLDrawInfo* draw_info);
 
     F32         getTextureVirtualSize() ;
-    F32         getImportanceToCamera()const {return mImportanceToCamera ;}
     void        resetVirtualSize();
 
     void        setHasMedia(bool has_media)  { mHasMedia = has_media ;}
@@ -265,6 +264,11 @@ public:
     // return mSkinInfo->mHash or 0 if mSkinInfo is null
     U64 getSkinHash();
 
+    // true if face was recently in the main camera frustum according to LLViewerTextureList updates
+    bool mInFrustum = false;
+    // value of gFrameCount the last time the face was touched by LLViewerTextureList::updateImageDecodePriority
+    U32 mLastTextureUpdate = 0;
+
 private:
     LLPointer<LLVertexBuffer> mVertexBuffer;
     LLPointer<LLVertexBuffer> mVertexBufferGLTF;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 53b054cb24..2df60dbf6c 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -889,79 +889,90 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
 {
     llassert(!gCubeSnapshot);
 
-    static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
-    static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
-    static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
+    if (imagep->getBoostLevel() < LLViewerFetchedTexture::BOOST_HIGH)  // don't bother checking face list for boosted textures
+    {
+        static LLCachedControl<F32> bias_distance_scale(gSavedSettings, "TextureBiasDistanceScale", 1.f);
+        static LLCachedControl<F32> texture_scale_min(gSavedSettings, "TextureScaleMinAreaFactor", 0.04f);
+        static LLCachedControl<F32> texture_scale_max(gSavedSettings, "TextureScaleMaxAreaFactor", 25.f);
 
+        F32 max_vsize = 0.f;
+        bool on_screen = false;
 
-    F32 max_vsize = 0.f;
-    bool on_screen = false;
+        U32 face_count = 0;
 
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
-    for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
-    {
-        for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
-        {
-            LLFace* face = (*(imagep->getFaceList(i)))[fi];
+        F32 bias = (F32) llroundf(powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f));
 
-            if (face && face->getViewerObject())
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
+        for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
+        {
+            for (S32 fi = 0; fi < imagep->getNumFaces(i); ++fi)
             {
-                F32 radius;
-                F32 cos_angle_to_view_dir;
-                static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
-                F32 vsize = face->getPixelArea();
-                bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
-
-                on_screen = in_frustum;
-
-                // Scale desired texture resolution higher or lower depending on texture scale
-                //
-                // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
-                // shows one letter at a time
-                //
-                // Maximum usage examples: huge chunk of terrain repeats texture
-                S32 te_offset = face->getTEOffset();  // offset is -1 if not inited
-                LLViewerObject* objp = face->getViewerObject();
-                const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
-                F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
-                min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
-                vsize /= min_scale;
-
-                // if bias is > 2, apply to on-screen textures as well
-                bool apply_bias = LLViewerTexture::sDesiredDiscardBias > 2.f;
-
-                // apply bias to off screen objects or objects that are small on screen all the time
-                if (!in_frustum || !face->getDrawable()->isVisible() || face->getImportanceToCamera() < bias_unimportant_threshold)
-                { // further reduce by discard bias when off screen or occluded
-                    apply_bias = true;
-                }
+                LLFace* face = (*(imagep->getFaceList(i)))[fi];
 
-                if (apply_bias)
+                if (face && face->getViewerObject())
                 {
-                    F32 bias = powf(4, LLViewerTexture::sDesiredDiscardBias - 1.f);
-                    bias = (F32) llround(bias);
-                    vsize /= bias;
+                    ++face_count;
+                    F32 radius;
+                    F32 cos_angle_to_view_dir;
+                    static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
+
+                    if ((gFrameCount - face->mLastTextureUpdate) > 10)
+                    { // only call calcPixelArea at most once every 10 frames for a given face
+                        // this helps eliminate redundant calls to calcPixelArea for faces that have multiple textures
+                        // assigned to them, such as is the case with GLTF materials or Blinn-Phong materials
+                        face->mInFrustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
+                        face->mLastTextureUpdate = gFrameCount;
+                    }
+
+                    F32 vsize = face->getPixelArea();
+
+                    on_screen = face->mInFrustum;
+
+                    // Scale desired texture resolution higher or lower depending on texture scale
+                    //
+                    // Minimum usage examples: a 1024x1024 texture with aplhabet, runing string
+                    // shows one letter at a time
+                    //
+                    // Maximum usage examples: huge chunk of terrain repeats texture
+                    // TODO: make this work with the GLTF texture transforms
+                    S32 te_offset = face->getTEOffset();  // offset is -1 if not inited
+                    LLViewerObject* objp = face->getViewerObject();
+                    const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
+                    F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
+                    min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
+                    vsize /= min_scale;
+
+                    // apply bias to offscreen faces all the time, but only to onscreen faces when bias is large
+                    if (!face->mInFrustum || LLViewerTexture::sDesiredDiscardBias > 2.f)
+                    {
+                        vsize /= bias;
+                    }
+
+                    max_vsize = llmax(max_vsize, vsize);
                 }
-
-                max_vsize = llmax(max_vsize, vsize);
             }
         }
-    }
 
-    if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
-    { // conditionally reset max virtual size for unboosted LOD_TEXTURES
-      // this is an alternative to decaying mMaxVirtualSize over time
-      // that keeps textures from continously downrezzing and uprezzing in the background
-
-        if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
-            (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
-        {
-            imagep->mMaxVirtualSize = 0.f;
+        if (face_count > 1024)
+        { // this texture is used in so many places we should just boost it and not bother checking its vsize
+            // this is especially important because the above is not time sliced and can hit multiple ms for a single texture
+            imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_HIGH);
         }
-    }
 
+        if (imagep->getType() == LLViewerTexture::LOD_TEXTURE && imagep->getBoostLevel() == LLViewerTexture::BOOST_NONE)
+        { // conditionally reset max virtual size for unboosted LOD_TEXTURES
+          // this is an alternative to decaying mMaxVirtualSize over time
+          // that keeps textures from continously downrezzing and uprezzing in the background
+
+            if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
+                (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
+            {
+                imagep->mMaxVirtualSize = 0.f;
+            }
+        }
 
-    imagep->addTextureStats(max_vsize);
+        imagep->addTextureStats(max_vsize);
+    }
 
 #if 0
     imagep->setDebugText(llformat("%d/%d - %d/%d -- %d/%d",
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index dcaf85b894..b7738b9135 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3219,6 +3219,7 @@ void LLVOVolume::updateSpotLightPriority()
     {
         return;
     }
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
 
     F32 r = getLightRadius();
     LLVector3 pos = mDrawable->getPositionAgent();
-- 
cgit v1.2.3


From f8d48f6a29f312724b826806fdc2f9b5ed85fd13 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 28 Aug 2024 14:49:13 -0500
Subject: #2432 Restore default nametag behavior. (#2444)

After instrumenting nametags some more, really UI rendering performance improvements should just focus on LLFontGL::render
---
 indra/llrender/llgl.cpp                 |  3 ++-
 indra/llui/llfloater.cpp                |  3 +++
 indra/newview/app_settings/settings.xml |  2 +-
 indra/newview/llhudnametag.cpp          | 27 ++++-----------------------
 indra/newview/llhudnametag.h            |  2 +-
 indra/newview/llviewerdisplay.cpp       |  2 ++
 indra/newview/llvoicevisualizer.cpp     |  2 ++
 7 files changed, 15 insertions(+), 26 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 7959b3bb57..c14efe8ab4 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2742,7 +2742,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G
 : mPrevDepthEnabled(sDepthEnabled), mPrevDepthFunc(sDepthFunc), mPrevWriteEnabled(sWriteEnabled)
 {
     stop_glerror();
-
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
     checkState();
 
     if (!depth_enabled)
@@ -2775,6 +2775,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G
 
 LLGLDepthTest::~LLGLDepthTest()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
     checkState();
     if (sDepthEnabled != mPrevDepthEnabled )
     {
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index ff174d8470..6ad74c09e6 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1983,6 +1983,9 @@ void LLFloater::onClickCloseBtn(bool app_quitting)
 // virtual
 void LLFloater::draw()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+    LL_PROFILE_ZONE_TEXT(getTitle().c_str(), getTitle().length());
+
     const F32 alpha = getCurrentTransparency();
 
     // draw background
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1d8cae4e95..ec06582d90 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10314,7 +10314,7 @@
       <key>Type</key>
       <string>S32</string>
       <key>Value</key>
-      <integer>2</integer>
+      <integer>1</integer>
     </map>
     <key>ShowAxes</key>
     <map>
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 205089c662..11f049564a 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -229,35 +229,20 @@ void LLHUDNameTag::render()
     if (sDisplayText)
     {
         LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
-        //LLGLDisable gls_stencil(GL_STENCIL_TEST);
-        renderText(false);
+        renderText();
     }
 }
 
-void LLHUDNameTag::renderText(bool for_select)
+void LLHUDNameTag::renderText()
 {
     if (!mVisible || mHidden)
     {
         return;
     }
 
-    // don't pick text that isn't bound to a viewerobject
-    if (for_select &&
-        (!mSourceObject || mSourceObject->mDrawable.isNull()))
-    {
-        return;
-    }
-
-    if (for_select)
-    {
-        gGL.getTexUnit(0)->disable();
-    }
-    else
-    {
-        gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
-    }
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
-    LLGLState gls_blend(GL_BLEND, !for_select);
+    gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
 
     LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
     F32 alpha_factor = 1.f;
@@ -393,10 +378,6 @@ void LLHUDNameTag::renderText(bool for_select)
     }
     /// Reset the default color to white.  The renderer expects this to be the default.
     gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
-    if (for_select)
-    {
-        gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
-    }
 }
 
 void LLHUDNameTag::setString(const std::string &text_utf8)
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 9abd8f33cc..5cb7fa877e 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -145,7 +145,7 @@ protected:
     LLHUDNameTag(const U8 type);
 
     /*virtual*/ void render();
-    void renderText(bool for_select);
+    void renderText();
     static void updateAll();
     void setLOD(S32 lod);
     S32 getMaxLines();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 8c6a38876a..9bd0973cc0 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1502,6 +1502,7 @@ void draw_axes()
 
 void render_ui_3d()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     LLGLSPipeline gls_pipeline;
 
     //////////////////////////////////////
@@ -1550,6 +1551,7 @@ void render_ui_3d()
 
 void render_ui_2d()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     LLGLSUIDefault gls_ui;
 
     /////////////////////////////////////////////////////////////
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 305fd77126..9412136272 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -342,6 +342,8 @@ void LLVoiceVisualizer::render()
         return;
     }
 
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
+
     if ( mSoundSymbol.mActive )
     {
         mPreviousTime = mCurrentTime;
-- 
cgit v1.2.3


From f23f28c8f9ccc36e8f70beb63b58b3114246a09c Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Wed, 28 Aug 2024 15:59:03 -0700
Subject: secondlife/viewer#2421: Do not calculate and store silhouette edges
 for nearly every geometric prim with a corner

---
 indra/llmath/llvolume.cpp | 415 ++++++++++++++++++++++++++--------------------
 indra/llmath/llvolume.h   |  15 +-
 2 files changed, 246 insertions(+), 184 deletions(-)

(limited to 'indra')

diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 56ac22ca18..700e61467b 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2710,7 +2710,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
 }
 
 
-bool LLVolume::isMeshAssetLoaded()
+bool LLVolume::isMeshAssetLoaded() const
 {
     return mIsMeshAssetLoaded;
 }
@@ -2733,7 +2733,7 @@ void LLVolume::setMeshAssetUnavaliable(bool unavaliable)
     }
 }
 
-bool LLVolume::isMeshAssetUnavaliable()
+bool LLVolume::isMeshAssetUnavaliable() const
 {
     return mIsMeshAssetUnavaliable;
 }
@@ -3730,6 +3730,207 @@ S32 LLVolume::getNumTriangles(S32* vcount) const
     return triangle_count;
 }
 
+void LLVolumeFace::generateSilhouetteEdge(const LLVolume* volume, std::vector<S32>& edge) const
+{
+    llassert(edge.empty()); // edge is supposed to be a scratch array
+
+    if (volume->isMeshAssetLoaded()) { return; }
+
+    if (mTypeMask & CAP_MASK)
+    {
+        // Logic copied from LLVolumeFace::createCap - indicates a face created via
+        // createUnCutCubeCap.
+        if (!(mTypeMask & HOLLOW_MASK) &&
+            !(mTypeMask & OPEN_MASK) &&
+            ((volume->getParams().getPathParams().getBegin()==0.0f)&&
+            (volume->getParams().getPathParams().getEnd()==1.0f))&&
+            (volume->getParams().getProfileParams().getCurveType()==LL_PCODE_PROFILE_SQUARE &&
+             volume->getParams().getPathParams().getCurveType()==LL_PCODE_PATH_LINE)
+            )
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("llvfgse - CAP_MASK");
+
+            const LLAlignedArray<LLVector4a,64>& profile = volume->getProfile().mProfile;
+            S32 grid_size = (profile.size()-1)/4;
+            edge.resize(mNumIndices);
+            llassert(edge.size() == 6*grid_size*grid_size);
+
+            S32 cur_edge = 0;
+            for(S32 gx = 0;gx<grid_size;gx++)
+            {
+                for(S32 gy = 0;gy<grid_size;gy++)
+                {
+                    if (mTypeMask & TOP_MASK)
+                    {
+
+                        S32 edge_value = grid_size * 2 * gy + gx * 2;
+
+                        if (gx > 0)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1; // Mark face to higlight it
+                        }
+
+                        if (gy < grid_size - 1)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        edge[cur_edge++] = edge_value;
+
+                        if (gx < grid_size - 1)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        if (gy > 0)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        edge[cur_edge++] = edge_value;
+                    }
+                    else
+                    {
+                        S32 edge_value = grid_size * 2 * gy + gx * 2;
+
+                        if (gy > 0)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        if (gx < grid_size - 1)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        edge[cur_edge++] = edge_value;
+
+                        if (gy < grid_size - 1)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        if (gx > 0)
+                        {
+                            edge[cur_edge++] = edge_value;
+                        }
+                        else
+                        {
+                            edge[cur_edge++] = -1;
+                        }
+
+                        edge[cur_edge++] = edge_value;
+                    }
+                }
+            }
+        }
+    }
+    else if ((mTypeMask & END_MASK) || (mTypeMask & SIDE_MASK))
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("llvfgse - END_MASK or SIDE_MASK");
+
+        edge.resize(mNumIndices);
+        llassert(edge.size() == 6*(mNumS-1)*(mNumT-1));
+
+        S32 cur_edge = 0;
+        const bool flat_face = mTypeMask & FLAT_MASK;
+        for (S32 t = 0; t < (mNumT-1); t++)
+        {
+            for (S32 s = 0; s < (mNumS-1); s++)
+            {
+                // bottom left/top right neighbor face
+                edge[cur_edge++] = (mNumS-1)*2*t+s*2+1;
+
+                if (t < mNumT-2)
+                {   // top right/top left neighbor face
+                    edge[cur_edge++] = (mNumS-1)*2*(t+1)+s*2+1;
+                }
+                else if (mNumT <= 3 || volume->getPath().isOpen())
+                {   // no neighbor
+                    edge[cur_edge++] = -1;
+                }
+                else
+                {   // wrap on T
+                    edge[cur_edge++] = s*2+1;
+                }
+
+                if (s > 0)
+                {   // top left/bottom left neighbor face
+                    edge[cur_edge++] = (mNumS-1)*2*t+s*2-1;
+                }
+                else if (flat_face || volume->getProfile().isOpen())
+                {   // no neighbor
+                    edge[cur_edge++] = -1;
+                }
+                else
+                {   // wrap on S
+                    edge[cur_edge++] = (mNumS-1)*2*t+(mNumS-2)*2+1;
+                }
+
+                if (t > 0)
+                {   // bottom left/bottom right neighbor face
+                    edge[cur_edge++] = (mNumS-1)*2*(t-1)+s*2;
+                }
+                else if (mNumT <= 3 || volume->getPath().isOpen())
+                {   // no neighbor
+                    edge[cur_edge++] = -1;
+                }
+                else
+                {   // wrap on T
+                    edge[cur_edge++] = (mNumS-1)*2*(mNumT-2)+s*2;
+                }
+
+                if (s < mNumS-2)
+                {   // bottom right/top right neighbor face
+                    edge[cur_edge++] = (mNumS-1)*2*t+(s+1)*2;
+                }
+                else if (flat_face || volume->getProfile().isOpen())
+                {   // no neighbor
+                    edge[cur_edge++] = -1;
+                }
+                else
+                {   // wrap on S
+                    edge[cur_edge++] = (mNumS-1)*2*t;
+                }
+
+                // top right/bottom left neighbor face
+                edge[cur_edge++] = (mNumS-1)*2*t+s*2;
+            }
+        }
+    }
+    else
+    {
+        LL_ERRS() << "Unknown/uninitialized face type!" << LL_ENDL;
+    }
+}
 
 //-----------------------------------------------------------------------------
 // generateSilhouetteVertices()
@@ -3761,6 +3962,13 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
     }
 
     S32 cur_index = 0;
+    // Scratch array for per-face silhouette edge information. This also has a
+    // lot of dev-only debug information that we might not care about anymore.
+    // (see DEBUG_SILHOUETTE_EDGE_MAP)
+    // *TODO: Consider removing the debug associated with
+    // DEBUG_SILHOUETTE_EDGE_MAP, and remove its associated computational
+    // overhead in generateSilhouetteEdge.
+    std::vector<S32> edge;
     //for each face
     for (face_list_t::iterator iter = mVolumeFaces.begin();
          iter != mVolumeFaces.end(); ++iter)
@@ -3768,7 +3976,16 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
         LLVolumeFace& face = *iter;
 
         if (!(face_mask & (0x1 << cur_index++)) ||
-             face.mNumIndices == 0 || face.mEdge.empty())
+             face.mNumIndices == 0)
+        {
+            continue;
+        }
+        // Attempt to generate "edge" info for this silhouette, which is used
+        // for some prims. If the edge array remains empty, then this
+        // silhouette generation method is not supported for this face.
+        edge.clear();
+        face.generateSilhouetteEdge(this, edge);
+        if (edge.empty())
         {
             continue;
         }
@@ -3782,7 +3999,7 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
             {
                 for (S32 k = 0; k < 3; k++)
                 {
-                    S32 index = face.mEdge[j * 3 + k];
+                    S32 index = edge[j * 3 + k];
 
                     if (index == -1)
                     {
@@ -3834,7 +4051,7 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
 
                 //for each edge
                 for (S32 k = 0; k < 3; k++) {
-                    S32 nIndex = face.mEdge[j*3+k];
+                    S32 nIndex = edge[j*3+k];
                     if (nIndex <= -1) {
                         continue;
                     }
@@ -3949,7 +4166,7 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
                     // *FIX IF NEEDED:  this does not deal with neighboring degenerate faces
                     for (S32 k = 0; k < 3; k++)
                     {
-                        S32 index = face.mEdge[j*3+k];
+                        S32 index = edge[j*3+k];
                         if (index != -1)
                         {
                             fFacing[j] = fFacing[index];
@@ -3961,10 +4178,10 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
 
                 //for each edge
                 for (S32 k = 0; k < 3; k++) {
-                    S32 index = face.mEdge[j*3+k];
+                    S32 index = edge[j*3+k];
                     if (index != -1 && fFacing[index] == (AWAY | TOWARDS)) {
                         //our neighbor is degenerate, make him face our direction
-                        fFacing[face.mEdge[j*3+k]] = fFacing[j];
+                        fFacing[edge[j*3+k]] = fFacing[j];
                         continue;
                     }
 
@@ -5775,30 +5992,16 @@ bool LLVolumeFace::createUnCutCubeCap(LLVolume* volume, bool partial_build)
 
     if (!partial_build)
     {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("llvfcuccm - generate indices");
+
         resizeIndices(grid_size*grid_size*6);
-        if (!volume->isMeshAssetLoaded())
-        {
-            S32 size = grid_size * grid_size * 6;
-            try
-            {
-                mEdge.resize(size);
-            }
-            catch (std::bad_alloc&)
-            {
-                LL_WARNS("LLVOLUME") << "Resize of mEdge to " << size << " failed" << LL_ENDL;
-                return false;
-            }
-        }
 
         U16* out = mIndices;
 
         S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0};
 
-        int cur_edge = 0;
-
         for(S32 gx = 0;gx<grid_size;gx++)
         {
-
             for(S32 gy = 0;gy<grid_size;gy++)
             {
                 if (mTypeMask & TOP_MASK)
@@ -5808,47 +6011,6 @@ bool LLVolumeFace::createUnCutCubeCap(LLVolume* volume, bool partial_build)
                         *out++ = ((gy*(grid_size+1))+gx+idxs[i]);
                     }
 
-                    S32 edge_value = grid_size * 2 * gy + gx * 2;
-
-                    if (gx > 0)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1; // Mark face to higlight it
-                    }
-
-                    if (gy < grid_size - 1)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    mEdge[cur_edge++] = edge_value;
-
-                    if (gx < grid_size - 1)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    if (gy > 0)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    mEdge[cur_edge++] = edge_value;
                 }
                 else
                 {
@@ -5856,48 +6018,6 @@ bool LLVolumeFace::createUnCutCubeCap(LLVolume* volume, bool partial_build)
                     {
                         *out++ = ((gy*(grid_size+1))+gx+idxs[i]);
                     }
-
-                    S32 edge_value = grid_size * 2 * gy + gx * 2;
-
-                    if (gy > 0)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    if (gx < grid_size - 1)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    mEdge[cur_edge++] = edge_value;
-
-                    if (gy < grid_size - 1)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    if (gx > 0)
-                    {
-                        mEdge[cur_edge++] = edge_value;
-                    }
-                    else
-                    {
-                        mEdge[cur_edge++] = -1;
-                    }
-
-                    mEdge[cur_edge++] = edge_value;
                 }
             }
         }
@@ -6377,6 +6497,8 @@ void LLVolumeFace::createTangents()
 
 void LLVolumeFace::resizeVertices(S32 num_verts)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
+
     ll_aligned_free<64>(mPositions);
     //DO NOT free mNormals and mTexCoords as they are part of mPositions buffer
     ll_aligned_free_16(mTangents);
@@ -6499,6 +6621,8 @@ void LLVolumeFace::allocateJointIndices(S32 num_verts)
 
 void LLVolumeFace::resizeIndices(S32 num_indices)
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
+
     ll_aligned_free_16(mIndices);
     llassert(num_indices % 3 == 0);
 
@@ -6591,19 +6715,6 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
     {
         resizeVertices(num_vertices);
         resizeIndices(num_indices);
-
-        if (!volume->isMeshAssetLoaded())
-        {
-            try
-            {
-                mEdge.resize(num_indices);
-            }
-            catch (std::bad_alloc&)
-            {
-                LL_WARNS("LLVOLUME") << "Resize of mEdge to " << num_indices << " failed" << LL_ENDL;
-                return false;
-            }
-        }
     }
 
     LL_CHECK_MEMORY
@@ -6618,6 +6729,7 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
     bool test = (mTypeMask & INNER_MASK) && (mTypeMask & FLAT_MASK) && mNumS > 2;
 
     // Copy the vertices into the array
+    { LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("llvfcs - copy verts");
     for (t = mBeginT; t < end_t; t++)
     {
         tt = path_data[t].mTexT;
@@ -6702,6 +6814,7 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
             cur_vertex++;
         }
     }
+    }
     LL_CHECK_MEMORY
 
     mCenter->clear();
@@ -6755,11 +6868,11 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
     mCenter->mul(0.5f);
 
     S32 cur_index = 0;
-    S32 cur_edge = 0;
-    bool flat_face = mTypeMask & FLAT_MASK;
 
     if (!partial_build)
     {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("llvfcs - generate indices");
+
         // Now we generate the indices.
         for (t = 0; t < (mNumT-1); t++)
         {
@@ -6771,64 +6884,6 @@ bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build)
                 mIndices[cur_index++] = s   + mNumS*t;          //bottom left
                 mIndices[cur_index++] = s+1 + mNumS*t;          //bottom right
                 mIndices[cur_index++] = s+1 + mNumS*(t+1);      //top right
-
-                // bottom left/top right neighbor face
-                mEdge[cur_edge++] = (mNumS-1)*2*t+s*2+1;
-
-                if (t < mNumT-2)
-                {   // top right/top left neighbor face
-                    mEdge[cur_edge++] = (mNumS-1)*2*(t+1)+s*2+1;
-                }
-                else if (mNumT <= 3 || volume->getPath().isOpen())
-                {   // no neighbor
-                    mEdge[cur_edge++] = -1;
-                }
-                else
-                {   // wrap on T
-                    mEdge[cur_edge++] = s*2+1;
-                }
-
-                if (s > 0)
-                {   // top left/bottom left neighbor face
-                    mEdge[cur_edge++] = (mNumS-1)*2*t+s*2-1;
-                }
-                else if (flat_face || volume->getProfile().isOpen())
-                {   // no neighbor
-                    mEdge[cur_edge++] = -1;
-                }
-                else
-                {   // wrap on S
-                    mEdge[cur_edge++] = (mNumS-1)*2*t+(mNumS-2)*2+1;
-                }
-
-                if (t > 0)
-                {   // bottom left/bottom right neighbor face
-                    mEdge[cur_edge++] = (mNumS-1)*2*(t-1)+s*2;
-                }
-                else if (mNumT <= 3 || volume->getPath().isOpen())
-                {   // no neighbor
-                    mEdge[cur_edge++] = -1;
-                }
-                else
-                {   // wrap on T
-                    mEdge[cur_edge++] = (mNumS-1)*2*(mNumT-2)+s*2;
-                }
-
-                if (s < mNumS-2)
-                {   // bottom right/top right neighbor face
-                    mEdge[cur_edge++] = (mNumS-1)*2*t+(s+1)*2;
-                }
-                else if (flat_face || volume->getProfile().isOpen())
-                {   // no neighbor
-                    mEdge[cur_edge++] = -1;
-                }
-                else
-                {   // wrap on S
-                    mEdge[cur_edge++] = (mNumS-1)*2*t;
-                }
-
-                // top right/bottom left neighbor face
-                mEdge[cur_edge++] = (mNumS-1)*2*t+s*2;
             }
         }
     }
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index bbb2a16b0b..27c5fc5a49 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -918,6 +918,15 @@ public:
     // Get a reference to the octree, which may be null
     const LLVolumeOctree* getOctree() const;
 
+    // Part of silhouette generation (used by selection outlines)
+    // Populates the provided edge array with numbers corresponding to
+    // *partial* logic of whether a particular index should be rendered
+    // as a silhouette edge. -1 indicates the index should be rendered as a
+    // silhouette edge. See generateSilhouetteVertices for the full logic.
+    // Silhouette edges can only be generated for some types of prims. If a
+    // silhouette edge cannot be generated, the edge array will be left empty.
+    void generateSilhouetteEdge(const LLVolume* volume, std::vector<S32>& edge) const;
+
     enum
     {
         SINGLE_MASK =   0x0001,
@@ -963,8 +972,6 @@ public:
     // indexes for mPositions/mNormals/mTexCoords
     U16* mIndices;
 
-    std::vector<S32>    mEdge;
-
     //list of skin weights for rigged volumes
     // format is mWeights[vertex_index].mV[influence] = <joint_index>.<weight>
     // mWeights.size() should be empty or match mVertices.size()
@@ -1113,9 +1120,9 @@ private:
 
 public:
     virtual void setMeshAssetLoaded(bool loaded);
-    virtual bool isMeshAssetLoaded();
+    virtual bool isMeshAssetLoaded() const;
     virtual void setMeshAssetUnavaliable(bool unavaliable);
-    virtual bool isMeshAssetUnavaliable();
+    virtual bool isMeshAssetUnavaliable() const;
 
  protected:
     bool mUnique;
-- 
cgit v1.2.3


From f15228023f3a1094f69891a5f431cff3d895515a Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Wed, 28 Aug 2024 16:20:25 -0700
Subject: Attempt to get better file/line info for LL_ERRS crahses in bugsplat.
 (#2447)

secondlife/viewer#2445
---
 indra/llcommon/llerror.cpp | 16 ----------------
 indra/llcommon/llerror.h   | 11 +++++------
 2 files changed, 5 insertions(+), 22 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 41c69ba194..ad35bc84f2 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1641,19 +1641,3 @@ namespace LLError
         sLocalizedOutOfMemoryWarning = message;
     }
 }
-
-void crashdriver(void (*callback)(int*))
-{
-    // The LLERROR_CRASH macro used to have inline code of the form:
-    //int* make_me_crash = NULL;
-    //*make_me_crash = 0;
-
-    // But compilers are getting smart enough to recognize that, so we must
-    // assign to an address supplied by a separate source file. We could do
-    // the assignment here in crashdriver() -- but then BugSplat would group
-    // all LL_ERRS() crashes as the fault of this one function, instead of
-    // identifying the specific LL_ERRS() source line. So instead, do the
-    // assignment in a lambda in the caller's source. We just provide the
-    // nullptr target.
-    callback(nullptr);
-}
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 6176ce0d1d..8a143ff30a 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -408,9 +408,11 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
 #define LL_NEWLINE '\n'
 
 // Use this only in LL_ERRS or in a place that LL_ERRS may not be used
-#define LLERROR_CRASH                                   \
-{                                                       \
-    crashdriver([](int* ptr){ *ptr = 0; exit(*ptr); }); \
+#define LLERROR_CRASH                                \
+{                                                    \
+    int* make_me_crash = (int*)0xDEADBEEFDEADBEEFUL; \
+    *make_me_crash = 0;                              \
+    exit(*make_me_crash);                            \
 }
 
 #define LL_ENDL                                         \
@@ -512,7 +514,4 @@ LL_DEBUGS("SomeTag") performs the locking and map-searching ONCE, then caches
 the result in a static variable.
 */
 
-// used by LLERROR_CRASH
-void crashdriver(void (*)(int*));
-
 #endif // LL_LLERROR_H
-- 
cgit v1.2.3


From e26261c7f936d697a96b964723498f3e989017d8 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 28 Aug 2024 23:51:29 +0200
Subject: #2360 Incorrect Day Cycle name in Edit Day Cycle floater after
 clicking the "Customize" button

---
 indra/newview/llfloatereditextdaycycle.cpp         | 49 ++++++++++------------
 indra/newview/llfloatereditextdaycycle.h           |  6 ++-
 indra/newview/llpanelenvironment.cpp               | 16 ++-----
 .../default/xui/en/floater_edit_ext_day_cycle.xml  |  2 +-
 4 files changed, 32 insertions(+), 41 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 60343a4e2a..d6e7cd97f3 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -184,7 +184,6 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
     mLoadTrack(nullptr),
     mClearTrack(nullptr)
 {
-
     mCommitCallbackRegistrar.add(EVNT_DAYTRACK, [this](LLUICtrl *ctrl, const LLSD &data) { onTrackSelectionCallback(data); });
     mCommitCallbackRegistrar.add(EVNT_PLAY, [this](LLUICtrl *ctrl, const LLSD &data) { onPlayActionCallback(data); });
 
@@ -205,8 +204,8 @@ LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle()
 // virtual
 bool LLFloaterEditExtDayCycle::postBuild()
 {
-    getChild<LLLineEditor>(TXT_DAY_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL);
-
+    mNameEditor = getChild<LLLineEditor>(TXT_DAY_NAME, true);
+    mCancelButton = getChild<LLButton>(BTN_CANCEL, true);
     mAddFrameButton = getChild<LLButton>(BTN_ADDFRAME, true);
     mDeleteFrameButton = getChild<LLButton>(BTN_DELFRAME, true);
     mTimeSlider = getChild<LLMultiSliderCtrl>(SLDR_TIME);
@@ -221,24 +220,24 @@ bool LLFloaterEditExtDayCycle::postBuild()
     mClearTrack = getChild<LLButton>(BTN_CLEARTRACK, true);
 
     mFlyoutControl = new LLFlyoutComboBtnCtrl(this, BTN_SAVE, BTN_FLYOUT, XML_FLYOUTMENU_FILE, false);
-    mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); });
+    mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD&) { onButtonApply(ctrl); });
 
-    getChild<LLButton>(BTN_CANCEL, true)->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onClickCloseBtn(); });
-    mTimeSlider->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onTimeSliderCallback(); });
-    mAddFrameButton->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onAddFrame(); });
-    mDeleteFrameButton->setCommitCallback([this](LLUICtrl *ctrl, const LLSD &data) { onRemoveFrame(); });
-    mImportButton->setCommitCallback([this](LLUICtrl *, const LLSD &){ onButtonImport(); });
-    mLoadFrame->setCommitCallback([this](LLUICtrl *, const LLSD &){ onButtonLoadFrame(); });
+    mNameEditor->setKeystrokeCallback([this](LLLineEditor*, void*) { onNameKeystroke(); }, NULL);
+    mCancelButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onClickCloseBtn(); });
+    mTimeSlider->setCommitCallback([this](LLUICtrl*, const LLSD&) { onTimeSliderCallback(); });
+    mAddFrameButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onAddFrame(); });
+    mDeleteFrameButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onRemoveFrame(); });
+    mImportButton->setCommitCallback([this](LLUICtrl*, const LLSD&) { onButtonImport(); });
+    mLoadFrame->setCommitCallback([this](LLUICtrl*, const LLSD&) { onButtonLoadFrame(); });
 
-    mCloneTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){ onCloneTrack(); });
-    mLoadTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){  onLoadTrack();});
-    mClearTrack->setCommitCallback([this](LLUICtrl *, const LLSD&){ onClearTrack(); });
+    mCloneTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onCloneTrack(); });
+    mLoadTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onLoadTrack();});
+    mClearTrack->setCommitCallback([this](LLUICtrl*, const LLSD&) { onClearTrack(); });
 
-
-    mFramesSlider->setCommitCallback([this](LLUICtrl *, const LLSD &data) { onFrameSliderCallback(data); });
-    mFramesSlider->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderDoubleClick(x, y, mask); });
-    mFramesSlider->setMouseDownCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderMouseDown(x, y, mask); });
-    mFramesSlider->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask){ onFrameSliderMouseUp(x, y, mask); });
+    mFramesSlider->setCommitCallback([this](LLUICtrl*, const LLSD &data) { onFrameSliderCallback(data); });
+    mFramesSlider->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderDoubleClick(x, y, mask); });
+    mFramesSlider->setMouseDownCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderMouseDown(x, y, mask); });
+    mFramesSlider->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onFrameSliderMouseUp(x, y, mask); });
 
     mTimeSlider->addSlider(0);
 
@@ -431,12 +430,10 @@ void LLFloaterEditExtDayCycle::refresh()
 {
     if (mEditDay)
     {
-        LLLineEditor* name_field = getChild<LLLineEditor>(TXT_DAY_NAME);
-        name_field->setText(mEditDay->getName());
-        name_field->setEnabled(mCanMod);
+        mNameEditor->setText(mEditDay->getName());
+        mNameEditor->setEnabled(mCanMod && mCanSave && mInventoryId.notNull());
     }
 
-
     bool is_inventory_avail = canUseInventory();
 
     bool show_commit = ((mEditContext == CONTEXT_PARCEL) || (mEditContext == CONTEXT_REGION));
@@ -461,7 +458,7 @@ void LLFloaterEditExtDayCycle::refresh()
     mFlyoutControl->setMenuItemVisible(ACTION_APPLY_REGION, show_apply);
 
     mFlyoutControl->setMenuItemEnabled(ACTION_COMMIT, show_commit && !mCommitSignal.empty());
-    mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && !mInventoryId.isNull() && mCanSave);
+    mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, is_inventory_avail && mCanMod && mCanSave && mInventoryId.notNull());
     mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, is_inventory_avail && mCanCopy && mCanSave);
     mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_LOCAL, true);
     mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_PARCEL, canApplyParcel() && show_apply);
@@ -569,7 +566,7 @@ bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_
     return LLFloater::handleKeyUp(key, mask, called_from_parent);
 }
 
-void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
+void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl)
 {
     std::string ctrl_action = ctrl->getName();
 
@@ -832,7 +829,7 @@ void LLFloaterEditExtDayCycle::onClearTrack()
     refresh();
 }
 
-void LLFloaterEditExtDayCycle::onCommitName(class LLLineEditor* caller, void* user_data)
+void LLFloaterEditExtDayCycle::onNameKeystroke()
 {
     if (!mEditDay)
     {
@@ -840,7 +837,7 @@ void LLFloaterEditExtDayCycle::onCommitName(class LLLineEditor* caller, void* us
         return;
     }
 
-    mEditDay->setName(caller->getText());
+    mEditDay->setName(mNameEditor->getText());
 }
 
 void LLFloaterEditExtDayCycle::onTrackSelectionCallback(const LLSD& user_data)
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 655915b6e8..926a24f8a4 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -110,7 +110,7 @@ private:
     F32 getCurrentFrame() const;
 
     // flyout response/click
-    void                        onButtonApply(LLUICtrl *ctrl, const LLSD &data);
+    void                        onButtonApply(LLUICtrl *ctrl);
     //virtual void                onClickCloseBtn(bool app_quitting = false) override;
     //void                        onButtonImport();
     void                        onButtonLoadFrame();
@@ -119,7 +119,7 @@ private:
     void                        onCloneTrack();
     void                        onLoadTrack();
     void                        onClearTrack();
-    void                        onCommitName(class LLLineEditor* caller, void* user_data);
+    void                        onNameKeystroke();
     void                        onTrackSelectionCallback(const LLSD& user_data);
     void                        onPlayActionCallback(const LLSD& user_data);
     // time slider clicked
@@ -196,6 +196,8 @@ private:
     std::string                 mLastFrameSlider;
     bool                        mShiftCopyEnabled;
 
+    LLLineEditor*               mNameEditor;
+    LLButton*                   mCancelButton;
     LLButton*                   mAddFrameButton;
     LLButton*                   mDeleteFrameButton;
     LLButton*                   mImportButton;
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 2a4323d3e6..c1d8ce50ff 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -58,14 +58,6 @@ namespace
     const std::string FLOATER_DAY_CYCLE_EDIT("env_edit_extdaycycle");
     const std::string STRING_REGION_ENV("str_region_env");
     const std::string STRING_EMPTY_NAME("str_empty");
-
-    inline bool ends_with(std::string const & value, std::string const & ending)
-    {
-        if (ending.size() > value.size())
-            return false;
-        return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
-    }
-
 }
 
 //=========================================================================
@@ -876,16 +868,16 @@ void LLPanelEnvironmentInfo::onBtnEdit()
             (LLFloaterEditExtDayCycle::KEY_CANMOD,      LLSD::Boolean(true)));
 
     dayeditor->openFloater(params);
+
     if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle)
     {
         dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle);
-        if (!ends_with(mCurrentEnvironment->mDayCycle->getName(), "(customized)"))
-        {
-            dayeditor->setEditName(mCurrentEnvironment->mDayCycle->getName() + "(customized)");
-        }
+        dayeditor->setEditName(mCurrentEnvironment->mDayCycleName);
     }
     else
+    {
         dayeditor->setEditDefaultDayCycle();
+    }
 }
 
 void LLPanelEnvironmentInfo::onBtnSelect()
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index 1500c96b8d..787b2f8be4 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -50,7 +50,7 @@
                     layout="topleft"
                     name="label"
                     left="15"
-                    top="5"
+                    top="8"
                     width="105">
                 Day Cycle Name:
             </text>
-- 
cgit v1.2.3


From e2809755c5e4a6a6d3c8f27911865efe4020d679 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 22 Aug 2024 17:27:16 +0300
Subject: Make LLPipeline::renderDebug() a bit cheaper

Each frame renderDebug() was pointlesly going over a large list of
partitions and bridges.
---
 indra/newview/llvoavatarself.cpp |  1 +
 indra/newview/llworld.cpp        |  1 +
 indra/newview/pipeline.cpp       | 56 ++++++++++++++++++++++++++--------------
 3 files changed, 39 insertions(+), 19 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 49859bb585..746ef7cacb 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -775,6 +775,7 @@ void LLVOAvatarSelf::updateVisualParams()
 
 void LLVOAvatarSelf::writeWearablesToAvatar()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
     for (U32 type = 0; type < LLWearableType::WT_COUNT; type++)
     {
         LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type);
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 40bfa8ec83..e0d8c25731 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -768,6 +768,7 @@ void LLWorld::updateParticles()
 
 void LLWorld::renderPropertyLines()
 {
+    LL_PROFILE_ZONE_SCOPED;
     for (region_list_t::iterator iter = mVisibleRegionList.begin();
          iter != mVisibleRegionList.end(); ++iter)
     {
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index eaf54356a2..ce43982f35 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4532,33 +4532,51 @@ void LLPipeline::renderDebug()
     }
 
     // Debug stuff.
-    for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
-            iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
-    {
-        LLViewerRegion* region = *iter;
-        for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
+    if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE |
+        LLPipeline::RENDER_DEBUG_OCCLUSION |
+        LLPipeline::RENDER_DEBUG_LIGHTS |
+        LLPipeline::RENDER_DEBUG_BATCH_SIZE |
+        LLPipeline::RENDER_DEBUG_UPDATE_TYPE |
+        LLPipeline::RENDER_DEBUG_BBOXES |
+        LLPipeline::RENDER_DEBUG_NORMALS |
+        LLPipeline::RENDER_DEBUG_POINTS |
+        LLPipeline::RENDER_DEBUG_TEXTURE_AREA |
+        LLPipeline::RENDER_DEBUG_TEXTURE_ANIM |
+        LLPipeline::RENDER_DEBUG_RAYCAST |
+        LLPipeline::RENDER_DEBUG_AVATAR_VOLUME |
+        LLPipeline::RENDER_DEBUG_AVATAR_JOINTS |
+        LLPipeline::RENDER_DEBUG_AGENT_TARGET |
+        LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA |
+        LLPipeline::RENDER_DEBUG_TEXEL_DENSITY))
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("render debug bridges");
+
+        for (LLViewerRegion* region : LLWorld::getInstance()->getRegionList())
         {
-            LLSpatialPartition* part = region->getSpatialPartition(i);
-            if (part)
+            for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
             {
-                if ( (hud_only && (part->mDrawableType == RENDER_TYPE_HUD || part->mDrawableType == RENDER_TYPE_HUD_PARTICLES)) ||
-                     (!hud_only && hasRenderType(part->mDrawableType)) )
+                LLSpatialPartition* part = region->getSpatialPartition(i);
+                if (part)
                 {
-                    part->renderDebug();
+                    if ((hud_only && (part->mDrawableType == RENDER_TYPE_HUD || part->mDrawableType == RENDER_TYPE_HUD_PARTICLES)) ||
+                        (!hud_only && hasRenderType(part->mDrawableType)))
+                    {
+                        part->renderDebug();
+                    }
                 }
             }
         }
-    }
 
-    for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
-    {
-        LLSpatialBridge* bridge = *i;
-        if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
+        for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
         {
-            gGL.pushMatrix();
-            gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
-            bridge->renderDebug();
-            gGL.popMatrix();
+            LLSpatialBridge* bridge = *i;
+            if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
+            {
+                gGL.pushMatrix();
+                gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
+                bridge->renderDebug();
+                gGL.popMatrix();
+            }
         }
     }
 
-- 
cgit v1.2.3


From 11afd7f86afd19fde8b577f57736d6d27542484e Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Thu, 29 Aug 2024 12:57:49 -0700
Subject: Add error handling for intel crashes from GLTF Scene shader (#2456)

fix secondlife/viewer#1856
---
 indra/newview/app_settings/settings.xml              | 11 +++++++++++
 indra/newview/gltfscenemanager.cpp                   |  8 ++++++++
 indra/newview/llviewermenu.cpp                       | 15 +++++++++++++--
 indra/newview/llviewershadermgr.cpp                  |  9 ++++++++-
 indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++
 5 files changed, 51 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 483c8774a7..5e7ae32b81 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7172,6 +7172,17 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
+    <key>RenderCanUseGLTFPBROpaqueShaders</key>
+    <map>
+        <key>Comment</key>
+        <string>Hardware has support for GLTF scene shaders</string>
+        <key>Persist</key>
+        <integer>0</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>1</integer>
+    </map>
   <key>RenderClass1MemoryBandwidth</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 086f41c1cb..e55d630940 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -45,6 +45,7 @@
 #include "llfloaterreg.h"
 #include "llagentbenefits.h"
 #include "llfilesystem.h"
+#include "llviewercontrol.h"
 #include "boost/json.hpp"
 
 #define GLTF_SIM_SUPPORT 1
@@ -618,6 +619,13 @@ void GLTFSceneManager::render(Asset& asset, U8 variant)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_GLTF;
 
+    static LLCachedControl<bool> can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true);
+    if (!can_use_shaders)
+    {
+        // user should already have been notified of unsupported hardware
+        return;
+    }
+
     for (U32 ds = 0; ds < 2; ++ds)
     {
         RenderData& rd = asset.mRenderData[ds];
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 97d5781566..e1664752e7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3414,7 +3414,9 @@ bool enable_os_exception()
 bool enable_gltf()
 {
     static LLCachedControl<bool> enablegltf(gSavedSettings, "GLTFEnabled", false);
-    return enablegltf;
+    static LLCachedControl<bool> can_use(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true);
+
+    return enablegltf && can_use;
 }
 
 bool enable_gltf_save_as()
@@ -8207,7 +8209,16 @@ class LLAdvancedClickGLTFOpen: public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
     {
-        LL::GLTFSceneManager::instance().load();
+        static LLCachedControl<bool> can_use_shaders(gSavedSettings, "RenderCanUseGLTFPBROpaqueShaders", true);
+        if (can_use_shaders)
+        {
+            LL::GLTFSceneManager::instance().load();
+        }
+        else
+        {
+            LLNotificationsUtil::add("NoSupportGLTFShader");
+        }
+
         return true;
     }
 };
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 073a1787d5..c98bd9b7e2 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1336,7 +1336,14 @@ bool LLViewerShaderMgr::loadShadersDeferred()
 
         success = make_gltf_variants(gGLTFPBRMetallicRoughnessProgram, use_sun_shadow);
 
-        llassert(success);
+        //llassert(success);
+        if (!success)
+        {
+            LL_WARNS() << "Failed to create GLTF PBR Metallic Roughness Shader, disabling!" << LL_ENDL;
+            gSavedSettings.setBOOL("RenderCanUseGLTFPBROpaqueShaders", false);
+            // continue as if this shader never happened
+            success = true;
+        }
     }
 
     if (success)
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e539388735..5ce73b2cfa 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12572,4 +12572,15 @@ are wearing now.
       yestext="OK"/>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="NoSupportGLTFShader"
+   type="notify">
+     GLTF scenes are not yet supported on your graphics hardware.
+     <tag>fail</tag>
+     <usetemplate
+       name="okbutton"
+       yestext="OK"/>
+  </notification>
+
 </notifications>
-- 
cgit v1.2.3


From b0fefd62adbf51f32434ba077e9f52d8a9241d15 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 29 Aug 2024 15:06:24 -0500
Subject: #2428 Fix for crash when applying PBR material to a single face (take
 2) (#2463)

Also fix for some objects randomly disappearing until they're selected again.
---
 indra/newview/llface.cpp     | 5 +++--
 indra/newview/llvovolume.cpp | 4 +---
 2 files changed, 4 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9e504402c8..581328b3cb 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -573,7 +573,6 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
                 if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial())
                 {
                     vertex_buffer = mVertexBufferGLTF.get();
-                    vertex_buffer->unmapBuffer();
                 }
             }
             // Draw the selection marker using the correctly chosen vertex buffer
@@ -1220,7 +1219,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
             mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask());
         }
 
-        // Clone the existing vertex buffer into the temporary one
+        // Clone the existing vertex buffer into the temporary   one
+        // TODO: factor out the need for mVertexBufferGLTF and make selection highlight shader work with the existing vertex buffer
         mVertexBuffer->clone(*mVertexBufferGLTF);
 
         // Recursive call the same function with the argument rebuild_for_gltf set to true
@@ -1228,6 +1228,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
         mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
         getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true);
         mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+        mVertexBufferGLTF->unmapBuffer();
     }
     else if (!tep->isSelected() && mVertexBufferGLTF.notNull())
     {
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index dcaf85b894..669ccb0924 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5765,9 +5765,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
                     continue;
                 }
 
-                if (facep->hasGeometry() &&
-                    (rigged ||  // <-- HACK FIXME -- getPixelArea might be incorrect for rigged objects
-                        facep->getPixelArea() > FORCE_CULL_AREA)) // <-- don't render tiny faces
+                if (facep->hasGeometry())
                 {
                     cur_total += facep->getGeomCount();
 
-- 
cgit v1.2.3


From 8759edd575bf34798237f559a4a515ce76a7b7d0 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 29 Aug 2024 15:55:19 -0400
Subject: Fix SSR clamping hdr brightness ranges

---
 indra/newview/pipeline.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index ce43982f35..cda9fcad9e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -871,7 +871,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
         if(RenderScreenSpaceReflections)
         {
-            mSceneMap.allocate(resX, resY, GL_RGB, true);
+            mSceneMap.allocate(resX, resY, GL_RGBA16F, true);
         }
         else
         {
-- 
cgit v1.2.3


From 3a7374892945a233a9eaa3a88c94a984873373d3 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 29 Aug 2024 15:56:28 -0400
Subject: Remove dead texunit colorspace conversion code

---
 indra/llrender/llglslshader.cpp   | 14 ++++++--------
 indra/llrender/llglslshader.h     |  8 ++++----
 indra/llrender/llrender.cpp       | 18 ++----------------
 indra/llrender/llrender.h         |  5 -----
 indra/llrender/llrendertarget.cpp |  1 -
 5 files changed, 12 insertions(+), 34 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index daa768e8ab..a157bfee21 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -1087,17 +1087,17 @@ void LLGLSLShader::unbind(void)
     sCurBoundShaderPtr = NULL;
 }
 
-S32 LLGLSLShader::bindTexture(const std::string& uniform, LLTexture* texture, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace colorspace)
+S32 LLGLSLShader::bindTexture(const std::string& uniform, LLTexture* texture, LLTexUnit::eTextureType mode)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
 
     S32 channel = 0;
     channel = getUniformLocation(uniform);
 
-    return bindTexture(channel, texture, mode, colorspace);
+    return bindTexture(channel, texture, mode);
 }
 
-S32 LLGLSLShader::bindTexture(S32 uniform, LLTexture* texture, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace colorspace)
+S32 LLGLSLShader::bindTexture(S32 uniform, LLTexture* texture, LLTexUnit::eTextureType mode)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
 
@@ -1113,7 +1113,6 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLTexture* texture, LLTexUnit::eTextu
     if (uniform > -1)
     {
         gGL.getTexUnit(uniform)->bindFast(texture);
-        gGL.getTexUnit(uniform)->setTextureColorSpace(colorspace);
     }
 
     return uniform;
@@ -1194,7 +1193,7 @@ S32 LLGLSLShader::getTextureChannel(S32 uniform) const
     return mTexture[uniform];
 }
 
-S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space)
+S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
 
@@ -1211,12 +1210,11 @@ S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTex
     {
         gGL.getTexUnit(index)->activate();
         gGL.getTexUnit(index)->enable(mode);
-        gGL.getTexUnit(index)->setTextureColorSpace(space);
     }
     return index;
 }
 
-S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTexUnit::eTextureColorSpace space)
+S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
 
@@ -1229,7 +1227,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTe
     S32 index = mTexture[uniform];
     if (index != -1 && gGL.getTexUnit(index)->getCurrType() != LLTexUnit::TT_NONE)
     {
-        if (gDebugGL && gGL.getTexUnit(index)->getCurrType() != mode && gGL.getTexUnit(index)->getCurrColorSpace() != space)
+        if (gDebugGL && gGL.getTexUnit(index)->getCurrType() != mode)
         {
             if (gDebugSession)
             {
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index f3c41cd819..913feb6a3f 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -249,16 +249,16 @@ public:
     //if given texture uniform is active in the shader,
     //the corresponding channel will be active upon return
     //returns channel texture is enabled in from [0-MAX)
-    S32 enableTexture(S32 uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE, LLTexUnit::eTextureColorSpace space = LLTexUnit::TCS_LINEAR);
-    S32 disableTexture(S32 uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE, LLTexUnit::eTextureColorSpace space = LLTexUnit::TCS_LINEAR);
+    S32 enableTexture(S32 uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
+    S32 disableTexture(S32 uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
 
     // get the texture channel of the given uniform, or -1 if uniform is not used as a texture
     S32 getTextureChannel(S32 uniform) const;
 
     // bindTexture returns the texture unit we've bound the texture to.
     // You can reuse the return value to unbind a texture when required.
-    S32 bindTexture(const std::string& uniform, LLTexture* texture, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE, LLTexUnit::eTextureColorSpace space = LLTexUnit::TCS_LINEAR);
-    S32 bindTexture(S32 uniform, LLTexture* texture, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE, LLTexUnit::eTextureColorSpace space = LLTexUnit::TCS_LINEAR);
+    S32 bindTexture(const std::string& uniform, LLTexture* texture, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
+    S32 bindTexture(S32 uniform, LLTexture* texture, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
     S32 bindTexture(const std::string& uniform, LLRenderTarget* texture, bool depth = false, LLTexUnit::eTextureFilterOptions mode = LLTexUnit::TFO_BILINEAR);
     S32 bindTexture(S32 uniform, LLRenderTarget* texture, bool depth = false, LLTexUnit::eTextureFilterOptions mode = LLTexUnit::TFO_BILINEAR, U32 index = 0);
     S32 unbindTexture(const std::string& uniform, LLTexUnit::eTextureType mode = LLTexUnit::TT_TEXTURE);
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 1301d325a0..3572419a7a 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -115,7 +115,7 @@ static const GLenum sGLBlendFactor[] =
 
 LLTexUnit::LLTexUnit(S32 index)
     : mCurrTexType(TT_NONE),
-    mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0), mTexColorSpace(TCS_LINEAR),
+    mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0),
     mHasMipMaps(false),
     mIndex(index)
 {
@@ -145,8 +145,6 @@ void LLTexUnit::refreshState(void)
     {
         glBindTexture(GL_TEXTURE_2D, 0);
     }
-
-    setTextureColorSpace(mTexColorSpace);
 }
 
 void LLTexUnit::activate(void)
@@ -241,7 +239,6 @@ bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind)
                         setTextureAddressMode(gl_tex->mAddressMode);
                         setTextureFilteringOption(gl_tex->mFilterOption);
                     }
-                    setTextureColorSpace(mTexColorSpace);
                 }
             }
             else
@@ -318,7 +315,6 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind, S32
             setTextureFilteringOption(texture->mFilterOption);
             stop_glerror();
         }
-        setTextureColorSpace(mTexColorSpace);
     }
 
     stop_glerror();
@@ -354,7 +350,6 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
                 setTextureAddressMode(cubeMap->mImages[0]->mAddressMode);
                 setTextureFilteringOption(cubeMap->mImages[0]->mFilterOption);
             }
-            setTextureColorSpace(mTexColorSpace);
             return true;
         }
         else
@@ -403,7 +398,6 @@ bool LLTexUnit::bindManual(eTextureType type, U32 texture, bool hasMips)
         mCurrTexture = texture;
         glBindTexture(sGLTextureType[type], texture);
         mHasMipMaps = hasMips;
-        setTextureColorSpace(mTexColorSpace);
     }
     return true;
 }
@@ -424,8 +418,6 @@ void LLTexUnit::unbind(eTextureType type)
     {
         mCurrTexture = 0;
 
-        // Always make sure our texture color space is reset to linear.  SRGB sampling should be opt-in in the vast majority of cases.  Also prevents color space "popping".
-        mTexColorSpace = TCS_LINEAR;
         if (type == LLTexUnit::TT_TEXTURE)
         {
             glBindTexture(sGLTextureType[type], sWhiteTexture);
@@ -447,8 +439,6 @@ void LLTexUnit::unbindFast(eTextureType type)
     {
         mCurrTexture = 0;
 
-        // Always make sure our texture color space is reset to linear.  SRGB sampling should be opt-in in the vast majority of cases.  Also prevents color space "popping".
-        mTexColorSpace = TCS_LINEAR;
         if (type == LLTexUnit::TT_TEXTURE)
         {
             glBindTexture(sGLTextureType[type], sWhiteTexture);
@@ -642,11 +632,6 @@ void LLTexUnit::debugTextureUnit(void)
     }
 }
 
-void LLTexUnit::setTextureColorSpace(eTextureColorSpace space)
-{
-    mTexColorSpace = space;
-}
-
 LLLightState::LLLightState(S32 index)
 : mIndex(index),
   mEnabled(false),
@@ -1634,6 +1619,7 @@ void LLRender::flush()
         {
 
             HBXXH64 hash;
+
             U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
 
             {
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 010ab122b6..4aa33b7427 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -219,17 +219,12 @@ public:
 
     void setHasMipMaps(bool hasMips) { mHasMipMaps = hasMips; }
 
-    void setTextureColorSpace(eTextureColorSpace space);
-
-    eTextureColorSpace getCurrColorSpace() { return mTexColorSpace; }
-
 protected:
     friend class LLRender;
 
     S32                 mIndex;
     U32                 mCurrTexture;
     eTextureType        mCurrTexType;
-    eTextureColorSpace  mTexColorSpace;
     S32                 mCurrColorScale;
     S32                 mCurrAlphaScale;
     bool                mHasMipMaps;
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 21a0820d32..38bc5ff331 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -509,7 +509,6 @@ void LLRenderTarget::bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilt
     }
 
     gGL.getTexUnit(channel)->setTextureFilteringOption(filter_options);
-    gGL.getTexUnit(channel)->setTextureColorSpace(isSRGB ? LLTexUnit::TCS_SRGB : LLTexUnit::TCS_LINEAR);
 }
 
 void LLRenderTarget::flush()
-- 
cgit v1.2.3


From 958afaa7a7bfb1217bbffee3fe562f21901277ac Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 27 Aug 2024 22:47:32 -0400
Subject: Integrate SMAA and rework post process chain for better visual
 quality Add SMAA buffer generation passes Add quality levels for both FXAA
 and SMAA Separate gamma correction and tonemapping for effects that require
 linear-but-tonemapped inputs Move application of noise to final render pass
 to screen to avoid damaging other post process effects

---
 indra/llrender/llglslshader.h                      |     4 +
 indra/llrender/llrender.cpp                        |     1 -
 indra/llrender/llshadermgr.cpp                     |    14 +
 indra/llrender/llshadermgr.h                       |     5 +
 indra/newview/SMAAAreaTex.h                        | 15005 +++++++++++++++++++
 indra/newview/SMAASearchTex.h                      |   157 +
 indra/newview/app_settings/settings.xml            |    26 +-
 .../app_settings/shaders/class1/deferred/CASF.glsl |     6 +-
 .../app_settings/shaders/class1/deferred/SMAA.glsl |  1463 ++
 .../shaders/class1/deferred/SMAABlendWeightsF.glsl |    57 +
 .../shaders/class1/deferred/SMAABlendWeightsV.glsl |    51 +
 .../shaders/class1/deferred/SMAAEdgeDetectF.glsl   |    59 +
 .../shaders/class1/deferred/SMAAEdgeDetectV.glsl   |    45 +
 .../class1/deferred/SMAANeighborhoodBlendF.glsl    |    63 +
 .../class1/deferred/SMAANeighborhoodBlendV.glsl    |    47 +
 .../shaders/class1/deferred/fxaaF.glsl             |     2 +-
 .../class1/deferred/postDeferredGammaCorrect.glsl  |   145 +-
 .../class1/deferred/postDeferredNoDoFF.glsl        |    47 +
 .../class1/deferred/postDeferredTonemap.glsl       |   150 +
 indra/newview/featuretable.txt                     |    20 +-
 indra/newview/featuretable_mac.txt                 |    18 +-
 .../llfloaterpreferencesgraphicsadvanced.cpp       |     2 -
 indra/newview/llgltfmaterialpreviewmgr.cpp         |     2 +-
 indra/newview/llviewercontrol.cpp                  |     2 +-
 indra/newview/llviewershadermgr.cpp                |   199 +-
 indra/newview/llviewershadermgr.h                  |     9 +-
 indra/newview/pipeline.cpp                         |   432 +-
 indra/newview/pipeline.h                           |    13 +-
 .../en/floater_preferences_graphics_advanced.xml   |    66 +-
 29 files changed, 17823 insertions(+), 287 deletions(-)
 create mode 100644 indra/newview/SMAAAreaTex.h
 create mode 100644 indra/newview/SMAASearchTex.h
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsF.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsV.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectF.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectV.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendF.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendV.glsl
 create mode 100644 indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl

(limited to 'indra')

diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 913feb6a3f..27c8f0b7d0 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -241,6 +241,10 @@ public:
 
     void clearPermutations();
     void addPermutation(std::string name, std::string value);
+    void addPermutations(const std::map<std::string, std::string>& defines)
+    {
+        mDefines.insert(defines.begin(), defines.end());
+    }
     void removePermutation(std::string name);
 
     void addConstant(const LLGLSLShader::eShaderConsts shader_const);
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 3572419a7a..7a52f9cfb5 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1619,7 +1619,6 @@ void LLRender::flush()
         {
 
             HBXXH64 hash;
-
             U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
 
             {
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index e9608491a4..150277c8df 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -597,6 +597,15 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
         }
     }
 
+    if (type == GL_FRAGMENT_SHADER)
+    {
+        extra_code_text[extra_code_count++] = strdup("#define FRAGMENT_SHADER 1\n");
+    }
+    else
+    {
+        extra_code_text[extra_code_count++] = strdup("#define VERTEX_SHADER 1\n");
+    }
+
     // Use alpha float to store bit flags
     // See: C++: addDeferredAttachment(), shader: frag_data[2]
     extra_code_text[extra_code_count++] = strdup("#define GBUFFER_FLAG_SKIP_ATMOS   0.0 \n"); // atmo kill
@@ -1468,6 +1477,11 @@ void LLShaderMgr::initAttribsAndUniforms()
 
     mReservedUniforms.push_back("debug_normal_draw_length");
 
+    mReservedUniforms.push_back("edgesTex");
+    mReservedUniforms.push_back("areaTex");
+    mReservedUniforms.push_back("searchTex");
+    mReservedUniforms.push_back("blendTex");
+
     llassert(mReservedUniforms.size() == END_RESERVED_UNIFORMS);
 
     std::set<std::string> dupe_check;
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 2b76ef664b..0eb9db6715 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -332,6 +332,11 @@ public:
 
         DEBUG_NORMAL_DRAW_LENGTH,           //  "debug_normal_draw_length"
 
+        SMAA_EDGE_TEX,                      //  "edgesTex"
+        SMAA_AREA_TEX,                      //  "areaTex"
+        SMAA_SEARCH_TEX,                    //  "searchTex"
+        SMAA_BLEND_TEX,                     //  "blendTex"
+
         END_RESERVED_UNIFORMS
     } eGLSLReservedUniforms;
     // clang-format on
diff --git a/indra/newview/SMAAAreaTex.h b/indra/newview/SMAAAreaTex.h
new file mode 100644
index 0000000000..11fc20bd82
--- /dev/null
+++ b/indra/newview/SMAAAreaTex.h
@@ -0,0 +1,15005 @@
+/**
+ * @file SMAAAreaTex.h
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/**
+ * Copyright (C) 2013 Jorge Jimenez (jorge@iryoku.com)
+ * Copyright (C) 2013 Jose I. Echevarria (joseignacioechevarria@gmail.com)
+ * Copyright (C) 2013 Belen Masia (bmasia@unizar.es)
+ * Copyright (C) 2013 Fernando Navarro (fernandn@microsoft.com)
+ * Copyright (C) 2013 Diego Gutierrez (diegog@unizar.es)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to
+ * do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software. As clarification, there
+ * is no requirement that the copyright notice and permission be included in
+ * binary distributions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+
+#ifndef AREATEX_H
+#define AREATEX_H
+
+#define AREATEX_WIDTH 160
+#define AREATEX_HEIGHT 560
+#define AREATEX_PITCH (AREATEX_WIDTH * 2)
+#define AREATEX_SIZE (AREATEX_HEIGHT * AREATEX_PITCH)
+
+/**
+ * Stored in R8G8 format. Load it in the following format:
+ *  - DX9:  D3DFMT_A8L8
+ *  - DX10: DXGI_FORMAT_R8G8_UNORM
+ */
+static const unsigned char areaTexBytes[] = {
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x40, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x44, 0x7b, 0x41, 0x5d,
+    0x42, 0x54, 0x41, 0x4f, 0x42, 0x4b, 0x42, 0x49, 0x42, 0x48, 0x41, 0x47,
+    0x42, 0x46, 0x42, 0x45, 0x42, 0x45, 0x42, 0x44, 0x42, 0x44, 0x42, 0x44,
+    0x42, 0x43, 0x41, 0x43, 0x42, 0x43, 0x42, 0x43, 0x42, 0x43, 0x42, 0x43,
+    0x04, 0x7f, 0x22, 0x3d, 0x2b, 0x3d, 0x30, 0x3d, 0x33, 0x3d, 0x35, 0x3d,
+    0x37, 0x3d, 0x38, 0x3d, 0x39, 0x3d, 0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d,
+    0x3b, 0x3d, 0x3b, 0x3d, 0x3b, 0x3d, 0x3c, 0x3d, 0x3c, 0x3d, 0x3c, 0x3d,
+    0x3c, 0x3d, 0x3c, 0x3d, 0x40, 0x7f, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x0a, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x62, 0x20, 0x4d, 0x2a, 0x48, 0x30, 0x44, 0x33,
+    0x44, 0x35, 0x44, 0x36, 0x43, 0x37, 0x42, 0x38, 0x43, 0x39, 0x42, 0x39,
+    0x42, 0x3a, 0x42, 0x3a, 0x42, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x41, 0x3b,
+    0x42, 0x3c, 0x42, 0x3c, 0x42, 0x3c, 0x42, 0x3c, 0x00, 0x5d, 0x0c, 0x49,
+    0x16, 0x43, 0x1d, 0x41, 0x22, 0x40, 0x26, 0x3f, 0x29, 0x3f, 0x2c, 0x3f,
+    0x2e, 0x3e, 0x2f, 0x3e, 0x31, 0x3e, 0x32, 0x3e, 0x33, 0x3e, 0x33, 0x3e,
+    0x34, 0x3e, 0x35, 0x3e, 0x35, 0x3e, 0x36, 0x3e, 0x37, 0x3e, 0x37, 0x3e,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x66, 0x00, 0x3f, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x3f, 0x00, 0x03, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x6d, 0x0b, 0x57, 0x16, 0x4f, 0x1d, 0x4a, 0x22, 0x48, 0x26, 0x47, 0x29,
+    0x46, 0x2b, 0x44, 0x2d, 0x44, 0x2f, 0x44, 0x30, 0x44, 0x31, 0x44, 0x32,
+    0x43, 0x33, 0x43, 0x34, 0x43, 0x34, 0x42, 0x35, 0x43, 0x36, 0x42, 0x36,
+    0x42, 0x37, 0x42, 0x37, 0x00, 0x68, 0x06, 0x54, 0x0d, 0x4b, 0x14, 0x47,
+    0x19, 0x44, 0x1d, 0x43, 0x20, 0x41, 0x23, 0x41, 0x26, 0x40, 0x27, 0x40,
+    0x29, 0x3f, 0x2b, 0x3f, 0x2c, 0x3f, 0x2d, 0x3f, 0x2e, 0x3f, 0x2f, 0x3f,
+    0x30, 0x3f, 0x30, 0x3e, 0x31, 0x3e, 0x32, 0x3e, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x5c,
+    0x00, 0x2d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x72, 0x00, 0x5c, 0x00, 0x2d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x72, 0x06, 0x5f, 0x0d,
+    0x56, 0x14, 0x4f, 0x19, 0x4d, 0x1d, 0x4a, 0x20, 0x49, 0x23, 0x47, 0x25,
+    0x46, 0x27, 0x46, 0x29, 0x45, 0x2a, 0x45, 0x2c, 0x44, 0x2d, 0x44, 0x2e,
+    0x44, 0x2f, 0x43, 0x30, 0x44, 0x30, 0x44, 0x31, 0x43, 0x32, 0x43, 0x33,
+    0x00, 0x6d, 0x04, 0x5b, 0x09, 0x51, 0x0e, 0x4c, 0x13, 0x48, 0x17, 0x46,
+    0x1a, 0x44, 0x1d, 0x43, 0x1f, 0x42, 0x22, 0x42, 0x24, 0x41, 0x25, 0x41,
+    0x27, 0x40, 0x28, 0x40, 0x29, 0x40, 0x2a, 0x3f, 0x2b, 0x3f, 0x2c, 0x3f,
+    0x2d, 0x3f, 0x2e, 0x3f, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00,
+    0x48, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x75, 0x03, 0x64, 0x09, 0x5a, 0x0e, 0x54, 0x13,
+    0x51, 0x17, 0x4e, 0x1a, 0x4c, 0x1d, 0x49, 0x1f, 0x49, 0x22, 0x48, 0x23,
+    0x47, 0x25, 0x46, 0x26, 0x46, 0x28, 0x45, 0x29, 0x45, 0x2a, 0x44, 0x2b,
+    0x44, 0x2c, 0x44, 0x2d, 0x44, 0x2e, 0x44, 0x2e, 0x00, 0x70, 0x02, 0x60,
+    0x07, 0x56, 0x0b, 0x50, 0x0f, 0x4c, 0x12, 0x49, 0x16, 0x47, 0x18, 0x46,
+    0x1b, 0x45, 0x1d, 0x44, 0x1f, 0x43, 0x21, 0x42, 0x22, 0x42, 0x24, 0x41,
+    0x25, 0x41, 0x26, 0x40, 0x27, 0x40, 0x28, 0x40, 0x29, 0x40, 0x2a, 0x3f,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00,
+    0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x77, 0x02, 0x68, 0x06, 0x5f, 0x0b, 0x58, 0x0f, 0x54, 0x12, 0x51, 0x15,
+    0x4f, 0x18, 0x4c, 0x1b, 0x4b, 0x1d, 0x4a, 0x1f, 0x49, 0x21, 0x48, 0x22,
+    0x48, 0x23, 0x47, 0x25, 0x46, 0x26, 0x45, 0x27, 0x45, 0x28, 0x45, 0x29,
+    0x45, 0x2a, 0x44, 0x2b, 0x00, 0x72, 0x02, 0x64, 0x05, 0x5b, 0x08, 0x54,
+    0x0c, 0x50, 0x0f, 0x4d, 0x12, 0x4a, 0x14, 0x48, 0x17, 0x47, 0x19, 0x46,
+    0x1b, 0x45, 0x1d, 0x44, 0x1f, 0x44, 0x20, 0x42, 0x21, 0x42, 0x22, 0x42,
+    0x24, 0x41, 0x25, 0x41, 0x26, 0x41, 0x27, 0x40, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x75,
+    0x00, 0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x78, 0x02, 0x6b, 0x05,
+    0x62, 0x08, 0x5b, 0x0c, 0x57, 0x0f, 0x54, 0x12, 0x51, 0x14, 0x4e, 0x17,
+    0x4d, 0x19, 0x4c, 0x1b, 0x4b, 0x1d, 0x4a, 0x1e, 0x49, 0x20, 0x48, 0x21,
+    0x48, 0x22, 0x46, 0x24, 0x46, 0x25, 0x46, 0x26, 0x46, 0x27, 0x45, 0x27,
+    0x00, 0x74, 0x01, 0x66, 0x04, 0x5e, 0x07, 0x57, 0x0a, 0x53, 0x0d, 0x4f,
+    0x10, 0x4d, 0x12, 0x4b, 0x14, 0x49, 0x16, 0x48, 0x18, 0x46, 0x1a, 0x45,
+    0x1b, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x20, 0x43, 0x21, 0x42, 0x22, 0x42,
+    0x23, 0x42, 0x24, 0x41, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56,
+    0x00, 0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00,
+    0x6a, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x79, 0x01, 0x6d, 0x04, 0x65, 0x07, 0x5e, 0x0a,
+    0x5a, 0x0d, 0x56, 0x0f, 0x54, 0x12, 0x51, 0x14, 0x4f, 0x16, 0x4e, 0x18,
+    0x4c, 0x1a, 0x4b, 0x1b, 0x4b, 0x1d, 0x4a, 0x1e, 0x49, 0x1f, 0x48, 0x21,
+    0x48, 0x22, 0x48, 0x23, 0x47, 0x23, 0x46, 0x25, 0x00, 0x75, 0x01, 0x69,
+    0x03, 0x61, 0x06, 0x5a, 0x08, 0x56, 0x0b, 0x52, 0x0d, 0x4f, 0x10, 0x4d,
+    0x12, 0x4b, 0x14, 0x4a, 0x16, 0x48, 0x17, 0x47, 0x19, 0x46, 0x1a, 0x45,
+    0x1c, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x1f, 0x44, 0x20, 0x43, 0x21, 0x42,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37,
+    0x00, 0x23, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00,
+    0x4b, 0x00, 0x37, 0x00, 0x23, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7a, 0x01, 0x6f, 0x03, 0x67, 0x06, 0x60, 0x08, 0x5d, 0x0b, 0x59, 0x0d,
+    0x56, 0x10, 0x53, 0x11, 0x51, 0x14, 0x50, 0x15, 0x4e, 0x17, 0x4d, 0x19,
+    0x4c, 0x1a, 0x4b, 0x1b, 0x4b, 0x1d, 0x48, 0x1e, 0x49, 0x1f, 0x49, 0x20,
+    0x48, 0x21, 0x48, 0x22, 0x00, 0x76, 0x01, 0x6b, 0x03, 0x63, 0x05, 0x5d,
+    0x07, 0x58, 0x09, 0x54, 0x0c, 0x52, 0x0e, 0x4f, 0x10, 0x4d, 0x11, 0x4c,
+    0x13, 0x4a, 0x15, 0x49, 0x17, 0x48, 0x18, 0x47, 0x19, 0x46, 0x1b, 0x45,
+    0x1c, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x1f, 0x44, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x7a,
+    0x00, 0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7d, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00,
+    0x30, 0x00, 0x1f, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7b, 0x01, 0x71, 0x02,
+    0x69, 0x05, 0x63, 0x07, 0x5f, 0x09, 0x5b, 0x0c, 0x58, 0x0e, 0x55, 0x10,
+    0x53, 0x11, 0x52, 0x13, 0x50, 0x15, 0x4e, 0x16, 0x4e, 0x18, 0x4c, 0x19,
+    0x4c, 0x1a, 0x4a, 0x1c, 0x4b, 0x1d, 0x49, 0x1e, 0x49, 0x1f, 0x49, 0x20,
+    0x00, 0x77, 0x00, 0x6c, 0x02, 0x65, 0x04, 0x5f, 0x06, 0x5a, 0x08, 0x57,
+    0x0a, 0x54, 0x0c, 0x51, 0x0e, 0x4f, 0x10, 0x4d, 0x11, 0x4c, 0x13, 0x4a,
+    0x15, 0x49, 0x16, 0x48, 0x18, 0x48, 0x18, 0x46, 0x1a, 0x46, 0x1b, 0x45,
+    0x1c, 0x45, 0x1d, 0x45, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69,
+    0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00,
+    0x74, 0x00, 0x69, 0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00,
+    0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7b, 0x00, 0x72, 0x02, 0x6b, 0x04, 0x64, 0x06,
+    0x61, 0x08, 0x5d, 0x0a, 0x5a, 0x0c, 0x56, 0x0e, 0x55, 0x10, 0x53, 0x11,
+    0x52, 0x13, 0x50, 0x15, 0x4f, 0x16, 0x4e, 0x17, 0x4d, 0x18, 0x4b, 0x1a,
+    0x4b, 0x1a, 0x4b, 0x1c, 0x4b, 0x1d, 0x49, 0x1d, 0x00, 0x77, 0x00, 0x6e,
+    0x02, 0x66, 0x04, 0x61, 0x05, 0x5c, 0x07, 0x59, 0x09, 0x56, 0x0b, 0x53,
+    0x0d, 0x51, 0x0f, 0x4f, 0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x14, 0x4a,
+    0x15, 0x48, 0x17, 0x48, 0x18, 0x47, 0x19, 0x46, 0x1b, 0x46, 0x1b, 0x45,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53,
+    0x00, 0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00,
+    0x61, 0x00, 0x53, 0x00, 0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00,
+    0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7c, 0x00, 0x73, 0x02, 0x6c, 0x03, 0x66, 0x05, 0x63, 0x07, 0x5e, 0x09,
+    0x5c, 0x0b, 0x58, 0x0c, 0x57, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13,
+    0x50, 0x14, 0x4f, 0x15, 0x4e, 0x17, 0x4c, 0x18, 0x4c, 0x19, 0x4c, 0x1a,
+    0x4b, 0x1a, 0x4b, 0x1c, 0x00, 0x77, 0x00, 0x6f, 0x02, 0x68, 0x03, 0x63,
+    0x05, 0x5e, 0x06, 0x5a, 0x08, 0x57, 0x0a, 0x55, 0x0b, 0x53, 0x0d, 0x50,
+    0x0f, 0x4f, 0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x14, 0x4a, 0x15, 0x49,
+    0x16, 0x48, 0x18, 0x48, 0x18, 0x46, 0x19, 0x46, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c,
+    0x00, 0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e,
+    0x00, 0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7c, 0x00, 0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00,
+    0x4c, 0x00, 0x3e, 0x00, 0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7c, 0x00, 0x74, 0x02,
+    0x6e, 0x03, 0x68, 0x05, 0x64, 0x06, 0x60, 0x08, 0x5d, 0x0a, 0x5a, 0x0b,
+    0x58, 0x0d, 0x56, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x50, 0x14,
+    0x50, 0x15, 0x4d, 0x16, 0x4e, 0x18, 0x4c, 0x18, 0x4c, 0x19, 0x4c, 0x1a,
+    0x00, 0x78, 0x00, 0x70, 0x01, 0x69, 0x03, 0x64, 0x04, 0x60, 0x06, 0x5c,
+    0x07, 0x59, 0x09, 0x56, 0x0b, 0x54, 0x0c, 0x52, 0x0d, 0x50, 0x0f, 0x4f,
+    0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x13, 0x4a, 0x15, 0x4a, 0x15, 0x48,
+    0x17, 0x48, 0x18, 0x47, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71,
+    0x00, 0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c,
+    0x00, 0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00,
+    0x78, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00,
+    0x39, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x75, 0x01, 0x6f, 0x02, 0x69, 0x04,
+    0x65, 0x06, 0x62, 0x07, 0x5f, 0x09, 0x5b, 0x0b, 0x5a, 0x0c, 0x58, 0x0d,
+    0x56, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x50, 0x13, 0x4f, 0x15,
+    0x4e, 0x15, 0x4e, 0x17, 0x4d, 0x18, 0x4c, 0x18, 0x00, 0x78, 0x00, 0x71,
+    0x01, 0x6a, 0x03, 0x66, 0x04, 0x61, 0x05, 0x5d, 0x06, 0x5a, 0x08, 0x58,
+    0x09, 0x55, 0x0b, 0x53, 0x0d, 0x52, 0x0e, 0x50, 0x0f, 0x4e, 0x10, 0x4e,
+    0x11, 0x4c, 0x13, 0x4c, 0x13, 0x4a, 0x15, 0x4a, 0x15, 0x49, 0x16, 0x48,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62,
+    0x00, 0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e,
+    0x00, 0x13, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00,
+    0x6b, 0x00, 0x62, 0x00, 0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00,
+    0x29, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7d, 0x00, 0x76, 0x01, 0x70, 0x02, 0x6a, 0x03, 0x67, 0x05, 0x63, 0x06,
+    0x60, 0x08, 0x5d, 0x09, 0x5b, 0x0b, 0x59, 0x0c, 0x57, 0x0d, 0x55, 0x0e,
+    0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x4f, 0x13, 0x50, 0x15, 0x4f, 0x15,
+    0x4e, 0x16, 0x4e, 0x18, 0x00, 0x79, 0x00, 0x71, 0x01, 0x6c, 0x02, 0x66,
+    0x04, 0x62, 0x05, 0x5f, 0x06, 0x5c, 0x07, 0x59, 0x09, 0x57, 0x0a, 0x55,
+    0x0b, 0x53, 0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c,
+    0x13, 0x4c, 0x13, 0x4b, 0x14, 0x4a, 0x15, 0x4a, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d,
+    0x00, 0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51,
+    0x00, 0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12,
+    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00,
+    0x5b, 0x00, 0x51, 0x00, 0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00,
+    0x1b, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x76, 0x01,
+    0x71, 0x02, 0x6c, 0x03, 0x68, 0x05, 0x64, 0x06, 0x61, 0x07, 0x5e, 0x09,
+    0x5c, 0x0a, 0x5a, 0x0b, 0x59, 0x0c, 0x57, 0x0e, 0x55, 0x0e, 0x55, 0x11,
+    0x52, 0x11, 0x51, 0x12, 0x51, 0x13, 0x50, 0x14, 0x4f, 0x15, 0x4e, 0x15,
+    0x00, 0x79, 0x00, 0x72, 0x01, 0x6d, 0x02, 0x68, 0x03, 0x63, 0x04, 0x60,
+    0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58, 0x09, 0x56, 0x0b, 0x54, 0x0c, 0x53,
+    0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c, 0x12, 0x4c,
+    0x13, 0x4b, 0x14, 0x4a, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x1f, 0x00, 0x3f,
+    0x00, 0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c,
+    0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e,
+    0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x58, 0x00, 0x70, 0x00, 0x77,
+    0x00, 0x79, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d,
+    0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x3f,
+    0x00, 0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c,
+    0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e,
+    0x00, 0x7e, 0x00, 0x7e, 0x1f, 0x1f, 0x00, 0x3f, 0x00, 0x66, 0x00, 0x72,
+    0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d,
+    0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x77, 0x01, 0x72, 0x02, 0x6d, 0x03,
+    0x69, 0x04, 0x66, 0x06, 0x63, 0x07, 0x5f, 0x08, 0x5e, 0x09, 0x5c, 0x0b,
+    0x5a, 0x0c, 0x58, 0x0c, 0x57, 0x0e, 0x55, 0x0f, 0x54, 0x11, 0x51, 0x11,
+    0x52, 0x12, 0x51, 0x13, 0x50, 0x14, 0x50, 0x15, 0x00, 0x79, 0x00, 0x73,
+    0x01, 0x6d, 0x02, 0x69, 0x03, 0x65, 0x04, 0x61, 0x05, 0x5e, 0x06, 0x5c,
+    0x07, 0x59, 0x09, 0x57, 0x0a, 0x55, 0x0b, 0x54, 0x0d, 0x53, 0x0d, 0x51,
+    0x0f, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c, 0x12, 0x4c, 0x13, 0x4b,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x3f, 0x00, 0x5c,
+    0x00, 0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a,
+    0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d,
+    0x00, 0x58, 0x00, 0x44, 0x00, 0x55, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x72,
+    0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c,
+    0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x0a, 0x0a, 0x00, 0x3f, 0x00, 0x5c,
+    0x00, 0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a,
+    0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d,
+    0x3f, 0x00, 0x0a, 0x0a, 0x00, 0x3f, 0x00, 0x5c, 0x00, 0x6a, 0x00, 0x71,
+    0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c,
+    0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7d, 0x00, 0x78, 0x01, 0x72, 0x02, 0x6e, 0x02, 0x6a, 0x03, 0x67, 0x05,
+    0x64, 0x06, 0x60, 0x07, 0x5f, 0x09, 0x5c, 0x0a, 0x5b, 0x0b, 0x5a, 0x0c,
+    0x57, 0x0c, 0x56, 0x0e, 0x55, 0x0f, 0x53, 0x11, 0x52, 0x11, 0x52, 0x12,
+    0x51, 0x13, 0x50, 0x13, 0x00, 0x79, 0x00, 0x73, 0x01, 0x6e, 0x02, 0x69,
+    0x03, 0x66, 0x04, 0x62, 0x05, 0x5f, 0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58,
+    0x09, 0x56, 0x0b, 0x55, 0x0b, 0x53, 0x0d, 0x52, 0x0d, 0x50, 0x0f, 0x50,
+    0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4d, 0x12, 0x4c, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x2d, 0x00, 0x48, 0x00, 0x59,
+    0x00, 0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76,
+    0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x70, 0x00, 0x55,
+    0x00, 0x20, 0x00, 0x3e, 0x00, 0x50, 0x00, 0x5a, 0x00, 0x63, 0x00, 0x6a,
+    0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78,
+    0x00, 0x79, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x66, 0x00, 0x3f, 0x00, 0x03, 0x03, 0x00, 0x2d, 0x00, 0x48, 0x00, 0x59,
+    0x00, 0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76,
+    0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x66, 0x00, 0x3f, 0x00,
+    0x03, 0x03, 0x00, 0x2d, 0x00, 0x48, 0x00, 0x59, 0x00, 0x63, 0x00, 0x6a,
+    0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78,
+    0x00, 0x79, 0x00, 0x7a, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7e, 0x00, 0x78, 0x01,
+    0x73, 0x02, 0x6e, 0x02, 0x6b, 0x03, 0x68, 0x05, 0x65, 0x06, 0x61, 0x07,
+    0x5f, 0x07, 0x5e, 0x09, 0x5c, 0x0b, 0x5a, 0x0b, 0x59, 0x0c, 0x57, 0x0d,
+    0x56, 0x0e, 0x54, 0x0f, 0x54, 0x11, 0x52, 0x11, 0x52, 0x12, 0x51, 0x13,
+    0x00, 0x79, 0x00, 0x74, 0x00, 0x6f, 0x02, 0x6a, 0x03, 0x66, 0x04, 0x63,
+    0x05, 0x60, 0x05, 0x5e, 0x06, 0x5b, 0x07, 0x59, 0x09, 0x58, 0x09, 0x55,
+    0x0b, 0x55, 0x0c, 0x53, 0x0d, 0x52, 0x0d, 0x50, 0x0f, 0x50, 0x0f, 0x4e,
+    0x11, 0x4e, 0x11, 0x4d, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56,
+    0x00, 0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71,
+    0x00, 0x73, 0x00, 0x75, 0x00, 0x77, 0x00, 0x67, 0x00, 0x3e, 0x00, 0x0d,
+    0x00, 0x28, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x64,
+    0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x73, 0x00, 0x75,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x5c, 0x00,
+    0x2d, 0x00, 0x01, 0x01, 0x00, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56,
+    0x00, 0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71,
+    0x00, 0x73, 0x00, 0x75, 0x72, 0x00, 0x5c, 0x00, 0x2d, 0x00, 0x01, 0x01,
+    0x00, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x64,
+    0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x73, 0x00, 0x75,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7e, 0x00, 0x78, 0x00, 0x74, 0x01, 0x6f, 0x02,
+    0x6c, 0x03, 0x68, 0x04, 0x65, 0x05, 0x62, 0x06, 0x61, 0x07, 0x5f, 0x09,
+    0x5c, 0x09, 0x5b, 0x0b, 0x5a, 0x0b, 0x58, 0x0c, 0x57, 0x0d, 0x55, 0x0e,
+    0x55, 0x0f, 0x54, 0x11, 0x52, 0x11, 0x52, 0x12, 0x00, 0x79, 0x00, 0x74,
+    0x00, 0x70, 0x01, 0x6b, 0x02, 0x67, 0x03, 0x64, 0x04, 0x61, 0x05, 0x5f,
+    0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58, 0x09, 0x57, 0x0a, 0x55, 0x0b, 0x54,
+    0x0c, 0x53, 0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x50, 0x0f, 0x4e, 0x11, 0x4e,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54,
+    0x00, 0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e,
+    0x00, 0x79, 0x00, 0x6e, 0x00, 0x50, 0x00, 0x28, 0x00, 0x01, 0x00, 0x1b,
+    0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x61,
+    0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22, 0x00,
+    0x00, 0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54,
+    0x00, 0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e,
+    0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x1b,
+    0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x61,
+    0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e, 0x21, 0x5d, 0x0c, 0x68,
+    0x06, 0x6d, 0x04, 0x71, 0x02, 0x72, 0x02, 0x74, 0x01, 0x75, 0x01, 0x76,
+    0x01, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x78, 0x00, 0x78, 0x00, 0x79,
+    0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x7a,
+    0x42, 0x40, 0x17, 0x55, 0x0c, 0x60, 0x08, 0x66, 0x05, 0x6a, 0x04, 0x6d,
+    0x03, 0x6f, 0x02, 0x71, 0x02, 0x73, 0x01, 0x73, 0x01, 0x74, 0x01, 0x75,
+    0x01, 0x76, 0x01, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x78, 0x00, 0x78,
+    0x00, 0x78, 0x00, 0x78, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x21, 0x5d, 0x0c, 0x68,
+    0x06, 0x6d, 0x04, 0x71, 0x02, 0x72, 0x02, 0x74, 0x01, 0x75, 0x01, 0x76,
+    0x01, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x78, 0x00, 0x78, 0x00, 0x79,
+    0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x79, 0x00, 0x7a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53,
+    0x00, 0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00, 0x7b, 0x00, 0x72,
+    0x00, 0x5a, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x01, 0x00, 0x16, 0x00, 0x28,
+    0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x00, 0x59, 0x00, 0x5e,
+    0x00, 0x62, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00, 0x00,
+    0x00, 0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53,
+    0x00, 0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x7a, 0x00, 0x71, 0x00,
+    0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x28,
+    0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x00, 0x59, 0x00, 0x5e,
+    0x00, 0x62, 0x00, 0x65, 0x2b, 0x49, 0x16, 0x53, 0x0d, 0x5b, 0x09, 0x60,
+    0x07, 0x64, 0x05, 0x67, 0x04, 0x69, 0x03, 0x6b, 0x03, 0x6c, 0x02, 0x6e,
+    0x02, 0x6f, 0x02, 0x70, 0x01, 0x71, 0x01, 0x71, 0x01, 0x72, 0x01, 0x73,
+    0x01, 0x73, 0x01, 0x74, 0x00, 0x74, 0x00, 0x75, 0x57, 0x16, 0x2d, 0x2c,
+    0x1b, 0x3b, 0x12, 0x45, 0x0d, 0x4d, 0x0b, 0x53, 0x08, 0x57, 0x07, 0x5b,
+    0x05, 0x5e, 0x05, 0x61, 0x04, 0x63, 0x04, 0x65, 0x03, 0x67, 0x02, 0x68,
+    0x02, 0x69, 0x02, 0x6b, 0x02, 0x6c, 0x01, 0x6d, 0x01, 0x6e, 0x01, 0x6f,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x2b, 0x49, 0x16, 0x53, 0x0d, 0x5b, 0x09, 0x60,
+    0x07, 0x64, 0x05, 0x67, 0x04, 0x69, 0x03, 0x6b, 0x03, 0x6c, 0x02, 0x6e,
+    0x02, 0x6f, 0x02, 0x70, 0x01, 0x71, 0x01, 0x71, 0x01, 0x72, 0x01, 0x73,
+    0x01, 0x73, 0x01, 0x74, 0x00, 0x74, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13,
+    0x00, 0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52,
+    0x00, 0x57, 0x00, 0x5b, 0x00, 0x7c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x4a,
+    0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x23, 0x00, 0x30,
+    0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52, 0x00, 0x57, 0x00, 0x5b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x75, 0x00,
+    0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x13,
+    0x00, 0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52,
+    0x00, 0x57, 0x00, 0x5b, 0x7c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x4a, 0x00,
+    0x30, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x23, 0x00, 0x30,
+    0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52, 0x00, 0x57, 0x00, 0x5b,
+    0x31, 0x43, 0x1d, 0x4b, 0x14, 0x51, 0x0e, 0x56, 0x0b, 0x5b, 0x08, 0x5e,
+    0x07, 0x61, 0x06, 0x63, 0x05, 0x65, 0x04, 0x67, 0x04, 0x68, 0x03, 0x69,
+    0x03, 0x6a, 0x03, 0x6c, 0x02, 0x6d, 0x02, 0x6d, 0x02, 0x6e, 0x02, 0x6f,
+    0x02, 0x70, 0x01, 0x70, 0x61, 0x0c, 0x3b, 0x1b, 0x28, 0x28, 0x1d, 0x32,
+    0x16, 0x3a, 0x11, 0x41, 0x0e, 0x47, 0x0c, 0x4b, 0x0a, 0x4f, 0x09, 0x53,
+    0x07, 0x55, 0x06, 0x58, 0x05, 0x5a, 0x05, 0x5c, 0x05, 0x5e, 0x04, 0x60,
+    0x04, 0x61, 0x04, 0x63, 0x03, 0x64, 0x02, 0x66, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x31, 0x43, 0x1d, 0x4b, 0x14, 0x51, 0x0e, 0x56, 0x0b, 0x5b, 0x08, 0x5e,
+    0x07, 0x61, 0x06, 0x63, 0x05, 0x65, 0x04, 0x67, 0x04, 0x68, 0x03, 0x69,
+    0x03, 0x6a, 0x03, 0x6c, 0x02, 0x6d, 0x02, 0x6d, 0x02, 0x6e, 0x02, 0x6f,
+    0x02, 0x70, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51,
+    0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x28,
+    0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x35,
+    0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56, 0x00,
+    0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51,
+    0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x28, 0x00,
+    0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x35,
+    0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51, 0x33, 0x41, 0x22, 0x46,
+    0x19, 0x4c, 0x13, 0x50, 0x0f, 0x54, 0x0c, 0x57, 0x0a, 0x5a, 0x08, 0x5d,
+    0x07, 0x5f, 0x06, 0x61, 0x05, 0x63, 0x05, 0x64, 0x04, 0x66, 0x04, 0x66,
+    0x04, 0x68, 0x03, 0x69, 0x03, 0x69, 0x03, 0x6a, 0x03, 0x6b, 0x02, 0x6c,
+    0x67, 0x07, 0x45, 0x12, 0x32, 0x1d, 0x26, 0x26, 0x1e, 0x2e, 0x18, 0x34,
+    0x14, 0x3a, 0x11, 0x3f, 0x0f, 0x44, 0x0c, 0x47, 0x0b, 0x4b, 0x0a, 0x4d,
+    0x09, 0x51, 0x07, 0x52, 0x07, 0x55, 0x06, 0x57, 0x05, 0x58, 0x05, 0x5a,
+    0x05, 0x5c, 0x04, 0x5d, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x33, 0x41, 0x22, 0x46,
+    0x19, 0x4c, 0x13, 0x50, 0x0f, 0x54, 0x0c, 0x57, 0x0a, 0x5a, 0x08, 0x5d,
+    0x07, 0x5f, 0x06, 0x61, 0x05, 0x63, 0x05, 0x64, 0x04, 0x66, 0x04, 0x66,
+    0x04, 0x68, 0x03, 0x69, 0x03, 0x69, 0x03, 0x6a, 0x03, 0x6b, 0x02, 0x6c,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27,
+    0x00, 0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00, 0x7d, 0x00, 0x79,
+    0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37, 0x00, 0x23, 0x00, 0x10,
+    0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x30, 0x00, 0x39,
+    0x00, 0x40, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37, 0x00,
+    0x23, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27,
+    0x00, 0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x7d, 0x00, 0x79, 0x00,
+    0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37, 0x00, 0x23, 0x00, 0x10, 0x00,
+    0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x30, 0x00, 0x39,
+    0x00, 0x40, 0x00, 0x46, 0x35, 0x40, 0x27, 0x44, 0x1d, 0x48, 0x17, 0x4c,
+    0x12, 0x50, 0x0f, 0x53, 0x0d, 0x56, 0x0b, 0x58, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5e, 0x06, 0x60, 0x06, 0x61, 0x05, 0x62, 0x05, 0x63, 0x04, 0x65,
+    0x04, 0x66, 0x04, 0x66, 0x04, 0x67, 0x03, 0x68, 0x6b, 0x05, 0x4d, 0x0d,
+    0x3b, 0x16, 0x2e, 0x1e, 0x25, 0x25, 0x1f, 0x2b, 0x1a, 0x31, 0x16, 0x36,
+    0x13, 0x3a, 0x10, 0x3e, 0x0f, 0x42, 0x0d, 0x45, 0x0c, 0x47, 0x0a, 0x4a,
+    0x0a, 0x4c, 0x09, 0x4f, 0x07, 0x51, 0x07, 0x52, 0x07, 0x54, 0x06, 0x56,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x35, 0x40, 0x27, 0x44, 0x1d, 0x48, 0x17, 0x4c,
+    0x12, 0x50, 0x0f, 0x53, 0x0d, 0x56, 0x0b, 0x58, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5e, 0x06, 0x60, 0x06, 0x61, 0x05, 0x62, 0x05, 0x63, 0x04, 0x65,
+    0x04, 0x66, 0x04, 0x66, 0x04, 0x67, 0x03, 0x68, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c,
+    0x00, 0x34, 0x00, 0x3b, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x64,
+    0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0e, 0x00, 0x00,
+    0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c, 0x00, 0x34, 0x00, 0x3b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x7a, 0x00,
+    0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0e, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c,
+    0x00, 0x34, 0x00, 0x3b, 0x7d, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x64, 0x00,
+    0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0e, 0x00, 0x00, 0x00,
+    0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c, 0x00, 0x34, 0x00, 0x3b,
+    0x37, 0x3f, 0x29, 0x43, 0x21, 0x46, 0x1a, 0x49, 0x16, 0x4d, 0x12, 0x50,
+    0x10, 0x52, 0x0d, 0x54, 0x0c, 0x57, 0x0a, 0x59, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5d, 0x06, 0x5f, 0x06, 0x60, 0x06, 0x61, 0x05, 0x62, 0x05, 0x63,
+    0x04, 0x64, 0x04, 0x65, 0x6e, 0x04, 0x53, 0x0a, 0x41, 0x11, 0x34, 0x18,
+    0x2b, 0x1f, 0x24, 0x24, 0x1f, 0x29, 0x1b, 0x2e, 0x17, 0x33, 0x15, 0x37,
+    0x12, 0x3a, 0x10, 0x3d, 0x0f, 0x40, 0x0d, 0x43, 0x0c, 0x45, 0x0c, 0x48,
+    0x0a, 0x4a, 0x0a, 0x4c, 0x09, 0x4e, 0x07, 0x4f, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x37, 0x3f, 0x29, 0x43, 0x21, 0x46, 0x1a, 0x49, 0x16, 0x4d, 0x12, 0x50,
+    0x10, 0x52, 0x0d, 0x54, 0x0c, 0x57, 0x0a, 0x59, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5d, 0x06, 0x5f, 0x06, 0x60, 0x06, 0x61, 0x05, 0x62, 0x05, 0x63,
+    0x04, 0x64, 0x04, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30,
+    0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5b, 0x00, 0x4b,
+    0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c,
+    0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69, 0x00,
+    0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30,
+    0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5b, 0x00, 0x4b, 0x00,
+    0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0c,
+    0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30, 0x38, 0x3f, 0x2c, 0x41,
+    0x23, 0x44, 0x1d, 0x47, 0x19, 0x4a, 0x14, 0x4d, 0x12, 0x4f, 0x10, 0x52,
+    0x0e, 0x54, 0x0c, 0x56, 0x0b, 0x57, 0x0a, 0x59, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5d, 0x07, 0x5e, 0x06, 0x5f, 0x06, 0x61, 0x05, 0x61, 0x05, 0x62,
+    0x70, 0x03, 0x58, 0x08, 0x47, 0x0e, 0x3a, 0x14, 0x31, 0x1a, 0x29, 0x1f,
+    0x24, 0x24, 0x20, 0x28, 0x1c, 0x2d, 0x19, 0x31, 0x16, 0x34, 0x14, 0x37,
+    0x12, 0x3a, 0x10, 0x3d, 0x0f, 0x3f, 0x0e, 0x42, 0x0c, 0x44, 0x0c, 0x46,
+    0x0b, 0x47, 0x0a, 0x4a, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x38, 0x3f, 0x2c, 0x41,
+    0x23, 0x44, 0x1d, 0x47, 0x19, 0x4a, 0x14, 0x4d, 0x12, 0x4f, 0x10, 0x52,
+    0x0e, 0x54, 0x0c, 0x56, 0x0b, 0x57, 0x0a, 0x59, 0x09, 0x5a, 0x08, 0x5c,
+    0x07, 0x5d, 0x07, 0x5e, 0x06, 0x5f, 0x06, 0x61, 0x05, 0x61, 0x05, 0x62,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00, 0x7e, 0x00, 0x7c,
+    0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53, 0x00, 0x44, 0x00, 0x35,
+    0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x15,
+    0x00, 0x1e, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53, 0x00,
+    0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x7e, 0x00, 0x7c, 0x00,
+    0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53, 0x00, 0x44, 0x00, 0x35, 0x00,
+    0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x15,
+    0x00, 0x1e, 0x00, 0x26, 0x39, 0x3f, 0x2e, 0x41, 0x26, 0x43, 0x20, 0x46,
+    0x1b, 0x48, 0x17, 0x4b, 0x14, 0x4d, 0x12, 0x4f, 0x10, 0x51, 0x0e, 0x53,
+    0x0d, 0x55, 0x0b, 0x56, 0x0b, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x07, 0x5d, 0x07, 0x5e, 0x06, 0x5f, 0x06, 0x60, 0x71, 0x02, 0x5b, 0x07,
+    0x4c, 0x0c, 0x3f, 0x11, 0x36, 0x16, 0x2e, 0x1b, 0x29, 0x20, 0x24, 0x23,
+    0x20, 0x28, 0x1d, 0x2b, 0x19, 0x2f, 0x17, 0x32, 0x16, 0x35, 0x12, 0x37,
+    0x12, 0x3a, 0x10, 0x3c, 0x0f, 0x3f, 0x0e, 0x41, 0x0c, 0x42, 0x0c, 0x45,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x39, 0x3f, 0x2e, 0x41, 0x26, 0x43, 0x20, 0x46,
+    0x1b, 0x48, 0x17, 0x4b, 0x14, 0x4d, 0x12, 0x4f, 0x10, 0x51, 0x0e, 0x53,
+    0x0d, 0x55, 0x0b, 0x56, 0x0b, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x07, 0x5d, 0x07, 0x5e, 0x06, 0x5f, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
+    0x00, 0x13, 0x00, 0x1b, 0x00, 0x7e, 0x00, 0x7c, 0x00, 0x77, 0x00, 0x6f,
+    0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e, 0x00, 0x30, 0x00, 0x23,
+    0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x1b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c, 0x00,
+    0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e, 0x00,
+    0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0a,
+    0x00, 0x13, 0x00, 0x1b, 0x7e, 0x00, 0x7c, 0x00, 0x77, 0x00, 0x6f, 0x00,
+    0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e, 0x00, 0x30, 0x00, 0x23, 0x00,
+    0x16, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x1b,
+    0x39, 0x3e, 0x2f, 0x40, 0x28, 0x42, 0x22, 0x45, 0x1d, 0x47, 0x19, 0x49,
+    0x16, 0x4b, 0x14, 0x4d, 0x11, 0x4f, 0x10, 0x51, 0x0f, 0x53, 0x0d, 0x54,
+    0x0c, 0x55, 0x0b, 0x57, 0x0a, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x07, 0x5c, 0x07, 0x5e, 0x73, 0x02, 0x5e, 0x05, 0x4f, 0x0a, 0x44, 0x0f,
+    0x3a, 0x13, 0x33, 0x18, 0x2d, 0x1c, 0x27, 0x20, 0x23, 0x23, 0x20, 0x27,
+    0x1d, 0x2a, 0x1a, 0x2d, 0x18, 0x30, 0x16, 0x33, 0x14, 0x35, 0x12, 0x38,
+    0x12, 0x3a, 0x10, 0x3c, 0x0f, 0x3e, 0x0f, 0x41, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x39, 0x3e, 0x2f, 0x40, 0x28, 0x42, 0x22, 0x45, 0x1d, 0x47, 0x19, 0x49,
+    0x16, 0x4b, 0x14, 0x4d, 0x11, 0x4f, 0x10, 0x51, 0x0f, 0x53, 0x0d, 0x54,
+    0x0c, 0x55, 0x0b, 0x57, 0x0a, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x07, 0x5c, 0x07, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12,
+    0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5e,
+    0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x15,
+    0x00, 0x0a, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71, 0x00,
+    0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00,
+    0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12,
+    0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5e, 0x00,
+    0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x15, 0x00,
+    0x0a, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12, 0x3a, 0x3e, 0x31, 0x40,
+    0x29, 0x42, 0x23, 0x44, 0x1f, 0x46, 0x1b, 0x48, 0x18, 0x4a, 0x15, 0x4c,
+    0x13, 0x4d, 0x11, 0x4f, 0x10, 0x50, 0x0f, 0x52, 0x0d, 0x53, 0x0d, 0x55,
+    0x0b, 0x56, 0x0b, 0x57, 0x0a, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x74, 0x01, 0x62, 0x05, 0x53, 0x08, 0x47, 0x0c, 0x3e, 0x11, 0x37, 0x15,
+    0x31, 0x19, 0x2b, 0x1d, 0x27, 0x20, 0x23, 0x23, 0x20, 0x26, 0x1d, 0x2a,
+    0x1b, 0x2c, 0x19, 0x2f, 0x16, 0x31, 0x16, 0x34, 0x13, 0x35, 0x12, 0x38,
+    0x12, 0x3b, 0x0f, 0x3b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x3a, 0x3e, 0x31, 0x40,
+    0x29, 0x42, 0x23, 0x44, 0x1f, 0x46, 0x1b, 0x48, 0x18, 0x4a, 0x15, 0x4c,
+    0x13, 0x4d, 0x11, 0x4f, 0x10, 0x50, 0x0f, 0x52, 0x0d, 0x53, 0x0d, 0x55,
+    0x0b, 0x56, 0x0b, 0x57, 0x0a, 0x58, 0x09, 0x59, 0x09, 0x5b, 0x08, 0x5b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7e, 0x00, 0x7d,
+    0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62, 0x00, 0x57, 0x00, 0x4c,
+    0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x09,
+    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62, 0x00,
+    0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e, 0x00,
+    0x13, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7e, 0x00, 0x7d, 0x00,
+    0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62, 0x00, 0x57, 0x00, 0x4c, 0x00,
+    0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x09, 0x00,
+    0x00, 0x00, 0x00, 0x08, 0x3a, 0x3e, 0x32, 0x3f, 0x2b, 0x41, 0x25, 0x43,
+    0x21, 0x45, 0x1d, 0x46, 0x1a, 0x48, 0x17, 0x4a, 0x15, 0x4c, 0x13, 0x4e,
+    0x11, 0x4f, 0x10, 0x50, 0x0f, 0x52, 0x0e, 0x53, 0x0d, 0x54, 0x0c, 0x55,
+    0x0b, 0x56, 0x0b, 0x58, 0x09, 0x58, 0x09, 0x59, 0x75, 0x01, 0x64, 0x04,
+    0x56, 0x07, 0x4b, 0x0b, 0x42, 0x0f, 0x3a, 0x12, 0x34, 0x16, 0x2f, 0x19,
+    0x2a, 0x1d, 0x26, 0x20, 0x23, 0x23, 0x21, 0x26, 0x1d, 0x29, 0x1b, 0x2b,
+    0x19, 0x2e, 0x18, 0x30, 0x16, 0x32, 0x15, 0x35, 0x12, 0x35, 0x12, 0x38,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x3a, 0x3e, 0x32, 0x3f, 0x2b, 0x41, 0x25, 0x43,
+    0x21, 0x45, 0x1d, 0x46, 0x1a, 0x48, 0x17, 0x4a, 0x15, 0x4c, 0x13, 0x4e,
+    0x11, 0x4f, 0x10, 0x50, 0x0f, 0x52, 0x0e, 0x53, 0x0d, 0x54, 0x0c, 0x55,
+    0x0b, 0x56, 0x0b, 0x58, 0x09, 0x58, 0x09, 0x59, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x75,
+    0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00, 0x46, 0x00, 0x3b,
+    0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00,
+    0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00,
+    0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12, 0x00,
+    0x08, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x75, 0x00,
+    0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00, 0x46, 0x00, 0x3b, 0x00,
+    0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00, 0x00,
+    0x3b, 0x3e, 0x33, 0x3f, 0x2c, 0x41, 0x27, 0x42, 0x22, 0x44, 0x1f, 0x45,
+    0x1c, 0x47, 0x19, 0x49, 0x17, 0x4a, 0x15, 0x4c, 0x13, 0x4e, 0x11, 0x4f,
+    0x10, 0x50, 0x0f, 0x51, 0x0e, 0x53, 0x0d, 0x54, 0x0c, 0x55, 0x0b, 0x55,
+    0x0b, 0x57, 0x0a, 0x58, 0x76, 0x01, 0x66, 0x04, 0x58, 0x06, 0x4d, 0x0a,
+    0x45, 0x0d, 0x3e, 0x10, 0x37, 0x14, 0x32, 0x17, 0x2d, 0x1a, 0x2a, 0x1d,
+    0x26, 0x21, 0x22, 0x22, 0x21, 0x26, 0x1d, 0x28, 0x1c, 0x2b, 0x19, 0x2c,
+    0x19, 0x30, 0x16, 0x30, 0x16, 0x33, 0x14, 0x35, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x3b, 0x3e, 0x33, 0x3f, 0x2c, 0x41, 0x27, 0x42, 0x22, 0x44, 0x1f, 0x45,
+    0x1c, 0x47, 0x19, 0x49, 0x17, 0x4a, 0x15, 0x4c, 0x13, 0x4e, 0x11, 0x4f,
+    0x10, 0x50, 0x0f, 0x51, 0x0e, 0x53, 0x0d, 0x54, 0x0c, 0x55, 0x0b, 0x55,
+    0x0b, 0x57, 0x0a, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x3e, 0x33, 0x3f,
+    0x2d, 0x40, 0x28, 0x42, 0x24, 0x44, 0x20, 0x45, 0x1d, 0x46, 0x1a, 0x48,
+    0x18, 0x49, 0x16, 0x4b, 0x14, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x10, 0x50,
+    0x0f, 0x51, 0x0f, 0x53, 0x0d, 0x53, 0x0d, 0x55, 0x0b, 0x55, 0x0b, 0x56,
+    0x77, 0x01, 0x67, 0x03, 0x5a, 0x05, 0x51, 0x09, 0x48, 0x0c, 0x40, 0x0f,
+    0x3a, 0x12, 0x35, 0x16, 0x30, 0x18, 0x2c, 0x1b, 0x29, 0x1d, 0x26, 0x21,
+    0x22, 0x22, 0x21, 0x26, 0x1d, 0x27, 0x1d, 0x2b, 0x1a, 0x2b, 0x19, 0x2e,
+    0x17, 0x30, 0x16, 0x31, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x3b, 0x3e, 0x33, 0x3f,
+    0x2d, 0x40, 0x28, 0x42, 0x24, 0x44, 0x20, 0x45, 0x1d, 0x46, 0x1a, 0x48,
+    0x18, 0x49, 0x16, 0x4b, 0x14, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x10, 0x50,
+    0x0f, 0x51, 0x0f, 0x53, 0x0d, 0x53, 0x0d, 0x55, 0x0b, 0x55, 0x0b, 0x56,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3b, 0x3e, 0x34, 0x3f, 0x2e, 0x40, 0x29, 0x41,
+    0x25, 0x43, 0x21, 0x44, 0x1e, 0x45, 0x1c, 0x47, 0x19, 0x48, 0x18, 0x4a,
+    0x15, 0x4b, 0x14, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50,
+    0x0f, 0x52, 0x0d, 0x53, 0x0d, 0x54, 0x0c, 0x55, 0x77, 0x01, 0x68, 0x02,
+    0x5d, 0x05, 0x52, 0x07, 0x4a, 0x0a, 0x43, 0x0d, 0x3d, 0x10, 0x38, 0x12,
+    0x33, 0x16, 0x2f, 0x19, 0x2b, 0x1b, 0x28, 0x1d, 0x26, 0x21, 0x22, 0x22,
+    0x21, 0x26, 0x1e, 0x26, 0x1d, 0x2a, 0x1a, 0x2b, 0x19, 0x2d, 0x18, 0x30,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x3b, 0x3e, 0x34, 0x3f, 0x2e, 0x40, 0x29, 0x41,
+    0x25, 0x43, 0x21, 0x44, 0x1e, 0x45, 0x1c, 0x47, 0x19, 0x48, 0x18, 0x4a,
+    0x15, 0x4b, 0x14, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50,
+    0x0f, 0x52, 0x0d, 0x53, 0x0d, 0x54, 0x0c, 0x55, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3c, 0x3e, 0x35, 0x3f, 0x2f, 0x40, 0x2a, 0x41, 0x26, 0x42, 0x22, 0x44,
+    0x20, 0x45, 0x1d, 0x46, 0x1b, 0x48, 0x18, 0x48, 0x17, 0x4a, 0x15, 0x4b,
+    0x13, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x52,
+    0x0d, 0x53, 0x0d, 0x53, 0x77, 0x00, 0x6a, 0x02, 0x5e, 0x04, 0x55, 0x07,
+    0x4c, 0x0a, 0x45, 0x0c, 0x40, 0x0f, 0x3a, 0x12, 0x35, 0x14, 0x31, 0x16,
+    0x2e, 0x19, 0x2b, 0x1c, 0x27, 0x1d, 0x26, 0x22, 0x21, 0x22, 0x21, 0x25,
+    0x1e, 0x26, 0x1d, 0x29, 0x1b, 0x2b, 0x19, 0x2b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x3c, 0x3e, 0x35, 0x3f, 0x2f, 0x40, 0x2a, 0x41, 0x26, 0x42, 0x22, 0x44,
+    0x20, 0x45, 0x1d, 0x46, 0x1b, 0x48, 0x18, 0x48, 0x17, 0x4a, 0x15, 0x4b,
+    0x13, 0x4c, 0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x52,
+    0x0d, 0x53, 0x0d, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x35, 0x3f,
+    0x30, 0x3f, 0x2b, 0x40, 0x27, 0x42, 0x24, 0x43, 0x21, 0x44, 0x1e, 0x45,
+    0x1c, 0x46, 0x1a, 0x48, 0x18, 0x49, 0x16, 0x4a, 0x15, 0x4c, 0x13, 0x4c,
+    0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x51, 0x0e, 0x53,
+    0x78, 0x00, 0x6b, 0x02, 0x60, 0x04, 0x57, 0x06, 0x4f, 0x09, 0x48, 0x0c,
+    0x42, 0x0e, 0x3c, 0x10, 0x38, 0x12, 0x34, 0x16, 0x30, 0x18, 0x2d, 0x19,
+    0x2b, 0x1d, 0x26, 0x1e, 0x25, 0x22, 0x21, 0x22, 0x21, 0x25, 0x1e, 0x26,
+    0x1d, 0x28, 0x1c, 0x2b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x3c, 0x3e, 0x35, 0x3f,
+    0x30, 0x3f, 0x2b, 0x40, 0x27, 0x42, 0x24, 0x43, 0x21, 0x44, 0x1e, 0x45,
+    0x1c, 0x46, 0x1a, 0x48, 0x18, 0x49, 0x16, 0x4a, 0x15, 0x4c, 0x13, 0x4c,
+    0x13, 0x4e, 0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x51, 0x0e, 0x53,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x36, 0x3f, 0x30, 0x3f, 0x2c, 0x40,
+    0x28, 0x41, 0x25, 0x42, 0x22, 0x44, 0x1f, 0x45, 0x1d, 0x46, 0x1b, 0x47,
+    0x19, 0x48, 0x18, 0x4a, 0x15, 0x4a, 0x15, 0x4c, 0x13, 0x4c, 0x13, 0x4e,
+    0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x51, 0x78, 0x00, 0x6d, 0x02,
+    0x61, 0x04, 0x58, 0x05, 0x51, 0x07, 0x4a, 0x0a, 0x44, 0x0c, 0x3f, 0x0f,
+    0x3a, 0x12, 0x35, 0x14, 0x32, 0x16, 0x30, 0x19, 0x2b, 0x19, 0x2a, 0x1d,
+    0x26, 0x1e, 0x25, 0x22, 0x21, 0x22, 0x21, 0x25, 0x1e, 0x26, 0x1d, 0x27,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x3c, 0x3e, 0x36, 0x3f, 0x30, 0x3f, 0x2c, 0x40,
+    0x28, 0x41, 0x25, 0x42, 0x22, 0x44, 0x1f, 0x45, 0x1d, 0x46, 0x1b, 0x47,
+    0x19, 0x48, 0x18, 0x4a, 0x15, 0x4a, 0x15, 0x4c, 0x13, 0x4c, 0x13, 0x4e,
+    0x11, 0x4e, 0x11, 0x50, 0x0f, 0x50, 0x0f, 0x51, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3c, 0x3e, 0x37, 0x3e, 0x31, 0x3f, 0x2d, 0x40, 0x29, 0x41, 0x26, 0x42,
+    0x23, 0x44, 0x20, 0x45, 0x1e, 0x45, 0x1c, 0x46, 0x1a, 0x48, 0x18, 0x48,
+    0x17, 0x4a, 0x15, 0x4a, 0x14, 0x4c, 0x13, 0x4c, 0x12, 0x4e, 0x11, 0x4e,
+    0x11, 0x50, 0x0f, 0x50, 0x78, 0x00, 0x6d, 0x02, 0x63, 0x04, 0x5a, 0x05,
+    0x53, 0x07, 0x4c, 0x0a, 0x46, 0x0c, 0x41, 0x0f, 0x3c, 0x0f, 0x38, 0x12,
+    0x35, 0x16, 0x30, 0x16, 0x2e, 0x19, 0x2b, 0x1a, 0x29, 0x1d, 0x26, 0x1e,
+    0x25, 0x22, 0x21, 0x22, 0x21, 0x25, 0x1f, 0x26, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x3c, 0x3e, 0x37, 0x3e, 0x31, 0x3f, 0x2d, 0x40, 0x29, 0x41, 0x26, 0x42,
+    0x23, 0x44, 0x20, 0x45, 0x1e, 0x45, 0x1c, 0x46, 0x1a, 0x48, 0x18, 0x48,
+    0x17, 0x4a, 0x15, 0x4a, 0x14, 0x4c, 0x13, 0x4c, 0x12, 0x4e, 0x11, 0x4e,
+    0x11, 0x50, 0x0f, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x37, 0x3e,
+    0x32, 0x3f, 0x2e, 0x40, 0x2a, 0x41, 0x27, 0x42, 0x24, 0x43, 0x21, 0x44,
+    0x1f, 0x45, 0x1d, 0x46, 0x1b, 0x47, 0x1a, 0x48, 0x18, 0x49, 0x16, 0x4a,
+    0x15, 0x4b, 0x14, 0x4c, 0x13, 0x4d, 0x12, 0x4e, 0x11, 0x4e, 0x11, 0x50,
+    0x78, 0x00, 0x6e, 0x01, 0x65, 0x03, 0x5c, 0x05, 0x54, 0x07, 0x4e, 0x09,
+    0x48, 0x0b, 0x43, 0x0c, 0x3e, 0x0f, 0x3b, 0x12, 0x36, 0x12, 0x33, 0x16,
+    0x30, 0x17, 0x2d, 0x19, 0x2b, 0x1b, 0x28, 0x1d, 0x26, 0x1e, 0x25, 0x22,
+    0x21, 0x22, 0x21, 0x24, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x3c, 0x3e, 0x37, 0x3e,
+    0x32, 0x3f, 0x2e, 0x40, 0x2a, 0x41, 0x27, 0x42, 0x24, 0x43, 0x21, 0x44,
+    0x1f, 0x45, 0x1d, 0x46, 0x1b, 0x47, 0x1a, 0x48, 0x18, 0x49, 0x16, 0x4a,
+    0x15, 0x4b, 0x14, 0x4c, 0x13, 0x4d, 0x12, 0x4e, 0x11, 0x4e, 0x11, 0x50,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x37, 0x3e, 0x33, 0x3f, 0x2e, 0x3f,
+    0x2b, 0x40, 0x28, 0x41, 0x25, 0x42, 0x22, 0x44, 0x20, 0x45, 0x1e, 0x45,
+    0x1c, 0x46, 0x1b, 0x48, 0x19, 0x48, 0x18, 0x4a, 0x16, 0x4a, 0x15, 0x4b,
+    0x13, 0x4c, 0x13, 0x4d, 0x12, 0x4e, 0x11, 0x4e, 0x79, 0x00, 0x6f, 0x01,
+    0x66, 0x02, 0x5d, 0x04, 0x56, 0x06, 0x4f, 0x07, 0x4a, 0x0a, 0x45, 0x0c,
+    0x41, 0x0f, 0x3b, 0x0f, 0x38, 0x12, 0x35, 0x14, 0x31, 0x16, 0x30, 0x18,
+    0x2b, 0x19, 0x2b, 0x1c, 0x27, 0x1d, 0x26, 0x1f, 0x24, 0x22, 0x21, 0x22,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7b,
+    0x00, 0x7b, 0x00, 0x7b, 0x3c, 0x3e, 0x37, 0x3e, 0x33, 0x3f, 0x2e, 0x3f,
+    0x2b, 0x40, 0x28, 0x41, 0x25, 0x42, 0x22, 0x44, 0x20, 0x45, 0x1e, 0x45,
+    0x1c, 0x46, 0x1b, 0x48, 0x19, 0x48, 0x18, 0x4a, 0x16, 0x4a, 0x15, 0x4b,
+    0x13, 0x4c, 0x13, 0x4d, 0x12, 0x4e, 0x11, 0x4e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x62, 0x00, 0x6c, 0x00, 0x72, 0x00, 0x74, 0x00, 0x77, 0x00, 0x79, 0x00,
+    0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00,
+    0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x08, 0x00, 0x44, 0x00,
+    0x56, 0x00, 0x61, 0x00, 0x67, 0x00, 0x6b, 0x00, 0x6e, 0x00, 0x70, 0x00,
+    0x71, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x76, 0x00,
+    0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00,
+    0x44, 0x00, 0x63, 0x00, 0x6c, 0x00, 0x71, 0x00, 0x75, 0x00, 0x77, 0x00,
+    0x79, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x7c, 0x00,
+    0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x0b, 0x57, 0x06,
+    0x5f, 0x03, 0x63, 0x02, 0x68, 0x02, 0x6b, 0x01, 0x6d, 0x01, 0x6e, 0x01,
+    0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00,
+    0x76, 0x00, 0x76, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x79, 0x00,
+    0x82, 0x00, 0x82, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x40, 0x17, 0x17, 0x2c, 0x0c, 0x3b, 0x07,
+    0x45, 0x05, 0x4d, 0x04, 0x53, 0x03, 0x57, 0x02, 0x5c, 0x02, 0x5e, 0x01,
+    0x61, 0x01, 0x63, 0x01, 0x66, 0x01, 0x67, 0x01, 0x68, 0x00, 0x69, 0x00,
+    0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, 0x41, 0x20, 0x4d, 0x0b,
+    0x58, 0x06, 0x5e, 0x03, 0x64, 0x02, 0x68, 0x02, 0x6b, 0x01, 0x6c, 0x01,
+    0x6f, 0x01, 0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00,
+    0x76, 0x00, 0x75, 0x00, 0x77, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x47, 0x15, 0x4f, 0x0d, 0x56, 0x09, 0x59, 0x06,
+    0x5f, 0x05, 0x62, 0x04, 0x65, 0x03, 0x67, 0x02, 0x69, 0x02, 0x6b, 0x02,
+    0x6c, 0x02, 0x6e, 0x01, 0x6f, 0x01, 0x70, 0x01, 0x71, 0x01, 0x70, 0x01,
+    0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x74, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x55, 0x0c, 0x2c, 0x1b, 0x1b, 0x27, 0x12, 0x32, 0x0d, 0x3a, 0x0b,
+    0x41, 0x08, 0x47, 0x07, 0x4c, 0x05, 0x4f, 0x05, 0x53, 0x04, 0x56, 0x04,
+    0x58, 0x03, 0x5a, 0x02, 0x5d, 0x02, 0x5e, 0x02, 0x60, 0x02, 0x61, 0x01,
+    0x63, 0x01, 0x64, 0x01, 0x41, 0x2a, 0x47, 0x16, 0x4f, 0x0d, 0x54, 0x09,
+    0x5b, 0x06, 0x5f, 0x05, 0x62, 0x04, 0x64, 0x03, 0x67, 0x02, 0x69, 0x02,
+    0x6b, 0x02, 0x6c, 0x02, 0x6e, 0x01, 0x6f, 0x01, 0x70, 0x01, 0x70, 0x01,
+    0x71, 0x01, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x45, 0x1d, 0x4a, 0x14, 0x50, 0x0e, 0x54, 0x0b, 0x59, 0x08, 0x5c, 0x07,
+    0x5f, 0x06, 0x60, 0x05, 0x64, 0x04, 0x65, 0x03, 0x67, 0x03, 0x68, 0x02,
+    0x6a, 0x02, 0x6b, 0x02, 0x6c, 0x02, 0x6c, 0x02, 0x6e, 0x02, 0x6f, 0x01,
+    0x70, 0x01, 0x70, 0x01, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x60, 0x08, 0x3b,
+    0x12, 0x28, 0x1d, 0x1d, 0x26, 0x16, 0x2e, 0x11, 0x34, 0x0e, 0x3a, 0x0c,
+    0x3f, 0x0a, 0x44, 0x08, 0x47, 0x07, 0x4b, 0x06, 0x4d, 0x05, 0x51, 0x05,
+    0x52, 0x04, 0x55, 0x04, 0x57, 0x04, 0x58, 0x04, 0x5a, 0x03, 0x5c, 0x02,
+    0x42, 0x30, 0x45, 0x1d, 0x4b, 0x14, 0x4f, 0x0e, 0x55, 0x0b, 0x59, 0x08,
+    0x5c, 0x07, 0x5e, 0x06, 0x61, 0x05, 0x64, 0x04, 0x65, 0x03, 0x67, 0x03,
+    0x68, 0x02, 0x6a, 0x02, 0x6b, 0x02, 0x6b, 0x02, 0x6d, 0x02, 0x6e, 0x02,
+    0x6f, 0x01, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x22, 0x48, 0x19,
+    0x4d, 0x13, 0x50, 0x0f, 0x54, 0x0c, 0x57, 0x0a, 0x5a, 0x08, 0x5c, 0x07,
+    0x5f, 0x06, 0x61, 0x05, 0x63, 0x05, 0x64, 0x04, 0x65, 0x03, 0x67, 0x03,
+    0x68, 0x03, 0x68, 0x02, 0x6a, 0x02, 0x6b, 0x02, 0x6c, 0x02, 0x6d, 0x02,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x66, 0x05, 0x45, 0x0d, 0x32, 0x16, 0x26,
+    0x1e, 0x1e, 0x25, 0x18, 0x2b, 0x14, 0x31, 0x11, 0x36, 0x0f, 0x3a, 0x0c,
+    0x3e, 0x0b, 0x42, 0x0a, 0x45, 0x09, 0x47, 0x07, 0x4a, 0x07, 0x4c, 0x06,
+    0x4f, 0x05, 0x51, 0x05, 0x52, 0x05, 0x54, 0x04, 0x41, 0x33, 0x44, 0x22,
+    0x48, 0x19, 0x4c, 0x13, 0x51, 0x0f, 0x54, 0x0c, 0x57, 0x0a, 0x59, 0x08,
+    0x5d, 0x07, 0x5f, 0x06, 0x61, 0x05, 0x63, 0x05, 0x64, 0x04, 0x65, 0x03,
+    0x67, 0x03, 0x67, 0x03, 0x69, 0x02, 0x6a, 0x02, 0x6b, 0x02, 0x6c, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x43, 0x26, 0x47, 0x1d, 0x4a, 0x17, 0x4d, 0x12,
+    0x51, 0x0f, 0x54, 0x0d, 0x56, 0x0b, 0x58, 0x09, 0x5b, 0x08, 0x5d, 0x07,
+    0x5f, 0x06, 0x60, 0x06, 0x62, 0x05, 0x63, 0x05, 0x64, 0x04, 0x65, 0x03,
+    0x67, 0x03, 0x67, 0x03, 0x68, 0x03, 0x69, 0x02, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x6a, 0x04, 0x4d, 0x0b, 0x3a, 0x11, 0x2e, 0x18, 0x25, 0x1f, 0x1f,
+    0x24, 0x1a, 0x29, 0x16, 0x2e, 0x13, 0x33, 0x11, 0x37, 0x0f, 0x3a, 0x0d,
+    0x3d, 0x0c, 0x40, 0x0a, 0x43, 0x0a, 0x45, 0x09, 0x48, 0x07, 0x4a, 0x07,
+    0x4c, 0x07, 0x4e, 0x06, 0x41, 0x35, 0x43, 0x26, 0x47, 0x1d, 0x49, 0x17,
+    0x4e, 0x12, 0x51, 0x0f, 0x54, 0x0d, 0x55, 0x0b, 0x59, 0x09, 0x5b, 0x08,
+    0x5d, 0x07, 0x5f, 0x06, 0x60, 0x06, 0x62, 0x05, 0x63, 0x05, 0x63, 0x04,
+    0x65, 0x03, 0x67, 0x03, 0x67, 0x03, 0x68, 0x03, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x43, 0x29, 0x45, 0x20, 0x49, 0x1a, 0x4b, 0x15, 0x4f, 0x12, 0x51, 0x0f,
+    0x54, 0x0d, 0x55, 0x0b, 0x58, 0x0a, 0x5a, 0x09, 0x5b, 0x08, 0x5d, 0x07,
+    0x5f, 0x06, 0x60, 0x06, 0x61, 0x05, 0x62, 0x05, 0x64, 0x05, 0x65, 0x04,
+    0x65, 0x03, 0x66, 0x03, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x6d, 0x03, 0x52,
+    0x08, 0x41, 0x0e, 0x34, 0x14, 0x2b, 0x1a, 0x24, 0x1f, 0x1f, 0x24, 0x1b,
+    0x28, 0x17, 0x2d, 0x15, 0x31, 0x12, 0x34, 0x10, 0x37, 0x0f, 0x3a, 0x0d,
+    0x3d, 0x0c, 0x40, 0x0b, 0x42, 0x0a, 0x44, 0x0a, 0x46, 0x09, 0x47, 0x07,
+    0x41, 0x36, 0x43, 0x29, 0x46, 0x20, 0x48, 0x1a, 0x4c, 0x15, 0x4f, 0x12,
+    0x51, 0x0f, 0x53, 0x0d, 0x56, 0x0b, 0x58, 0x0a, 0x5a, 0x09, 0x5b, 0x08,
+    0x5d, 0x07, 0x5f, 0x06, 0x60, 0x06, 0x60, 0x05, 0x62, 0x05, 0x64, 0x05,
+    0x65, 0x04, 0x65, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x2b, 0x45, 0x23,
+    0x48, 0x1d, 0x49, 0x18, 0x4d, 0x14, 0x4f, 0x12, 0x51, 0x10, 0x53, 0x0e,
+    0x55, 0x0c, 0x57, 0x0b, 0x59, 0x0a, 0x5a, 0x09, 0x5c, 0x08, 0x5d, 0x07,
+    0x5f, 0x07, 0x5f, 0x06, 0x61, 0x06, 0x62, 0x05, 0x63, 0x05, 0x64, 0x05,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x6f, 0x02, 0x57, 0x07, 0x47, 0x0c, 0x3a,
+    0x11, 0x31, 0x16, 0x29, 0x1b, 0x24, 0x20, 0x20, 0x23, 0x1c, 0x28, 0x19,
+    0x2b, 0x16, 0x2f, 0x14, 0x32, 0x12, 0x35, 0x10, 0x38, 0x0f, 0x3a, 0x0e,
+    0x3c, 0x0c, 0x3f, 0x0c, 0x41, 0x0b, 0x42, 0x0a, 0x41, 0x37, 0x43, 0x2b,
+    0x45, 0x23, 0x47, 0x1d, 0x4a, 0x18, 0x4d, 0x14, 0x4f, 0x12, 0x51, 0x10,
+    0x53, 0x0e, 0x55, 0x0c, 0x57, 0x0b, 0x59, 0x0a, 0x5a, 0x09, 0x5c, 0x08,
+    0x5d, 0x07, 0x5e, 0x07, 0x60, 0x06, 0x61, 0x06, 0x62, 0x05, 0x63, 0x05,
+    0x1f, 0x00, 0x3f, 0x00, 0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00,
+    0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x1f, 0x1f, 0x3f, 0x00,
+    0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c, 0x00,
+    0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7d, 0x00, 0x58, 0x00, 0x70, 0x00, 0x77, 0x00, 0x79, 0x00, 0x7b, 0x00,
+    0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x1f, 0x1f, 0x3f, 0x00,
+    0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c, 0x00,
+    0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x43, 0x2d, 0x44, 0x25, 0x46, 0x1f, 0x48, 0x1b,
+    0x4b, 0x17, 0x4d, 0x14, 0x50, 0x12, 0x51, 0x10, 0x53, 0x0e, 0x55, 0x0c,
+    0x57, 0x0b, 0x58, 0x0b, 0x5a, 0x09, 0x5b, 0x09, 0x5c, 0x08, 0x5c, 0x07,
+    0x5f, 0x07, 0x60, 0x06, 0x61, 0x06, 0x62, 0x06, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x71, 0x02, 0x5b, 0x05, 0x4b, 0x0a, 0x3f, 0x0f, 0x36, 0x13, 0x2e,
+    0x18, 0x29, 0x1c, 0x23, 0x20, 0x20, 0x23, 0x1d, 0x27, 0x19, 0x2a, 0x17,
+    0x2d, 0x16, 0x30, 0x12, 0x33, 0x12, 0x35, 0x10, 0x38, 0x0f, 0x3b, 0x0e,
+    0x3c, 0x0c, 0x3e, 0x0c, 0x41, 0x38, 0x43, 0x2d, 0x44, 0x25, 0x45, 0x1f,
+    0x49, 0x1b, 0x4b, 0x17, 0x4d, 0x14, 0x4f, 0x11, 0x51, 0x10, 0x53, 0x0e,
+    0x55, 0x0c, 0x57, 0x0b, 0x58, 0x0b, 0x5a, 0x09, 0x5b, 0x09, 0x5b, 0x08,
+    0x5e, 0x07, 0x5f, 0x07, 0x60, 0x06, 0x61, 0x06, 0x00, 0x00, 0x0a, 0x00,
+    0x3f, 0x00, 0x5c, 0x00, 0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00,
+    0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00,
+    0x7d, 0x00, 0x7d, 0x00, 0x00, 0x3f, 0x0a, 0x0a, 0x3f, 0x00, 0x5c, 0x00,
+    0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00,
+    0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x44, 0x00,
+    0x55, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x75, 0x00, 0x78, 0x00,
+    0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00,
+    0x7d, 0x00, 0x7d, 0x00, 0x00, 0x3f, 0x0a, 0x0a, 0x3f, 0x00, 0x5c, 0x00,
+    0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00,
+    0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x00,
+    0x42, 0x2f, 0x44, 0x27, 0x46, 0x22, 0x47, 0x1d, 0x4a, 0x19, 0x4c, 0x16,
+    0x4e, 0x13, 0x4f, 0x11, 0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d, 0x56, 0x0c,
+    0x58, 0x0b, 0x59, 0x0a, 0x5a, 0x09, 0x5b, 0x09, 0x5c, 0x07, 0x5e, 0x07,
+    0x5f, 0x07, 0x5f, 0x06, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x73, 0x01, 0x5e,
+    0x05, 0x4f, 0x08, 0x44, 0x0c, 0x3a, 0x10, 0x33, 0x15, 0x2d, 0x19, 0x28,
+    0x1d, 0x23, 0x20, 0x20, 0x23, 0x1d, 0x26, 0x1a, 0x2a, 0x18, 0x2c, 0x16,
+    0x2f, 0x14, 0x31, 0x12, 0x34, 0x12, 0x35, 0x0f, 0x38, 0x0f, 0x3b, 0x0f,
+    0x41, 0x39, 0x42, 0x2f, 0x44, 0x27, 0x45, 0x22, 0x48, 0x1d, 0x4a, 0x19,
+    0x4c, 0x16, 0x4d, 0x14, 0x50, 0x11, 0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d,
+    0x56, 0x0c, 0x58, 0x0b, 0x59, 0x0a, 0x59, 0x09, 0x5c, 0x09, 0x5c, 0x07,
+    0x5e, 0x07, 0x5f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x2d, 0x00,
+    0x48, 0x00, 0x59, 0x00, 0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00,
+    0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00,
+    0x00, 0x66, 0x00, 0x3f, 0x03, 0x03, 0x2d, 0x00, 0x48, 0x00, 0x59, 0x00,
+    0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00,
+    0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x55, 0x00, 0x20, 0x00, 0x3e, 0x00,
+    0x50, 0x00, 0x5a, 0x00, 0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00,
+    0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00,
+    0x00, 0x66, 0x00, 0x3f, 0x03, 0x03, 0x2d, 0x00, 0x48, 0x00, 0x59, 0x00,
+    0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00,
+    0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x42, 0x30, 0x44, 0x29,
+    0x45, 0x23, 0x46, 0x1f, 0x49, 0x1b, 0x4b, 0x18, 0x4c, 0x15, 0x4d, 0x13,
+    0x50, 0x11, 0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d, 0x56, 0x0c, 0x57, 0x0b,
+    0x59, 0x0b, 0x59, 0x09, 0x5b, 0x09, 0x5c, 0x09, 0x5c, 0x07, 0x5e, 0x07,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x73, 0x01, 0x61, 0x04, 0x52, 0x07, 0x47,
+    0x0b, 0x3e, 0x0f, 0x37, 0x12, 0x31, 0x16, 0x2b, 0x19, 0x27, 0x1d, 0x23,
+    0x20, 0x20, 0x23, 0x1d, 0x26, 0x1b, 0x29, 0x19, 0x2b, 0x16, 0x2e, 0x16,
+    0x30, 0x13, 0x32, 0x12, 0x35, 0x12, 0x36, 0x0f, 0x41, 0x39, 0x42, 0x30,
+    0x44, 0x29, 0x44, 0x23, 0x47, 0x1f, 0x49, 0x1b, 0x4b, 0x18, 0x4c, 0x15,
+    0x4e, 0x13, 0x50, 0x11, 0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d, 0x56, 0x0c,
+    0x57, 0x0b, 0x57, 0x0b, 0x5a, 0x09, 0x5b, 0x09, 0x5c, 0x09, 0x5c, 0x07,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x00, 0x3a, 0x00,
+    0x4a, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00,
+    0x6f, 0x00, 0x71, 0x00, 0x73, 0x00, 0x75, 0x00, 0x00, 0x72, 0x00, 0x5c,
+    0x00, 0x2d, 0x01, 0x01, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56, 0x00,
+    0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71, 0x00,
+    0x73, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x77, 0x00, 0x67, 0x00, 0x3e, 0x00, 0x0d, 0x00, 0x28, 0x00, 0x3a, 0x00,
+    0x4a, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00,
+    0x6f, 0x00, 0x71, 0x00, 0x73, 0x00, 0x75, 0x00, 0x00, 0x72, 0x00, 0x5c,
+    0x00, 0x2d, 0x01, 0x01, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56, 0x00,
+    0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71, 0x00,
+    0x73, 0x00, 0x75, 0x00, 0x42, 0x32, 0x44, 0x2a, 0x45, 0x25, 0x46, 0x21,
+    0x48, 0x1d, 0x4a, 0x1a, 0x4b, 0x17, 0x4c, 0x15, 0x4e, 0x13, 0x50, 0x11,
+    0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d, 0x55, 0x0c, 0x57, 0x0c, 0x57, 0x0b,
+    0x5a, 0x0a, 0x5a, 0x09, 0x5b, 0x09, 0x5c, 0x09, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x74, 0x01, 0x64, 0x04, 0x55, 0x06, 0x4a, 0x0a, 0x42, 0x0d, 0x3a,
+    0x10, 0x34, 0x14, 0x2f, 0x17, 0x2a, 0x1a, 0x26, 0x1d, 0x23, 0x21, 0x21,
+    0x22, 0x1d, 0x26, 0x1b, 0x28, 0x19, 0x2b, 0x18, 0x2c, 0x16, 0x30, 0x15,
+    0x30, 0x12, 0x33, 0x12, 0x41, 0x3a, 0x42, 0x32, 0x44, 0x2a, 0x44, 0x25,
+    0x46, 0x21, 0x48, 0x1d, 0x4a, 0x1a, 0x4b, 0x17, 0x4d, 0x15, 0x4e, 0x13,
+    0x50, 0x11, 0x52, 0x10, 0x53, 0x0e, 0x55, 0x0d, 0x55, 0x0c, 0x56, 0x0c,
+    0x58, 0x0b, 0x5a, 0x0a, 0x5a, 0x09, 0x5b, 0x09, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00,
+    0x4b, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00,
+    0x6b, 0x00, 0x6e, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22,
+    0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54, 0x00,
+    0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x6e, 0x00,
+    0x50, 0x00, 0x28, 0x00, 0x01, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00,
+    0x4b, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00,
+    0x6b, 0x00, 0x6e, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22,
+    0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54, 0x00,
+    0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e, 0x00,
+    0x42, 0x32, 0x43, 0x2c, 0x44, 0x26, 0x45, 0x22, 0x48, 0x1f, 0x49, 0x1b,
+    0x4b, 0x19, 0x4c, 0x16, 0x4e, 0x15, 0x4f, 0x13, 0x50, 0x11, 0x52, 0x10,
+    0x53, 0x0e, 0x55, 0x0e, 0x55, 0x0c, 0x56, 0x0c, 0x57, 0x0b, 0x59, 0x0b,
+    0x5a, 0x0a, 0x5a, 0x09, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x75, 0x01, 0x65,
+    0x03, 0x58, 0x05, 0x4d, 0x09, 0x45, 0x0c, 0x3e, 0x0f, 0x37, 0x12, 0x32,
+    0x16, 0x2d, 0x18, 0x2a, 0x1b, 0x26, 0x1d, 0x22, 0x21, 0x21, 0x22, 0x1d,
+    0x26, 0x1c, 0x27, 0x19, 0x2b, 0x19, 0x2b, 0x16, 0x2e, 0x16, 0x30, 0x14,
+    0x41, 0x3a, 0x42, 0x32, 0x43, 0x2c, 0x44, 0x26, 0x46, 0x22, 0x48, 0x1f,
+    0x49, 0x1b, 0x4a, 0x19, 0x4c, 0x16, 0x4e, 0x15, 0x4f, 0x13, 0x50, 0x11,
+    0x52, 0x10, 0x53, 0x0e, 0x55, 0x0e, 0x54, 0x0c, 0x57, 0x0c, 0x57, 0x0b,
+    0x59, 0x0b, 0x5a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00,
+    0x4b, 0x00, 0x53, 0x00, 0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00,
+    0x00, 0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00,
+    0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x00,
+    0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x72, 0x00, 0x5a, 0x00, 0x3a, 0x00,
+    0x1b, 0x00, 0x01, 0x00, 0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00,
+    0x4b, 0x00, 0x53, 0x00, 0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00,
+    0x00, 0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00,
+    0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x00,
+    0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00, 0x42, 0x33, 0x43, 0x2d,
+    0x44, 0x28, 0x45, 0x23, 0x47, 0x20, 0x48, 0x1d, 0x4a, 0x1a, 0x4a, 0x18,
+    0x4c, 0x16, 0x4e, 0x14, 0x4f, 0x13, 0x50, 0x11, 0x52, 0x10, 0x53, 0x0e,
+    0x55, 0x0e, 0x54, 0x0d, 0x57, 0x0c, 0x57, 0x0b, 0x58, 0x0b, 0x5a, 0x0b,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x76, 0x01, 0x67, 0x02, 0x5a, 0x05, 0x50,
+    0x07, 0x47, 0x0a, 0x40, 0x0d, 0x3a, 0x10, 0x35, 0x12, 0x30, 0x16, 0x2c,
+    0x19, 0x29, 0x1b, 0x26, 0x1d, 0x22, 0x21, 0x21, 0x22, 0x1d, 0x26, 0x1d,
+    0x26, 0x1a, 0x2a, 0x19, 0x2b, 0x17, 0x2d, 0x16, 0x41, 0x3b, 0x42, 0x33,
+    0x43, 0x2d, 0x44, 0x28, 0x45, 0x23, 0x47, 0x20, 0x48, 0x1d, 0x49, 0x1a,
+    0x4b, 0x18, 0x4c, 0x16, 0x4e, 0x14, 0x4f, 0x13, 0x50, 0x11, 0x52, 0x10,
+    0x53, 0x0e, 0x54, 0x0e, 0x55, 0x0d, 0x57, 0x0c, 0x57, 0x0b, 0x58, 0x0b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x13, 0x00, 0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00,
+    0x4c, 0x00, 0x52, 0x00, 0x57, 0x00, 0x5b, 0x00, 0x00, 0x7c, 0x00, 0x75,
+    0x00, 0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x13, 0x00,
+    0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52, 0x00,
+    0x57, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00,
+    0x00, 0x00, 0x13, 0x00, 0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00,
+    0x4c, 0x00, 0x52, 0x00, 0x57, 0x00, 0x5b, 0x00, 0x00, 0x7c, 0x00, 0x75,
+    0x00, 0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x13, 0x00,
+    0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52, 0x00,
+    0x57, 0x00, 0x5b, 0x00, 0x42, 0x34, 0x43, 0x2e, 0x44, 0x29, 0x45, 0x25,
+    0x46, 0x21, 0x48, 0x1e, 0x49, 0x1b, 0x4a, 0x19, 0x4c, 0x17, 0x4d, 0x15,
+    0x4e, 0x14, 0x50, 0x13, 0x50, 0x11, 0x52, 0x11, 0x52, 0x0f, 0x53, 0x0e,
+    0x55, 0x0d, 0x56, 0x0c, 0x57, 0x0c, 0x57, 0x0b, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x77, 0x00, 0x68, 0x02, 0x5c, 0x05, 0x52, 0x07, 0x4a, 0x0a, 0x43,
+    0x0c, 0x3d, 0x0f, 0x37, 0x12, 0x33, 0x14, 0x2f, 0x16, 0x2b, 0x19, 0x28,
+    0x1c, 0x26, 0x1d, 0x22, 0x21, 0x22, 0x21, 0x1e, 0x25, 0x1d, 0x26, 0x1a,
+    0x29, 0x19, 0x2b, 0x18, 0x41, 0x3b, 0x42, 0x34, 0x43, 0x2e, 0x44, 0x29,
+    0x45, 0x25, 0x46, 0x21, 0x48, 0x1e, 0x48, 0x1b, 0x4b, 0x19, 0x4c, 0x17,
+    0x4d, 0x15, 0x4e, 0x14, 0x50, 0x13, 0x50, 0x11, 0x52, 0x11, 0x51, 0x0f,
+    0x54, 0x0e, 0x55, 0x0d, 0x56, 0x0c, 0x57, 0x0c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00,
+    0x4c, 0x00, 0x51, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56,
+    0x00, 0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00,
+    0x6a, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00,
+    0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00,
+    0x4c, 0x00, 0x51, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56,
+    0x00, 0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51, 0x00,
+    0x42, 0x34, 0x43, 0x2f, 0x44, 0x2a, 0x44, 0x26, 0x46, 0x22, 0x47, 0x1f,
+    0x48, 0x1d, 0x49, 0x1a, 0x4b, 0x18, 0x4c, 0x17, 0x4e, 0x15, 0x4e, 0x13,
+    0x50, 0x13, 0x50, 0x11, 0x52, 0x11, 0x51, 0x0f, 0x54, 0x0e, 0x55, 0x0d,
+    0x56, 0x0c, 0x57, 0x0c, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x77, 0x00, 0x69,
+    0x02, 0x5e, 0x04, 0x55, 0x06, 0x4c, 0x09, 0x45, 0x0c, 0x3f, 0x0e, 0x3a,
+    0x10, 0x35, 0x12, 0x31, 0x16, 0x2e, 0x18, 0x2b, 0x19, 0x27, 0x1d, 0x26,
+    0x1e, 0x22, 0x21, 0x22, 0x21, 0x1e, 0x25, 0x1d, 0x26, 0x1b, 0x28, 0x19,
+    0x41, 0x3b, 0x42, 0x34, 0x43, 0x2f, 0x43, 0x2a, 0x45, 0x26, 0x46, 0x22,
+    0x47, 0x1f, 0x48, 0x1d, 0x4a, 0x1a, 0x4b, 0x18, 0x4c, 0x17, 0x4e, 0x15,
+    0x4e, 0x13, 0x50, 0x13, 0x50, 0x11, 0x51, 0x11, 0x52, 0x0f, 0x54, 0x0e,
+    0x55, 0x0d, 0x56, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
+    0x1b, 0x00, 0x27, 0x00, 0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00,
+    0x00, 0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37,
+    0x00, 0x23, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27, 0x00,
+    0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00,
+    0x4b, 0x00, 0x37, 0x00, 0x23, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0e, 0x00,
+    0x1b, 0x00, 0x27, 0x00, 0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00,
+    0x00, 0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37,
+    0x00, 0x23, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27, 0x00,
+    0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00, 0x42, 0x35, 0x43, 0x30,
+    0x44, 0x2b, 0x44, 0x27, 0x45, 0x24, 0x46, 0x21, 0x48, 0x1e, 0x48, 0x1c,
+    0x4b, 0x1a, 0x4b, 0x18, 0x4c, 0x16, 0x4e, 0x15, 0x4e, 0x13, 0x50, 0x12,
+    0x50, 0x11, 0x51, 0x11, 0x52, 0x0f, 0x54, 0x0e, 0x55, 0x0e, 0x55, 0x0c,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x77, 0x00, 0x6b, 0x02, 0x60, 0x04, 0x57,
+    0x05, 0x4f, 0x07, 0x48, 0x0a, 0x42, 0x0c, 0x3c, 0x0f, 0x38, 0x12, 0x34,
+    0x14, 0x30, 0x16, 0x2c, 0x19, 0x2b, 0x19, 0x26, 0x1d, 0x25, 0x1e, 0x22,
+    0x21, 0x22, 0x21, 0x1e, 0x25, 0x1d, 0x26, 0x1c, 0x41, 0x3b, 0x42, 0x35,
+    0x43, 0x30, 0x43, 0x2b, 0x44, 0x27, 0x45, 0x24, 0x46, 0x21, 0x47, 0x1e,
+    0x49, 0x1c, 0x4b, 0x1a, 0x4b, 0x18, 0x4c, 0x16, 0x4e, 0x15, 0x4e, 0x13,
+    0x50, 0x12, 0x50, 0x11, 0x52, 0x11, 0x52, 0x0f, 0x54, 0x0e, 0x55, 0x0e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00,
+    0x23, 0x00, 0x2c, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x00, 0x7d, 0x00, 0x7a,
+    0x00, 0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0e, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c, 0x00,
+    0x34, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7d, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00,
+    0x30, 0x00, 0x1f, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00,
+    0x23, 0x00, 0x2c, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x00, 0x7d, 0x00, 0x7a,
+    0x00, 0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0e, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c, 0x00,
+    0x34, 0x00, 0x3b, 0x00, 0x42, 0x36, 0x43, 0x30, 0x44, 0x2c, 0x44, 0x28,
+    0x45, 0x25, 0x46, 0x22, 0x48, 0x1f, 0x48, 0x1d, 0x49, 0x1a, 0x4b, 0x19,
+    0x4c, 0x18, 0x4d, 0x15, 0x4e, 0x15, 0x4f, 0x13, 0x50, 0x12, 0x50, 0x11,
+    0x52, 0x11, 0x52, 0x0f, 0x54, 0x0e, 0x55, 0x0e, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x00, 0x77, 0x00, 0x6c, 0x02, 0x61, 0x04, 0x58, 0x05, 0x51, 0x07, 0x4a,
+    0x0a, 0x44, 0x0c, 0x3f, 0x0f, 0x3a, 0x10, 0x35, 0x12, 0x32, 0x16, 0x30,
+    0x16, 0x2b, 0x19, 0x2a, 0x1a, 0x26, 0x1d, 0x25, 0x1e, 0x22, 0x21, 0x22,
+    0x21, 0x1e, 0x25, 0x1d, 0x41, 0x3b, 0x42, 0x36, 0x43, 0x30, 0x43, 0x2c,
+    0x44, 0x28, 0x45, 0x25, 0x46, 0x22, 0x47, 0x1f, 0x49, 0x1d, 0x49, 0x1a,
+    0x4b, 0x19, 0x4c, 0x18, 0x4d, 0x15, 0x4e, 0x15, 0x4f, 0x13, 0x4f, 0x12,
+    0x51, 0x11, 0x52, 0x11, 0x52, 0x0f, 0x54, 0x0e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00,
+    0x29, 0x00, 0x30, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69,
+    0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d,
+    0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00,
+    0x74, 0x00, 0x69, 0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00,
+    0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00,
+    0x29, 0x00, 0x30, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69,
+    0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d,
+    0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30, 0x00,
+    0x42, 0x36, 0x42, 0x31, 0x43, 0x2d, 0x44, 0x29, 0x45, 0x26, 0x46, 0x23,
+    0x47, 0x20, 0x47, 0x1e, 0x49, 0x1c, 0x4b, 0x1a, 0x4b, 0x18, 0x4c, 0x17,
+    0x4d, 0x15, 0x4e, 0x14, 0x4f, 0x13, 0x4f, 0x12, 0x51, 0x11, 0x52, 0x11,
+    0x52, 0x0f, 0x54, 0x0e, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x00, 0x78, 0x00, 0x6d,
+    0x01, 0x62, 0x03, 0x5a, 0x05, 0x52, 0x07, 0x4c, 0x09, 0x46, 0x0b, 0x41,
+    0x0c, 0x3c, 0x0f, 0x38, 0x12, 0x35, 0x12, 0x30, 0x16, 0x2e, 0x17, 0x2b,
+    0x19, 0x29, 0x1b, 0x26, 0x1d, 0x25, 0x1e, 0x22, 0x21, 0x22, 0x21, 0x1f,
+    0x41, 0x3c, 0x42, 0x36, 0x42, 0x31, 0x43, 0x2d, 0x44, 0x29, 0x45, 0x26,
+    0x46, 0x23, 0x46, 0x20, 0x48, 0x1e, 0x49, 0x1c, 0x4b, 0x1a, 0x4b, 0x18,
+    0x4c, 0x17, 0x4d, 0x15, 0x4e, 0x14, 0x4e, 0x13, 0x50, 0x12, 0x51, 0x11,
+    0x52, 0x11, 0x52, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00,
+    0x00, 0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53,
+    0x00, 0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00,
+    0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00,
+    0x61, 0x00, 0x53, 0x00, 0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00,
+    0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00,
+    0x00, 0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53,
+    0x00, 0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00,
+    0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00, 0x42, 0x37, 0x42, 0x32,
+    0x43, 0x2d, 0x44, 0x2a, 0x45, 0x27, 0x45, 0x23, 0x46, 0x21, 0x47, 0x1f,
+    0x49, 0x1d, 0x49, 0x1a, 0x4b, 0x19, 0x4c, 0x18, 0x4c, 0x16, 0x4e, 0x15,
+    0x4e, 0x14, 0x4f, 0x13, 0x50, 0x12, 0x51, 0x11, 0x52, 0x11, 0x52, 0x0f,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x82, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x83, 0x00, 0x81, 0x00, 0x83, 0x00, 0x83, 0x00,
+    0x83, 0x00, 0x83, 0x00, 0x00, 0x78, 0x00, 0x6e, 0x01, 0x64, 0x02, 0x5b,
+    0x04, 0x54, 0x06, 0x4e, 0x07, 0x47, 0x0a, 0x42, 0x0c, 0x3e, 0x0f, 0x3b,
+    0x0f, 0x35, 0x12, 0x33, 0x14, 0x30, 0x16, 0x2d, 0x19, 0x2b, 0x19, 0x28,
+    0x1c, 0x26, 0x1d, 0x25, 0x1f, 0x22, 0x21, 0x22, 0x41, 0x3c, 0x42, 0x37,
+    0x42, 0x32, 0x43, 0x2d, 0x44, 0x2a, 0x45, 0x27, 0x45, 0x23, 0x46, 0x21,
+    0x48, 0x1f, 0x49, 0x1d, 0x49, 0x1a, 0x4b, 0x19, 0x4c, 0x18, 0x4c, 0x16,
+    0x4e, 0x15, 0x4d, 0x14, 0x50, 0x13, 0x50, 0x12, 0x51, 0x11, 0x52, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x1b, 0x00, 0x00, 0x7e, 0x00, 0x7c,
+    0x00, 0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e,
+    0x00, 0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x0a, 0x00,
+    0x13, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7c, 0x00, 0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00,
+    0x4c, 0x00, 0x3e, 0x00, 0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00,
+    0x00, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x1b, 0x00, 0x00, 0x7e, 0x00, 0x7c,
+    0x00, 0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e,
+    0x00, 0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x0a, 0x00,
+    0x13, 0x00, 0x1b, 0x00, 0x40, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x61, 0x20, 0x4d, 0x2a,
+    0x48, 0x30, 0x44, 0x33, 0x44, 0x35, 0x44, 0x36, 0x43, 0x37, 0x42, 0x38,
+    0x43, 0x39, 0x42, 0x39, 0x42, 0x3a, 0x42, 0x3a, 0x42, 0x3b, 0x42, 0x3b,
+    0x42, 0x3b, 0x41, 0x3b, 0x42, 0x3c, 0x42, 0x3c, 0x42, 0x3c, 0x42, 0x3c,
+    0x04, 0x3d, 0x22, 0x3d, 0x2b, 0x3d, 0x30, 0x3d, 0x33, 0x3d, 0x35, 0x3d,
+    0x37, 0x3d, 0x38, 0x3d, 0x39, 0x3d, 0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d,
+    0x3b, 0x3d, 0x3b, 0x3d, 0x3b, 0x3d, 0x3c, 0x3d, 0x3c, 0x3d, 0x3c, 0x3d,
+    0x3c, 0x3d, 0x3c, 0x3d, 0x40, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x09, 0x00, 0x12, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71,
+    0x00, 0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c,
+    0x00, 0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x12, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00,
+    0x78, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00,
+    0x39, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x00,
+    0x09, 0x00, 0x12, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71,
+    0x00, 0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c,
+    0x00, 0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x12, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x6c, 0x0b, 0x57, 0x16, 0x4f, 0x1d, 0x4a, 0x22,
+    0x48, 0x26, 0x47, 0x29, 0x46, 0x2b, 0x44, 0x2d, 0x44, 0x2f, 0x44, 0x30,
+    0x44, 0x31, 0x44, 0x32, 0x43, 0x33, 0x43, 0x34, 0x43, 0x34, 0x42, 0x35,
+    0x43, 0x36, 0x42, 0x36, 0x42, 0x37, 0x42, 0x37, 0x00, 0x5d, 0x0c, 0x49,
+    0x16, 0x43, 0x1d, 0x41, 0x22, 0x40, 0x26, 0x3f, 0x29, 0x3f, 0x2c, 0x3f,
+    0x2e, 0x3e, 0x2f, 0x3e, 0x31, 0x3e, 0x32, 0x3e, 0x33, 0x3e, 0x33, 0x3e,
+    0x34, 0x3e, 0x35, 0x3e, 0x35, 0x3e, 0x36, 0x3e, 0x37, 0x3e, 0x37, 0x3e,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
+    0x00, 0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62,
+    0x00, 0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e,
+    0x00, 0x13, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00,
+    0x6b, 0x00, 0x62, 0x00, 0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00,
+    0x29, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00,
+    0x00, 0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62,
+    0x00, 0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e,
+    0x00, 0x13, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x72, 0x06, 0x5f, 0x0d, 0x56, 0x14, 0x4f, 0x19, 0x4d, 0x1d, 0x4a, 0x20,
+    0x49, 0x23, 0x47, 0x25, 0x46, 0x27, 0x46, 0x29, 0x45, 0x2a, 0x45, 0x2c,
+    0x44, 0x2d, 0x44, 0x2e, 0x44, 0x2f, 0x43, 0x30, 0x44, 0x30, 0x44, 0x31,
+    0x43, 0x32, 0x43, 0x33, 0x00, 0x68, 0x06, 0x54, 0x0d, 0x4b, 0x14, 0x47,
+    0x19, 0x44, 0x1d, 0x43, 0x20, 0x41, 0x23, 0x41, 0x26, 0x40, 0x27, 0x40,
+    0x29, 0x3f, 0x2b, 0x3f, 0x2c, 0x3f, 0x2d, 0x3f, 0x2e, 0x3f, 0x2f, 0x3f,
+    0x30, 0x3f, 0x30, 0x3e, 0x31, 0x3e, 0x32, 0x3e, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d,
+    0x00, 0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51,
+    0x00, 0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12,
+    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00,
+    0x5b, 0x00, 0x51, 0x00, 0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00,
+    0x1b, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d,
+    0x00, 0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51,
+    0x00, 0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12,
+    0x00, 0x08, 0x00, 0x00, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x75, 0x03, 0x64, 0x09,
+    0x5a, 0x0e, 0x54, 0x13, 0x51, 0x17, 0x4e, 0x1a, 0x4c, 0x1d, 0x49, 0x1f,
+    0x49, 0x22, 0x48, 0x23, 0x47, 0x25, 0x46, 0x26, 0x46, 0x28, 0x45, 0x29,
+    0x45, 0x2a, 0x44, 0x2b, 0x44, 0x2c, 0x44, 0x2d, 0x44, 0x2e, 0x44, 0x2e,
+    0x00, 0x6d, 0x04, 0x5b, 0x09, 0x51, 0x0e, 0x4c, 0x13, 0x48, 0x17, 0x46,
+    0x1a, 0x44, 0x1d, 0x43, 0x1f, 0x42, 0x22, 0x42, 0x24, 0x41, 0x25, 0x41,
+    0x27, 0x40, 0x28, 0x40, 0x29, 0x40, 0x2a, 0x3f, 0x2b, 0x3f, 0x2c, 0x3f,
+    0x2d, 0x3f, 0x2e, 0x3f, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x3f, 0x00, 0x66, 0x00, 0x72, 0x00,
+    0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00,
+    0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x3f,
+    0x00, 0x66, 0x00, 0x72, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x7c, 0x00, 0x7c,
+    0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e,
+    0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x77, 0x02, 0x68, 0x06, 0x5f, 0x0b, 0x58, 0x0f,
+    0x54, 0x12, 0x51, 0x15, 0x4f, 0x18, 0x4c, 0x1b, 0x4b, 0x1d, 0x4a, 0x1f,
+    0x49, 0x21, 0x48, 0x22, 0x48, 0x23, 0x47, 0x25, 0x46, 0x26, 0x45, 0x27,
+    0x45, 0x28, 0x45, 0x29, 0x45, 0x2a, 0x44, 0x2b, 0x00, 0x70, 0x02, 0x60,
+    0x07, 0x56, 0x0b, 0x50, 0x0f, 0x4c, 0x12, 0x49, 0x16, 0x47, 0x18, 0x46,
+    0x1b, 0x45, 0x1d, 0x44, 0x1f, 0x43, 0x21, 0x42, 0x22, 0x42, 0x24, 0x41,
+    0x25, 0x41, 0x26, 0x40, 0x27, 0x40, 0x28, 0x40, 0x29, 0x40, 0x2a, 0x3f,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x0a, 0x0a, 0x3f, 0x00, 0x5c, 0x00, 0x6a, 0x00, 0x71, 0x00,
+    0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00,
+    0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x0a, 0x0a, 0x00, 0x3f, 0x00, 0x5c,
+    0x00, 0x6a, 0x00, 0x71, 0x00, 0x75, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a,
+    0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7d, 0x00, 0x7d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x78, 0x02, 0x6b, 0x05, 0x62, 0x08, 0x5b, 0x0c, 0x57, 0x0f, 0x54, 0x12,
+    0x51, 0x14, 0x4e, 0x17, 0x4d, 0x19, 0x4c, 0x1b, 0x4b, 0x1d, 0x4a, 0x1e,
+    0x49, 0x20, 0x48, 0x21, 0x48, 0x22, 0x46, 0x24, 0x46, 0x25, 0x46, 0x26,
+    0x46, 0x27, 0x45, 0x27, 0x00, 0x72, 0x02, 0x64, 0x05, 0x5b, 0x08, 0x54,
+    0x0c, 0x50, 0x0f, 0x4d, 0x12, 0x4a, 0x14, 0x48, 0x17, 0x47, 0x19, 0x46,
+    0x1b, 0x45, 0x1d, 0x44, 0x1f, 0x44, 0x20, 0x42, 0x21, 0x42, 0x22, 0x42,
+    0x24, 0x41, 0x25, 0x41, 0x26, 0x41, 0x27, 0x40, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x3f,
+    0x03, 0x03, 0x2d, 0x00, 0x48, 0x00, 0x59, 0x00, 0x63, 0x00, 0x6a, 0x00,
+    0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00,
+    0x79, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x66, 0x00, 0x3f, 0x00, 0x03, 0x03, 0x00, 0x2d, 0x00, 0x48, 0x00, 0x59,
+    0x00, 0x63, 0x00, 0x6a, 0x00, 0x6e, 0x00, 0x72, 0x00, 0x74, 0x00, 0x76,
+    0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x79, 0x01, 0x6d, 0x04,
+    0x65, 0x07, 0x5e, 0x0a, 0x5a, 0x0d, 0x56, 0x0f, 0x54, 0x12, 0x51, 0x14,
+    0x4f, 0x16, 0x4e, 0x18, 0x4c, 0x1a, 0x4b, 0x1b, 0x4b, 0x1d, 0x4a, 0x1e,
+    0x49, 0x1f, 0x48, 0x21, 0x48, 0x22, 0x48, 0x23, 0x47, 0x23, 0x46, 0x25,
+    0x00, 0x74, 0x01, 0x66, 0x04, 0x5e, 0x07, 0x57, 0x0a, 0x53, 0x0d, 0x4f,
+    0x10, 0x4d, 0x12, 0x4b, 0x14, 0x49, 0x16, 0x48, 0x18, 0x46, 0x1a, 0x45,
+    0x1b, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x20, 0x43, 0x21, 0x42, 0x22, 0x42,
+    0x23, 0x42, 0x24, 0x41, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x5c, 0x00, 0x2d, 0x01, 0x01,
+    0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x64, 0x00,
+    0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x73, 0x00, 0x75, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x5c, 0x00,
+    0x2d, 0x00, 0x01, 0x01, 0x00, 0x22, 0x00, 0x3a, 0x00, 0x4a, 0x00, 0x56,
+    0x00, 0x5e, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x71,
+    0x00, 0x73, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7a, 0x01, 0x6f, 0x03, 0x67, 0x06, 0x60, 0x08,
+    0x5d, 0x0b, 0x59, 0x0d, 0x56, 0x10, 0x53, 0x11, 0x51, 0x14, 0x50, 0x15,
+    0x4e, 0x17, 0x4d, 0x19, 0x4c, 0x1a, 0x4b, 0x1b, 0x4b, 0x1d, 0x48, 0x1e,
+    0x49, 0x1f, 0x49, 0x20, 0x48, 0x21, 0x48, 0x22, 0x00, 0x75, 0x01, 0x69,
+    0x03, 0x61, 0x06, 0x5a, 0x08, 0x56, 0x0b, 0x52, 0x0d, 0x4f, 0x10, 0x4d,
+    0x12, 0x4b, 0x14, 0x4a, 0x16, 0x48, 0x17, 0x47, 0x19, 0x46, 0x1a, 0x45,
+    0x1c, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x1f, 0x44, 0x20, 0x43, 0x21, 0x42,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22, 0x00, 0x00, 0x1b, 0x00,
+    0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x61, 0x00,
+    0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x48, 0x00, 0x22, 0x00,
+    0x00, 0x00, 0x00, 0x1b, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x54,
+    0x00, 0x5b, 0x00, 0x61, 0x00, 0x65, 0x00, 0x68, 0x00, 0x6b, 0x00, 0x6e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7b, 0x01, 0x71, 0x02, 0x69, 0x05, 0x62, 0x07, 0x5f, 0x09, 0x5b, 0x0c,
+    0x58, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x50, 0x15, 0x4e, 0x16,
+    0x4e, 0x18, 0x4c, 0x19, 0x4c, 0x1a, 0x4a, 0x1c, 0x4b, 0x1d, 0x49, 0x1e,
+    0x49, 0x1f, 0x49, 0x20, 0x00, 0x76, 0x01, 0x6b, 0x03, 0x63, 0x05, 0x5d,
+    0x07, 0x58, 0x09, 0x54, 0x0c, 0x52, 0x0e, 0x4f, 0x10, 0x4d, 0x11, 0x4c,
+    0x13, 0x4a, 0x15, 0x49, 0x17, 0x48, 0x18, 0x47, 0x19, 0x46, 0x1b, 0x45,
+    0x1c, 0x45, 0x1d, 0x44, 0x1e, 0x44, 0x1f, 0x44, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x71,
+    0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00, 0x16, 0x00, 0x28, 0x00,
+    0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x00, 0x59, 0x00, 0x5e, 0x00,
+    0x62, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7a, 0x00, 0x71, 0x00, 0x59, 0x00, 0x3a, 0x00, 0x1b, 0x00, 0x00, 0x00,
+    0x00, 0x16, 0x00, 0x28, 0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53,
+    0x00, 0x59, 0x00, 0x5e, 0x00, 0x62, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7b, 0x00, 0x72, 0x02,
+    0x6b, 0x04, 0x64, 0x06, 0x61, 0x08, 0x5d, 0x0a, 0x5a, 0x0c, 0x56, 0x0e,
+    0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x50, 0x15, 0x4f, 0x16, 0x4e, 0x17,
+    0x4d, 0x18, 0x4b, 0x1a, 0x4b, 0x1a, 0x4b, 0x1c, 0x4b, 0x1d, 0x49, 0x1d,
+    0x00, 0x77, 0x00, 0x6c, 0x02, 0x65, 0x04, 0x5f, 0x06, 0x5a, 0x08, 0x57,
+    0x0a, 0x54, 0x0c, 0x51, 0x0e, 0x4f, 0x10, 0x4d, 0x11, 0x4c, 0x13, 0x4a,
+    0x15, 0x49, 0x16, 0x48, 0x18, 0x48, 0x18, 0x46, 0x1a, 0x46, 0x1b, 0x45,
+    0x1c, 0x45, 0x1d, 0x45, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x75, 0x00, 0x63, 0x00, 0x4a,
+    0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x13, 0x00, 0x23, 0x00, 0x30, 0x00,
+    0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52, 0x00, 0x57, 0x00, 0x5b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x75, 0x00,
+    0x63, 0x00, 0x4a, 0x00, 0x30, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x13,
+    0x00, 0x23, 0x00, 0x30, 0x00, 0x3b, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x52,
+    0x00, 0x57, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7c, 0x00, 0x73, 0x02, 0x6c, 0x03, 0x66, 0x05,
+    0x63, 0x07, 0x5e, 0x09, 0x5c, 0x0b, 0x58, 0x0c, 0x57, 0x0e, 0x55, 0x10,
+    0x53, 0x11, 0x52, 0x13, 0x50, 0x14, 0x4f, 0x15, 0x4e, 0x17, 0x4c, 0x18,
+    0x4c, 0x19, 0x4c, 0x1a, 0x4b, 0x1a, 0x4b, 0x1c, 0x00, 0x77, 0x00, 0x6e,
+    0x02, 0x66, 0x04, 0x61, 0x05, 0x5c, 0x07, 0x59, 0x09, 0x56, 0x0b, 0x53,
+    0x0d, 0x51, 0x0f, 0x4f, 0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x14, 0x4a,
+    0x15, 0x48, 0x17, 0x48, 0x18, 0x47, 0x19, 0x46, 0x1b, 0x46, 0x1b, 0x45,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x28,
+    0x00, 0x13, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x35, 0x00,
+    0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x56, 0x00,
+    0x3f, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0x2b, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x4c, 0x00, 0x51,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7c, 0x00, 0x74, 0x02, 0x6e, 0x03, 0x68, 0x05, 0x64, 0x06, 0x60, 0x08,
+    0x5d, 0x0a, 0x5a, 0x0b, 0x58, 0x0d, 0x56, 0x0e, 0x55, 0x10, 0x53, 0x11,
+    0x52, 0x13, 0x50, 0x14, 0x50, 0x15, 0x4d, 0x16, 0x4e, 0x18, 0x4c, 0x18,
+    0x4c, 0x19, 0x4c, 0x1a, 0x00, 0x77, 0x00, 0x6f, 0x02, 0x68, 0x03, 0x63,
+    0x05, 0x5e, 0x06, 0x5a, 0x08, 0x57, 0x0a, 0x55, 0x0b, 0x53, 0x0d, 0x50,
+    0x0f, 0x4f, 0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x14, 0x4a, 0x15, 0x49,
+    0x16, 0x48, 0x18, 0x48, 0x18, 0x46, 0x19, 0x46, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x79,
+    0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37, 0x00, 0x23, 0x00, 0x10,
+    0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x30, 0x00, 0x39, 0x00,
+    0x40, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7d, 0x00, 0x79, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4b, 0x00, 0x37, 0x00,
+    0x23, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x27,
+    0x00, 0x30, 0x00, 0x39, 0x00, 0x40, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x75, 0x01,
+    0x6f, 0x02, 0x69, 0x04, 0x65, 0x06, 0x62, 0x07, 0x5f, 0x09, 0x5b, 0x0b,
+    0x5a, 0x0c, 0x58, 0x0d, 0x56, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13,
+    0x50, 0x13, 0x4f, 0x15, 0x4e, 0x15, 0x4e, 0x17, 0x4d, 0x18, 0x4c, 0x18,
+    0x00, 0x78, 0x00, 0x70, 0x01, 0x69, 0x03, 0x64, 0x04, 0x60, 0x06, 0x5c,
+    0x07, 0x59, 0x09, 0x56, 0x0b, 0x54, 0x0c, 0x52, 0x0d, 0x50, 0x0f, 0x4f,
+    0x10, 0x4e, 0x11, 0x4c, 0x13, 0x4b, 0x13, 0x4a, 0x15, 0x4a, 0x15, 0x48,
+    0x17, 0x48, 0x18, 0x47, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x64,
+    0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0e, 0x00, 0x00,
+    0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c, 0x00, 0x34, 0x00, 0x3b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x7a, 0x00,
+    0x72, 0x00, 0x64, 0x00, 0x54, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0e, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2c,
+    0x00, 0x34, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x76, 0x01, 0x70, 0x02, 0x6a, 0x03,
+    0x67, 0x05, 0x63, 0x06, 0x60, 0x08, 0x5d, 0x09, 0x5b, 0x0b, 0x59, 0x0c,
+    0x57, 0x0d, 0x55, 0x0e, 0x55, 0x10, 0x53, 0x11, 0x52, 0x13, 0x4f, 0x13,
+    0x50, 0x15, 0x4f, 0x15, 0x4e, 0x16, 0x4e, 0x18, 0x00, 0x78, 0x00, 0x71,
+    0x01, 0x6a, 0x03, 0x66, 0x04, 0x61, 0x05, 0x5d, 0x06, 0x5a, 0x08, 0x58,
+    0x09, 0x55, 0x0b, 0x53, 0x0d, 0x52, 0x0e, 0x50, 0x0f, 0x4e, 0x10, 0x4e,
+    0x11, 0x4c, 0x13, 0x4c, 0x13, 0x4a, 0x15, 0x4a, 0x15, 0x49, 0x16, 0x48,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5b, 0x00, 0x4b,
+    0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x0c, 0x00,
+    0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x69, 0x00,
+    0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2b, 0x00, 0x1b, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x20, 0x00, 0x29, 0x00, 0x30,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7d, 0x00, 0x76, 0x01, 0x71, 0x02, 0x6c, 0x03, 0x68, 0x05, 0x64, 0x06,
+    0x61, 0x07, 0x5e, 0x09, 0x5c, 0x0a, 0x5a, 0x0b, 0x59, 0x0c, 0x57, 0x0e,
+    0x55, 0x0e, 0x55, 0x11, 0x52, 0x11, 0x51, 0x12, 0x51, 0x13, 0x50, 0x14,
+    0x4f, 0x15, 0x4e, 0x15, 0x00, 0x79, 0x00, 0x71, 0x01, 0x6c, 0x02, 0x66,
+    0x04, 0x62, 0x05, 0x5f, 0x06, 0x5c, 0x07, 0x59, 0x09, 0x57, 0x0a, 0x55,
+    0x0b, 0x53, 0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c,
+    0x13, 0x4c, 0x13, 0x4b, 0x14, 0x4a, 0x15, 0x4a, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c,
+    0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53, 0x00, 0x44, 0x00, 0x35,
+    0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x15, 0x00,
+    0x1e, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x53, 0x00,
+    0x44, 0x00, 0x35, 0x00, 0x27, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x77, 0x01,
+    0x72, 0x02, 0x6d, 0x03, 0x69, 0x04, 0x66, 0x06, 0x63, 0x07, 0x5f, 0x08,
+    0x5e, 0x09, 0x5c, 0x0b, 0x5a, 0x0c, 0x58, 0x0c, 0x57, 0x0e, 0x55, 0x0f,
+    0x54, 0x11, 0x51, 0x11, 0x52, 0x12, 0x51, 0x13, 0x50, 0x14, 0x50, 0x15,
+    0x00, 0x79, 0x00, 0x72, 0x01, 0x6d, 0x02, 0x68, 0x03, 0x63, 0x04, 0x60,
+    0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58, 0x09, 0x56, 0x0b, 0x54, 0x0c, 0x53,
+    0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c, 0x12, 0x4c,
+    0x13, 0x4b, 0x14, 0x4a, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c, 0x00, 0x77, 0x00, 0x6f,
+    0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e, 0x00, 0x30, 0x00, 0x23,
+    0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x1b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7c, 0x00,
+    0x77, 0x00, 0x6f, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x3e, 0x00,
+    0x30, 0x00, 0x23, 0x00, 0x16, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0a,
+    0x00, 0x13, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7d, 0x00, 0x78, 0x01, 0x72, 0x02, 0x6e, 0x02,
+    0x6a, 0x03, 0x67, 0x05, 0x64, 0x06, 0x60, 0x07, 0x5f, 0x09, 0x5c, 0x0a,
+    0x5b, 0x0b, 0x5a, 0x0c, 0x57, 0x0c, 0x56, 0x0e, 0x55, 0x0f, 0x53, 0x11,
+    0x52, 0x11, 0x52, 0x12, 0x51, 0x13, 0x50, 0x13, 0x00, 0x79, 0x00, 0x73,
+    0x01, 0x6d, 0x02, 0x69, 0x03, 0x65, 0x04, 0x61, 0x05, 0x5e, 0x06, 0x5c,
+    0x07, 0x59, 0x09, 0x57, 0x0a, 0x55, 0x0b, 0x54, 0x0d, 0x53, 0x0d, 0x51,
+    0x0f, 0x50, 0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4c, 0x12, 0x4c, 0x13, 0x4b,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5e,
+    0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x15,
+    0x00, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x71, 0x00,
+    0x68, 0x00, 0x5e, 0x00, 0x52, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00,
+    0x20, 0x00, 0x15, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x7e, 0x00, 0x78, 0x01, 0x73, 0x02, 0x6e, 0x02, 0x6b, 0x03, 0x68, 0x05,
+    0x65, 0x06, 0x62, 0x07, 0x5f, 0x07, 0x5e, 0x09, 0x5c, 0x0b, 0x5a, 0x0b,
+    0x59, 0x0c, 0x57, 0x0d, 0x56, 0x0e, 0x54, 0x0f, 0x54, 0x11, 0x52, 0x11,
+    0x52, 0x12, 0x51, 0x13, 0x00, 0x79, 0x00, 0x73, 0x01, 0x6e, 0x02, 0x69,
+    0x03, 0x66, 0x04, 0x62, 0x05, 0x5f, 0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58,
+    0x09, 0x56, 0x0b, 0x55, 0x0b, 0x53, 0x0d, 0x52, 0x0d, 0x50, 0x0f, 0x50,
+    0x0f, 0x4e, 0x11, 0x4e, 0x11, 0x4d, 0x12, 0x4c, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d,
+    0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62, 0x00, 0x57, 0x00, 0x4c,
+    0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x09,
+    0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7e, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x73, 0x00, 0x6b, 0x00, 0x62, 0x00,
+    0x57, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1e, 0x00,
+    0x13, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x7e, 0x00, 0x78, 0x00,
+    0x74, 0x01, 0x6f, 0x02, 0x6c, 0x03, 0x68, 0x04, 0x65, 0x05, 0x62, 0x06,
+    0x61, 0x07, 0x5f, 0x09, 0x5c, 0x09, 0x5b, 0x0b, 0x5a, 0x0b, 0x58, 0x0c,
+    0x57, 0x0d, 0x55, 0x0e, 0x55, 0x0f, 0x54, 0x11, 0x52, 0x11, 0x52, 0x12,
+    0x00, 0x79, 0x00, 0x74, 0x00, 0x6f, 0x02, 0x6a, 0x03, 0x66, 0x04, 0x63,
+    0x05, 0x60, 0x05, 0x5e, 0x06, 0x5b, 0x07, 0x59, 0x09, 0x58, 0x09, 0x55,
+    0x0b, 0x55, 0x0c, 0x53, 0x0d, 0x52, 0x0d, 0x50, 0x0f, 0x50, 0x0f, 0x4e,
+    0x11, 0x4e, 0x11, 0x4d, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x75,
+    0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00, 0x46, 0x00, 0x3b,
+    0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7d, 0x00,
+    0x7a, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00,
+    0x46, 0x00, 0x3b, 0x00, 0x30, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x12, 0x00,
+    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x7e, 0x00, 0x79, 0x00, 0x74, 0x01, 0x70, 0x02,
+    0x6c, 0x03, 0x69, 0x03, 0x66, 0x05, 0x63, 0x06, 0x62, 0x07, 0x5f, 0x07,
+    0x5e, 0x09, 0x5c, 0x0a, 0x5a, 0x0b, 0x5a, 0x0c, 0x57, 0x0c, 0x56, 0x0e,
+    0x55, 0x0e, 0x55, 0x0f, 0x54, 0x11, 0x52, 0x11, 0x00, 0x79, 0x00, 0x74,
+    0x00, 0x70, 0x01, 0x6b, 0x02, 0x67, 0x03, 0x64, 0x04, 0x61, 0x05, 0x5f,
+    0x06, 0x5d, 0x07, 0x5b, 0x08, 0x58, 0x09, 0x57, 0x0a, 0x55, 0x0b, 0x54,
+    0x0c, 0x53, 0x0d, 0x51, 0x0e, 0x50, 0x0f, 0x50, 0x0f, 0x4e, 0x11, 0x4e,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x66, 0x7f, 0x4d, 0x68, 0x49, 0x5c, 0x47, 0x55, 0x45, 0x51, 0x45, 0x4e,
+    0x44, 0x4c, 0x43, 0x4a, 0x43, 0x49, 0x43, 0x48, 0x43, 0x47, 0x42, 0x47,
+    0x42, 0x46, 0x42, 0x46, 0x42, 0x45, 0x42, 0x45, 0x42, 0x45, 0x42, 0x44,
+    0x42, 0x44, 0x42, 0x44, 0x57, 0x7f, 0x2e, 0x58, 0x34, 0x4d, 0x37, 0x49,
+    0x39, 0x47, 0x3a, 0x45, 0x3b, 0x44, 0x3b, 0x44, 0x3c, 0x43, 0x3c, 0x43,
+    0x3c, 0x43, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x41,
+    0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x99, 0x7f, 0x4d, 0x58,
+    0x49, 0x4d, 0x47, 0x49, 0x45, 0x47, 0x45, 0x45, 0x44, 0x44, 0x43, 0x44,
+    0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
+    0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x05,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xa5, 0x16, 0x74, 0x23,
+    0x62, 0x29, 0x59, 0x2d, 0x53, 0x30, 0x50, 0x32, 0x4e, 0x34, 0x4c, 0x35,
+    0x4a, 0x36, 0x49, 0x37, 0x48, 0x38, 0x48, 0x38, 0x47, 0x39, 0x46, 0x39,
+    0x46, 0x39, 0x46, 0x3a, 0x45, 0x3a, 0x45, 0x3a, 0x45, 0x3a, 0x44, 0x3b,
+    0x23, 0x2f, 0x25, 0x35, 0x2a, 0x37, 0x2e, 0x39, 0x31, 0x3a, 0x33, 0x3b,
+    0x34, 0x3b, 0x35, 0x3c, 0x37, 0x3c, 0x37, 0x3c, 0x38, 0x3d, 0x38, 0x3d,
+    0x39, 0x3d, 0x39, 0x3d, 0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d,
+    0x3b, 0x3d, 0x3b, 0x3d, 0x77, 0x27, 0x5f, 0x31, 0x56, 0x35, 0x52, 0x38,
+    0x4f, 0x39, 0x4c, 0x3a, 0x4b, 0x3b, 0x49, 0x3b, 0x48, 0x3c, 0x48, 0x3c,
+    0x47, 0x3c, 0x47, 0x3c, 0x46, 0x3d, 0x46, 0x3d, 0x45, 0x3d, 0x45, 0x3d,
+    0x45, 0x3d, 0x44, 0x3d, 0x44, 0x3d, 0x44, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x1f, 0x00, 0x01, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x5f, 0x00,
+    0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xbb, 0x01, 0x91, 0x09, 0x78, 0x11, 0x6b, 0x17,
+    0x62, 0x1c, 0x5c, 0x20, 0x58, 0x23, 0x55, 0x25, 0x52, 0x28, 0x51, 0x2a,
+    0x4f, 0x2b, 0x4e, 0x2c, 0x4d, 0x2e, 0x4c, 0x2f, 0x4b, 0x30, 0x4a, 0x31,
+    0x49, 0x31, 0x49, 0x32, 0x48, 0x33, 0x47, 0x33, 0x22, 0x25, 0x23, 0x2a,
+    0x26, 0x2e, 0x2a, 0x31, 0x2c, 0x33, 0x2e, 0x34, 0x30, 0x36, 0x31, 0x37,
+    0x32, 0x37, 0x33, 0x38, 0x34, 0x38, 0x35, 0x39, 0x36, 0x39, 0x36, 0x3a,
+    0x37, 0x3a, 0x37, 0x3a, 0x38, 0x3a, 0x38, 0x3b, 0x39, 0x3b, 0x39, 0x3b,
+    0x7a, 0x1a, 0x68, 0x24, 0x5f, 0x2a, 0x5a, 0x2e, 0x55, 0x31, 0x53, 0x33,
+    0x51, 0x34, 0x4f, 0x35, 0x4d, 0x36, 0x4c, 0x37, 0x4b, 0x38, 0x4b, 0x38,
+    0x4a, 0x39, 0x49, 0x39, 0x49, 0x39, 0x48, 0x3a, 0x47, 0x3a, 0x47, 0x3a,
+    0x46, 0x3b, 0x46, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x39, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x8b, 0x00, 0x44, 0x00, 0x02, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xc6, 0x00, 0xa3, 0x02, 0x8a, 0x07, 0x7a, 0x0c, 0x6f, 0x11, 0x68, 0x15,
+    0x62, 0x18, 0x5e, 0x1b, 0x5b, 0x1d, 0x58, 0x20, 0x56, 0x22, 0x54, 0x23,
+    0x53, 0x25, 0x51, 0x26, 0x50, 0x28, 0x4e, 0x29, 0x4d, 0x2a, 0x4d, 0x2b,
+    0x4d, 0x2c, 0x4c, 0x2c, 0x22, 0x23, 0x22, 0x27, 0x25, 0x2a, 0x27, 0x2c,
+    0x2a, 0x2e, 0x2b, 0x30, 0x2d, 0x32, 0x2e, 0x33, 0x30, 0x34, 0x31, 0x34,
+    0x32, 0x35, 0x33, 0x36, 0x33, 0x36, 0x34, 0x37, 0x34, 0x37, 0x35, 0x38,
+    0x36, 0x38, 0x36, 0x39, 0x36, 0x39, 0x36, 0x39, 0x7b, 0x16, 0x6d, 0x1f,
+    0x65, 0x24, 0x5f, 0x28, 0x5b, 0x2b, 0x58, 0x2d, 0x55, 0x2f, 0x54, 0x31,
+    0x52, 0x32, 0x50, 0x33, 0x4f, 0x34, 0x4e, 0x35, 0x4d, 0x35, 0x4c, 0x36,
+    0x4b, 0x36, 0x4a, 0x37, 0x4a, 0x38, 0x4a, 0x38, 0x4a, 0x39, 0x49, 0x39,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x35,
+    0x00, 0x24, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xb3, 0x00, 0x9f, 0x00, 0x6d, 0x00, 0x33, 0x00, 0x01, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xcc, 0x00, 0xaf, 0x00,
+    0x98, 0x03, 0x87, 0x06, 0x7b, 0x0a, 0x73, 0x0e, 0x6c, 0x11, 0x67, 0x13,
+    0x63, 0x16, 0x5f, 0x18, 0x5c, 0x1a, 0x5a, 0x1c, 0x58, 0x1e, 0x56, 0x20,
+    0x55, 0x21, 0x54, 0x22, 0x52, 0x24, 0x51, 0x25, 0x50, 0x26, 0x4f, 0x27,
+    0x22, 0x22, 0x22, 0x25, 0x24, 0x27, 0x26, 0x2a, 0x28, 0x2b, 0x29, 0x2d,
+    0x2b, 0x2f, 0x2c, 0x30, 0x2d, 0x31, 0x2f, 0x32, 0x30, 0x33, 0x30, 0x33,
+    0x31, 0x34, 0x32, 0x35, 0x33, 0x35, 0x33, 0x36, 0x33, 0x36, 0x34, 0x36,
+    0x35, 0x36, 0x35, 0x37, 0x7c, 0x15, 0x71, 0x1b, 0x68, 0x20, 0x63, 0x24,
+    0x5f, 0x27, 0x5c, 0x29, 0x59, 0x2c, 0x57, 0x2d, 0x55, 0x2f, 0x54, 0x30,
+    0x53, 0x31, 0x51, 0x32, 0x50, 0x32, 0x4f, 0x33, 0x4f, 0x34, 0x4e, 0x35,
+    0x4d, 0x35, 0x4c, 0x35, 0x4b, 0x35, 0x4a, 0x36, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x2c, 0x00, 0x1d,
+    0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0xaa, 0x00,
+    0x85, 0x00, 0x57, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xcf, 0x00, 0xb7, 0x00, 0xa2, 0x00, 0x92, 0x03,
+    0x85, 0x06, 0x7c, 0x09, 0x75, 0x0b, 0x6f, 0x0e, 0x6a, 0x11, 0x66, 0x13,
+    0x63, 0x15, 0x5f, 0x17, 0x5e, 0x19, 0x5c, 0x1a, 0x5a, 0x1c, 0x57, 0x1d,
+    0x56, 0x1f, 0x55, 0x1f, 0x55, 0x21, 0x54, 0x22, 0x22, 0x22, 0x22, 0x24,
+    0x23, 0x26, 0x25, 0x28, 0x26, 0x29, 0x28, 0x2b, 0x29, 0x2c, 0x2b, 0x2d,
+    0x2c, 0x2f, 0x2d, 0x30, 0x2d, 0x30, 0x2f, 0x31, 0x30, 0x32, 0x30, 0x33,
+    0x30, 0x33, 0x32, 0x33, 0x32, 0x34, 0x33, 0x35, 0x33, 0x36, 0x33, 0x36,
+    0x7c, 0x14, 0x73, 0x19, 0x6c, 0x1e, 0x67, 0x22, 0x63, 0x24, 0x5f, 0x26,
+    0x5c, 0x28, 0x5a, 0x2a, 0x58, 0x2c, 0x57, 0x2d, 0x55, 0x2e, 0x53, 0x2f,
+    0x53, 0x30, 0x52, 0x31, 0x51, 0x31, 0x4f, 0x32, 0x4f, 0x33, 0x4f, 0x33,
+    0x4f, 0x34, 0x4e, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3e, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xba, 0x00, 0xb0, 0x00, 0x95, 0x00, 0x70, 0x00,
+    0x48, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xd2, 0x00, 0xbd, 0x00, 0xaa, 0x00, 0x9b, 0x01, 0x8e, 0x03, 0x84, 0x05,
+    0x7c, 0x08, 0x76, 0x0a, 0x71, 0x0c, 0x6c, 0x0f, 0x69, 0x11, 0x66, 0x12,
+    0x63, 0x14, 0x60, 0x16, 0x5e, 0x17, 0x5d, 0x19, 0x5b, 0x1a, 0x59, 0x1b,
+    0x57, 0x1c, 0x56, 0x1e, 0x22, 0x22, 0x22, 0x23, 0x23, 0x25, 0x24, 0x27,
+    0x25, 0x28, 0x27, 0x29, 0x28, 0x2b, 0x29, 0x2c, 0x2b, 0x2d, 0x2b, 0x2d,
+    0x2d, 0x2f, 0x2d, 0x30, 0x2d, 0x30, 0x2f, 0x30, 0x30, 0x32, 0x30, 0x33,
+    0x30, 0x33, 0x31, 0x33, 0x32, 0x33, 0x33, 0x33, 0x7d, 0x13, 0x75, 0x18,
+    0x6e, 0x1c, 0x69, 0x1f, 0x65, 0x22, 0x62, 0x24, 0x60, 0x26, 0x5c, 0x28,
+    0x5b, 0x29, 0x59, 0x2a, 0x57, 0x2c, 0x57, 0x2d, 0x55, 0x2e, 0x53, 0x2e,
+    0x53, 0x2f, 0x53, 0x31, 0x51, 0x31, 0x50, 0x31, 0x4f, 0x31, 0x4f, 0x32,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c,
+    0x00, 0x35, 0x00, 0x2b, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbb, 0x00, 0xb3, 0x00, 0x9f, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x3d, 0x00,
+    0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xd3, 0x00, 0xc2, 0x00,
+    0xb1, 0x00, 0xa2, 0x00, 0x96, 0x02, 0x8c, 0x03, 0x83, 0x05, 0x7d, 0x07,
+    0x77, 0x09, 0x73, 0x0b, 0x6f, 0x0d, 0x6a, 0x0f, 0x68, 0x11, 0x66, 0x12,
+    0x63, 0x14, 0x60, 0x15, 0x5f, 0x16, 0x5e, 0x18, 0x5c, 0x19, 0x5a, 0x1a,
+    0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x24, 0x25, 0x25, 0x27, 0x26, 0x29,
+    0x27, 0x29, 0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2d, 0x2b, 0x2d, 0x2c, 0x2e,
+    0x2d, 0x2f, 0x2d, 0x30, 0x2e, 0x30, 0x2f, 0x30, 0x30, 0x31, 0x30, 0x32,
+    0x30, 0x33, 0x30, 0x33, 0x7d, 0x13, 0x76, 0x17, 0x70, 0x1b, 0x6b, 0x1e,
+    0x68, 0x20, 0x65, 0x22, 0x61, 0x24, 0x60, 0x26, 0x5d, 0x27, 0x5c, 0x29,
+    0x5a, 0x2a, 0x58, 0x2b, 0x57, 0x2c, 0x57, 0x2d, 0x55, 0x2e, 0x53, 0x2e,
+    0x53, 0x2f, 0x53, 0x30, 0x53, 0x31, 0x51, 0x31, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x37, 0x00, 0x2f,
+    0x00, 0x25, 0x00, 0x1b, 0x00, 0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb6, 0x00,
+    0xa6, 0x00, 0x8e, 0x00, 0x71, 0x00, 0x52, 0x00, 0x35, 0x00, 0x19, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xd4, 0x00, 0xc5, 0x00, 0xb6, 0x00, 0xa8, 0x00,
+    0x9c, 0x00, 0x92, 0x02, 0x8a, 0x03, 0x82, 0x05, 0x7d, 0x07, 0x78, 0x09,
+    0x74, 0x0a, 0x71, 0x0c, 0x6c, 0x0e, 0x69, 0x0f, 0x68, 0x11, 0x65, 0x12,
+    0x63, 0x13, 0x60, 0x14, 0x5f, 0x16, 0x5e, 0x17, 0x21, 0x22, 0x22, 0x23,
+    0x22, 0x24, 0x23, 0x25, 0x24, 0x26, 0x25, 0x27, 0x27, 0x28, 0x27, 0x29,
+    0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2c, 0x2b, 0x2d, 0x2b, 0x2d, 0x2d, 0x2e,
+    0x2d, 0x2f, 0x2d, 0x30, 0x2e, 0x30, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x31,
+    0x7d, 0x12, 0x77, 0x16, 0x71, 0x19, 0x6d, 0x1c, 0x69, 0x1f, 0x66, 0x20,
+    0x64, 0x23, 0x61, 0x24, 0x60, 0x26, 0x5d, 0x27, 0x5c, 0x28, 0x5b, 0x2a,
+    0x58, 0x2a, 0x57, 0x2b, 0x57, 0x2c, 0x56, 0x2e, 0x54, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3e, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x21,
+    0x00, 0x18, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x97, 0x00,
+    0x7e, 0x00, 0x64, 0x00, 0x48, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xd5, 0x00, 0xc7, 0x00, 0xba, 0x00, 0xad, 0x00, 0xa2, 0x00, 0x98, 0x01,
+    0x8f, 0x02, 0x88, 0x03, 0x82, 0x05, 0x7e, 0x07, 0x78, 0x08, 0x74, 0x0a,
+    0x72, 0x0b, 0x6e, 0x0c, 0x6b, 0x0e, 0x69, 0x0f, 0x67, 0x11, 0x65, 0x12,
+    0x63, 0x13, 0x60, 0x14, 0x21, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24,
+    0x24, 0x25, 0x25, 0x27, 0x26, 0x27, 0x27, 0x28, 0x27, 0x29, 0x28, 0x2b,
+    0x29, 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2a, 0x2d, 0x2c, 0x2d, 0x2d, 0x2e,
+    0x2d, 0x2f, 0x2d, 0x30, 0x2e, 0x30, 0x2f, 0x30, 0x7d, 0x12, 0x77, 0x15,
+    0x72, 0x18, 0x6e, 0x1b, 0x6b, 0x1d, 0x68, 0x20, 0x65, 0x21, 0x64, 0x23,
+    0x60, 0x24, 0x60, 0x26, 0x5d, 0x27, 0x5c, 0x27, 0x5c, 0x29, 0x59, 0x2a,
+    0x57, 0x2a, 0x57, 0x2b, 0x57, 0x2c, 0x56, 0x2e, 0x54, 0x2e, 0x53, 0x2e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d,
+    0x00, 0x3a, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x25, 0x00, 0x1d, 0x00, 0x15,
+    0x00, 0x0d, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x89, 0x00, 0x71, 0x00,
+    0x59, 0x00, 0x41, 0x00, 0x29, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xd6, 0x00, 0xc9, 0x00,
+    0xbd, 0x00, 0xb2, 0x00, 0xa7, 0x00, 0x9d, 0x00, 0x95, 0x01, 0x8e, 0x02,
+    0x87, 0x03, 0x82, 0x05, 0x7e, 0x06, 0x79, 0x08, 0x75, 0x09, 0x73, 0x0b,
+    0x70, 0x0c, 0x6c, 0x0d, 0x6a, 0x0e, 0x68, 0x0f, 0x67, 0x11, 0x65, 0x12,
+    0x21, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x24, 0x25, 0x24, 0x26,
+    0x25, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x28, 0x2b,
+    0x2a, 0x2b, 0x2b, 0x2c, 0x2a, 0x2d, 0x2b, 0x2d, 0x2d, 0x2d, 0x2d, 0x2e,
+    0x2d, 0x2f, 0x2d, 0x30, 0x7d, 0x12, 0x78, 0x15, 0x73, 0x18, 0x70, 0x1a,
+    0x6d, 0x1d, 0x69, 0x1e, 0x67, 0x20, 0x65, 0x21, 0x63, 0x23, 0x60, 0x24,
+    0x60, 0x26, 0x5d, 0x27, 0x5c, 0x27, 0x5c, 0x28, 0x5a, 0x2a, 0x58, 0x2a,
+    0x57, 0x2a, 0x57, 0x2b, 0x57, 0x2c, 0x56, 0x2e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x36,
+    0x00, 0x30, 0x00, 0x29, 0x00, 0x22, 0x00, 0x1a, 0x00, 0x13, 0x00, 0x0c,
+    0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xba, 0x00,
+    0xb1, 0x00, 0xa3, 0x00, 0x91, 0x00, 0x7c, 0x00, 0x66, 0x00, 0x50, 0x00,
+    0x3a, 0x00, 0x25, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xd7, 0x00, 0xcb, 0x00, 0xc0, 0x00, 0xb5, 0x00,
+    0xab, 0x00, 0xa2, 0x00, 0x9a, 0x00, 0x92, 0x02, 0x8d, 0x02, 0x87, 0x03,
+    0x81, 0x05, 0x7e, 0x06, 0x79, 0x07, 0x76, 0x09, 0x74, 0x0a, 0x71, 0x0b,
+    0x6e, 0x0c, 0x6b, 0x0d, 0x6a, 0x0e, 0x68, 0x10, 0x21, 0x22, 0x22, 0x22,
+    0x22, 0x23, 0x23, 0x24, 0x23, 0x25, 0x24, 0x25, 0x25, 0x27, 0x25, 0x27,
+    0x27, 0x28, 0x27, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x28, 0x2b, 0x2a, 0x2b,
+    0x2b, 0x2c, 0x2b, 0x2d, 0x2b, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2e,
+    0x7e, 0x12, 0x79, 0x15, 0x75, 0x17, 0x71, 0x1a, 0x6d, 0x1b, 0x6a, 0x1d,
+    0x69, 0x1f, 0x65, 0x20, 0x65, 0x22, 0x62, 0x23, 0x60, 0x23, 0x60, 0x25,
+    0x5d, 0x27, 0x5c, 0x27, 0x5c, 0x28, 0x5c, 0x29, 0x59, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2c,
+    0x00, 0x26, 0x00, 0x1f, 0x00, 0x18, 0x00, 0x11, 0x00, 0x0b, 0x00, 0x05,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb3, 0x00, 0xa7, 0x00,
+    0x98, 0x00, 0x85, 0x00, 0x72, 0x00, 0x5d, 0x00, 0x49, 0x00, 0x35, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xd7, 0x00, 0xcc, 0x00, 0xc2, 0x00, 0xb9, 0x00, 0xae, 0x00, 0xa6, 0x00,
+    0x9e, 0x00, 0x97, 0x01, 0x90, 0x02, 0x8b, 0x02, 0x85, 0x04, 0x81, 0x05,
+    0x7e, 0x06, 0x7a, 0x07, 0x76, 0x08, 0x74, 0x09, 0x72, 0x0b, 0x6f, 0x0c,
+    0x6c, 0x0c, 0x6a, 0x0e, 0x21, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24,
+    0x23, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x27, 0x26, 0x27, 0x27, 0x28,
+    0x26, 0x28, 0x28, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x2a, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x2d, 0x2b, 0x2d, 0x2c, 0x2d, 0x2d, 0x2d, 0x7e, 0x12, 0x79, 0x15,
+    0x75, 0x17, 0x72, 0x19, 0x6e, 0x1a, 0x6c, 0x1d, 0x69, 0x1d, 0x68, 0x20,
+    0x65, 0x20, 0x65, 0x22, 0x61, 0x23, 0x60, 0x23, 0x60, 0x25, 0x5e, 0x27,
+    0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x29, 0x5a, 0x2a, 0x58, 0x2a, 0x57, 0x2a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e,
+    0x00, 0x3c, 0x00, 0x38, 0x00, 0x34, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x22,
+    0x00, 0x1c, 0x00, 0x16, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xaa, 0x00, 0x9d, 0x00, 0x8d, 0x00,
+    0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xd8, 0x00, 0xce, 0x00,
+    0xc5, 0x00, 0xbb, 0x00, 0xb2, 0x00, 0xaa, 0x00, 0xa1, 0x00, 0x9b, 0x00,
+    0x94, 0x01, 0x8f, 0x02, 0x8a, 0x03, 0x84, 0x04, 0x81, 0x05, 0x7e, 0x06,
+    0x7b, 0x07, 0x77, 0x08, 0x75, 0x09, 0x73, 0x0a, 0x71, 0x0b, 0x6e, 0x0c,
+    0x21, 0x22, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x24, 0x24, 0x25,
+    0x24, 0x25, 0x25, 0x26, 0x25, 0x27, 0x27, 0x27, 0x27, 0x28, 0x27, 0x28,
+    0x28, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x2a, 0x2b, 0x2b, 0x2b, 0x2b, 0x2c,
+    0x2b, 0x2d, 0x2b, 0x2d, 0x7e, 0x12, 0x7a, 0x14, 0x76, 0x16, 0x72, 0x18,
+    0x6f, 0x1a, 0x6d, 0x1b, 0x6a, 0x1d, 0x69, 0x1e, 0x66, 0x20, 0x65, 0x20,
+    0x64, 0x23, 0x61, 0x23, 0x60, 0x23, 0x60, 0x25, 0x5e, 0x27, 0x5c, 0x27,
+    0x5c, 0x27, 0x5c, 0x28, 0x5b, 0x2a, 0x59, 0x2a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x39,
+    0x00, 0x35, 0x00, 0x31, 0x00, 0x2b, 0x00, 0x26, 0x00, 0x20, 0x00, 0x1a,
+    0x00, 0x14, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00,
+    0xb6, 0x00, 0xad, 0x00, 0xa1, 0x00, 0x93, 0x00, 0x83, 0x00, 0x72, 0x00,
+    0x60, 0x00, 0x4f, 0x00, 0x3d, 0x00, 0x2d, 0x00, 0x1d, 0x00, 0x0e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xd8, 0x00, 0xcf, 0x00, 0xc6, 0x00, 0xbd, 0x00,
+    0xb5, 0x00, 0xad, 0x00, 0xa6, 0x00, 0x9e, 0x00, 0x99, 0x00, 0x92, 0x01,
+    0x8e, 0x02, 0x89, 0x03, 0x84, 0x04, 0x81, 0x05, 0x7e, 0x06, 0x7b, 0x07,
+    0x77, 0x07, 0x75, 0x09, 0x73, 0x09, 0x72, 0x0b, 0x21, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25,
+    0x25, 0x27, 0x25, 0x27, 0x27, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x28,
+    0x28, 0x2a, 0x28, 0x2b, 0x2a, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2d,
+    0x7e, 0x12, 0x7a, 0x14, 0x76, 0x15, 0x72, 0x18, 0x71, 0x1a, 0x6d, 0x1a,
+    0x6c, 0x1d, 0x69, 0x1d, 0x68, 0x1f, 0x65, 0x20, 0x65, 0x21, 0x64, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x25, 0x5e, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0x5c, 0x27, 0x5c, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x37, 0x00, 0x32,
+    0x00, 0x2d, 0x00, 0x28, 0x00, 0x23, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x13,
+    0x00, 0x0d, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf, 0x00,
+    0xa5, 0x00, 0x98, 0x00, 0x89, 0x00, 0x7a, 0x00, 0x6a, 0x00, 0x59, 0x00,
+    0x49, 0x00, 0x39, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xd8, 0x00, 0xd0, 0x00, 0xc7, 0x00, 0xbf, 0x00, 0xb8, 0x00, 0xaf, 0x00,
+    0xa9, 0x00, 0xa1, 0x00, 0x9c, 0x00, 0x96, 0x01, 0x90, 0x02, 0x8d, 0x02,
+    0x88, 0x03, 0x84, 0x04, 0x81, 0x05, 0x7f, 0x06, 0x7b, 0x07, 0x77, 0x07,
+    0x76, 0x09, 0x74, 0x09, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23,
+    0x23, 0x24, 0x23, 0x24, 0x24, 0x25, 0x24, 0x25, 0x25, 0x26, 0x25, 0x27,
+    0x26, 0x27, 0x27, 0x27, 0x26, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2a,
+    0x28, 0x2b, 0x2a, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x7e, 0x11, 0x7a, 0x13,
+    0x76, 0x15, 0x74, 0x18, 0x72, 0x19, 0x6e, 0x1a, 0x6d, 0x1c, 0x69, 0x1d,
+    0x69, 0x1e, 0x67, 0x20, 0x65, 0x20, 0x65, 0x21, 0x63, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x25, 0x5e, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0x00, 0x0f, 0x00, 0x1f, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3c, 0x00, 0x3d,
+    0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f,
+    0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x58, 0x00, 0x3d,
+    0x00, 0x4c, 0x00, 0x4c, 0x00, 0x48, 0x00, 0x42, 0x00, 0x3e, 0x00, 0x3e,
+    0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f,
+    0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x0b, 0x07, 0x17, 0x00, 0x2c, 0x00, 0x36, 0x00, 0x3a, 0x00, 0x3c,
+    0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+    0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x47, 0x07, 0x0f, 0x0f,
+    0x00, 0x26, 0x00, 0x33, 0x00, 0x38, 0x00, 0x3a, 0x00, 0x3c, 0x00, 0x3d,
+    0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3f,
+    0x00, 0x3f, 0x00, 0x3f, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xd9, 0x00, 0xd1, 0x00,
+    0xc9, 0x00, 0xc1, 0x00, 0xba, 0x00, 0xb2, 0x00, 0xac, 0x00, 0xa5, 0x00,
+    0x9e, 0x00, 0x9a, 0x00, 0x93, 0x01, 0x8f, 0x02, 0x8c, 0x02, 0x88, 0x03,
+    0x83, 0x04, 0x81, 0x05, 0x7f, 0x06, 0x7b, 0x06, 0x78, 0x07, 0x76, 0x08,
+    0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x24,
+    0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x27, 0x25, 0x27, 0x27, 0x27,
+    0x27, 0x28, 0x27, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2a, 0x28, 0x2b,
+    0x2a, 0x2b, 0x2b, 0x2b, 0x7e, 0x11, 0x7b, 0x13, 0x77, 0x15, 0x75, 0x17,
+    0x72, 0x18, 0x6f, 0x1a, 0x6d, 0x1a, 0x6c, 0x1d, 0x69, 0x1d, 0x69, 0x1f,
+    0x65, 0x20, 0x65, 0x20, 0x65, 0x22, 0x62, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x25, 0x5f, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x00, 0x00, 0x00, 0x05,
+    0x00, 0x1f, 0x00, 0x2e, 0x00, 0x35, 0x00, 0x38, 0x00, 0x3a, 0x00, 0x3c,
+    0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+    0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3d, 0x00, 0x30, 0x00, 0x39, 0x00, 0x42,
+    0x00, 0x41, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d,
+    0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x27, 0x02,
+    0x02, 0x12, 0x00, 0x25, 0x00, 0x2f, 0x00, 0x35, 0x00, 0x38, 0x00, 0x3a,
+    0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e,
+    0x00, 0x3e, 0x00, 0x3e, 0x7f, 0x00, 0x3f, 0x00, 0x05, 0x05, 0x00, 0x1c,
+    0x00, 0x2a, 0x00, 0x31, 0x00, 0x35, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3b,
+    0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xd9, 0x00, 0xd2, 0x00, 0xca, 0x00, 0xc3, 0x00,
+    0xbb, 0x00, 0xb5, 0x00, 0xae, 0x00, 0xa8, 0x00, 0xa1, 0x00, 0x9d, 0x00,
+    0x98, 0x00, 0x92, 0x01, 0x8e, 0x02, 0x8b, 0x02, 0x87, 0x03, 0x83, 0x04,
+    0x81, 0x05, 0x7f, 0x06, 0x7c, 0x06, 0x78, 0x07, 0x21, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x25,
+    0x24, 0x25, 0x25, 0x25, 0x25, 0x27, 0x26, 0x27, 0x27, 0x27, 0x27, 0x28,
+    0x27, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x29, 0x2b,
+    0x7e, 0x11, 0x7b, 0x13, 0x77, 0x15, 0x76, 0x17, 0x72, 0x18, 0x71, 0x1a,
+    0x6d, 0x1a, 0x6d, 0x1c, 0x69, 0x1d, 0x69, 0x1d, 0x68, 0x20, 0x65, 0x20,
+    0x65, 0x20, 0x65, 0x22, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x25,
+    0x5f, 0x27, 0x5c, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x16,
+    0x00, 0x24, 0x00, 0x2c, 0x00, 0x31, 0x00, 0x35, 0x00, 0x37, 0x00, 0x39,
+    0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d,
+    0x00, 0x4c, 0x00, 0x39, 0x00, 0x16, 0x00, 0x28, 0x00, 0x2f, 0x00, 0x2e,
+    0x00, 0x31, 0x00, 0x35, 0x00, 0x37, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b,
+    0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9f, 0x00, 0x6f, 0x00, 0x22, 0x00, 0x09, 0x0b,
+    0x00, 0x16, 0x00, 0x23, 0x00, 0x2a, 0x00, 0x2f, 0x00, 0x33, 0x00, 0x35,
+    0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c,
+    0xa5, 0x00, 0x7f, 0x00, 0x3f, 0x00, 0x12, 0x00, 0x00, 0x09, 0x00, 0x19,
+    0x00, 0x23, 0x00, 0x2a, 0x00, 0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36,
+    0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3a, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xd9, 0x00, 0xd2, 0x00, 0xca, 0x00, 0xc5, 0x00, 0xbd, 0x00, 0xb7, 0x00,
+    0xb0, 0x00, 0xab, 0x00, 0xa4, 0x00, 0x9f, 0x00, 0x9b, 0x00, 0x95, 0x01,
+    0x91, 0x01, 0x8e, 0x02, 0x8a, 0x02, 0x86, 0x03, 0x83, 0x04, 0x81, 0x05,
+    0x7f, 0x06, 0x7c, 0x06, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23,
+    0x22, 0x23, 0x23, 0x24, 0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25,
+    0x25, 0x26, 0x25, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x28, 0x27, 0x28,
+    0x28, 0x28, 0x28, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x7f, 0x11, 0x7b, 0x13,
+    0x77, 0x15, 0x76, 0x16, 0x72, 0x18, 0x72, 0x19, 0x6d, 0x1a, 0x6d, 0x1b,
+    0x6b, 0x1d, 0x69, 0x1d, 0x69, 0x1e, 0x66, 0x20, 0x65, 0x20, 0x65, 0x20,
+    0x64, 0x22, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x24, 0x5f, 0x26,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x1d,
+    0x00, 0x25, 0x00, 0x2b, 0x00, 0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36,
+    0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x4c, 0x00, 0x42,
+    0x00, 0x28, 0x00, 0x09, 0x00, 0x16, 0x00, 0x1d, 0x00, 0x25, 0x00, 0x2b,
+    0x00, 0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38,
+    0x00, 0x39, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xaf, 0x00, 0x93, 0x00, 0x58, 0x00, 0x21, 0x00, 0x0e, 0x08, 0x02, 0x0e,
+    0x00, 0x18, 0x00, 0x20, 0x00, 0x27, 0x00, 0x2b, 0x00, 0x2f, 0x00, 0x31,
+    0x00, 0x33, 0x00, 0x35, 0x00, 0x36, 0x00, 0x38, 0xb2, 0x00, 0x9c, 0x00,
+    0x6d, 0x00, 0x3f, 0x00, 0x1d, 0x00, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x16,
+    0x00, 0x1f, 0x00, 0x25, 0x00, 0x29, 0x00, 0x2d, 0x00, 0x30, 0x00, 0x32,
+    0x00, 0x33, 0x00, 0x35, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xda, 0x00, 0xd2, 0x00,
+    0xcb, 0x00, 0xc6, 0x00, 0xbe, 0x00, 0xb9, 0x00, 0xb2, 0x00, 0xac, 0x00,
+    0xa8, 0x00, 0xa1, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x93, 0x01, 0x90, 0x02,
+    0x8d, 0x02, 0x89, 0x02, 0x85, 0x03, 0x83, 0x04, 0x81, 0x05, 0x7f, 0x06,
+    0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23,
+    0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x24, 0x25, 0x25, 0x25, 0x25, 0x27,
+    0x25, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x29, 0x27, 0x28, 0x28, 0x28,
+    0x28, 0x28, 0x28, 0x29, 0x7f, 0x11, 0x7b, 0x13, 0x78, 0x15, 0x76, 0x15,
+    0x73, 0x18, 0x72, 0x18, 0x6f, 0x1a, 0x6d, 0x1a, 0x6d, 0x1c, 0x69, 0x1d,
+    0x69, 0x1d, 0x69, 0x1f, 0x65, 0x20, 0x65, 0x20, 0x65, 0x21, 0x64, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x24, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x1f,
+    0x00, 0x25, 0x00, 0x2a, 0x00, 0x2d, 0x00, 0x30, 0x00, 0x32, 0x00, 0x34,
+    0x00, 0x35, 0x00, 0x37, 0x00, 0x48, 0x00, 0x41, 0x00, 0x2f, 0x00, 0x16,
+    0x00, 0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x2a,
+    0x00, 0x2d, 0x00, 0x30, 0x00, 0x32, 0x00, 0x34, 0x00, 0x35, 0x00, 0x37,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x00, 0xa4, 0x00,
+    0x7a, 0x00, 0x4a, 0x00, 0x20, 0x00, 0x12, 0x06, 0x07, 0x0c, 0x00, 0x10,
+    0x00, 0x18, 0x00, 0x1f, 0x00, 0x24, 0x00, 0x28, 0x00, 0x2c, 0x00, 0x2e,
+    0x00, 0x30, 0x00, 0x32, 0xb7, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x62, 0x00,
+    0x3f, 0x00, 0x24, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x14,
+    0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00, 0x2b, 0x00, 0x2e,
+    0x33, 0x22, 0x28, 0x22, 0x25, 0x22, 0x24, 0x22, 0x23, 0x22, 0x23, 0x22,
+    0x22, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x21,
+    0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x22, 0x22, 0x21, 0x22, 0x21,
+    0x22, 0x21, 0x22, 0x21, 0x9d, 0x05, 0x6b, 0x0d, 0x51, 0x12, 0x45, 0x15,
+    0x3d, 0x17, 0x38, 0x18, 0x35, 0x1a, 0x32, 0x1b, 0x30, 0x1b, 0x2f, 0x1c,
+    0x2d, 0x1c, 0x2d, 0x1c, 0x2c, 0x1d, 0x2b, 0x1d, 0x2a, 0x1e, 0x2a, 0x1e,
+    0x29, 0x1e, 0x29, 0x1e, 0x28, 0x1e, 0x28, 0x1e, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x5f, 0x13, 0x46, 0x17, 0x39, 0x1a, 0x33, 0x1b, 0x2f, 0x1c, 0x2d, 0x1d,
+    0x2b, 0x1e, 0x2a, 0x1e, 0x29, 0x1e, 0x28, 0x1f, 0x27, 0x1f, 0x27, 0x1f,
+    0x27, 0x1f, 0x26, 0x1f, 0x26, 0x20, 0x26, 0x20, 0x25, 0x20, 0x25, 0x20,
+    0x25, 0x20, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21,
+    0x00, 0x25, 0x00, 0x29, 0x00, 0x2c, 0x00, 0x2f, 0x00, 0x31, 0x00, 0x32,
+    0x00, 0x42, 0x00, 0x3d, 0x00, 0x2e, 0x00, 0x1d, 0x00, 0x0d, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29,
+    0x00, 0x2c, 0x00, 0x2f, 0x00, 0x31, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0xad, 0x00, 0x8f, 0x00, 0x68, 0x00,
+    0x42, 0x00, 0x20, 0x00, 0x14, 0x05, 0x0b, 0x0a, 0x04, 0x0d, 0x00, 0x12,
+    0x00, 0x19, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x26, 0x00, 0x29, 0x00, 0x2c,
+    0xba, 0x00, 0xb1, 0x00, 0x99, 0x00, 0x7a, 0x00, 0x5b, 0x00, 0x3f, 0x00,
+    0x29, 0x00, 0x16, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x13,
+    0x00, 0x19, 0x00, 0x1e, 0x00, 0x22, 0x00, 0x25, 0x37, 0x28, 0x2d, 0x25,
+    0x28, 0x23, 0x26, 0x23, 0x25, 0x23, 0x24, 0x22, 0x24, 0x22, 0x23, 0x22,
+    0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0xbc, 0x00, 0x8e, 0x01, 0x73, 0x04, 0x60, 0x08, 0x55, 0x0b, 0x4c, 0x0d,
+    0x47, 0x0f, 0x42, 0x11, 0x3e, 0x12, 0x3b, 0x13, 0x39, 0x14, 0x37, 0x15,
+    0x36, 0x16, 0x34, 0x16, 0x33, 0x17, 0x32, 0x18, 0x31, 0x18, 0x30, 0x19,
+    0x2f, 0x19, 0x2f, 0x19, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x6f, 0x11, 0x58, 0x11,
+    0x4a, 0x13, 0x41, 0x15, 0x3b, 0x16, 0x37, 0x17, 0x34, 0x18, 0x32, 0x19,
+    0x30, 0x1a, 0x2e, 0x1a, 0x2d, 0x1b, 0x2c, 0x1b, 0x2c, 0x1c, 0x2b, 0x1c,
+    0x2a, 0x1c, 0x2a, 0x1d, 0x29, 0x1d, 0x29, 0x1d, 0x28, 0x1d, 0x28, 0x1d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x09, 0x00, 0x11, 0x00, 0x18, 0x00, 0x1d, 0x00, 0x22,
+    0x00, 0x26, 0x00, 0x29, 0x00, 0x2b, 0x00, 0x2d, 0x00, 0x3e, 0x00, 0x3a,
+    0x00, 0x31, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x09,
+    0x00, 0x11, 0x00, 0x18, 0x00, 0x1d, 0x00, 0x22, 0x00, 0x26, 0x00, 0x29,
+    0x00, 0x2b, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xba, 0x00, 0xb2, 0x00, 0x9c, 0x00, 0x7d, 0x00, 0x5c, 0x00, 0x3c, 0x00,
+    0x20, 0x00, 0x16, 0x04, 0x0e, 0x08, 0x07, 0x0c, 0x02, 0x0e, 0x00, 0x13,
+    0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0xbb, 0x00, 0xb5, 0x00,
+    0xa3, 0x00, 0x8a, 0x00, 0x6f, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x2c, 0x00,
+    0x1c, 0x00, 0x0f, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x12,
+    0x00, 0x17, 0x00, 0x1c, 0x38, 0x2c, 0x30, 0x28, 0x2b, 0x26, 0x29, 0x25,
+    0x27, 0x24, 0x26, 0x24, 0x25, 0x23, 0x24, 0x23, 0x24, 0x23, 0x24, 0x22,
+    0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0xc6, 0x00, 0xa4, 0x00,
+    0x89, 0x00, 0x77, 0x02, 0x67, 0x04, 0x5e, 0x06, 0x55, 0x08, 0x50, 0x0a,
+    0x4b, 0x0c, 0x47, 0x0d, 0x44, 0x0e, 0x41, 0x0f, 0x3e, 0x10, 0x3d, 0x11,
+    0x3b, 0x12, 0x39, 0x12, 0x38, 0x13, 0x37, 0x14, 0x35, 0x15, 0x35, 0x16,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x74, 0x11, 0x63, 0x11, 0x55, 0x11, 0x4c, 0x12,
+    0x44, 0x13, 0x40, 0x14, 0x3b, 0x15, 0x39, 0x16, 0x36, 0x17, 0x34, 0x17,
+    0x33, 0x18, 0x31, 0x18, 0x30, 0x19, 0x2f, 0x19, 0x2e, 0x1a, 0x2d, 0x1a,
+    0x2d, 0x1a, 0x2c, 0x1b, 0x2b, 0x1b, 0x2b, 0x1c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x08, 0x00, 0x0f, 0x00, 0x15, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x22,
+    0x00, 0x26, 0x00, 0x28, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x2b,
+    0x00, 0x1f, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f,
+    0x00, 0x15, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x22, 0x00, 0x26, 0x00, 0x28,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb5, 0x00,
+    0xa4, 0x00, 0x8b, 0x00, 0x6f, 0x00, 0x52, 0x00, 0x37, 0x00, 0x20, 0x00,
+    0x17, 0x04, 0x10, 0x07, 0x0a, 0x0a, 0x05, 0x0d, 0x00, 0x0f, 0x00, 0x14,
+    0x00, 0x19, 0x00, 0x1d, 0xbc, 0x00, 0xb7, 0x00, 0xaa, 0x00, 0x96, 0x00,
+    0x7f, 0x00, 0x68, 0x00, 0x53, 0x00, 0x3f, 0x00, 0x2e, 0x00, 0x20, 0x00,
+    0x14, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x11,
+    0x3a, 0x2f, 0x32, 0x2b, 0x2e, 0x28, 0x2b, 0x27, 0x28, 0x25, 0x27, 0x25,
+    0x27, 0x24, 0x25, 0x24, 0x25, 0x24, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23,
+    0x24, 0x23, 0x23, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22,
+    0x23, 0x22, 0x23, 0x22, 0xcd, 0x00, 0xb0, 0x00, 0x9a, 0x00, 0x87, 0x00,
+    0x78, 0x01, 0x6c, 0x03, 0x64, 0x04, 0x5c, 0x05, 0x57, 0x07, 0x51, 0x09,
+    0x4e, 0x0a, 0x4a, 0x0b, 0x48, 0x0c, 0x45, 0x0c, 0x43, 0x0e, 0x40, 0x0f,
+    0x3f, 0x0f, 0x3d, 0x0f, 0x3c, 0x11, 0x3b, 0x12, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x77, 0x11, 0x69, 0x11, 0x5e, 0x11, 0x54, 0x11, 0x4d, 0x11, 0x47, 0x12,
+    0x43, 0x13, 0x3f, 0x13, 0x3c, 0x14, 0x39, 0x15, 0x38, 0x16, 0x36, 0x16,
+    0x35, 0x17, 0x33, 0x17, 0x32, 0x18, 0x31, 0x18, 0x30, 0x18, 0x2f, 0x18,
+    0x2f, 0x19, 0x2e, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+    0x00, 0x0d, 0x00, 0x13, 0x00, 0x18, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x23,
+    0x00, 0x3e, 0x00, 0x3c, 0x00, 0x37, 0x00, 0x2f, 0x00, 0x25, 0x00, 0x1b,
+    0x00, 0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x13,
+    0x00, 0x18, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xaa, 0x00, 0x96, 0x00,
+    0x7e, 0x00, 0x64, 0x00, 0x4c, 0x00, 0x34, 0x00, 0x20, 0x00, 0x18, 0x03,
+    0x11, 0x06, 0x0c, 0x09, 0x07, 0x0c, 0x03, 0x0e, 0x00, 0x10, 0x00, 0x15,
+    0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8b, 0x00, 0x77, 0x00,
+    0x63, 0x00, 0x50, 0x00, 0x3f, 0x00, 0x30, 0x00, 0x23, 0x00, 0x18, 0x00,
+    0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3b, 0x32, 0x34, 0x2d,
+    0x2f, 0x2a, 0x2c, 0x28, 0x2a, 0x27, 0x29, 0x26, 0x27, 0x25, 0x27, 0x25,
+    0x26, 0x24, 0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0x24, 0x23, 0x24, 0x23,
+    0x24, 0x23, 0x24, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x22,
+    0xcf, 0x00, 0xb9, 0x00, 0xa4, 0x00, 0x94, 0x00, 0x85, 0x00, 0x7a, 0x01,
+    0x70, 0x02, 0x68, 0x03, 0x61, 0x04, 0x5c, 0x05, 0x57, 0x07, 0x53, 0x07,
+    0x50, 0x09, 0x4c, 0x0a, 0x4a, 0x0a, 0x48, 0x0c, 0x45, 0x0c, 0x44, 0x0c,
+    0x42, 0x0d, 0x41, 0x0f, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x78, 0x11, 0x6d, 0x11,
+    0x63, 0x11, 0x5b, 0x11, 0x53, 0x11, 0x4e, 0x11, 0x49, 0x12, 0x45, 0x12,
+    0x41, 0x13, 0x3f, 0x13, 0x3c, 0x14, 0x3a, 0x14, 0x39, 0x15, 0x37, 0x16,
+    0x36, 0x16, 0x35, 0x17, 0x33, 0x17, 0x33, 0x17, 0x32, 0x17, 0x31, 0x18,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c,
+    0x00, 0x11, 0x00, 0x16, 0x00, 0x1a, 0x00, 0x1d, 0x00, 0x3e, 0x00, 0x3d,
+    0x00, 0x39, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f,
+    0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x11, 0x00, 0x16,
+    0x00, 0x1a, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9d, 0x00, 0x89, 0x00, 0x73, 0x00,
+    0x5c, 0x00, 0x46, 0x00, 0x32, 0x00, 0x20, 0x00, 0x19, 0x03, 0x13, 0x06,
+    0x0e, 0x08, 0x09, 0x0b, 0x05, 0x0d, 0x01, 0x0e, 0xbd, 0x00, 0xba, 0x00,
+    0xb1, 0x00, 0xa4, 0x00, 0x94, 0x00, 0x82, 0x00, 0x70, 0x00, 0x5e, 0x00,
+    0x4e, 0x00, 0x3f, 0x00, 0x32, 0x00, 0x26, 0x00, 0x1c, 0x00, 0x13, 0x00,
+    0x0b, 0x00, 0x03, 0x00, 0x3c, 0x34, 0x35, 0x2f, 0x31, 0x2c, 0x2e, 0x2a,
+    0x2c, 0x28, 0x2a, 0x27, 0x28, 0x27, 0x28, 0x26, 0x27, 0x25, 0x27, 0x25,
+    0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0x24, 0x24, 0x24, 0x23,
+    0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x23, 0x23, 0xd2, 0x00, 0xbe, 0x00,
+    0xad, 0x00, 0x9d, 0x00, 0x90, 0x00, 0x84, 0x00, 0x7a, 0x00, 0x72, 0x01,
+    0x6b, 0x02, 0x65, 0x04, 0x60, 0x04, 0x5b, 0x05, 0x58, 0x06, 0x54, 0x07,
+    0x51, 0x07, 0x4f, 0x09, 0x4c, 0x0a, 0x4a, 0x0a, 0x48, 0x0b, 0x46, 0x0c,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x7a, 0x11, 0x70, 0x11, 0x67, 0x11, 0x5f, 0x11,
+    0x59, 0x11, 0x53, 0x11, 0x4e, 0x11, 0x4a, 0x11, 0x46, 0x12, 0x43, 0x13,
+    0x41, 0x13, 0x3e, 0x13, 0x3d, 0x14, 0x3b, 0x14, 0x39, 0x14, 0x38, 0x15,
+    0x37, 0x16, 0x36, 0x16, 0x35, 0x16, 0x34, 0x17, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x10,
+    0x00, 0x14, 0x00, 0x18, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x34,
+    0x00, 0x2d, 0x00, 0x25, 0x00, 0x1d, 0x00, 0x15, 0x00, 0x0d, 0x00, 0x06,
+    0x00, 0x00, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x10, 0x00, 0x14, 0x00, 0x18,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xba, 0x00,
+    0xb1, 0x00, 0xa3, 0x00, 0x92, 0x00, 0x7e, 0x00, 0x6a, 0x00, 0x56, 0x00,
+    0x42, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x19, 0x03, 0x14, 0x05, 0x0f, 0x08,
+    0x0b, 0x0a, 0x07, 0x0c, 0xbd, 0x00, 0xbb, 0x00, 0xb4, 0x00, 0xa9, 0x00,
+    0x9b, 0x00, 0x8b, 0x00, 0x7b, 0x00, 0x6b, 0x00, 0x5b, 0x00, 0x4d, 0x00,
+    0x3f, 0x00, 0x33, 0x00, 0x28, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x0e, 0x00,
+    0x3c, 0x35, 0x36, 0x31, 0x32, 0x2e, 0x2f, 0x2b, 0x2d, 0x2a, 0x2b, 0x28,
+    0x2a, 0x28, 0x28, 0x27, 0x28, 0x27, 0x27, 0x25, 0x27, 0x25, 0x26, 0x25,
+    0x25, 0x25, 0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0x24, 0x24, 0x24, 0x24,
+    0x24, 0x23, 0x24, 0x23, 0xd3, 0x00, 0xc2, 0x00, 0xb2, 0x00, 0xa4, 0x00,
+    0x98, 0x00, 0x8d, 0x00, 0x83, 0x00, 0x7b, 0x00, 0x73, 0x01, 0x6e, 0x02,
+    0x67, 0x02, 0x63, 0x04, 0x5f, 0x04, 0x5b, 0x05, 0x58, 0x05, 0x55, 0x07,
+    0x52, 0x07, 0x50, 0x07, 0x4e, 0x09, 0x4c, 0x0a, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x7a, 0x11, 0x72, 0x11, 0x6a, 0x11, 0x63, 0x11, 0x5d, 0x11, 0x57, 0x11,
+    0x52, 0x11, 0x4e, 0x11, 0x4a, 0x11, 0x48, 0x12, 0x44, 0x12, 0x42, 0x13,
+    0x40, 0x13, 0x3e, 0x13, 0x3d, 0x13, 0x3b, 0x14, 0x3a, 0x14, 0x39, 0x14,
+    0x38, 0x15, 0x37, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x13,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x36, 0x00, 0x30, 0x00, 0x29,
+    0x00, 0x22, 0x00, 0x1a, 0x00, 0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x00,
+    0x00, 0x05, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb3, 0x00, 0xa8, 0x00,
+    0x99, 0x00, 0x87, 0x00, 0x75, 0x00, 0x62, 0x00, 0x50, 0x00, 0x3f, 0x00,
+    0x2e, 0x00, 0x1f, 0x00, 0x1a, 0x02, 0x15, 0x05, 0x10, 0x07, 0x0c, 0x09,
+    0xbe, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xac, 0x00, 0xa0, 0x00, 0x93, 0x00,
+    0x84, 0x00, 0x75, 0x00, 0x66, 0x00, 0x58, 0x00, 0x4b, 0x00, 0x3f, 0x00,
+    0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x19, 0x00, 0x3c, 0x36, 0x37, 0x32,
+    0x33, 0x2f, 0x30, 0x2d, 0x2e, 0x2b, 0x2d, 0x2a, 0x2b, 0x28, 0x2a, 0x28,
+    0x28, 0x27, 0x28, 0x27, 0x27, 0x26, 0x27, 0x25, 0x27, 0x25, 0x26, 0x25,
+    0x25, 0x25, 0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0x24, 0x24, 0x24, 0x24,
+    0xd5, 0x00, 0xc5, 0x00, 0xb7, 0x00, 0xaa, 0x00, 0x9f, 0x00, 0x95, 0x00,
+    0x8b, 0x00, 0x83, 0x00, 0x7c, 0x00, 0x75, 0x01, 0x6f, 0x01, 0x69, 0x02,
+    0x66, 0x02, 0x61, 0x04, 0x5e, 0x04, 0x5a, 0x05, 0x58, 0x05, 0x55, 0x06,
+    0x53, 0x07, 0x51, 0x07, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x7b, 0x11, 0x73, 0x11,
+    0x6c, 0x11, 0x66, 0x11, 0x60, 0x11, 0x5b, 0x11, 0x56, 0x11, 0x52, 0x11,
+    0x4f, 0x11, 0x4b, 0x11, 0x48, 0x11, 0x45, 0x12, 0x44, 0x12, 0x41, 0x13,
+    0x40, 0x13, 0x3e, 0x13, 0x3d, 0x13, 0x3b, 0x14, 0x3a, 0x14, 0x39, 0x14,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x3f, 0x00, 0x3e,
+    0x00, 0x3b, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2c, 0x00, 0x26, 0x00, 0x1f,
+    0x00, 0x18, 0x00, 0x11, 0x00, 0x0b, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
+    0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xab, 0x00, 0x9e, 0x00, 0x8f, 0x00,
+    0x7e, 0x00, 0x6d, 0x00, 0x5c, 0x00, 0x4c, 0x00, 0x3c, 0x00, 0x2d, 0x00,
+    0x1f, 0x00, 0x1a, 0x02, 0x16, 0x04, 0x11, 0x06, 0xbe, 0x00, 0xbc, 0x00,
+    0xb7, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x99, 0x00, 0x8b, 0x00, 0x7e, 0x00,
+    0x70, 0x00, 0x63, 0x00, 0x56, 0x00, 0x4a, 0x00, 0x3f, 0x00, 0x35, 0x00,
+    0x2c, 0x00, 0x23, 0x00, 0x3c, 0x37, 0x38, 0x33, 0x34, 0x30, 0x31, 0x2e,
+    0x2f, 0x2c, 0x2d, 0x2a, 0x2c, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x27,
+    0x28, 0x27, 0x27, 0x27, 0x27, 0x26, 0x27, 0x25, 0x27, 0x25, 0x25, 0x25,
+    0x25, 0x25, 0x25, 0x24, 0x25, 0x24, 0x25, 0x24, 0xd5, 0x00, 0xc8, 0x00,
+    0xbb, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x9b, 0x00, 0x92, 0x00, 0x8a, 0x00,
+    0x82, 0x00, 0x7c, 0x00, 0x76, 0x00, 0x70, 0x01, 0x6c, 0x02, 0x67, 0x02,
+    0x64, 0x03, 0x60, 0x04, 0x5d, 0x04, 0x5b, 0x05, 0x58, 0x05, 0x55, 0x05,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x7b, 0x11, 0x75, 0x11, 0x6e, 0x11, 0x68, 0x11,
+    0x63, 0x11, 0x5e, 0x11, 0x5a, 0x11, 0x56, 0x11, 0x52, 0x11, 0x4f, 0x11,
+    0x4c, 0x11, 0x49, 0x11, 0x47, 0x12, 0x44, 0x12, 0x43, 0x12, 0x41, 0x13,
+    0x3f, 0x13, 0x3e, 0x13, 0x3d, 0x13, 0x3b, 0x13, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x04, 0x00, 0x09, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x38,
+    0x00, 0x34, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x22, 0x00, 0x1c, 0x00, 0x16,
+    0x00, 0x10, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x09,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00,
+    0xb7, 0x00, 0xae, 0x00, 0xa2, 0x00, 0x95, 0x00, 0x86, 0x00, 0x77, 0x00,
+    0x67, 0x00, 0x57, 0x00, 0x48, 0x00, 0x3a, 0x00, 0x2c, 0x00, 0x1f, 0x00,
+    0x1b, 0x02, 0x16, 0x04, 0xbe, 0x00, 0xbd, 0x00, 0xb8, 0x00, 0xb1, 0x00,
+    0xa8, 0x00, 0x9d, 0x00, 0x92, 0x00, 0x85, 0x00, 0x78, 0x00, 0x6c, 0x00,
+    0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x2d, 0x00,
+    0x3d, 0x38, 0x38, 0x34, 0x35, 0x31, 0x33, 0x2f, 0x30, 0x2d, 0x2e, 0x2c,
+    0x2d, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x27, 0x28, 0x27,
+    0x28, 0x27, 0x27, 0x27, 0x27, 0x25, 0x27, 0x25, 0x26, 0x25, 0x25, 0x25,
+    0x25, 0x25, 0x25, 0x24, 0xd6, 0x00, 0xca, 0x00, 0xbe, 0x00, 0xb3, 0x00,
+    0xaa, 0x00, 0xa0, 0x00, 0x98, 0x00, 0x90, 0x00, 0x88, 0x00, 0x82, 0x00,
+    0x7d, 0x00, 0x77, 0x00, 0x71, 0x01, 0x6d, 0x01, 0x69, 0x02, 0x66, 0x02,
+    0x63, 0x04, 0x60, 0x04, 0x5d, 0x04, 0x5b, 0x05, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x7c, 0x11, 0x76, 0x11, 0x70, 0x11, 0x6a, 0x11, 0x66, 0x11, 0x61, 0x11,
+    0x5d, 0x11, 0x59, 0x11, 0x55, 0x11, 0x52, 0x11, 0x4f, 0x11, 0x4c, 0x11,
+    0x49, 0x11, 0x47, 0x11, 0x45, 0x12, 0x44, 0x12, 0x42, 0x13, 0x41, 0x13,
+    0x3f, 0x13, 0x3e, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x39, 0x00, 0x35, 0x00, 0x31,
+    0x00, 0x2b, 0x00, 0x26, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x14, 0x00, 0x0f,
+    0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xb0, 0x00,
+    0xa6, 0x00, 0x9a, 0x00, 0x8d, 0x00, 0x7f, 0x00, 0x70, 0x00, 0x61, 0x00,
+    0x53, 0x00, 0x45, 0x00, 0x38, 0x00, 0x2b, 0x00, 0x1f, 0x00, 0x1b, 0x02,
+    0xbe, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb3, 0x00, 0xab, 0x00, 0xa1, 0x00,
+    0x97, 0x00, 0x8b, 0x00, 0x80, 0x00, 0x74, 0x00, 0x68, 0x00, 0x5d, 0x00,
+    0x53, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x3d, 0x38, 0x39, 0x35,
+    0x36, 0x32, 0x33, 0x30, 0x31, 0x2e, 0x30, 0x2d, 0x2d, 0x2b, 0x2d, 0x2b,
+    0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x26, 0x28, 0x27,
+    0x27, 0x27, 0x27, 0x26, 0x27, 0x25, 0x27, 0x25, 0x26, 0x25, 0x25, 0x25,
+    0xd6, 0x00, 0xcc, 0x00, 0xc0, 0x00, 0xb7, 0x00, 0xad, 0x00, 0xa5, 0x00,
+    0x9d, 0x00, 0x96, 0x00, 0x8f, 0x00, 0x88, 0x00, 0x81, 0x00, 0x7d, 0x00,
+    0x77, 0x00, 0x73, 0x01, 0x6f, 0x01, 0x6b, 0x02, 0x67, 0x02, 0x64, 0x02,
+    0x62, 0x04, 0x5f, 0x04, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x7c, 0x11, 0x77, 0x11,
+    0x71, 0x11, 0x6c, 0x11, 0x67, 0x11, 0x63, 0x11, 0x5f, 0x11, 0x5c, 0x11,
+    0x58, 0x11, 0x55, 0x11, 0x51, 0x11, 0x4f, 0x11, 0x4c, 0x11, 0x4a, 0x11,
+    0x48, 0x11, 0x46, 0x12, 0x44, 0x12, 0x43, 0x12, 0x42, 0x13, 0x40, 0x13,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e,
+    0x00, 0x3d, 0x00, 0x3a, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x28,
+    0x00, 0x23, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x09,
+    0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb2, 0x00, 0xa9, 0x00, 0x9e, 0x00,
+    0x92, 0x00, 0x85, 0x00, 0x78, 0x00, 0x6a, 0x00, 0x5c, 0x00, 0x4f, 0x00,
+    0x42, 0x00, 0x36, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0xbe, 0x00, 0xbd, 0x00,
+    0xba, 0x00, 0xb4, 0x00, 0xad, 0x00, 0xa5, 0x00, 0x9b, 0x00, 0x91, 0x00,
+    0x86, 0x00, 0x7b, 0x00, 0x70, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00,
+    0x48, 0x00, 0x3f, 0x00, 0x3d, 0x39, 0x39, 0x36, 0x36, 0x33, 0x33, 0x30,
+    0x32, 0x2f, 0x30, 0x2d, 0x2e, 0x2d, 0x2d, 0x2a, 0x2c, 0x2b, 0x2b, 0x29,
+    0x2b, 0x28, 0x29, 0x28, 0x28, 0x28, 0x28, 0x26, 0x28, 0x27, 0x27, 0x27,
+    0x27, 0x27, 0x27, 0x26, 0x27, 0x25, 0x27, 0x25, 0xd7, 0x00, 0xcc, 0x00,
+    0xc3, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa8, 0x00, 0xa0, 0x00, 0x99, 0x00,
+    0x93, 0x00, 0x8d, 0x00, 0x87, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x78, 0x00,
+    0x74, 0x00, 0x70, 0x01, 0x6c, 0x01, 0x69, 0x02, 0x66, 0x02, 0x63, 0x02,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x7c, 0x11, 0x77, 0x11, 0x72, 0x11, 0x6e, 0x11,
+    0x69, 0x11, 0x65, 0x11, 0x61, 0x11, 0x5d, 0x11, 0x5a, 0x11, 0x57, 0x11,
+    0x54, 0x11, 0x51, 0x11, 0x4f, 0x11, 0x4d, 0x11, 0x4b, 0x11, 0x49, 0x11,
+    0x47, 0x11, 0x45, 0x12, 0x44, 0x12, 0x42, 0x12, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x39, 0x39, 0x36, 0x36, 0x33, 0x34, 0x32, 0x33, 0x30, 0x30, 0x2e,
+    0x30, 0x2d, 0x2d, 0x2c, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x29, 0x2b, 0x28,
+    0x29, 0x28, 0x28, 0x28, 0x28, 0x27, 0x29, 0x27, 0x27, 0x27, 0x27, 0x27,
+    0x27, 0x27, 0x27, 0x25, 0xd7, 0x00, 0xce, 0x00, 0xc5, 0x00, 0xbc, 0x00,
+    0xb4, 0x00, 0xac, 0x00, 0xa5, 0x00, 0x9e, 0x00, 0x97, 0x00, 0x91, 0x00,
+    0x8c, 0x00, 0x87, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x75, 0x00,
+    0x71, 0x01, 0x6d, 0x01, 0x6b, 0x02, 0x68, 0x02, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x7c, 0x11, 0x78, 0x11, 0x73, 0x11, 0x6f, 0x11, 0x6b, 0x11, 0x67, 0x11,
+    0x63, 0x11, 0x60, 0x11, 0x5c, 0x11, 0x59, 0x11, 0x57, 0x11, 0x54, 0x11,
+    0x51, 0x11, 0x4f, 0x11, 0x4d, 0x11, 0x4b, 0x11, 0x49, 0x11, 0x47, 0x11,
+    0x46, 0x12, 0x45, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x39, 0x3a, 0x36,
+    0x37, 0x34, 0x35, 0x33, 0x33, 0x30, 0x31, 0x30, 0x30, 0x2d, 0x2e, 0x2d,
+    0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x29, 0x2b, 0x28, 0x29, 0x28,
+    0x28, 0x28, 0x28, 0x27, 0x28, 0x27, 0x28, 0x27, 0x27, 0x27, 0x27, 0x27,
+    0xd8, 0x00, 0xcf, 0x00, 0xc6, 0x00, 0xbe, 0x00, 0xb6, 0x00, 0xaf, 0x00,
+    0xa8, 0x00, 0xa1, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x90, 0x00, 0x8a, 0x00,
+    0x86, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x75, 0x00, 0x72, 0x01,
+    0x6f, 0x01, 0x6b, 0x01, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x7d, 0x11, 0x78, 0x11,
+    0x74, 0x11, 0x70, 0x11, 0x6c, 0x11, 0x68, 0x11, 0x65, 0x11, 0x61, 0x11,
+    0x5f, 0x11, 0x5c, 0x11, 0x59, 0x11, 0x56, 0x11, 0x54, 0x11, 0x51, 0x11,
+    0x4f, 0x11, 0x4d, 0x11, 0x4b, 0x11, 0x4a, 0x11, 0x48, 0x11, 0x46, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x3a, 0x3a, 0x37, 0x38, 0x35, 0x36, 0x33,
+    0x33, 0x31, 0x32, 0x30, 0x30, 0x2e, 0x30, 0x2d, 0x2d, 0x2d, 0x2d, 0x2b,
+    0x2c, 0x2b, 0x2b, 0x2b, 0x2b, 0x29, 0x2b, 0x28, 0x29, 0x28, 0x28, 0x28,
+    0x28, 0x27, 0x28, 0x26, 0x28, 0x27, 0x27, 0x27, 0xd8, 0x00, 0xd0, 0x00,
+    0xc8, 0x00, 0xc0, 0x00, 0xb9, 0x00, 0xb2, 0x00, 0xab, 0x00, 0xa5, 0x00,
+    0x9f, 0x00, 0x99, 0x00, 0x94, 0x00, 0x8f, 0x00, 0x8a, 0x00, 0x86, 0x00,
+    0x81, 0x00, 0x7d, 0x00, 0x79, 0x00, 0x76, 0x00, 0x73, 0x00, 0x70, 0x01,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x7d, 0x11, 0x79, 0x11, 0x75, 0x11, 0x71, 0x11,
+    0x6d, 0x11, 0x6a, 0x11, 0x66, 0x11, 0x63, 0x11, 0x60, 0x11, 0x5d, 0x11,
+    0x5b, 0x11, 0x58, 0x11, 0x56, 0x11, 0x54, 0x11, 0x51, 0x11, 0x4f, 0x11,
+    0x4d, 0x11, 0x4c, 0x11, 0x4a, 0x11, 0x49, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x3a, 0x3a, 0x37, 0x38, 0x36, 0x36, 0x33, 0x33, 0x32, 0x33, 0x30,
+    0x30, 0x30, 0x30, 0x2d, 0x2f, 0x2d, 0x2d, 0x2c, 0x2d, 0x2b, 0x2c, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x29, 0x2b, 0x28, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28,
+    0x28, 0x27, 0x29, 0x27, 0xd9, 0x00, 0xd1, 0x00, 0xc9, 0x00, 0xc2, 0x00,
+    0xbb, 0x00, 0xb4, 0x00, 0xae, 0x00, 0xa8, 0x00, 0xa2, 0x00, 0x9c, 0x00,
+    0x97, 0x00, 0x92, 0x00, 0x8e, 0x00, 0x89, 0x00, 0x85, 0x00, 0x81, 0x00,
+    0x7d, 0x00, 0x7a, 0x00, 0x76, 0x00, 0x73, 0x00, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x7d, 0x11, 0x79, 0x11, 0x75, 0x11, 0x72, 0x11, 0x6e, 0x11, 0x6b, 0x11,
+    0x68, 0x11, 0x65, 0x11, 0x62, 0x11, 0x5f, 0x11, 0x5c, 0x11, 0x5a, 0x11,
+    0x58, 0x11, 0x55, 0x11, 0x53, 0x11, 0x51, 0x11, 0x4f, 0x11, 0x4e, 0x11,
+    0x4c, 0x11, 0x4a, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x3a, 0x3b, 0x38,
+    0x39, 0x36, 0x36, 0x33, 0x34, 0x33, 0x33, 0x30, 0x32, 0x30, 0x30, 0x2e,
+    0x30, 0x2d, 0x2d, 0x2d, 0x2d, 0x2c, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x29, 0x2b, 0x28, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x27,
+    0xd9, 0x00, 0xd1, 0x00, 0xca, 0x00, 0xc3, 0x00, 0xbc, 0x00, 0xb6, 0x00,
+    0xb0, 0x00, 0xaa, 0x00, 0xa5, 0x00, 0xa0, 0x00, 0x9a, 0x00, 0x96, 0x00,
+    0x91, 0x00, 0x8d, 0x00, 0x89, 0x00, 0x84, 0x00, 0x81, 0x00, 0x7d, 0x00,
+    0x7a, 0x00, 0x77, 0x00, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x7d, 0x11, 0x79, 0x11,
+    0x76, 0x11, 0x72, 0x11, 0x6f, 0x11, 0x6c, 0x11, 0x69, 0x11, 0x66, 0x11,
+    0x63, 0x11, 0x61, 0x11, 0x5e, 0x11, 0x5c, 0x11, 0x59, 0x11, 0x57, 0x11,
+    0x55, 0x11, 0x53, 0x11, 0x51, 0x11, 0x4f, 0x11, 0x4e, 0x11, 0x4c, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x3a, 0x3b, 0x39, 0x39, 0x36, 0x36, 0x34,
+    0x35, 0x33, 0x33, 0x31, 0x33, 0x30, 0x30, 0x30, 0x30, 0x2d, 0x2f, 0x2d,
+    0x2d, 0x2d, 0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x29,
+    0x2b, 0x28, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0xd9, 0x00, 0xd2, 0x00,
+    0xcb, 0x00, 0xc4, 0x00, 0xbe, 0x00, 0xb8, 0x00, 0xb2, 0x00, 0xad, 0x00,
+    0xa8, 0x00, 0xa2, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x94, 0x00, 0x90, 0x00,
+    0x8b, 0x00, 0x88, 0x00, 0x84, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x7b, 0x00,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x7d, 0x11, 0x7a, 0x11, 0x76, 0x11, 0x73, 0x11,
+    0x70, 0x11, 0x6d, 0x11, 0x6a, 0x11, 0x67, 0x11, 0x65, 0x11, 0x62, 0x11,
+    0x5f, 0x11, 0x5d, 0x11, 0x5b, 0x11, 0x59, 0x11, 0x56, 0x11, 0x55, 0x11,
+    0x53, 0x11, 0x51, 0x11, 0x4f, 0x11, 0x4e, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x3b, 0x3b, 0x39, 0x3a, 0x36, 0x36, 0x35, 0x36, 0x33, 0x33, 0x32,
+    0x33, 0x30, 0x31, 0x30, 0x30, 0x2f, 0x30, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d,
+    0x2d, 0x2b, 0x2c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x28, 0x2b, 0x28,
+    0x28, 0x28, 0x28, 0x28, 0xd9, 0x00, 0xd3, 0x00, 0xcc, 0x00, 0xc6, 0x00,
+    0xc0, 0x00, 0xba, 0x00, 0xb4, 0x00, 0xaf, 0x00, 0xaa, 0x00, 0xa5, 0x00,
+    0xa0, 0x00, 0x9b, 0x00, 0x97, 0x00, 0x93, 0x00, 0x8f, 0x00, 0x8b, 0x00,
+    0x88, 0x00, 0x83, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x7d, 0x11, 0x7a, 0x11, 0x77, 0x11, 0x74, 0x11, 0x71, 0x11, 0x6e, 0x11,
+    0x6b, 0x11, 0x68, 0x11, 0x66, 0x11, 0x63, 0x11, 0x61, 0x11, 0x5e, 0x11,
+    0x5c, 0x11, 0x5a, 0x11, 0x58, 0x11, 0x56, 0x11, 0x55, 0x11, 0x52, 0x11,
+    0x51, 0x11, 0x4f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x3b, 0x3b, 0x39,
+    0x39, 0x36, 0x37, 0x36, 0x36, 0x33, 0x34, 0x33, 0x33, 0x31, 0x32, 0x30,
+    0x30, 0x30, 0x30, 0x2d, 0x2f, 0x2d, 0x2d, 0x2d, 0x2d, 0x2c, 0x2d, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28,
+    0xd9, 0x00, 0xd3, 0x00, 0xcd, 0x00, 0xc7, 0x00, 0xc1, 0x00, 0xbc, 0x00,
+    0xb7, 0x00, 0xb0, 0x00, 0xac, 0x00, 0xa7, 0x00, 0xa2, 0x00, 0x9e, 0x00,
+    0x9a, 0x00, 0x95, 0x00, 0x93, 0x00, 0x8e, 0x00, 0x8b, 0x00, 0x87, 0x00,
+    0x83, 0x00, 0x81, 0x00, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x7d, 0x11, 0x7a, 0x11,
+    0x77, 0x11, 0x74, 0x11, 0x71, 0x11, 0x6f, 0x11, 0x6c, 0x11, 0x69, 0x11,
+    0x67, 0x11, 0x64, 0x11, 0x62, 0x11, 0x60, 0x11, 0x5e, 0x11, 0x5b, 0x11,
+    0x5a, 0x11, 0x58, 0x11, 0x56, 0x11, 0x54, 0x11, 0x52, 0x11, 0x51, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0xb8, 0x00, 0xc5, 0x00, 0xcb, 0x00,
+    0xcf, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00,
+    0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd9, 0x00,
+    0xd9, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x44, 0x00, 0x9d, 0x00, 0xbc, 0x00, 0xc6, 0x00, 0xcd, 0x00, 0xcf, 0x00,
+    0xd2, 0x00, 0xd3, 0x00, 0xd5, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd6, 0x00,
+    0xd7, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xd9, 0x00,
+    0xd9, 0x00, 0xd9, 0x00, 0x90, 0x00, 0xbd, 0x00, 0xcc, 0x00, 0xd1, 0x00,
+    0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xd9, 0x00,
+    0xd9, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xda, 0x00, 0xda, 0x00, 0xda, 0x00,
+    0xdb, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x68, 0x01, 0x8b, 0x00, 0xa0, 0x00, 0xad, 0x00, 0xb6, 0x00, 0xbc, 0x00,
+    0xc1, 0x00, 0xc4, 0x00, 0xc7, 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcc, 0x00,
+    0xcd, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd2, 0x00,
+    0xd2, 0x00, 0xd3, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x25, 0x05, 0x6b, 0x00,
+    0x8e, 0x00, 0xa4, 0x00, 0xb0, 0x00, 0xb9, 0x00, 0xbe, 0x00, 0xc2, 0x00,
+    0xc5, 0x00, 0xc8, 0x00, 0xca, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xce, 0x00,
+    0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00,
+    0x81, 0x02, 0xa4, 0x00, 0xb5, 0x00, 0xc0, 0x00, 0xc6, 0x00, 0xcb, 0x00,
+    0xcd, 0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00,
+    0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd7, 0x00,
+    0xd7, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x09, 0x72, 0x02,
+    0x87, 0x00, 0x96, 0x00, 0xa0, 0x00, 0xa9, 0x00, 0xb0, 0x00, 0xb5, 0x00,
+    0xb9, 0x00, 0xbd, 0x00, 0xbf, 0x00, 0xc2, 0x00, 0xc4, 0x00, 0xc6, 0x00,
+    0xc7, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x23, 0x0d, 0x51, 0x01, 0x73, 0x00, 0x89, 0x00,
+    0x9a, 0x00, 0xa4, 0x00, 0xad, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbb, 0x00,
+    0xbe, 0x00, 0xc0, 0x00, 0xc3, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc8, 0x00,
+    0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0x80, 0x06, 0x97, 0x00,
+    0xa8, 0x00, 0xb3, 0x00, 0xbb, 0x00, 0xc0, 0x00, 0xc5, 0x00, 0xc7, 0x00,
+    0xca, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xd0, 0x00, 0xd1, 0x00,
+    0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd4, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x4f, 0x11, 0x65, 0x07, 0x76, 0x03, 0x84, 0x01,
+    0x8f, 0x00, 0x99, 0x00, 0xa1, 0x00, 0xa7, 0x00, 0xad, 0x00, 0xb1, 0x00,
+    0xb4, 0x00, 0xb8, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xc0, 0x00,
+    0xc2, 0x00, 0xc4, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x22, 0x12, 0x45, 0x04, 0x60, 0x00, 0x77, 0x00, 0x87, 0x00, 0x94, 0x00,
+    0x9d, 0x00, 0xa4, 0x00, 0xaa, 0x00, 0xaf, 0x00, 0xb3, 0x00, 0xb7, 0x00,
+    0xba, 0x00, 0xbc, 0x00, 0xbe, 0x00, 0xc0, 0x00, 0xc2, 0x00, 0xc3, 0x00,
+    0xc4, 0x00, 0xc6, 0x00, 0x7f, 0x09, 0x91, 0x02, 0x9e, 0x00, 0xaa, 0x00,
+    0xb2, 0x00, 0xb8, 0x00, 0xbd, 0x00, 0xc0, 0x00, 0xc3, 0x00, 0xc6, 0x00,
+    0xc8, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00,
+    0xcf, 0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x4b, 0x17, 0x5d, 0x0c, 0x6c, 0x06, 0x78, 0x03, 0x83, 0x01, 0x8c, 0x00,
+    0x94, 0x00, 0x9b, 0x00, 0xa1, 0x00, 0xa6, 0x00, 0xaa, 0x00, 0xae, 0x00,
+    0xb1, 0x00, 0xb4, 0x00, 0xb7, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbd, 0x00,
+    0xbe, 0x00, 0xbf, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x22, 0x15, 0x3d, 0x08,
+    0x55, 0x02, 0x67, 0x00, 0x78, 0x00, 0x85, 0x00, 0x90, 0x00, 0x98, 0x00,
+    0x9f, 0x00, 0xa5, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xb1, 0x00, 0xb4, 0x00,
+    0xb6, 0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbe, 0x00, 0xc0, 0x00,
+    0x7f, 0x0a, 0x8d, 0x04, 0x99, 0x01, 0xa2, 0x00, 0xaa, 0x00, 0xb1, 0x00,
+    0xb6, 0x00, 0xba, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc3, 0x00, 0xc5, 0x00,
+    0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcc, 0x00,
+    0xcd, 0x00, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x1c, 0x57, 0x11,
+    0x64, 0x0a, 0x70, 0x06, 0x79, 0x03, 0x82, 0x02, 0x8a, 0x00, 0x91, 0x00,
+    0x97, 0x00, 0x9c, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa9, 0x00, 0xad, 0x00,
+    0xaf, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb9, 0x00, 0xba, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x21, 0x17, 0x38, 0x0b, 0x4c, 0x04, 0x5e, 0x01,
+    0x6c, 0x00, 0x7a, 0x00, 0x84, 0x00, 0x8d, 0x00, 0x95, 0x00, 0x9b, 0x00,
+    0xa0, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xac, 0x00, 0xaf, 0x00, 0xb2, 0x00,
+    0xb4, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00, 0x7f, 0x0b, 0x8a, 0x05,
+    0x94, 0x02, 0x9d, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb0, 0x00, 0xb5, 0x00,
+    0xb9, 0x00, 0xbc, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc4, 0x00,
+    0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x47, 0x20, 0x54, 0x15, 0x5f, 0x0e, 0x69, 0x09,
+    0x72, 0x05, 0x7a, 0x03, 0x82, 0x02, 0x88, 0x01, 0x8f, 0x00, 0x94, 0x00,
+    0x99, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa4, 0x00, 0xa8, 0x00, 0xac, 0x00,
+    0xae, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x22, 0x18, 0x35, 0x0d, 0x47, 0x06, 0x55, 0x03, 0x64, 0x01, 0x70, 0x00,
+    0x7a, 0x00, 0x83, 0x00, 0x8b, 0x00, 0x92, 0x00, 0x98, 0x00, 0x9d, 0x00,
+    0xa0, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xab, 0x00, 0xae, 0x00, 0xb0, 0x00,
+    0xb2, 0x00, 0xb4, 0x00, 0x7f, 0x0c, 0x89, 0x06, 0x92, 0x03, 0x99, 0x01,
+    0xa0, 0x00, 0xa6, 0x00, 0xab, 0x00, 0xb0, 0x00, 0xb4, 0x00, 0xb7, 0x00,
+    0xba, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc4, 0x00,
+    0xc5, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x46, 0x23, 0x50, 0x18, 0x5b, 0x11, 0x64, 0x0b, 0x6c, 0x08, 0x74, 0x05,
+    0x7b, 0x03, 0x82, 0x02, 0x87, 0x01, 0x8c, 0x00, 0x91, 0x00, 0x95, 0x00,
+    0x9a, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa4, 0x00, 0xa7, 0x00, 0xab, 0x00,
+    0xac, 0x00, 0xaf, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1a, 0x32, 0x0f,
+    0x42, 0x08, 0x50, 0x04, 0x5c, 0x02, 0x68, 0x00, 0x72, 0x00, 0x7b, 0x00,
+    0x83, 0x00, 0x8a, 0x00, 0x90, 0x00, 0x96, 0x00, 0x99, 0x00, 0x9e, 0x00,
+    0xa1, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00,
+    0x7f, 0x0d, 0x88, 0x07, 0x8f, 0x04, 0x96, 0x02, 0x9c, 0x01, 0xa2, 0x00,
+    0xa7, 0x00, 0xac, 0x00, 0xb0, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xb9, 0x00,
+    0xbb, 0x00, 0xbd, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00,
+    0xc5, 0x00, 0xc6, 0x00, 0x2f, 0x00, 0x5f, 0x00, 0x99, 0x00, 0xac, 0x00,
+    0xb3, 0x00, 0xb7, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00,
+    0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00,
+    0x3b, 0x0b, 0x6f, 0x00, 0x9f, 0x00, 0xaf, 0x00, 0xb5, 0x00, 0xb9, 0x00,
+    0xba, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00,
+    0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x6d, 0x00, 0x8d, 0x00, 0x9b, 0x00,
+    0xa6, 0x00, 0xb2, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00,
+    0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00,
+    0x47, 0x07, 0x7f, 0x00, 0xa5, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xba, 0x00,
+    0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00,
+    0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0x45, 0x25, 0x4e, 0x1b,
+    0x57, 0x13, 0x60, 0x0e, 0x68, 0x0a, 0x6f, 0x07, 0x76, 0x05, 0x7b, 0x03,
+    0x82, 0x02, 0x86, 0x02, 0x8b, 0x01, 0x90, 0x00, 0x93, 0x00, 0x97, 0x00,
+    0x9b, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xa6, 0x00, 0xaa, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x22, 0x1b, 0x30, 0x11, 0x3e, 0x0a, 0x4b, 0x05,
+    0x57, 0x03, 0x61, 0x01, 0x6b, 0x00, 0x73, 0x00, 0x7c, 0x00, 0x82, 0x00,
+    0x88, 0x00, 0x8f, 0x00, 0x93, 0x00, 0x97, 0x00, 0x9c, 0x00, 0x9f, 0x00,
+    0xa2, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0x7f, 0x0d, 0x86, 0x08,
+    0x8d, 0x05, 0x94, 0x02, 0x9a, 0x01, 0x9f, 0x00, 0xa4, 0x00, 0xa8, 0x00,
+    0xac, 0x00, 0xaf, 0x00, 0xb2, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00,
+    0xbc, 0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00,
+    0x00, 0x00, 0x0f, 0x00, 0x5f, 0x00, 0x8b, 0x00, 0x9f, 0x00, 0xaa, 0x00,
+    0xb0, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00,
+    0xbb, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0x07, 0x17, 0x27, 0x02,
+    0x6f, 0x00, 0x93, 0x00, 0xa4, 0x00, 0xad, 0x00, 0xb2, 0x00, 0xb5, 0x00,
+    0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbb, 0x00, 0xbc, 0x00,
+    0xbc, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x6d, 0x00, 0x54, 0x00, 0x6b, 0x00, 0x87, 0x00, 0x98, 0x00, 0xa6, 0x00,
+    0xb0, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00,
+    0xbb, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0x0f, 0x0f, 0x3f, 0x00,
+    0x7f, 0x00, 0x9c, 0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb5, 0x00, 0xb7, 0x00,
+    0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd, 0x00,
+    0xbd, 0x00, 0xbd, 0x00, 0x45, 0x28, 0x4d, 0x1d, 0x55, 0x16, 0x5d, 0x11,
+    0x64, 0x0c, 0x6b, 0x09, 0x71, 0x07, 0x77, 0x05, 0x7b, 0x03, 0x81, 0x02,
+    0x85, 0x02, 0x8a, 0x01, 0x8e, 0x00, 0x92, 0x00, 0x95, 0x00, 0x98, 0x00,
+    0x9d, 0x00, 0x9f, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x21, 0x1b, 0x2f, 0x12, 0x3b, 0x0c, 0x47, 0x07, 0x51, 0x04, 0x5c, 0x02,
+    0x65, 0x01, 0x6e, 0x00, 0x75, 0x00, 0x7c, 0x00, 0x82, 0x00, 0x88, 0x00,
+    0x8d, 0x00, 0x91, 0x00, 0x96, 0x00, 0x99, 0x00, 0x9c, 0x00, 0xa0, 0x00,
+    0xa2, 0x00, 0xa5, 0x00, 0x7f, 0x0d, 0x86, 0x09, 0x8c, 0x06, 0x92, 0x03,
+    0x97, 0x02, 0x9c, 0x01, 0xa1, 0x00, 0xa5, 0x00, 0xa9, 0x00, 0xac, 0x00,
+    0xaf, 0x00, 0xb2, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xbb, 0x00,
+    0xbc, 0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x44, 0x00, 0x6d, 0x00, 0x85, 0x00, 0x95, 0x00, 0x9f, 0x00,
+    0xa6, 0x00, 0xab, 0x00, 0xae, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00,
+    0xb6, 0x00, 0xb7, 0x00, 0x00, 0x2c, 0x02, 0x12, 0x22, 0x00, 0x58, 0x00,
+    0x7a, 0x00, 0x8f, 0x00, 0x9c, 0x00, 0xa4, 0x00, 0xaa, 0x00, 0xae, 0x00,
+    0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x6b, 0x00,
+    0x28, 0x00, 0x52, 0x00, 0x70, 0x00, 0x85, 0x00, 0x95, 0x00, 0x9f, 0x00,
+    0xa6, 0x00, 0xab, 0x00, 0xae, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00,
+    0xb6, 0x00, 0xb7, 0x00, 0x00, 0x26, 0x05, 0x05, 0x3f, 0x00, 0x6d, 0x00,
+    0x88, 0x00, 0x99, 0x00, 0xa3, 0x00, 0xaa, 0x00, 0xae, 0x00, 0xb1, 0x00,
+    0xb4, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00,
+    0x44, 0x2a, 0x4b, 0x20, 0x53, 0x18, 0x5a, 0x13, 0x61, 0x0f, 0x67, 0x0b,
+    0x6d, 0x09, 0x73, 0x07, 0x77, 0x05, 0x7c, 0x03, 0x81, 0x02, 0x85, 0x02,
+    0x88, 0x01, 0x8d, 0x01, 0x90, 0x00, 0x93, 0x00, 0x96, 0x00, 0x9a, 0x00,
+    0x9d, 0x00, 0x9f, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x22, 0x1c, 0x2d, 0x13,
+    0x39, 0x0d, 0x44, 0x09, 0x4e, 0x05, 0x57, 0x04, 0x60, 0x02, 0x67, 0x01,
+    0x6f, 0x00, 0x76, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x87, 0x00, 0x8c, 0x00,
+    0x90, 0x00, 0x94, 0x00, 0x97, 0x00, 0x9a, 0x00, 0x9d, 0x00, 0xa0, 0x00,
+    0x7f, 0x0e, 0x85, 0x09, 0x8b, 0x06, 0x90, 0x04, 0x95, 0x02, 0x9a, 0x02,
+    0x9e, 0x01, 0xa2, 0x00, 0xa6, 0x00, 0xa9, 0x00, 0xad, 0x00, 0xaf, 0x00,
+    0xb2, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbb, 0x00,
+    0xbd, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+    0x33, 0x00, 0x57, 0x00, 0x70, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x97, 0x00,
+    0x9e, 0x00, 0xa3, 0x00, 0xa7, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00,
+    0x00, 0x36, 0x00, 0x25, 0x09, 0x0b, 0x21, 0x00, 0x4a, 0x00, 0x68, 0x00,
+    0x7d, 0x00, 0x8b, 0x00, 0x96, 0x00, 0x9d, 0x00, 0xa3, 0x00, 0xa8, 0x00,
+    0xab, 0x00, 0xae, 0x00, 0xb0, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x87, 0x00, 0x52, 0x00, 0x11, 0x00,
+    0x39, 0x00, 0x57, 0x00, 0x70, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x97, 0x00,
+    0x9e, 0x00, 0xa3, 0x00, 0xa7, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00,
+    0x00, 0x33, 0x00, 0x1c, 0x12, 0x00, 0x3f, 0x00, 0x62, 0x00, 0x7a, 0x00,
+    0x8a, 0x00, 0x96, 0x00, 0x9e, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xac, 0x00,
+    0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0x43, 0x2b, 0x4a, 0x22,
+    0x51, 0x1a, 0x57, 0x15, 0x5e, 0x11, 0x63, 0x0d, 0x69, 0x0a, 0x6e, 0x08,
+    0x74, 0x06, 0x78, 0x05, 0x7c, 0x04, 0x81, 0x03, 0x84, 0x02, 0x87, 0x02,
+    0x8c, 0x01, 0x8f, 0x00, 0x92, 0x00, 0x94, 0x00, 0x97, 0x00, 0x9b, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1c, 0x2d, 0x14, 0x37, 0x0e, 0x41, 0x0a,
+    0x4a, 0x07, 0x53, 0x04, 0x5b, 0x02, 0x63, 0x01, 0x69, 0x00, 0x70, 0x00,
+    0x77, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x87, 0x00, 0x8a, 0x00, 0x8f, 0x00,
+    0x92, 0x00, 0x96, 0x00, 0x99, 0x00, 0x9b, 0x00, 0x7f, 0x0e, 0x85, 0x0a,
+    0x8a, 0x07, 0x8f, 0x05, 0x93, 0x03, 0x98, 0x02, 0x9c, 0x01, 0xa0, 0x00,
+    0xa3, 0x00, 0xa6, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb2, 0x00,
+    0xb3, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbc, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x28, 0x00,
+    0x48, 0x00, 0x5f, 0x00, 0x71, 0x00, 0x7e, 0x00, 0x89, 0x00, 0x91, 0x00,
+    0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0x00, 0x3a, 0x00, 0x2f,
+    0x00, 0x16, 0x0e, 0x08, 0x20, 0x00, 0x42, 0x00, 0x5c, 0x00, 0x6f, 0x00,
+    0x7e, 0x00, 0x89, 0x00, 0x92, 0x00, 0x99, 0x00, 0x9e, 0x00, 0xa2, 0x00,
+    0xa6, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xa6, 0x00, 0x98, 0x00, 0x70, 0x00, 0x39, 0x00, 0x02, 0x00, 0x28, 0x00,
+    0x48, 0x00, 0x5f, 0x00, 0x71, 0x00, 0x7e, 0x00, 0x89, 0x00, 0x91, 0x00,
+    0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0x00, 0x38, 0x00, 0x2a,
+    0x00, 0x09, 0x1d, 0x00, 0x3f, 0x00, 0x5b, 0x00, 0x6f, 0x00, 0x7f, 0x00,
+    0x8b, 0x00, 0x94, 0x00, 0x9b, 0x00, 0xa0, 0x00, 0xa5, 0x00, 0xa8, 0x00,
+    0xab, 0x00, 0xad, 0x00, 0x43, 0x2c, 0x49, 0x23, 0x50, 0x1c, 0x56, 0x17,
+    0x5b, 0x12, 0x61, 0x0f, 0x66, 0x0c, 0x6b, 0x0a, 0x6f, 0x08, 0x75, 0x06,
+    0x78, 0x05, 0x7c, 0x04, 0x81, 0x03, 0x84, 0x02, 0x87, 0x02, 0x8b, 0x01,
+    0x8e, 0x01, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x22, 0x1c, 0x2c, 0x15, 0x36, 0x0f, 0x3e, 0x0b, 0x48, 0x07, 0x50, 0x05,
+    0x58, 0x04, 0x5f, 0x02, 0x66, 0x01, 0x6c, 0x00, 0x71, 0x00, 0x77, 0x00,
+    0x7d, 0x00, 0x81, 0x00, 0x86, 0x00, 0x8a, 0x00, 0x8e, 0x00, 0x91, 0x00,
+    0x94, 0x00, 0x97, 0x00, 0x7f, 0x0e, 0x84, 0x0a, 0x89, 0x07, 0x8d, 0x05,
+    0x92, 0x03, 0x96, 0x02, 0x9a, 0x02, 0x9e, 0x01, 0xa1, 0x00, 0xa4, 0x00,
+    0xa7, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00,
+    0xb5, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x3d, 0x00,
+    0x52, 0x00, 0x64, 0x00, 0x71, 0x00, 0x7c, 0x00, 0x85, 0x00, 0x8d, 0x00,
+    0x93, 0x00, 0x98, 0x00, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x23, 0x02, 0x0e,
+    0x12, 0x06, 0x20, 0x00, 0x3c, 0x00, 0x52, 0x00, 0x64, 0x00, 0x73, 0x00,
+    0x7e, 0x00, 0x87, 0x00, 0x8f, 0x00, 0x95, 0x00, 0x9a, 0x00, 0x9e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x00, 0xa6, 0x00,
+    0x85, 0x00, 0x57, 0x00, 0x28, 0x00, 0x01, 0x00, 0x21, 0x00, 0x3d, 0x00,
+    0x52, 0x00, 0x64, 0x00, 0x71, 0x00, 0x7c, 0x00, 0x85, 0x00, 0x8d, 0x00,
+    0x93, 0x00, 0x98, 0x00, 0x00, 0x3a, 0x00, 0x31, 0x00, 0x19, 0x05, 0x00,
+    0x24, 0x00, 0x3f, 0x00, 0x56, 0x00, 0x68, 0x00, 0x77, 0x00, 0x82, 0x00,
+    0x8b, 0x00, 0x93, 0x00, 0x99, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5, 0x00,
+    0x43, 0x2e, 0x48, 0x25, 0x4e, 0x1e, 0x54, 0x19, 0x59, 0x14, 0x5f, 0x11,
+    0x63, 0x0e, 0x69, 0x0b, 0x6c, 0x09, 0x71, 0x07, 0x76, 0x06, 0x78, 0x05,
+    0x7c, 0x04, 0x81, 0x03, 0x84, 0x02, 0x86, 0x02, 0x8a, 0x01, 0x8e, 0x01,
+    0x90, 0x00, 0x92, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1d, 0x2b, 0x16,
+    0x34, 0x10, 0x3d, 0x0c, 0x45, 0x09, 0x4c, 0x06, 0x54, 0x04, 0x5b, 0x02,
+    0x61, 0x02, 0x67, 0x01, 0x6d, 0x00, 0x73, 0x00, 0x78, 0x00, 0x7d, 0x00,
+    0x81, 0x00, 0x86, 0x00, 0x89, 0x00, 0x8d, 0x00, 0x90, 0x00, 0x93, 0x00,
+    0x7f, 0x0e, 0x84, 0x0b, 0x88, 0x08, 0x8d, 0x06, 0x91, 0x04, 0x94, 0x03,
+    0x98, 0x02, 0x9c, 0x01, 0x9f, 0x01, 0xa2, 0x00, 0xa5, 0x00, 0xa8, 0x00,
+    0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00,
+    0xb6, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x35, 0x00, 0x48, 0x00,
+    0x59, 0x00, 0x66, 0x00, 0x72, 0x00, 0x7b, 0x00, 0x83, 0x00, 0x89, 0x00,
+    0x00, 0x3d, 0x00, 0x38, 0x00, 0x2a, 0x00, 0x18, 0x07, 0x0c, 0x14, 0x05,
+    0x20, 0x00, 0x37, 0x00, 0x4c, 0x00, 0x5c, 0x00, 0x6a, 0x00, 0x75, 0x00,
+    0x7e, 0x00, 0x86, 0x00, 0x8d, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xba, 0x00, 0xb0, 0x00, 0x95, 0x00, 0x70, 0x00,
+    0x48, 0x00, 0x21, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x35, 0x00, 0x48, 0x00,
+    0x59, 0x00, 0x66, 0x00, 0x72, 0x00, 0x7b, 0x00, 0x83, 0x00, 0x89, 0x00,
+    0x00, 0x3c, 0x00, 0x35, 0x00, 0x23, 0x00, 0x0b, 0x0f, 0x00, 0x29, 0x00,
+    0x3f, 0x00, 0x53, 0x00, 0x63, 0x00, 0x70, 0x00, 0x7b, 0x00, 0x84, 0x00,
+    0x8b, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9b, 0x00, 0x42, 0x2f, 0x48, 0x26,
+    0x4d, 0x20, 0x52, 0x1a, 0x58, 0x16, 0x5c, 0x12, 0x61, 0x0f, 0x66, 0x0c,
+    0x6b, 0x0b, 0x6d, 0x09, 0x73, 0x07, 0x76, 0x06, 0x79, 0x05, 0x7d, 0x04,
+    0x81, 0x03, 0x83, 0x02, 0x86, 0x02, 0x89, 0x02, 0x8d, 0x01, 0x8f, 0x01,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x22, 0x1d, 0x2a, 0x16, 0x33, 0x11, 0x3b, 0x0c,
+    0x43, 0x0a, 0x4a, 0x07, 0x51, 0x05, 0x58, 0x04, 0x5e, 0x02, 0x64, 0x01,
+    0x69, 0x01, 0x6f, 0x00, 0x74, 0x00, 0x78, 0x00, 0x7d, 0x00, 0x81, 0x00,
+    0x85, 0x00, 0x89, 0x00, 0x8b, 0x00, 0x8f, 0x00, 0x7f, 0x0e, 0x83, 0x0b,
+    0x88, 0x08, 0x8c, 0x06, 0x90, 0x05, 0x93, 0x03, 0x97, 0x02, 0x9a, 0x02,
+    0x9d, 0x01, 0xa0, 0x00, 0xa3, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00,
+    0xad, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb6, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x50, 0x00,
+    0x5d, 0x00, 0x68, 0x00, 0x72, 0x00, 0x7a, 0x00, 0x00, 0x3d, 0x00, 0x3a,
+    0x00, 0x2f, 0x00, 0x20, 0x00, 0x10, 0x0b, 0x0a, 0x16, 0x04, 0x20, 0x00,
+    0x34, 0x00, 0x46, 0x00, 0x56, 0x00, 0x62, 0x00, 0x6d, 0x00, 0x77, 0x00,
+    0x7f, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbb, 0x00, 0xb3, 0x00, 0x9f, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x3d, 0x00,
+    0x1c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x50, 0x00,
+    0x5d, 0x00, 0x68, 0x00, 0x72, 0x00, 0x7a, 0x00, 0x00, 0x3d, 0x00, 0x38,
+    0x00, 0x2a, 0x00, 0x16, 0x00, 0x00, 0x16, 0x00, 0x2c, 0x00, 0x3f, 0x00,
+    0x50, 0x00, 0x5e, 0x00, 0x6b, 0x00, 0x75, 0x00, 0x7e, 0x00, 0x85, 0x00,
+    0x8b, 0x00, 0x91, 0x00, 0x42, 0x30, 0x47, 0x28, 0x4c, 0x21, 0x51, 0x1c,
+    0x56, 0x17, 0x5a, 0x14, 0x60, 0x11, 0x63, 0x0e, 0x68, 0x0c, 0x6c, 0x0a,
+    0x6f, 0x08, 0x74, 0x07, 0x77, 0x06, 0x79, 0x05, 0x7d, 0x04, 0x81, 0x03,
+    0x83, 0x02, 0x85, 0x02, 0x88, 0x02, 0x8c, 0x01, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x21, 0x1e, 0x2a, 0x17, 0x32, 0x12, 0x39, 0x0e, 0x40, 0x0a, 0x48, 0x07,
+    0x4f, 0x05, 0x55, 0x04, 0x5a, 0x03, 0x60, 0x02, 0x66, 0x01, 0x6b, 0x00,
+    0x70, 0x00, 0x75, 0x00, 0x79, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x84, 0x00,
+    0x88, 0x00, 0x8b, 0x00, 0x7f, 0x0f, 0x83, 0x0b, 0x87, 0x09, 0x8b, 0x07,
+    0x8e, 0x05, 0x92, 0x03, 0x96, 0x02, 0x99, 0x02, 0x9b, 0x01, 0x9e, 0x01,
+    0xa1, 0x00, 0xa4, 0x00, 0xa6, 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00,
+    0xaf, 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x16, 0x00, 0x29, 0x00, 0x3a, 0x00, 0x49, 0x00, 0x55, 0x00,
+    0x60, 0x00, 0x6a, 0x00, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x33, 0x00, 0x27,
+    0x00, 0x18, 0x04, 0x0d, 0x0e, 0x08, 0x17, 0x04, 0x20, 0x00, 0x32, 0x00,
+    0x42, 0x00, 0x50, 0x00, 0x5c, 0x00, 0x67, 0x00, 0x70, 0x00, 0x78, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb6, 0x00,
+    0xa6, 0x00, 0x8e, 0x00, 0x71, 0x00, 0x52, 0x00, 0x35, 0x00, 0x19, 0x00,
+    0x00, 0x00, 0x16, 0x00, 0x29, 0x00, 0x3a, 0x00, 0x49, 0x00, 0x55, 0x00,
+    0x60, 0x00, 0x6a, 0x00, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x2f, 0x00, 0x1f,
+    0x00, 0x0b, 0x08, 0x00, 0x1c, 0x00, 0x2e, 0x00, 0x3f, 0x00, 0x4e, 0x00,
+    0x5b, 0x00, 0x66, 0x00, 0x70, 0x00, 0x78, 0x00, 0x80, 0x00, 0x86, 0x00,
+    0x42, 0x31, 0x47, 0x29, 0x4b, 0x22, 0x50, 0x1d, 0x55, 0x19, 0x58, 0x15,
+    0x5e, 0x12, 0x61, 0x0f, 0x65, 0x0d, 0x6a, 0x0b, 0x6c, 0x09, 0x70, 0x08,
+    0x75, 0x07, 0x77, 0x06, 0x79, 0x05, 0x7d, 0x04, 0x81, 0x03, 0x83, 0x02,
+    0x85, 0x02, 0x87, 0x02, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1e, 0x29, 0x18,
+    0x31, 0x12, 0x38, 0x0f, 0x3f, 0x0c, 0x45, 0x09, 0x4c, 0x07, 0x52, 0x05,
+    0x58, 0x04, 0x5d, 0x02, 0x63, 0x02, 0x67, 0x01, 0x6c, 0x00, 0x71, 0x00,
+    0x75, 0x00, 0x79, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x84, 0x00, 0x88, 0x00,
+    0x7f, 0x0f, 0x83, 0x0c, 0x87, 0x09, 0x8a, 0x07, 0x8e, 0x06, 0x91, 0x04,
+    0x94, 0x03, 0x97, 0x02, 0x9a, 0x02, 0x9d, 0x01, 0xa0, 0x01, 0xa2, 0x00,
+    0xa4, 0x00, 0xa7, 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00,
+    0xb0, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x13, 0x00, 0x25, 0x00, 0x35, 0x00, 0x43, 0x00, 0x4f, 0x00, 0x59, 0x00,
+    0x00, 0x3e, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x2b, 0x00, 0x1f, 0x00, 0x12,
+    0x07, 0x0c, 0x10, 0x07, 0x18, 0x03, 0x20, 0x00, 0x30, 0x00, 0x3f, 0x00,
+    0x4c, 0x00, 0x57, 0x00, 0x61, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x97, 0x00,
+    0x7e, 0x00, 0x64, 0x00, 0x48, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x00, 0x00,
+    0x13, 0x00, 0x25, 0x00, 0x35, 0x00, 0x43, 0x00, 0x4f, 0x00, 0x59, 0x00,
+    0x00, 0x3e, 0x00, 0x3b, 0x00, 0x32, 0x00, 0x25, 0x00, 0x14, 0x00, 0x02,
+    0x0f, 0x00, 0x20, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4d, 0x00, 0x58, 0x00,
+    0x63, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x7b, 0x00, 0x42, 0x31, 0x46, 0x2a,
+    0x4a, 0x24, 0x4f, 0x1f, 0x53, 0x1a, 0x58, 0x16, 0x5c, 0x13, 0x60, 0x11,
+    0x63, 0x0e, 0x67, 0x0c, 0x6b, 0x0b, 0x6d, 0x09, 0x72, 0x07, 0x75, 0x07,
+    0x77, 0x06, 0x79, 0x05, 0x7e, 0x04, 0x81, 0x03, 0x83, 0x02, 0x85, 0x02,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1e, 0x29, 0x18, 0x30, 0x13, 0x37, 0x0f,
+    0x3d, 0x0c, 0x44, 0x0a, 0x4a, 0x07, 0x50, 0x05, 0x55, 0x04, 0x5b, 0x04,
+    0x60, 0x02, 0x64, 0x01, 0x69, 0x01, 0x6d, 0x00, 0x72, 0x00, 0x76, 0x00,
+    0x7a, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x83, 0x00, 0x7f, 0x0f, 0x83, 0x0c,
+    0x86, 0x09, 0x8a, 0x07, 0x8d, 0x06, 0x90, 0x05, 0x93, 0x03, 0x96, 0x02,
+    0x99, 0x02, 0x9c, 0x02, 0x9e, 0x01, 0xa0, 0x00, 0xa3, 0x00, 0xa5, 0x00,
+    0xa7, 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb0, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x49, 0x00, 0x00, 0x3e, 0x00, 0x3c,
+    0x00, 0x37, 0x00, 0x2f, 0x00, 0x24, 0x00, 0x19, 0x02, 0x0e, 0x0a, 0x0a,
+    0x11, 0x06, 0x19, 0x03, 0x1f, 0x00, 0x2e, 0x00, 0x3c, 0x00, 0x48, 0x00,
+    0x53, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x89, 0x00, 0x71, 0x00,
+    0x59, 0x00, 0x41, 0x00, 0x29, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x49, 0x00, 0x00, 0x3e, 0x00, 0x3c,
+    0x00, 0x34, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0c, 0x04, 0x00, 0x14, 0x00,
+    0x23, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x56, 0x00, 0x60, 0x00,
+    0x68, 0x00, 0x70, 0x00, 0x42, 0x32, 0x46, 0x2b, 0x49, 0x25, 0x4f, 0x1f,
+    0x52, 0x1b, 0x57, 0x18, 0x59, 0x14, 0x5f, 0x12, 0x62, 0x0f, 0x65, 0x0d,
+    0x6a, 0x0c, 0x6c, 0x0a, 0x6e, 0x09, 0x73, 0x07, 0x76, 0x06, 0x78, 0x06,
+    0x7a, 0x05, 0x7e, 0x04, 0x81, 0x03, 0x83, 0x02, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0x21, 0x1e, 0x28, 0x19, 0x2f, 0x14, 0x35, 0x0f, 0x3c, 0x0c, 0x42, 0x0a,
+    0x48, 0x07, 0x4e, 0x06, 0x53, 0x05, 0x58, 0x04, 0x5d, 0x02, 0x62, 0x02,
+    0x66, 0x01, 0x6b, 0x01, 0x6f, 0x00, 0x73, 0x00, 0x76, 0x00, 0x7a, 0x00,
+    0x7d, 0x00, 0x81, 0x00, 0x7f, 0x0f, 0x82, 0x0c, 0x86, 0x0a, 0x89, 0x07,
+    0x8c, 0x06, 0x8f, 0x05, 0x92, 0x03, 0x95, 0x03, 0x98, 0x02, 0x9a, 0x02,
+    0x9d, 0x01, 0x9f, 0x01, 0xa1, 0x00, 0xa4, 0x00, 0xa6, 0x00, 0xa8, 0x00,
+    0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2d, 0x00, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x31,
+    0x00, 0x28, 0x00, 0x1e, 0x00, 0x13, 0x05, 0x0d, 0x0c, 0x09, 0x13, 0x06,
+    0x19, 0x03, 0x1f, 0x00, 0x2d, 0x00, 0x3a, 0x00, 0x45, 0x00, 0x4f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xba, 0x00,
+    0xb1, 0x00, 0xa3, 0x00, 0x91, 0x00, 0x7c, 0x00, 0x66, 0x00, 0x50, 0x00,
+    0x3a, 0x00, 0x25, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2d, 0x00, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x36, 0x00, 0x2d,
+    0x00, 0x21, 0x00, 0x13, 0x00, 0x04, 0x0a, 0x00, 0x18, 0x00, 0x26, 0x00,
+    0x33, 0x00, 0x3f, 0x00, 0x4a, 0x00, 0x54, 0x00, 0x5d, 0x00, 0x65, 0x00,
+    0x42, 0x33, 0x45, 0x2c, 0x48, 0x26, 0x4e, 0x21, 0x50, 0x1c, 0x56, 0x19,
+    0x58, 0x16, 0x5c, 0x13, 0x60, 0x11, 0x62, 0x0e, 0x67, 0x0c, 0x6a, 0x0b,
+    0x6d, 0x0a, 0x70, 0x09, 0x74, 0x07, 0x76, 0x06, 0x78, 0x06, 0x7a, 0x05,
+    0x7e, 0x04, 0x81, 0x03, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x21, 0x1e, 0x28, 0x19,
+    0x2f, 0x15, 0x35, 0x11, 0x3b, 0x0d, 0x41, 0x0b, 0x46, 0x09, 0x4c, 0x07,
+    0x51, 0x05, 0x55, 0x04, 0x5b, 0x04, 0x5f, 0x02, 0x63, 0x02, 0x68, 0x01,
+    0x6b, 0x00, 0x70, 0x00, 0x73, 0x00, 0x77, 0x00, 0x7b, 0x00, 0x7d, 0x00,
+    0x7f, 0x0f, 0x82, 0x0c, 0x86, 0x0a, 0x89, 0x08, 0x8c, 0x06, 0x8f, 0x05,
+    0x91, 0x04, 0x94, 0x03, 0x97, 0x02, 0x99, 0x02, 0x9c, 0x02, 0x9e, 0x01,
+    0xa0, 0x01, 0xa2, 0x00, 0xa4, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00,
+    0xac, 0x00, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x29, 0x00,
+    0x00, 0x3f, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x33, 0x00, 0x2c, 0x00, 0x23,
+    0x00, 0x19, 0x00, 0x0f, 0x07, 0x0c, 0x0e, 0x08, 0x14, 0x05, 0x1a, 0x02,
+    0x1f, 0x00, 0x2c, 0x00, 0x38, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb3, 0x00, 0xa7, 0x00,
+    0x98, 0x00, 0x85, 0x00, 0x72, 0x00, 0x5d, 0x00, 0x49, 0x00, 0x35, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x29, 0x00,
+    0x00, 0x3e, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x30, 0x00, 0x25, 0x00, 0x19,
+    0x00, 0x0c, 0x01, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x28, 0x00, 0x34, 0x00,
+    0x3f, 0x00, 0x49, 0x00, 0x53, 0x00, 0x5b, 0x00, 0x5d, 0x1a, 0x6d, 0x16,
+    0x72, 0x15, 0x75, 0x14, 0x77, 0x13, 0x78, 0x13, 0x79, 0x13, 0x7a, 0x12,
+    0x7a, 0x12, 0x7b, 0x12, 0x7b, 0x12, 0x7b, 0x12, 0x7c, 0x12, 0x7c, 0x11,
+    0x7c, 0x11, 0x7c, 0x11, 0x7c, 0x11, 0x7c, 0x11, 0x7c, 0x11, 0x7d, 0x11,
+    0xbd, 0x02, 0xa4, 0x06, 0x97, 0x09, 0x91, 0x0a, 0x8d, 0x0b, 0x8a, 0x0c,
+    0x89, 0x0d, 0x88, 0x0d, 0x86, 0x0d, 0x86, 0x0e, 0x85, 0x0e, 0x85, 0x0e,
+    0x84, 0x0e, 0x84, 0x0e, 0x83, 0x0f, 0x83, 0x0f, 0x83, 0x0f, 0x83, 0x0f,
+    0x82, 0x0f, 0x82, 0x0f, 0x33, 0x11, 0x5f, 0x11, 0x6f, 0x11, 0x74, 0x11,
+    0x77, 0x11, 0x78, 0x11, 0x7a, 0x11, 0x7a, 0x11, 0x7b, 0x11, 0x7b, 0x11,
+    0x7c, 0x11, 0x7c, 0x11, 0x7c, 0x11, 0x7c, 0x11, 0x7d, 0x11, 0x7d, 0x11,
+    0x7d, 0x11, 0x7d, 0x11, 0x7d, 0x11, 0x7d, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x00, 0x3f, 0x00, 0x3e,
+    0x00, 0x3a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x26, 0x00, 0x1d, 0x00, 0x14,
+    0x03, 0x0e, 0x09, 0x0b, 0x0f, 0x08, 0x15, 0x05, 0x1a, 0x02, 0x1f, 0x00,
+    0x2b, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xaa, 0x00, 0x9d, 0x00, 0x8d, 0x00,
+    0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0x00, 0x3f, 0x00, 0x3d,
+    0x00, 0x39, 0x00, 0x32, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x12, 0x00, 0x06,
+    0x06, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x3f, 0x00,
+    0x49, 0x00, 0x51, 0x00, 0x50, 0x24, 0x5f, 0x1f, 0x66, 0x1b, 0x6b, 0x19,
+    0x6e, 0x18, 0x70, 0x17, 0x73, 0x16, 0x73, 0x15, 0x75, 0x15, 0x76, 0x15,
+    0x76, 0x15, 0x77, 0x14, 0x77, 0x14, 0x78, 0x13, 0x78, 0x13, 0x79, 0x13,
+    0x79, 0x13, 0x7a, 0x13, 0x7a, 0x13, 0x7b, 0x13, 0xcc, 0x00, 0xb5, 0x00,
+    0xa8, 0x02, 0x9e, 0x04, 0x99, 0x05, 0x94, 0x06, 0x92, 0x07, 0x8f, 0x08,
+    0x8d, 0x09, 0x8c, 0x09, 0x8b, 0x0a, 0x8a, 0x0a, 0x89, 0x0b, 0x88, 0x0b,
+    0x88, 0x0b, 0x87, 0x0c, 0x87, 0x0c, 0x86, 0x0c, 0x86, 0x0c, 0x86, 0x0c,
+    0x23, 0x13, 0x46, 0x11, 0x58, 0x11, 0x63, 0x11, 0x69, 0x11, 0x6d, 0x11,
+    0x70, 0x11, 0x72, 0x11, 0x73, 0x11, 0x75, 0x11, 0x76, 0x11, 0x77, 0x11,
+    0x77, 0x11, 0x78, 0x11, 0x78, 0x11, 0x79, 0x11, 0x79, 0x11, 0x79, 0x11,
+    0x7a, 0x11, 0x7a, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0d, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x36,
+    0x00, 0x30, 0x00, 0x29, 0x00, 0x21, 0x00, 0x19, 0x00, 0x10, 0x05, 0x0d,
+    0x0b, 0x0a, 0x10, 0x07, 0x16, 0x04, 0x1b, 0x02, 0x1f, 0x00, 0x2a, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00,
+    0xb6, 0x00, 0xad, 0x00, 0xa1, 0x00, 0x93, 0x00, 0x83, 0x00, 0x72, 0x00,
+    0x60, 0x00, 0x4f, 0x00, 0x3d, 0x00, 0x2d, 0x00, 0x1d, 0x00, 0x0e, 0x00,
+    0x00, 0x00, 0x0d, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x33,
+    0x00, 0x2b, 0x00, 0x22, 0x00, 0x17, 0x00, 0x0c, 0x00, 0x00, 0x0b, 0x00,
+    0x16, 0x00, 0x21, 0x00, 0x2c, 0x00, 0x36, 0x00, 0x3f, 0x00, 0x48, 0x00,
+    0x4a, 0x2a, 0x57, 0x24, 0x5f, 0x20, 0x64, 0x1e, 0x68, 0x1c, 0x6a, 0x1b,
+    0x6d, 0x19, 0x6e, 0x18, 0x70, 0x18, 0x72, 0x17, 0x72, 0x17, 0x73, 0x16,
+    0x74, 0x15, 0x75, 0x15, 0x76, 0x15, 0x76, 0x15, 0x76, 0x15, 0x76, 0x15,
+    0x76, 0x15, 0x77, 0x14, 0xd1, 0x00, 0xc0, 0x00, 0xb3, 0x00, 0xaa, 0x01,
+    0xa2, 0x02, 0x9d, 0x03, 0x99, 0x04, 0x96, 0x05, 0x94, 0x06, 0x92, 0x06,
+    0x90, 0x07, 0x8f, 0x07, 0x8d, 0x08, 0x8d, 0x08, 0x8c, 0x09, 0x8b, 0x09,
+    0x8a, 0x09, 0x8a, 0x0a, 0x89, 0x0a, 0x89, 0x0b, 0x22, 0x17, 0x39, 0x11,
+    0x4a, 0x11, 0x55, 0x11, 0x5e, 0x11, 0x63, 0x11, 0x67, 0x11, 0x6a, 0x11,
+    0x6c, 0x11, 0x6e, 0x11, 0x70, 0x11, 0x71, 0x11, 0x72, 0x11, 0x73, 0x11,
+    0x74, 0x11, 0x75, 0x11, 0x75, 0x11, 0x76, 0x11, 0x76, 0x11, 0x77, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x38, 0x00, 0x32, 0x00, 0x2c,
+    0x00, 0x25, 0x00, 0x1d, 0x00, 0x15, 0x01, 0x0e, 0x07, 0x0c, 0x0c, 0x09,
+    0x11, 0x06, 0x16, 0x04, 0x1b, 0x02, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf, 0x00,
+    0xa5, 0x00, 0x98, 0x00, 0x89, 0x00, 0x7a, 0x00, 0x6a, 0x00, 0x59, 0x00,
+    0x49, 0x00, 0x39, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x25,
+    0x00, 0x1c, 0x00, 0x11, 0x00, 0x07, 0x03, 0x00, 0x0e, 0x00, 0x19, 0x00,
+    0x23, 0x00, 0x2d, 0x00, 0x36, 0x00, 0x3f, 0x00, 0x48, 0x2e, 0x53, 0x28,
+    0x5a, 0x24, 0x5f, 0x22, 0x63, 0x1f, 0x66, 0x1e, 0x69, 0x1c, 0x6a, 0x1b,
+    0x6c, 0x1a, 0x6d, 0x1a, 0x6e, 0x19, 0x70, 0x18, 0x71, 0x18, 0x72, 0x18,
+    0x72, 0x17, 0x72, 0x17, 0x73, 0x16, 0x74, 0x15, 0x75, 0x15, 0x76, 0x15,
+    0xd5, 0x00, 0xc6, 0x00, 0xbb, 0x00, 0xb2, 0x00, 0xaa, 0x00, 0xa4, 0x01,
+    0xa0, 0x02, 0x9c, 0x02, 0x9a, 0x03, 0x97, 0x04, 0x95, 0x05, 0x93, 0x05,
+    0x92, 0x06, 0x91, 0x06, 0x90, 0x07, 0x8e, 0x07, 0x8e, 0x07, 0x8d, 0x07,
+    0x8c, 0x08, 0x8c, 0x09, 0x22, 0x1a, 0x33, 0x13, 0x41, 0x11, 0x4c, 0x11,
+    0x54, 0x11, 0x5b, 0x11, 0x5f, 0x11, 0x63, 0x11, 0x66, 0x11, 0x68, 0x11,
+    0x6a, 0x11, 0x6c, 0x11, 0x6e, 0x11, 0x6f, 0x11, 0x70, 0x11, 0x71, 0x11,
+    0x72, 0x11, 0x72, 0x11, 0x73, 0x11, 0x74, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x07, 0x7f, 0x00,
+    0xa5, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00,
+    0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00,
+    0xbe, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x47, 0x07, 0x0f, 0x0f, 0x00, 0x26, 0x00, 0x33, 0x00, 0x38, 0x00, 0x3a,
+    0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+    0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x50, 0x2b, 0x56, 0x27, 0x5b, 0x24,
+    0x5f, 0x22, 0x62, 0x20, 0x65, 0x1f, 0x67, 0x1d, 0x69, 0x1d, 0x6a, 0x1b,
+    0x6c, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6e, 0x19, 0x6f, 0x18, 0x71, 0x18,
+    0x72, 0x18, 0x72, 0x18, 0x72, 0x18, 0x72, 0x17, 0xd6, 0x00, 0xcb, 0x00,
+    0xc0, 0x00, 0xb8, 0x00, 0xb1, 0x00, 0xab, 0x00, 0xa6, 0x01, 0xa2, 0x01,
+    0x9f, 0x02, 0x9c, 0x02, 0x9a, 0x03, 0x98, 0x03, 0x96, 0x04, 0x94, 0x05,
+    0x93, 0x05, 0x92, 0x06, 0x91, 0x06, 0x90, 0x06, 0x8f, 0x06, 0x8f, 0x07,
+    0x22, 0x1b, 0x2f, 0x15, 0x3b, 0x12, 0x44, 0x11, 0x4d, 0x11, 0x53, 0x11,
+    0x59, 0x11, 0x5d, 0x11, 0x60, 0x11, 0x63, 0x11, 0x66, 0x11, 0x67, 0x11,
+    0x69, 0x11, 0x6b, 0x11, 0x6c, 0x11, 0x6d, 0x11, 0x6e, 0x11, 0x6f, 0x11,
+    0x70, 0x11, 0x71, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x3f, 0x00, 0x7f, 0x00, 0x9c, 0x00,
+    0xaa, 0x00, 0xb1, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xba, 0x00,
+    0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x3f, 0x00,
+    0x05, 0x05, 0x00, 0x1c, 0x00, 0x2a, 0x00, 0x31, 0x00, 0x35, 0x00, 0x38,
+    0x00, 0x39, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d,
+    0x00, 0x3d, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x45, 0x33, 0x4d, 0x2e, 0x53, 0x29, 0x58, 0x26, 0x5c, 0x24, 0x5f, 0x22,
+    0x61, 0x21, 0x65, 0x20, 0x65, 0x1e, 0x68, 0x1d, 0x69, 0x1d, 0x6a, 0x1b,
+    0x6b, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6e, 0x19, 0x6f, 0x18,
+    0x71, 0x18, 0x72, 0x18, 0xd7, 0x00, 0xcd, 0x00, 0xc5, 0x00, 0xbd, 0x00,
+    0xb6, 0x00, 0xb0, 0x00, 0xab, 0x00, 0xa7, 0x00, 0xa4, 0x01, 0xa1, 0x02,
+    0x9e, 0x02, 0x9c, 0x02, 0x9a, 0x03, 0x98, 0x03, 0x97, 0x03, 0x96, 0x04,
+    0x94, 0x05, 0x93, 0x05, 0x92, 0x05, 0x91, 0x06, 0x21, 0x1c, 0x2d, 0x16,
+    0x37, 0x13, 0x40, 0x11, 0x47, 0x11, 0x4e, 0x11, 0x53, 0x11, 0x57, 0x11,
+    0x5b, 0x11, 0x5e, 0x11, 0x61, 0x11, 0x63, 0x11, 0x65, 0x11, 0x67, 0x11,
+    0x68, 0x11, 0x6a, 0x11, 0x6b, 0x11, 0x6c, 0x11, 0x6d, 0x11, 0x6e, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x26, 0x05, 0x05, 0x3f, 0x00, 0x6d, 0x00, 0x88, 0x00, 0x99, 0x00,
+    0xa3, 0x00, 0xaa, 0x00, 0xae, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xb6, 0x00,
+    0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x7f, 0x00, 0x3f, 0x00, 0x12, 0x00,
+    0x00, 0x09, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2a, 0x00, 0x2f, 0x00, 0x32,
+    0x00, 0x34, 0x00, 0x36, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x34, 0x4c, 0x2f,
+    0x51, 0x2c, 0x56, 0x28, 0x5a, 0x26, 0x5c, 0x24, 0x60, 0x23, 0x61, 0x21,
+    0x64, 0x20, 0x65, 0x1f, 0x66, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0x69, 0x1c,
+    0x6b, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0x6e, 0x19,
+    0xd8, 0x00, 0xcf, 0x00, 0xc7, 0x00, 0xc0, 0x00, 0xba, 0x00, 0xb5, 0x00,
+    0xb0, 0x00, 0xac, 0x00, 0xa8, 0x00, 0xa5, 0x01, 0xa2, 0x01, 0xa0, 0x02,
+    0x9e, 0x02, 0x9c, 0x02, 0x9a, 0x02, 0x99, 0x03, 0x97, 0x03, 0x96, 0x03,
+    0x95, 0x04, 0x94, 0x05, 0x22, 0x1d, 0x2b, 0x17, 0x34, 0x14, 0x3b, 0x12,
+    0x43, 0x11, 0x49, 0x11, 0x4e, 0x11, 0x52, 0x11, 0x56, 0x11, 0x5a, 0x11,
+    0x5d, 0x11, 0x5f, 0x11, 0x61, 0x11, 0x63, 0x11, 0x65, 0x11, 0x66, 0x11,
+    0x68, 0x11, 0x69, 0x11, 0x6a, 0x11, 0x6b, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x1c,
+    0x12, 0x00, 0x3f, 0x00, 0x62, 0x00, 0x7a, 0x00, 0x8a, 0x00, 0x96, 0x00,
+    0x9e, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xac, 0x00, 0xaf, 0x00, 0xb1, 0x00,
+    0xb3, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xb2, 0x00, 0x9c, 0x00, 0x6d, 0x00, 0x3f, 0x00, 0x1d, 0x00, 0x05, 0x00,
+    0x00, 0x0b, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x29, 0x00, 0x2d,
+    0x00, 0x30, 0x00, 0x32, 0x00, 0x33, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x44, 0x36, 0x4a, 0x31, 0x50, 0x2d, 0x54, 0x2a,
+    0x57, 0x28, 0x5b, 0x26, 0x5c, 0x24, 0x60, 0x23, 0x61, 0x21, 0x63, 0x20,
+    0x65, 0x20, 0x65, 0x1e, 0x67, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0x69, 0x1c,
+    0x6a, 0x1b, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d, 0x1a, 0xd9, 0x00, 0xd1, 0x00,
+    0xca, 0x00, 0xc3, 0x00, 0xbe, 0x00, 0xb9, 0x00, 0xb4, 0x00, 0xb0, 0x00,
+    0xac, 0x00, 0xa9, 0x00, 0xa6, 0x00, 0xa3, 0x01, 0xa1, 0x01, 0x9f, 0x02,
+    0x9d, 0x02, 0x9b, 0x02, 0x9a, 0x02, 0x99, 0x03, 0x98, 0x03, 0x97, 0x03,
+    0x21, 0x1e, 0x2a, 0x18, 0x32, 0x15, 0x39, 0x13, 0x3f, 0x12, 0x45, 0x11,
+    0x4a, 0x11, 0x4e, 0x11, 0x52, 0x11, 0x56, 0x11, 0x59, 0x11, 0x5c, 0x11,
+    0x5d, 0x11, 0x60, 0x11, 0x61, 0x11, 0x63, 0x11, 0x65, 0x11, 0x66, 0x11,
+    0x67, 0x11, 0x68, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x2a, 0x00, 0x09, 0x1d, 0x00,
+    0x3f, 0x00, 0x5b, 0x00, 0x6f, 0x00, 0x7f, 0x00, 0x8b, 0x00, 0x94, 0x00,
+    0x9b, 0x00, 0xa0, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xab, 0x00, 0xad, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0xaa, 0x00,
+    0x88, 0x00, 0x62, 0x00, 0x3f, 0x00, 0x24, 0x00, 0x0f, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29,
+    0x00, 0x2b, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x43, 0x36, 0x49, 0x32, 0x4e, 0x2f, 0x52, 0x2c, 0x56, 0x29, 0x58, 0x27,
+    0x5b, 0x26, 0x5d, 0x24, 0x60, 0x23, 0x60, 0x22, 0x62, 0x20, 0x65, 0x20,
+    0x65, 0x1f, 0x66, 0x1e, 0x68, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0x69, 0x1c,
+    0x6a, 0x1b, 0x6c, 0x1a, 0xd9, 0x00, 0xd2, 0x00, 0xcc, 0x00, 0xc6, 0x00,
+    0xc1, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xb3, 0x00, 0xaf, 0x00, 0xac, 0x00,
+    0xa9, 0x00, 0xa6, 0x00, 0xa4, 0x01, 0xa2, 0x01, 0xa0, 0x01, 0x9e, 0x02,
+    0x9d, 0x02, 0x9c, 0x02, 0x9a, 0x02, 0x99, 0x02, 0x22, 0x1e, 0x29, 0x19,
+    0x30, 0x16, 0x36, 0x13, 0x3c, 0x12, 0x41, 0x11, 0x46, 0x11, 0x4a, 0x11,
+    0x4f, 0x11, 0x52, 0x11, 0x55, 0x11, 0x58, 0x11, 0x5a, 0x11, 0x5c, 0x11,
+    0x5f, 0x11, 0x60, 0x11, 0x62, 0x11, 0x63, 0x11, 0x65, 0x11, 0x66, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3a, 0x00, 0x31, 0x00, 0x19, 0x05, 0x00, 0x24, 0x00, 0x3f, 0x00,
+    0x56, 0x00, 0x68, 0x00, 0x77, 0x00, 0x82, 0x00, 0x8b, 0x00, 0x93, 0x00,
+    0x99, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xba, 0x00, 0xb1, 0x00, 0x99, 0x00, 0x7a, 0x00,
+    0x5b, 0x00, 0x3f, 0x00, 0x29, 0x00, 0x16, 0x00, 0x08, 0x00, 0x00, 0x02,
+    0x00, 0x0c, 0x00, 0x13, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x22, 0x00, 0x25,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x37, 0x48, 0x33,
+    0x4d, 0x30, 0x51, 0x2d, 0x54, 0x2a, 0x57, 0x29, 0x59, 0x27, 0x5c, 0x26,
+    0x5d, 0x24, 0x60, 0x23, 0x60, 0x22, 0x62, 0x20, 0x65, 0x20, 0x65, 0x20,
+    0x65, 0x1f, 0x66, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0x69, 0x1d,
+    0xd9, 0x00, 0xd3, 0x00, 0xcd, 0x00, 0xc8, 0x00, 0xc3, 0x00, 0xbe, 0x00,
+    0xba, 0x00, 0xb6, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xaa, 0x00,
+    0xa7, 0x00, 0xa5, 0x00, 0xa3, 0x01, 0xa1, 0x01, 0xa0, 0x02, 0x9e, 0x02,
+    0x9d, 0x02, 0x9c, 0x02, 0x21, 0x1e, 0x28, 0x1a, 0x2e, 0x17, 0x34, 0x14,
+    0x39, 0x13, 0x3f, 0x12, 0x43, 0x11, 0x48, 0x11, 0x4b, 0x11, 0x4f, 0x11,
+    0x52, 0x11, 0x55, 0x11, 0x57, 0x11, 0x59, 0x11, 0x5c, 0x11, 0x5d, 0x11,
+    0x5f, 0x11, 0x61, 0x11, 0x62, 0x11, 0x63, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x35,
+    0x00, 0x23, 0x00, 0x0b, 0x0f, 0x00, 0x29, 0x00, 0x3f, 0x00, 0x53, 0x00,
+    0x63, 0x00, 0x70, 0x00, 0x7b, 0x00, 0x84, 0x00, 0x8b, 0x00, 0x92, 0x00,
+    0x97, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbb, 0x00, 0xb5, 0x00, 0xa3, 0x00, 0x8a, 0x00, 0x6f, 0x00, 0x56, 0x00,
+    0x3f, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0f, 0x00, 0x04, 0x00, 0x00, 0x04,
+    0x00, 0x0c, 0x00, 0x12, 0x00, 0x17, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x43, 0x38, 0x48, 0x34, 0x4c, 0x31, 0x4f, 0x2e,
+    0x53, 0x2c, 0x56, 0x2a, 0x57, 0x28, 0x5a, 0x27, 0x5c, 0x26, 0x5d, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x61, 0x21, 0x64, 0x20, 0x65, 0x20, 0x65, 0x20,
+    0x65, 0x1e, 0x67, 0x1d, 0x69, 0x1d, 0x69, 0x1d, 0xd9, 0x00, 0xd4, 0x00,
+    0xce, 0x00, 0xca, 0x00, 0xc5, 0x00, 0xc1, 0x00, 0xbd, 0x00, 0xb9, 0x00,
+    0xb6, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xaa, 0x00, 0xa8, 0x00,
+    0xa6, 0x00, 0xa4, 0x01, 0xa2, 0x01, 0xa0, 0x01, 0x9f, 0x02, 0x9e, 0x02,
+    0x22, 0x1f, 0x27, 0x1a, 0x2d, 0x17, 0x33, 0x15, 0x38, 0x13, 0x3c, 0x13,
+    0x41, 0x12, 0x44, 0x11, 0x48, 0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x11,
+    0x54, 0x11, 0x57, 0x11, 0x59, 0x11, 0x5b, 0x11, 0x5c, 0x11, 0x5e, 0x11,
+    0x5f, 0x11, 0x61, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x2a, 0x00, 0x16,
+    0x00, 0x00, 0x16, 0x00, 0x2c, 0x00, 0x3f, 0x00, 0x50, 0x00, 0x5e, 0x00,
+    0x6b, 0x00, 0x75, 0x00, 0x7e, 0x00, 0x85, 0x00, 0x8b, 0x00, 0x91, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb7, 0x00,
+    0xaa, 0x00, 0x96, 0x00, 0x7f, 0x00, 0x68, 0x00, 0x53, 0x00, 0x3f, 0x00,
+    0x2e, 0x00, 0x20, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x06,
+    0x00, 0x0c, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x43, 0x38, 0x47, 0x35, 0x4b, 0x32, 0x4e, 0x2f, 0x52, 0x2d, 0x53, 0x2b,
+    0x57, 0x2a, 0x58, 0x27, 0x5b, 0x27, 0x5c, 0x25, 0x5d, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x61, 0x21, 0x64, 0x20, 0x65, 0x20, 0x65, 0x20, 0x65, 0x1f,
+    0x66, 0x1e, 0x68, 0x1d, 0xda, 0x00, 0xd4, 0x00, 0xd0, 0x00, 0xcb, 0x00,
+    0xc7, 0x00, 0xc2, 0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb8, 0x00, 0xb5, 0x00,
+    0xb2, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xaa, 0x00, 0xa8, 0x00, 0xa6, 0x00,
+    0xa4, 0x00, 0xa3, 0x01, 0xa1, 0x01, 0xa0, 0x01, 0x21, 0x1f, 0x27, 0x1b,
+    0x2c, 0x18, 0x31, 0x16, 0x36, 0x14, 0x3a, 0x13, 0x3e, 0x12, 0x42, 0x11,
+    0x45, 0x11, 0x49, 0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x11, 0x54, 0x11,
+    0x56, 0x11, 0x58, 0x11, 0x5a, 0x11, 0x5c, 0x11, 0x5d, 0x11, 0x5e, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3d, 0x00, 0x39, 0x00, 0x2f, 0x00, 0x1f, 0x00, 0x0b, 0x08, 0x00,
+    0x1c, 0x00, 0x2e, 0x00, 0x3f, 0x00, 0x4e, 0x00, 0x5b, 0x00, 0x66, 0x00,
+    0x70, 0x00, 0x78, 0x00, 0x80, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e, 0x00,
+    0x8b, 0x00, 0x77, 0x00, 0x63, 0x00, 0x50, 0x00, 0x3f, 0x00, 0x30, 0x00,
+    0x23, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x39, 0x46, 0x35,
+    0x4a, 0x32, 0x4e, 0x30, 0x50, 0x2e, 0x53, 0x2c, 0x55, 0x2a, 0x57, 0x29,
+    0x58, 0x27, 0x5c, 0x27, 0x5c, 0x25, 0x5d, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x22, 0x63, 0x20, 0x65, 0x20, 0x65, 0x20, 0x65, 0x20, 0x65, 0x1f,
+    0xda, 0x00, 0xd5, 0x00, 0xd1, 0x00, 0xcc, 0x00, 0xc8, 0x00, 0xc4, 0x00,
+    0xc1, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb7, 0x00, 0xb4, 0x00, 0xb2, 0x00,
+    0xaf, 0x00, 0xad, 0x00, 0xaa, 0x00, 0xa9, 0x00, 0xa7, 0x00, 0xa5, 0x00,
+    0xa4, 0x01, 0xa2, 0x01, 0x22, 0x1f, 0x27, 0x1b, 0x2c, 0x18, 0x30, 0x16,
+    0x35, 0x14, 0x39, 0x13, 0x3d, 0x13, 0x40, 0x12, 0x44, 0x11, 0x47, 0x11,
+    0x49, 0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x11, 0x54, 0x11, 0x56, 0x11,
+    0x58, 0x11, 0x59, 0x11, 0x5b, 0x11, 0x5c, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3b,
+    0x00, 0x32, 0x00, 0x25, 0x00, 0x14, 0x00, 0x02, 0x0f, 0x00, 0x20, 0x00,
+    0x30, 0x00, 0x3f, 0x00, 0x4d, 0x00, 0x58, 0x00, 0x63, 0x00, 0x6c, 0x00,
+    0x74, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbd, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa4, 0x00, 0x94, 0x00, 0x82, 0x00,
+    0x70, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3f, 0x00, 0x32, 0x00, 0x26, 0x00,
+    0x1c, 0x00, 0x13, 0x00, 0x0b, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x39, 0x46, 0x36, 0x4a, 0x33, 0x4d, 0x31,
+    0x4f, 0x2e, 0x52, 0x2d, 0x53, 0x2b, 0x57, 0x2a, 0x57, 0x28, 0x5a, 0x27,
+    0x5c, 0x27, 0x5c, 0x25, 0x5e, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x22,
+    0x62, 0x20, 0x65, 0x20, 0x65, 0x20, 0x65, 0x20, 0xda, 0x00, 0xd6, 0x00,
+    0xd1, 0x00, 0xcd, 0x00, 0xc9, 0x00, 0xc6, 0x00, 0xc2, 0x00, 0xbf, 0x00,
+    0xbc, 0x00, 0xb9, 0x00, 0xb6, 0x00, 0xb3, 0x00, 0xb1, 0x00, 0xaf, 0x00,
+    0xad, 0x00, 0xab, 0x00, 0xa9, 0x00, 0xa7, 0x00, 0xa6, 0x00, 0xa4, 0x00,
+    0x21, 0x1f, 0x26, 0x1c, 0x2b, 0x19, 0x2f, 0x17, 0x33, 0x15, 0x37, 0x14,
+    0x3b, 0x13, 0x3e, 0x12, 0x41, 0x12, 0x44, 0x11, 0x47, 0x11, 0x4a, 0x11,
+    0x4d, 0x11, 0x4f, 0x11, 0x51, 0x11, 0x54, 0x11, 0x55, 0x11, 0x57, 0x11,
+    0x59, 0x11, 0x5a, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x34, 0x00, 0x29,
+    0x00, 0x1b, 0x00, 0x0c, 0x04, 0x00, 0x14, 0x00, 0x23, 0x00, 0x32, 0x00,
+    0x3f, 0x00, 0x4b, 0x00, 0x56, 0x00, 0x60, 0x00, 0x68, 0x00, 0x70, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb, 0x00,
+    0xb4, 0x00, 0xa9, 0x00, 0x9b, 0x00, 0x8b, 0x00, 0x7b, 0x00, 0x6b, 0x00,
+    0x5b, 0x00, 0x4d, 0x00, 0x3f, 0x00, 0x33, 0x00, 0x28, 0x00, 0x1f, 0x00,
+    0x16, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x39, 0x45, 0x36, 0x49, 0x34, 0x4c, 0x31, 0x4f, 0x30, 0x51, 0x2e,
+    0x53, 0x2c, 0x55, 0x2a, 0x57, 0x2a, 0x57, 0x28, 0x5b, 0x27, 0x5c, 0x27,
+    0x5c, 0x25, 0x5e, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x22, 0x61, 0x21,
+    0x64, 0x20, 0x65, 0x20, 0xda, 0x00, 0xd6, 0x00, 0xd2, 0x00, 0xce, 0x00,
+    0xcb, 0x00, 0xc7, 0x00, 0xc4, 0x00, 0xc1, 0x00, 0xbe, 0x00, 0xbb, 0x00,
+    0xb8, 0x00, 0xb6, 0x00, 0xb3, 0x00, 0xb1, 0x00, 0xaf, 0x00, 0xad, 0x00,
+    0xab, 0x00, 0xa9, 0x00, 0xa8, 0x00, 0xa6, 0x00, 0x22, 0x1f, 0x26, 0x1c,
+    0x2a, 0x19, 0x2e, 0x17, 0x32, 0x16, 0x36, 0x14, 0x39, 0x13, 0x3d, 0x13,
+    0x40, 0x12, 0x43, 0x11, 0x45, 0x11, 0x48, 0x11, 0x4b, 0x11, 0x4d, 0x11,
+    0x4f, 0x11, 0x51, 0x11, 0x53, 0x11, 0x55, 0x11, 0x56, 0x11, 0x58, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3e, 0x00, 0x3c, 0x00, 0x36, 0x00, 0x2d, 0x00, 0x21, 0x00, 0x13,
+    0x00, 0x04, 0x0a, 0x00, 0x18, 0x00, 0x26, 0x00, 0x33, 0x00, 0x3f, 0x00,
+    0x4a, 0x00, 0x54, 0x00, 0x5d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xac, 0x00,
+    0xa0, 0x00, 0x93, 0x00, 0x84, 0x00, 0x75, 0x00, 0x66, 0x00, 0x58, 0x00,
+    0x4b, 0x00, 0x3f, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x19, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3a, 0x45, 0x37,
+    0x48, 0x35, 0x4a, 0x32, 0x4e, 0x31, 0x50, 0x2e, 0x53, 0x2e, 0x53, 0x2b,
+    0x57, 0x2a, 0x57, 0x29, 0x58, 0x27, 0x5b, 0x27, 0x5c, 0x27, 0x5c, 0x25,
+    0x5e, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x61, 0x21, 0x64, 0x20,
+    0xdb, 0x00, 0xd7, 0x00, 0xd3, 0x00, 0xcf, 0x00, 0xcc, 0x00, 0xc8, 0x00,
+    0xc5, 0x00, 0xc2, 0x00, 0xbf, 0x00, 0xbc, 0x00, 0xba, 0x00, 0xb7, 0x00,
+    0xb5, 0x00, 0xb3, 0x00, 0xb1, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xab, 0x00,
+    0xa9, 0x00, 0xa8, 0x00, 0x21, 0x20, 0x26, 0x1c, 0x2a, 0x1a, 0x2d, 0x18,
+    0x31, 0x16, 0x35, 0x14, 0x38, 0x13, 0x3b, 0x13, 0x3e, 0x12, 0x41, 0x12,
+    0x44, 0x11, 0x46, 0x11, 0x49, 0x11, 0x4b, 0x11, 0x4d, 0x11, 0x4f, 0x11,
+    0x51, 0x11, 0x53, 0x11, 0x55, 0x11, 0x56, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3d,
+    0x00, 0x38, 0x00, 0x30, 0x00, 0x25, 0x00, 0x19, 0x00, 0x0c, 0x01, 0x00,
+    0x0e, 0x00, 0x1c, 0x00, 0x28, 0x00, 0x34, 0x00, 0x3f, 0x00, 0x49, 0x00,
+    0x53, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x99, 0x00,
+    0x8b, 0x00, 0x7e, 0x00, 0x70, 0x00, 0x63, 0x00, 0x56, 0x00, 0x4a, 0x00,
+    0x3f, 0x00, 0x35, 0x00, 0x2c, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3a, 0x45, 0x37, 0x48, 0x35, 0x4a, 0x33,
+    0x4d, 0x31, 0x4f, 0x2f, 0x52, 0x2e, 0x53, 0x2c, 0x55, 0x2a, 0x57, 0x2a,
+    0x57, 0x29, 0x59, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x25, 0x5f, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x22, 0xdb, 0x00, 0xd7, 0x00,
+    0xd3, 0x00, 0xd0, 0x00, 0xcc, 0x00, 0xc9, 0x00, 0xc6, 0x00, 0xc3, 0x00,
+    0xc1, 0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb9, 0x00, 0xb7, 0x00, 0xb5, 0x00,
+    0xb3, 0x00, 0xb0, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xab, 0x00, 0xaa, 0x00,
+    0x21, 0x20, 0x25, 0x1d, 0x29, 0x1a, 0x2d, 0x18, 0x30, 0x17, 0x33, 0x15,
+    0x37, 0x14, 0x3a, 0x13, 0x3d, 0x13, 0x3f, 0x12, 0x42, 0x12, 0x44, 0x11,
+    0x47, 0x11, 0x49, 0x11, 0x4b, 0x11, 0x4d, 0x11, 0x4f, 0x11, 0x51, 0x11,
+    0x53, 0x11, 0x55, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x32,
+    0x00, 0x29, 0x00, 0x1e, 0x00, 0x12, 0x00, 0x06, 0x06, 0x00, 0x13, 0x00,
+    0x1f, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x3f, 0x00, 0x49, 0x00, 0x51, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd, 0x00,
+    0xb8, 0x00, 0xb1, 0x00, 0xa8, 0x00, 0x9d, 0x00, 0x92, 0x00, 0x85, 0x00,
+    0x78, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3f, 0x00,
+    0x36, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3a, 0x45, 0x38, 0x47, 0x35, 0x4a, 0x33, 0x4d, 0x31, 0x4f, 0x30,
+    0x51, 0x2e, 0x53, 0x2e, 0x53, 0x2b, 0x56, 0x2a, 0x57, 0x2a, 0x57, 0x28,
+    0x5a, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x25, 0x5f, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0xdb, 0x00, 0xd7, 0x00, 0xd4, 0x00, 0xd0, 0x00,
+    0xcd, 0x00, 0xca, 0x00, 0xc7, 0x00, 0xc5, 0x00, 0xc2, 0x00, 0xbf, 0x00,
+    0xbd, 0x00, 0xbb, 0x00, 0xb8, 0x00, 0xb6, 0x00, 0xb4, 0x00, 0xb2, 0x00,
+    0xb0, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xac, 0x00, 0x21, 0x20, 0x25, 0x1d,
+    0x29, 0x1a, 0x2c, 0x18, 0x2f, 0x17, 0x33, 0x16, 0x36, 0x14, 0x39, 0x13,
+    0x3b, 0x13, 0x3e, 0x13, 0x41, 0x12, 0x43, 0x11, 0x45, 0x11, 0x47, 0x11,
+    0x4a, 0x11, 0x4c, 0x11, 0x4e, 0x11, 0x4f, 0x11, 0x51, 0x11, 0x52, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x33, 0x00, 0x2b, 0x00, 0x22,
+    0x00, 0x17, 0x00, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x16, 0x00, 0x21, 0x00,
+    0x2c, 0x00, 0x36, 0x00, 0x3f, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb3, 0x00,
+    0xab, 0x00, 0xa1, 0x00, 0x97, 0x00, 0x8b, 0x00, 0x80, 0x00, 0x74, 0x00,
+    0x68, 0x00, 0x5d, 0x00, 0x53, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x36, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3b, 0x44, 0x39,
+    0x46, 0x35, 0x4a, 0x34, 0x4c, 0x31, 0x4f, 0x31, 0x4f, 0x2e, 0x53, 0x2e,
+    0x53, 0x2c, 0x55, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x58, 0x27, 0x5b, 0x27,
+    0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x24, 0x5f, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0xdb, 0x00, 0xd8, 0x00, 0xd4, 0x00, 0xd1, 0x00, 0xce, 0x00, 0xcb, 0x00,
+    0xc8, 0x00, 0xc6, 0x00, 0xc3, 0x00, 0xc1, 0x00, 0xbe, 0x00, 0xbc, 0x00,
+    0xba, 0x00, 0xb8, 0x00, 0xb6, 0x00, 0xb4, 0x00, 0xb2, 0x00, 0xb0, 0x00,
+    0xaf, 0x00, 0xad, 0x00, 0x21, 0x20, 0x25, 0x1d, 0x28, 0x1b, 0x2b, 0x18,
+    0x2f, 0x17, 0x32, 0x16, 0x35, 0x14, 0x38, 0x14, 0x3a, 0x13, 0x3d, 0x13,
+    0x3f, 0x12, 0x42, 0x12, 0x44, 0x11, 0x46, 0x11, 0x48, 0x11, 0x4a, 0x11,
+    0x4c, 0x11, 0x4e, 0x11, 0x4f, 0x11, 0x51, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e,
+    0x00, 0x3a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x25, 0x00, 0x1c, 0x00, 0x11,
+    0x00, 0x07, 0x03, 0x00, 0x0e, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2d, 0x00,
+    0x36, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xbe, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb4, 0x00, 0xad, 0x00, 0xa5, 0x00,
+    0x9b, 0x00, 0x91, 0x00, 0x86, 0x00, 0x7b, 0x00, 0x70, 0x00, 0x65, 0x00,
+    0x5b, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3b, 0x44, 0x39, 0x46, 0x36, 0x4a, 0x35,
+    0x4a, 0x32, 0x4e, 0x31, 0x4f, 0x2f, 0x51, 0x2e, 0x53, 0x2e, 0x53, 0x2b,
+    0x56, 0x2a, 0x57, 0x2a, 0x57, 0x29, 0x59, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0x5c, 0x26, 0x5c, 0x24, 0x5f, 0x23, 0x60, 0x23, 0xdb, 0x00, 0xd8, 0x00,
+    0xd5, 0x00, 0xd2, 0x00, 0xcf, 0x00, 0xcc, 0x00, 0xca, 0x00, 0xc6, 0x00,
+    0xc4, 0x00, 0xc2, 0x00, 0xbf, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb9, 0x00,
+    0xb8, 0x00, 0xb5, 0x00, 0xb4, 0x00, 0xb2, 0x00, 0xb0, 0x00, 0xaf, 0x00,
+    0x21, 0x20, 0x25, 0x1d, 0x28, 0x1b, 0x2b, 0x19, 0x2e, 0x17, 0x31, 0x16,
+    0x34, 0x15, 0x37, 0x14, 0x39, 0x13, 0x3b, 0x13, 0x3e, 0x13, 0x40, 0x12,
+    0x42, 0x12, 0x45, 0x11, 0x46, 0x11, 0x49, 0x11, 0x4a, 0x11, 0x4c, 0x11,
+    0x4e, 0x11, 0x4f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11,
+    0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x7f, 0x11, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x40, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x27, 0x68, 0x32, 0x51, 0x36, 0x4a, 0x38, 0x47,
+    0x3a, 0x46, 0x3a, 0x45, 0x3b, 0x44, 0x3c, 0x43, 0x3c, 0x43, 0x3c, 0x43,
+    0x3c, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x41,
+    0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x41, 0x0e, 0x16, 0x27,
+    0x23, 0x31, 0x2a, 0x35, 0x2e, 0x38, 0x31, 0x39, 0x33, 0x3a, 0x34, 0x3b,
+    0x35, 0x3b, 0x36, 0x3c, 0x37, 0x3c, 0x38, 0x3c, 0x38, 0x3c, 0x39, 0x3d,
+    0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3b, 0x3d,
+    0x68, 0x00, 0x32, 0x27, 0x36, 0x31, 0x38, 0x35, 0x3a, 0x38, 0x3a, 0x39,
+    0x3b, 0x3a, 0x3c, 0x3b, 0x3c, 0x3b, 0x3c, 0x3c, 0x3c, 0x3c, 0x3d, 0x3c,
+    0x3d, 0x3c, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
+    0x3d, 0x3d, 0x3d, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x22, 0x32, 0x28, 0x36, 0x2c, 0x38, 0x2f, 0x3a, 0x32, 0x3a, 0x34, 0x3b,
+    0x35, 0x3c, 0x36, 0x3c, 0x37, 0x3c, 0x37, 0x3c, 0x38, 0x3d, 0x39, 0x3d,
+    0x39, 0x3d, 0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d,
+    0x3b, 0x3d, 0x3b, 0x3d, 0x00, 0x97, 0x01, 0x67, 0x09, 0x56, 0x11, 0x4f,
+    0x17, 0x4b, 0x1c, 0x49, 0x20, 0x47, 0x23, 0x46, 0x25, 0x45, 0x28, 0x44,
+    0x2a, 0x44, 0x2b, 0x43, 0x2c, 0x43, 0x2e, 0x43, 0x2f, 0x42, 0x30, 0x42,
+    0x31, 0x42, 0x31, 0x42, 0x32, 0x42, 0x33, 0x42, 0x1a, 0x5c, 0x25, 0x4f,
+    0x2a, 0x4a, 0x2e, 0x48, 0x31, 0x46, 0x33, 0x45, 0x34, 0x44, 0x36, 0x44,
+    0x37, 0x43, 0x37, 0x43, 0x38, 0x43, 0x38, 0x42, 0x39, 0x42, 0x39, 0x42,
+    0x39, 0x41, 0x3a, 0x41, 0x3a, 0x41, 0x3a, 0x41, 0x3b, 0x41, 0x3b, 0x41,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x5f,
+    0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x33, 0x00, 0x1f, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x22, 0x28, 0x25, 0x2d,
+    0x28, 0x30, 0x2b, 0x32, 0x2e, 0x34, 0x2f, 0x35, 0x31, 0x36, 0x32, 0x37,
+    0x33, 0x38, 0x34, 0x38, 0x35, 0x39, 0x36, 0x39, 0x36, 0x39, 0x36, 0x3a,
+    0x37, 0x3a, 0x37, 0x3a, 0x38, 0x3b, 0x38, 0x3b, 0x39, 0x3b, 0x39, 0x3b,
+    0x00, 0xb7, 0x00, 0x8b, 0x02, 0x72, 0x07, 0x65, 0x0c, 0x5c, 0x11, 0x57,
+    0x15, 0x53, 0x18, 0x50, 0x1b, 0x4e, 0x1d, 0x4d, 0x20, 0x4b, 0x22, 0x4a,
+    0x23, 0x49, 0x25, 0x48, 0x26, 0x48, 0x28, 0x47, 0x29, 0x47, 0x2a, 0x46,
+    0x2b, 0x46, 0x2c, 0x45, 0x16, 0x6d, 0x1f, 0x5f, 0x24, 0x57, 0x28, 0x53,
+    0x2b, 0x50, 0x2d, 0x4d, 0x2f, 0x4c, 0x31, 0x4a, 0x32, 0x49, 0x33, 0x48,
+    0x34, 0x48, 0x35, 0x47, 0x35, 0x46, 0x36, 0x46, 0x36, 0x45, 0x37, 0x45,
+    0x38, 0x45, 0x38, 0x45, 0x39, 0x44, 0x39, 0x44, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x8b, 0x00, 0x44, 0x00, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x2e, 0x00,
+    0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x25, 0x23, 0x28, 0x26, 0x2b, 0x28, 0x2e,
+    0x2a, 0x2f, 0x2c, 0x31, 0x2e, 0x32, 0x2f, 0x33, 0x30, 0x34, 0x31, 0x35,
+    0x32, 0x36, 0x33, 0x36, 0x33, 0x36, 0x34, 0x37, 0x35, 0x38, 0x36, 0x38,
+    0x36, 0x39, 0x36, 0x39, 0x36, 0x39, 0x36, 0x39, 0x00, 0xc5, 0x00, 0xa0,
+    0x00, 0x87, 0x03, 0x76, 0x06, 0x6b, 0x0a, 0x64, 0x0e, 0x5f, 0x11, 0x5b,
+    0x13, 0x57, 0x16, 0x55, 0x18, 0x53, 0x1a, 0x51, 0x1c, 0x50, 0x1e, 0x4e,
+    0x20, 0x4d, 0x21, 0x4c, 0x22, 0x4b, 0x24, 0x4a, 0x25, 0x49, 0x26, 0x48,
+    0x15, 0x72, 0x1b, 0x66, 0x20, 0x5f, 0x24, 0x5a, 0x27, 0x56, 0x29, 0x53,
+    0x2c, 0x51, 0x2d, 0x50, 0x2f, 0x4e, 0x30, 0x4d, 0x31, 0x4c, 0x32, 0x4b,
+    0x32, 0x4a, 0x33, 0x49, 0x34, 0x49, 0x35, 0x48, 0x35, 0x48, 0x35, 0x47,
+    0x35, 0x46, 0x36, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xb3, 0x00, 0x9f, 0x00, 0x6d, 0x00, 0x33, 0x00, 0x01, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x24, 0x00, 0x11, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x22, 0x24, 0x23, 0x26, 0x25, 0x29, 0x27, 0x2b, 0x28, 0x2c, 0x2a, 0x2e,
+    0x2c, 0x2f, 0x2d, 0x30, 0x2e, 0x31, 0x2f, 0x32, 0x30, 0x33, 0x30, 0x33,
+    0x32, 0x34, 0x33, 0x35, 0x33, 0x36, 0x33, 0x36, 0x33, 0x36, 0x34, 0x36,
+    0x35, 0x36, 0x36, 0x37, 0x00, 0xcb, 0x00, 0xad, 0x00, 0x96, 0x01, 0x84,
+    0x03, 0x78, 0x06, 0x70, 0x09, 0x69, 0x0b, 0x64, 0x0e, 0x60, 0x10, 0x5d,
+    0x13, 0x59, 0x15, 0x57, 0x17, 0x56, 0x19, 0x54, 0x1a, 0x52, 0x1c, 0x51,
+    0x1d, 0x50, 0x1f, 0x4f, 0x1f, 0x4f, 0x21, 0x4e, 0x14, 0x75, 0x19, 0x6b,
+    0x1e, 0x64, 0x22, 0x5f, 0x24, 0x5b, 0x27, 0x58, 0x29, 0x56, 0x2a, 0x54,
+    0x2c, 0x52, 0x2d, 0x51, 0x2e, 0x4f, 0x2f, 0x4e, 0x30, 0x4e, 0x31, 0x4d,
+    0x31, 0x4c, 0x32, 0x4a, 0x33, 0x4a, 0x33, 0x4a, 0x34, 0x4a, 0x35, 0x4a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0xaa,
+    0x00, 0x85, 0x00, 0x57, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x00, 0x38, 0x00, 0x2c, 0x00, 0x1d, 0x00, 0x0d, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x22, 0x23, 0x23, 0x25,
+    0x24, 0x27, 0x25, 0x28, 0x27, 0x2a, 0x28, 0x2c, 0x2a, 0x2d, 0x2b, 0x2e,
+    0x2c, 0x2f, 0x2d, 0x30, 0x2e, 0x31, 0x2f, 0x32, 0x30, 0x32, 0x30, 0x33,
+    0x31, 0x33, 0x32, 0x33, 0x33, 0x34, 0x33, 0x35, 0x33, 0x36, 0x33, 0x36,
+    0x00, 0xcf, 0x00, 0xb6, 0x00, 0xa0, 0x00, 0x8f, 0x01, 0x83, 0x03, 0x79,
+    0x05, 0x72, 0x08, 0x6c, 0x0a, 0x68, 0x0c, 0x64, 0x0f, 0x61, 0x10, 0x5e,
+    0x12, 0x5b, 0x14, 0x59, 0x16, 0x58, 0x17, 0x56, 0x19, 0x55, 0x1a, 0x53,
+    0x1b, 0x52, 0x1c, 0x50, 0x13, 0x77, 0x18, 0x6e, 0x1c, 0x68, 0x1f, 0x63,
+    0x22, 0x5f, 0x24, 0x5c, 0x26, 0x59, 0x28, 0x57, 0x29, 0x56, 0x2a, 0x54,
+    0x2c, 0x53, 0x2d, 0x52, 0x2e, 0x50, 0x2e, 0x4f, 0x2f, 0x4f, 0x31, 0x4e,
+    0x31, 0x4d, 0x31, 0x4d, 0x31, 0x4c, 0x32, 0x4a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0x00, 0xb0, 0x00, 0x95, 0x00, 0x70,
+    0x00, 0x48, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3a, 0x00,
+    0x31, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x23, 0x22, 0x24, 0x24, 0x26, 0x25, 0x27,
+    0x26, 0x29, 0x27, 0x2a, 0x28, 0x2b, 0x2a, 0x2d, 0x2a, 0x2d, 0x2c, 0x2e,
+    0x2d, 0x30, 0x2d, 0x30, 0x2e, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33,
+    0x30, 0x33, 0x31, 0x33, 0x32, 0x33, 0x33, 0x34, 0x00, 0xd1, 0x00, 0xbc,
+    0x00, 0xa9, 0x00, 0x99, 0x00, 0x8c, 0x02, 0x82, 0x03, 0x7a, 0x05, 0x74,
+    0x07, 0x6f, 0x09, 0x6b, 0x0b, 0x67, 0x0d, 0x63, 0x0f, 0x61, 0x10, 0x5f,
+    0x12, 0x5c, 0x14, 0x5a, 0x15, 0x58, 0x16, 0x58, 0x18, 0x57, 0x19, 0x56,
+    0x13, 0x78, 0x17, 0x70, 0x1b, 0x6a, 0x1e, 0x66, 0x20, 0x62, 0x22, 0x5f,
+    0x24, 0x5c, 0x26, 0x5b, 0x27, 0x58, 0x29, 0x57, 0x2a, 0x56, 0x2b, 0x53,
+    0x2c, 0x53, 0x2d, 0x52, 0x2e, 0x51, 0x2e, 0x50, 0x2f, 0x4f, 0x30, 0x4f,
+    0x31, 0x4f, 0x31, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbb, 0x00, 0xb3, 0x00, 0x9f, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x3d,
+    0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x2b, 0x00,
+    0x1f, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x22, 0x22, 0x22, 0x24, 0x23, 0x25, 0x24, 0x27, 0x25, 0x27, 0x27, 0x28,
+    0x28, 0x2a, 0x28, 0x2b, 0x2a, 0x2c, 0x2b, 0x2d, 0x2b, 0x2d, 0x2d, 0x2e,
+    0x2d, 0x30, 0x2d, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x33,
+    0x30, 0x33, 0x31, 0x33, 0x00, 0xd3, 0x00, 0xc1, 0x00, 0xaf, 0x00, 0xa1,
+    0x00, 0x94, 0x00, 0x8a, 0x02, 0x82, 0x03, 0x7b, 0x05, 0x76, 0x07, 0x71,
+    0x09, 0x6d, 0x0a, 0x69, 0x0c, 0x66, 0x0e, 0x63, 0x0f, 0x61, 0x10, 0x60,
+    0x12, 0x5d, 0x13, 0x5c, 0x14, 0x59, 0x16, 0x58, 0x13, 0x79, 0x16, 0x72,
+    0x19, 0x6d, 0x1c, 0x69, 0x1f, 0x65, 0x20, 0x61, 0x23, 0x60, 0x24, 0x5c,
+    0x26, 0x5b, 0x27, 0x59, 0x28, 0x57, 0x2a, 0x57, 0x2a, 0x55, 0x2b, 0x53,
+    0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2e, 0x51, 0x2e, 0x4f, 0x2f, 0x4f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb6,
+    0x00, 0xa6, 0x00, 0x8e, 0x00, 0x71, 0x00, 0x52, 0x00, 0x35, 0x00, 0x19,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x00, 0x3c, 0x00, 0x37, 0x00, 0x2f, 0x00, 0x25, 0x00, 0x1b, 0x00,
+    0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x23,
+    0x23, 0x24, 0x24, 0x25, 0x25, 0x27, 0x26, 0x28, 0x26, 0x28, 0x28, 0x2a,
+    0x28, 0x2b, 0x2a, 0x2b, 0x2b, 0x2d, 0x2a, 0x2d, 0x2c, 0x2d, 0x2d, 0x2e,
+    0x2d, 0x30, 0x2d, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x32,
+    0x00, 0xd4, 0x00, 0xc4, 0x00, 0xb5, 0x00, 0xa7, 0x00, 0x9b, 0x00, 0x91,
+    0x01, 0x88, 0x02, 0x82, 0x03, 0x7b, 0x05, 0x77, 0x07, 0x73, 0x08, 0x6e,
+    0x0a, 0x6b, 0x0b, 0x69, 0x0c, 0x66, 0x0e, 0x63, 0x0f, 0x61, 0x10, 0x60,
+    0x12, 0x5f, 0x13, 0x5c, 0x12, 0x79, 0x15, 0x73, 0x18, 0x6e, 0x1b, 0x6a,
+    0x1d, 0x67, 0x20, 0x65, 0x21, 0x61, 0x23, 0x60, 0x24, 0x5d, 0x26, 0x5c,
+    0x27, 0x5a, 0x27, 0x58, 0x29, 0x57, 0x2a, 0x57, 0x2a, 0x55, 0x2b, 0x53,
+    0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x51, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x97,
+    0x00, 0x7e, 0x00, 0x64, 0x00, 0x48, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3d, 0x00,
+    0x39, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f, 0x00,
+    0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x24, 0x25,
+    0x24, 0x26, 0x25, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x2a, 0x28, 0x2b,
+    0x2a, 0x2b, 0x2b, 0x2c, 0x2b, 0x2d, 0x2b, 0x2d, 0x2d, 0x2d, 0x2d, 0x2f,
+    0x2d, 0x30, 0x2d, 0x30, 0x2f, 0x30, 0x30, 0x30, 0x00, 0xd5, 0x00, 0xc7,
+    0x00, 0xb9, 0x00, 0xad, 0x00, 0xa1, 0x00, 0x97, 0x00, 0x8f, 0x01, 0x87,
+    0x02, 0x82, 0x03, 0x7b, 0x05, 0x77, 0x06, 0x74, 0x08, 0x6f, 0x09, 0x6c,
+    0x0b, 0x6b, 0x0c, 0x68, 0x0d, 0x65, 0x0e, 0x63, 0x0f, 0x62, 0x10, 0x60,
+    0x12, 0x7a, 0x15, 0x75, 0x18, 0x70, 0x1a, 0x6c, 0x1d, 0x69, 0x1e, 0x65,
+    0x20, 0x64, 0x21, 0x61, 0x23, 0x60, 0x24, 0x5d, 0x26, 0x5c, 0x27, 0x5b,
+    0x27, 0x58, 0x28, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x55, 0x2b, 0x53,
+    0x2c, 0x53, 0x2e, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x89, 0x00, 0x71,
+    0x00, 0x59, 0x00, 0x41, 0x00, 0x29, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x34, 0x00,
+    0x2d, 0x00, 0x25, 0x00, 0x1d, 0x00, 0x15, 0x00, 0x0d, 0x00, 0x06, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x21, 0x22, 0x22, 0x23, 0x23, 0x24, 0x23, 0x24, 0x24, 0x25, 0x25, 0x27,
+    0x25, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x29, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x2d, 0x2b, 0x2d, 0x2c, 0x2d, 0x2d, 0x2d, 0x2d, 0x2f,
+    0x2d, 0x30, 0x2d, 0x30, 0x00, 0xd6, 0x00, 0xc9, 0x00, 0xbc, 0x00, 0xb1,
+    0x00, 0xa6, 0x00, 0x9c, 0x00, 0x94, 0x00, 0x8c, 0x02, 0x86, 0x02, 0x81,
+    0x03, 0x7c, 0x05, 0x78, 0x06, 0x75, 0x07, 0x71, 0x09, 0x6d, 0x0a, 0x6c,
+    0x0b, 0x6a, 0x0c, 0x67, 0x0d, 0x65, 0x0e, 0x62, 0x12, 0x7b, 0x15, 0x76,
+    0x18, 0x72, 0x1a, 0x6d, 0x1b, 0x6a, 0x1d, 0x68, 0x1f, 0x65, 0x20, 0x63,
+    0x22, 0x60, 0x23, 0x60, 0x23, 0x5d, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5a,
+    0x28, 0x57, 0x29, 0x57, 0x2a, 0x57, 0x2a, 0x56, 0x2a, 0x55, 0x2b, 0x53,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xba,
+    0x00, 0xb1, 0x00, 0xa3, 0x00, 0x91, 0x00, 0x7c, 0x00, 0x66, 0x00, 0x50,
+    0x00, 0x3a, 0x00, 0x25, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x36, 0x00, 0x30, 0x00, 0x29, 0x00,
+    0x22, 0x00, 0x1a, 0x00, 0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x21, 0x22, 0x22, 0x23,
+    0x22, 0x23, 0x23, 0x24, 0x24, 0x25, 0x24, 0x25, 0x25, 0x27, 0x26, 0x27,
+    0x27, 0x28, 0x27, 0x28, 0x28, 0x2a, 0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x2c, 0x2b, 0x2d, 0x2c, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2f,
+    0x00, 0xd6, 0x00, 0xcb, 0x00, 0xbf, 0x00, 0xb4, 0x00, 0xab, 0x00, 0xa1,
+    0x00, 0x99, 0x00, 0x91, 0x01, 0x8b, 0x02, 0x85, 0x02, 0x81, 0x04, 0x7c,
+    0x05, 0x78, 0x06, 0x76, 0x07, 0x73, 0x08, 0x6f, 0x09, 0x6c, 0x0b, 0x6b,
+    0x0c, 0x6a, 0x0c, 0x67, 0x12, 0x7b, 0x15, 0x76, 0x17, 0x72, 0x19, 0x6e,
+    0x1a, 0x6c, 0x1d, 0x69, 0x1d, 0x66, 0x20, 0x65, 0x20, 0x62, 0x22, 0x60,
+    0x23, 0x60, 0x23, 0x5d, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5b, 0x27, 0x58,
+    0x29, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x56, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb3, 0x00, 0xa7,
+    0x00, 0x98, 0x00, 0x85, 0x00, 0x72, 0x00, 0x5d, 0x00, 0x49, 0x00, 0x35,
+    0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00,
+    0x3b, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2c, 0x00, 0x26, 0x00, 0x1f, 0x00,
+    0x18, 0x00, 0x11, 0x00, 0x0b, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24,
+    0x24, 0x25, 0x24, 0x25, 0x25, 0x26, 0x25, 0x27, 0x27, 0x27, 0x27, 0x28,
+    0x28, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2b, 0x2b, 0x2c,
+    0x2b, 0x2d, 0x2b, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x00, 0xd7, 0x00, 0xcc,
+    0x00, 0xc2, 0x00, 0xb8, 0x00, 0xae, 0x00, 0xa5, 0x00, 0x9e, 0x00, 0x95,
+    0x00, 0x90, 0x01, 0x8a, 0x02, 0x85, 0x03, 0x81, 0x04, 0x7c, 0x05, 0x78,
+    0x06, 0x76, 0x07, 0x74, 0x08, 0x70, 0x09, 0x6d, 0x0a, 0x6c, 0x0b, 0x6a,
+    0x12, 0x7b, 0x14, 0x77, 0x16, 0x73, 0x18, 0x70, 0x1a, 0x6d, 0x1c, 0x6a,
+    0x1d, 0x69, 0x1e, 0x65, 0x20, 0x65, 0x20, 0x62, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x5d, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x59, 0x28, 0x57,
+    0x2a, 0x57, 0x2a, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xaa, 0x00, 0x9d, 0x00, 0x8d,
+    0x00, 0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x38, 0x00,
+    0x34, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x22, 0x00, 0x1c, 0x00, 0x16, 0x00,
+    0x10, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x23, 0x24, 0x24, 0x25,
+    0x25, 0x25, 0x25, 0x27, 0x26, 0x27, 0x27, 0x28, 0x26, 0x28, 0x28, 0x28,
+    0x28, 0x29, 0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2d,
+    0x2b, 0x2d, 0x2c, 0x2d, 0x00, 0xd7, 0x00, 0xcd, 0x00, 0xc4, 0x00, 0xbb,
+    0x00, 0xb1, 0x00, 0xa9, 0x00, 0xa1, 0x00, 0x9a, 0x00, 0x93, 0x00, 0x8e,
+    0x01, 0x88, 0x02, 0x84, 0x03, 0x81, 0x04, 0x7c, 0x05, 0x79, 0x06, 0x77,
+    0x07, 0x75, 0x07, 0x72, 0x09, 0x6e, 0x09, 0x6d, 0x12, 0x7b, 0x14, 0x77,
+    0x15, 0x73, 0x18, 0x71, 0x1a, 0x6d, 0x1a, 0x6b, 0x1d, 0x69, 0x1d, 0x67,
+    0x1f, 0x65, 0x20, 0x65, 0x21, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x5e,
+    0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5a, 0x27, 0x58, 0x29, 0x57,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc,
+    0x00, 0xb6, 0x00, 0xad, 0x00, 0xa1, 0x00, 0x93, 0x00, 0x83, 0x00, 0x72,
+    0x00, 0x60, 0x00, 0x4f, 0x00, 0x3d, 0x00, 0x2d, 0x00, 0x1d, 0x00, 0x0e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x39, 0x00, 0x35, 0x00, 0x31, 0x00,
+    0x2b, 0x00, 0x26, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x14, 0x00, 0x0f, 0x00,
+    0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x25, 0x24, 0x25, 0x25, 0x26,
+    0x25, 0x27, 0x27, 0x27, 0x27, 0x28, 0x26, 0x28, 0x28, 0x28, 0x28, 0x29,
+    0x28, 0x2b, 0x29, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2d,
+    0x00, 0xd8, 0x00, 0xcf, 0x00, 0xc6, 0x00, 0xbd, 0x00, 0xb4, 0x00, 0xad,
+    0x00, 0xa4, 0x00, 0x9e, 0x00, 0x97, 0x00, 0x92, 0x01, 0x8d, 0x02, 0x88,
+    0x02, 0x84, 0x03, 0x81, 0x04, 0x7d, 0x05, 0x79, 0x06, 0x77, 0x07, 0x75,
+    0x07, 0x73, 0x09, 0x70, 0x12, 0x7c, 0x13, 0x78, 0x15, 0x75, 0x18, 0x72,
+    0x19, 0x6e, 0x1a, 0x6d, 0x1c, 0x69, 0x1d, 0x69, 0x1e, 0x66, 0x20, 0x65,
+    0x20, 0x64, 0x21, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x5e, 0x25, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5b, 0x27, 0x59, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf,
+    0x00, 0xa5, 0x00, 0x98, 0x00, 0x89, 0x00, 0x7a, 0x00, 0x6a, 0x00, 0x59,
+    0x00, 0x49, 0x00, 0x39, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00,
+    0x3d, 0x00, 0x3a, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x28, 0x00,
+    0x23, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x09, 0x00,
+    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23,
+    0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x27, 0x25, 0x27,
+    0x27, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x28, 0x28, 0x29, 0x28, 0x2b,
+    0x29, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x00, 0xd8, 0x00, 0xd0,
+    0x00, 0xc7, 0x00, 0xbe, 0x00, 0xb7, 0x00, 0xaf, 0x00, 0xa8, 0x00, 0xa1,
+    0x00, 0x9b, 0x00, 0x95, 0x00, 0x90, 0x01, 0x8c, 0x02, 0x87, 0x02, 0x84,
+    0x03, 0x81, 0x04, 0x7d, 0x05, 0x79, 0x06, 0x77, 0x06, 0x76, 0x07, 0x74,
+    0x11, 0x7c, 0x13, 0x78, 0x15, 0x76, 0x17, 0x72, 0x18, 0x6f, 0x1a, 0x6d,
+    0x1b, 0x6a, 0x1d, 0x69, 0x1d, 0x68, 0x1f, 0x65, 0x20, 0x65, 0x20, 0x64,
+    0x22, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x5e, 0x25, 0x5c, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x00, 0x2f, 0x00, 0x5f, 0x00, 0x99, 0x00, 0xac,
+    0x00, 0xb3, 0x00, 0xb7, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc,
+    0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe,
+    0x00, 0x9a, 0x00, 0x6d, 0x00, 0x8d, 0x00, 0x9b, 0x00, 0xa6, 0x00, 0xb2,
+    0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd,
+    0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0b, 0x3b, 0x00, 0x6f, 0x00, 0x9f, 0x00, 0xaf,
+    0x00, 0xb5, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd,
+    0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe,
+    0x07, 0x47, 0x00, 0x7f, 0x00, 0xa5, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xba,
+    0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbe,
+    0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x24, 0x23, 0x24,
+    0x24, 0x25, 0x24, 0x25, 0x25, 0x25, 0x25, 0x27, 0x26, 0x27, 0x27, 0x27,
+    0x27, 0x29, 0x27, 0x28, 0x28, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x29, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x2b, 0x00, 0xd8, 0x00, 0xd1, 0x00, 0xc9, 0x00, 0xc0,
+    0x00, 0xba, 0x00, 0xb1, 0x00, 0xac, 0x00, 0xa4, 0x00, 0x9e, 0x00, 0x98,
+    0x00, 0x93, 0x00, 0x8f, 0x01, 0x8b, 0x02, 0x86, 0x02, 0x83, 0x03, 0x81,
+    0x04, 0x7d, 0x05, 0x79, 0x06, 0x78, 0x06, 0x76, 0x11, 0x7c, 0x13, 0x79,
+    0x15, 0x76, 0x17, 0x72, 0x18, 0x71, 0x1a, 0x6d, 0x1a, 0x6d, 0x1c, 0x69,
+    0x1d, 0x69, 0x1d, 0x66, 0x20, 0x65, 0x20, 0x65, 0x20, 0x63, 0x22, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x5f, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5c,
+    0x00, 0x00, 0x00, 0x0f, 0x00, 0x5f, 0x00, 0x8b, 0x00, 0x9f, 0x00, 0xaa,
+    0x00, 0xb0, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba,
+    0x00, 0xbb, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0x6d, 0x00, 0x54,
+    0x00, 0x6b, 0x00, 0x87, 0x00, 0x98, 0x00, 0xa6, 0x00, 0xb0, 0x00, 0xb3,
+    0x00, 0xb6, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbb,
+    0x00, 0xbc, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x17, 0x07, 0x02, 0x27, 0x00, 0x6f, 0x00, 0x93, 0x00, 0xa4, 0x00, 0xad,
+    0x00, 0xb2, 0x00, 0xb5, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb,
+    0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd, 0x0f, 0x0f, 0x00, 0x3f,
+    0x00, 0x7f, 0x00, 0x9c, 0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb5, 0x00, 0xb7,
+    0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbc, 0x00, 0xbd,
+    0x00, 0xbd, 0x00, 0xbd, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x25,
+    0x25, 0x25, 0x25, 0x26, 0x25, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x28,
+    0x27, 0x28, 0x28, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x28, 0x2b, 0x2a, 0x2b,
+    0x00, 0xd9, 0x00, 0xd2, 0x00, 0xc9, 0x00, 0xc2, 0x00, 0xbb, 0x00, 0xb4,
+    0x00, 0xae, 0x00, 0xa7, 0x00, 0xa1, 0x00, 0x9d, 0x00, 0x96, 0x00, 0x92,
+    0x01, 0x8e, 0x01, 0x89, 0x02, 0x86, 0x02, 0x83, 0x03, 0x81, 0x04, 0x7e,
+    0x05, 0x7a, 0x06, 0x78, 0x11, 0x7c, 0x13, 0x79, 0x15, 0x76, 0x16, 0x73,
+    0x18, 0x72, 0x19, 0x6e, 0x1a, 0x6d, 0x1b, 0x6a, 0x1d, 0x69, 0x1d, 0x69,
+    0x1e, 0x65, 0x20, 0x65, 0x20, 0x65, 0x20, 0x62, 0x22, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x5f, 0x24, 0x5c, 0x26, 0x5c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x05, 0x00, 0x44, 0x00, 0x6d, 0x00, 0x85, 0x00, 0x95, 0x00, 0x9f,
+    0x00, 0xa6, 0x00, 0xab, 0x00, 0xae, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5,
+    0x00, 0xb6, 0x00, 0xb7, 0x00, 0x8d, 0x00, 0x6b, 0x00, 0x28, 0x00, 0x52,
+    0x00, 0x70, 0x00, 0x85, 0x00, 0x95, 0x00, 0x9f, 0x00, 0xa6, 0x00, 0xab,
+    0x00, 0xae, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x12, 0x02,
+    0x00, 0x22, 0x00, 0x58, 0x00, 0x7a, 0x00, 0x8f, 0x00, 0x9c, 0x00, 0xa4,
+    0x00, 0xaa, 0x00, 0xae, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00, 0xb7,
+    0x00, 0xb8, 0x00, 0xb9, 0x26, 0x00, 0x05, 0x05, 0x00, 0x3f, 0x00, 0x6d,
+    0x00, 0x88, 0x00, 0x99, 0x00, 0xa3, 0x00, 0xaa, 0x00, 0xae, 0x00, 0xb1,
+    0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xba,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23,
+    0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x24, 0x25, 0x25, 0x25,
+    0x25, 0x27, 0x26, 0x27, 0x27, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x28,
+    0x28, 0x28, 0x28, 0x29, 0x28, 0x2b, 0x28, 0x2b, 0x00, 0xd9, 0x00, 0xd2,
+    0x00, 0xca, 0x00, 0xc4, 0x00, 0xbd, 0x00, 0xb6, 0x00, 0xb0, 0x00, 0xaa,
+    0x00, 0xa3, 0x00, 0x9f, 0x00, 0x9a, 0x00, 0x94, 0x00, 0x91, 0x01, 0x8e,
+    0x02, 0x89, 0x02, 0x85, 0x02, 0x83, 0x03, 0x81, 0x04, 0x7e, 0x05, 0x7a,
+    0x11, 0x7c, 0x13, 0x7a, 0x15, 0x76, 0x15, 0x74, 0x18, 0x72, 0x18, 0x6f,
+    0x1a, 0x6d, 0x1a, 0x6c, 0x1c, 0x69, 0x1d, 0x69, 0x1d, 0x67, 0x1f, 0x65,
+    0x20, 0x65, 0x20, 0x65, 0x21, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x5f, 0x24, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+    0x00, 0x33, 0x00, 0x57, 0x00, 0x70, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x97,
+    0x00, 0x9e, 0x00, 0xa3, 0x00, 0xa7, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf,
+    0x00, 0x9b, 0x00, 0x87, 0x00, 0x52, 0x00, 0x11, 0x00, 0x39, 0x00, 0x57,
+    0x00, 0x70, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x97, 0x00, 0x9e, 0x00, 0xa3,
+    0x00, 0xa7, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x25, 0x00, 0x0b, 0x09, 0x00, 0x21,
+    0x00, 0x4a, 0x00, 0x68, 0x00, 0x7d, 0x00, 0x8b, 0x00, 0x96, 0x00, 0x9d,
+    0x00, 0xa3, 0x00, 0xa8, 0x00, 0xab, 0x00, 0xae, 0x00, 0xb0, 0x00, 0xb2,
+    0x33, 0x00, 0x1c, 0x00, 0x00, 0x12, 0x00, 0x3f, 0x00, 0x62, 0x00, 0x7a,
+    0x00, 0x8a, 0x00, 0x96, 0x00, 0x9e, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xac,
+    0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb4, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x24,
+    0x23, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x26, 0x25, 0x27,
+    0x27, 0x27, 0x27, 0x27, 0x27, 0x28, 0x27, 0x28, 0x28, 0x28, 0x28, 0x28,
+    0x28, 0x28, 0x28, 0x2a, 0x00, 0xd9, 0x00, 0xd2, 0x00, 0xcb, 0x00, 0xc6,
+    0x00, 0xbe, 0x00, 0xb9, 0x00, 0xb1, 0x00, 0xac, 0x00, 0xa6, 0x00, 0xa1,
+    0x00, 0x9d, 0x00, 0x97, 0x00, 0x93, 0x00, 0x90, 0x01, 0x8d, 0x02, 0x88,
+    0x02, 0x85, 0x02, 0x83, 0x03, 0x81, 0x04, 0x7e, 0x11, 0x7c, 0x13, 0x7a,
+    0x15, 0x76, 0x15, 0x75, 0x18, 0x72, 0x18, 0x71, 0x1a, 0x6d, 0x1a, 0x6d,
+    0x1b, 0x6a, 0x1d, 0x69, 0x1d, 0x69, 0x1e, 0x66, 0x20, 0x65, 0x20, 0x65,
+    0x20, 0x64, 0x21, 0x61, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x5f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x28,
+    0x00, 0x48, 0x00, 0x5f, 0x00, 0x71, 0x00, 0x7e, 0x00, 0x89, 0x00, 0x91,
+    0x00, 0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0x98,
+    0x00, 0x70, 0x00, 0x39, 0x00, 0x02, 0x00, 0x28, 0x00, 0x48, 0x00, 0x5f,
+    0x00, 0x71, 0x00, 0x7e, 0x00, 0x89, 0x00, 0x91, 0x00, 0x98, 0x00, 0x9d,
+    0x00, 0xa1, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3a, 0x00, 0x2f, 0x00, 0x16, 0x00, 0x08, 0x0e, 0x00, 0x20, 0x00, 0x42,
+    0x00, 0x5c, 0x00, 0x6f, 0x00, 0x7e, 0x00, 0x89, 0x00, 0x92, 0x00, 0x99,
+    0x00, 0x9e, 0x00, 0xa2, 0x00, 0xa6, 0x00, 0xa9, 0x38, 0x00, 0x2a, 0x00,
+    0x09, 0x00, 0x00, 0x1d, 0x00, 0x3f, 0x00, 0x5b, 0x00, 0x6f, 0x00, 0x7f,
+    0x00, 0x8b, 0x00, 0x94, 0x00, 0x9b, 0x00, 0xa0, 0x00, 0xa5, 0x00, 0xa8,
+    0x00, 0xab, 0x00, 0xad, 0x16, 0xa4, 0x01, 0xbb, 0x00, 0xc6, 0x00, 0xcc,
+    0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6,
+    0x00, 0xd7, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd9,
+    0x00, 0xd9, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xda, 0x05, 0x9d, 0x00, 0xbc,
+    0x00, 0xc6, 0x00, 0xcd, 0x00, 0xcf, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd5,
+    0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd7, 0x00, 0xd8,
+    0x00, 0xd8, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xd9,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x02, 0xbd, 0x00, 0xcc, 0x00, 0xd1, 0x00, 0xd5,
+    0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xd9, 0x00, 0xd9,
+    0x00, 0xd9, 0x00, 0xda, 0x00, 0xda, 0x00, 0xda, 0x00, 0xda, 0x00, 0xdb,
+    0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x3d,
+    0x00, 0x52, 0x00, 0x64, 0x00, 0x71, 0x00, 0x7c, 0x00, 0x85, 0x00, 0x8d,
+    0x00, 0x93, 0x00, 0x98, 0x00, 0xb2, 0x00, 0xa6, 0x00, 0x85, 0x00, 0x57,
+    0x00, 0x28, 0x00, 0x01, 0x00, 0x21, 0x00, 0x3d, 0x00, 0x52, 0x00, 0x64,
+    0x00, 0x71, 0x00, 0x7c, 0x00, 0x85, 0x00, 0x8d, 0x00, 0x93, 0x00, 0x98,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x35, 0x00,
+    0x23, 0x00, 0x0e, 0x02, 0x06, 0x12, 0x00, 0x20, 0x00, 0x3c, 0x00, 0x52,
+    0x00, 0x64, 0x00, 0x73, 0x00, 0x7e, 0x00, 0x87, 0x00, 0x8f, 0x00, 0x95,
+    0x00, 0x9a, 0x00, 0x9e, 0x3a, 0x00, 0x31, 0x00, 0x19, 0x00, 0x00, 0x05,
+    0x00, 0x24, 0x00, 0x3f, 0x00, 0x56, 0x00, 0x68, 0x00, 0x77, 0x00, 0x82,
+    0x00, 0x8b, 0x00, 0x93, 0x00, 0x99, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa5,
+    0x23, 0x74, 0x09, 0x91, 0x02, 0xa3, 0x00, 0xaf, 0x00, 0xb7, 0x00, 0xbd,
+    0x00, 0xc2, 0x00, 0xc5, 0x00, 0xc7, 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcc,
+    0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd2,
+    0x00, 0xd2, 0x00, 0xd3, 0x0d, 0x6b, 0x01, 0x8e, 0x00, 0xa4, 0x00, 0xb0,
+    0x00, 0xb9, 0x00, 0xbe, 0x00, 0xc2, 0x00, 0xc5, 0x00, 0xc8, 0x00, 0xca,
+    0x00, 0xcc, 0x00, 0xcc, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1,
+    0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd3, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x06, 0xa4, 0x00, 0xb5, 0x00, 0xc0, 0x00, 0xc6, 0x00, 0xcb, 0x00, 0xcd,
+    0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd4,
+    0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd7, 0x00, 0xd7,
+    0x00, 0xd8, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x35, 0x00, 0x48,
+    0x00, 0x59, 0x00, 0x66, 0x00, 0x72, 0x00, 0x7b, 0x00, 0x83, 0x00, 0x89,
+    0x00, 0xba, 0x00, 0xb0, 0x00, 0x95, 0x00, 0x70, 0x00, 0x48, 0x00, 0x21,
+    0x00, 0x01, 0x00, 0x1c, 0x00, 0x35, 0x00, 0x48, 0x00, 0x59, 0x00, 0x66,
+    0x00, 0x72, 0x00, 0x7b, 0x00, 0x83, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x2a, 0x00, 0x18, 0x00,
+    0x0c, 0x07, 0x05, 0x14, 0x00, 0x20, 0x00, 0x37, 0x00, 0x4c, 0x00, 0x5c,
+    0x00, 0x6a, 0x00, 0x75, 0x00, 0x7e, 0x00, 0x86, 0x00, 0x8d, 0x00, 0x92,
+    0x3c, 0x00, 0x35, 0x00, 0x23, 0x00, 0x0b, 0x00, 0x00, 0x0f, 0x00, 0x29,
+    0x00, 0x3f, 0x00, 0x53, 0x00, 0x63, 0x00, 0x70, 0x00, 0x7b, 0x00, 0x84,
+    0x00, 0x8b, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9b, 0x2a, 0x61, 0x11, 0x78,
+    0x07, 0x8a, 0x03, 0x98, 0x01, 0xa2, 0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb6,
+    0x00, 0xba, 0x00, 0xbd, 0x00, 0xc0, 0x00, 0xc2, 0x00, 0xc5, 0x00, 0xc6,
+    0x00, 0xc7, 0x00, 0xc9, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc,
+    0x12, 0x51, 0x04, 0x73, 0x00, 0x89, 0x00, 0x9a, 0x00, 0xa4, 0x00, 0xad,
+    0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbb, 0x00, 0xbe, 0x00, 0xc0, 0x00, 0xc3,
+    0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb,
+    0x00, 0xcc, 0x00, 0xcd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x09, 0x97, 0x02, 0xa8,
+    0x00, 0xb3, 0x00, 0xbb, 0x00, 0xc0, 0x00, 0xc5, 0x00, 0xc7, 0x00, 0xca,
+    0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd1,
+    0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd4, 0x00, 0xd5,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x50,
+    0x00, 0x5d, 0x00, 0x68, 0x00, 0x72, 0x00, 0x7a, 0x00, 0xbb, 0x00, 0xb3,
+    0x00, 0x9f, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x3d, 0x00, 0x1c, 0x00, 0x00,
+    0x00, 0x19, 0x00, 0x2e, 0x00, 0x41, 0x00, 0x50, 0x00, 0x5d, 0x00, 0x68,
+    0x00, 0x72, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x20, 0x00, 0x10, 0x00, 0x0a, 0x0b,
+    0x04, 0x16, 0x00, 0x20, 0x00, 0x34, 0x00, 0x46, 0x00, 0x56, 0x00, 0x62,
+    0x00, 0x6d, 0x00, 0x77, 0x00, 0x7f, 0x00, 0x85, 0x3d, 0x00, 0x38, 0x00,
+    0x2a, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x2c, 0x00, 0x3f,
+    0x00, 0x50, 0x00, 0x5e, 0x00, 0x6b, 0x00, 0x75, 0x00, 0x7e, 0x00, 0x85,
+    0x00, 0x8b, 0x00, 0x91, 0x2e, 0x59, 0x17, 0x6b, 0x0c, 0x7a, 0x06, 0x87,
+    0x03, 0x92, 0x01, 0x9b, 0x00, 0xa2, 0x00, 0xa8, 0x00, 0xad, 0x00, 0xb1,
+    0x00, 0xb5, 0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xc1,
+    0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc6, 0x00, 0xc7, 0x15, 0x45, 0x08, 0x60,
+    0x02, 0x77, 0x00, 0x87, 0x00, 0x94, 0x00, 0x9d, 0x00, 0xa4, 0x00, 0xaa,
+    0x00, 0xaf, 0x00, 0xb3, 0x00, 0xb7, 0x00, 0xba, 0x00, 0xbc, 0x00, 0xbe,
+    0x00, 0xc0, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc6, 0x00, 0xc7,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0a, 0x91, 0x04, 0x9e, 0x01, 0xaa, 0x00, 0xb2,
+    0x00, 0xb8, 0x00, 0xbd, 0x00, 0xc0, 0x00, 0xc3, 0x00, 0xc6, 0x00, 0xc8,
+    0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf,
+    0x00, 0xd0, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x16, 0x00, 0x29, 0x00, 0x3a, 0x00, 0x49, 0x00, 0x55,
+    0x00, 0x60, 0x00, 0x6a, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xa6, 0x00, 0x8e,
+    0x00, 0x71, 0x00, 0x52, 0x00, 0x35, 0x00, 0x19, 0x00, 0x00, 0x00, 0x16,
+    0x00, 0x29, 0x00, 0x3a, 0x00, 0x49, 0x00, 0x55, 0x00, 0x60, 0x00, 0x6a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3b, 0x00,
+    0x33, 0x00, 0x27, 0x00, 0x18, 0x00, 0x0d, 0x04, 0x08, 0x0e, 0x04, 0x17,
+    0x00, 0x20, 0x00, 0x32, 0x00, 0x42, 0x00, 0x50, 0x00, 0x5c, 0x00, 0x67,
+    0x00, 0x70, 0x00, 0x78, 0x3d, 0x00, 0x39, 0x00, 0x2f, 0x00, 0x1f, 0x00,
+    0x0b, 0x00, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x2e, 0x00, 0x3f, 0x00, 0x4e,
+    0x00, 0x5b, 0x00, 0x66, 0x00, 0x70, 0x00, 0x78, 0x00, 0x80, 0x00, 0x86,
+    0x31, 0x53, 0x1c, 0x62, 0x11, 0x70, 0x0a, 0x7b, 0x06, 0x85, 0x03, 0x8e,
+    0x02, 0x96, 0x00, 0x9c, 0x00, 0xa2, 0x00, 0xa7, 0x00, 0xab, 0x00, 0xae,
+    0x00, 0xb2, 0x00, 0xb5, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbd,
+    0x00, 0xbe, 0x00, 0xbf, 0x17, 0x3d, 0x0b, 0x55, 0x04, 0x67, 0x01, 0x78,
+    0x00, 0x85, 0x00, 0x90, 0x00, 0x98, 0x00, 0x9f, 0x00, 0xa5, 0x00, 0xaa,
+    0x00, 0xad, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb9, 0x00, 0xbb,
+    0x00, 0xbc, 0x00, 0xbe, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0b, 0x8d, 0x05, 0x99, 0x02, 0xa2, 0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb6,
+    0x00, 0xba, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc3, 0x00, 0xc5, 0x00, 0xc7,
+    0x00, 0xc8, 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcd,
+    0x00, 0xce, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x13, 0x00, 0x25, 0x00, 0x35, 0x00, 0x43, 0x00, 0x4f, 0x00, 0x59,
+    0x00, 0xbc, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x97, 0x00, 0x7e, 0x00, 0x64,
+    0x00, 0x48, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x25,
+    0x00, 0x35, 0x00, 0x43, 0x00, 0x4f, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x2b, 0x00,
+    0x1f, 0x00, 0x12, 0x00, 0x0c, 0x07, 0x07, 0x10, 0x03, 0x18, 0x00, 0x20,
+    0x00, 0x30, 0x00, 0x3f, 0x00, 0x4c, 0x00, 0x57, 0x00, 0x61, 0x00, 0x6a,
+    0x3e, 0x00, 0x3b, 0x00, 0x32, 0x00, 0x25, 0x00, 0x14, 0x00, 0x02, 0x00,
+    0x00, 0x0f, 0x00, 0x20, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4d, 0x00, 0x58,
+    0x00, 0x63, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x7b, 0x33, 0x50, 0x20, 0x5c,
+    0x15, 0x68, 0x0e, 0x72, 0x09, 0x7c, 0x05, 0x84, 0x03, 0x8c, 0x02, 0x92,
+    0x01, 0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa6, 0x00, 0xaa, 0x00, 0xad,
+    0x00, 0xaf, 0x00, 0xb2, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xba,
+    0x18, 0x38, 0x0d, 0x4c, 0x06, 0x5e, 0x03, 0x6c, 0x01, 0x7a, 0x00, 0x84,
+    0x00, 0x8d, 0x00, 0x95, 0x00, 0x9b, 0x00, 0xa0, 0x00, 0xa5, 0x00, 0xa8,
+    0x00, 0xac, 0x00, 0xaf, 0x00, 0xb2, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb8,
+    0x00, 0xba, 0x00, 0xbc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x0c, 0x8a, 0x06, 0x94,
+    0x03, 0x9d, 0x01, 0xa4, 0x00, 0xab, 0x00, 0xb0, 0x00, 0xb5, 0x00, 0xb9,
+    0x00, 0xbc, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc4, 0x00, 0xc6,
+    0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+    0x00, 0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x49, 0x00, 0xbd, 0x00, 0xb9,
+    0x00, 0xae, 0x00, 0x9e, 0x00, 0x89, 0x00, 0x71, 0x00, 0x59, 0x00, 0x41,
+    0x00, 0x29, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00, 0x22, 0x00, 0x30,
+    0x00, 0x3d, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x00, 0x3c, 0x00, 0x37, 0x00, 0x2f, 0x00, 0x24, 0x00, 0x19, 0x00,
+    0x0e, 0x02, 0x0a, 0x0a, 0x06, 0x11, 0x03, 0x19, 0x00, 0x1f, 0x00, 0x2e,
+    0x00, 0x3c, 0x00, 0x48, 0x00, 0x53, 0x00, 0x5c, 0x3e, 0x00, 0x3c, 0x00,
+    0x34, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00, 0x14,
+    0x00, 0x23, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x56, 0x00, 0x60,
+    0x00, 0x68, 0x00, 0x70, 0x34, 0x4e, 0x23, 0x58, 0x18, 0x62, 0x10, 0x6c,
+    0x0b, 0x75, 0x08, 0x7c, 0x05, 0x83, 0x03, 0x8a, 0x02, 0x8f, 0x01, 0x95,
+    0x00, 0x9a, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa9, 0x00, 0xac,
+    0x00, 0xae, 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb5, 0x1a, 0x35, 0x0f, 0x47,
+    0x08, 0x55, 0x04, 0x64, 0x02, 0x70, 0x00, 0x7a, 0x00, 0x83, 0x00, 0x8b,
+    0x00, 0x92, 0x00, 0x98, 0x00, 0x9d, 0x00, 0xa0, 0x00, 0xa5, 0x00, 0xa8,
+    0x00, 0xab, 0x00, 0xae, 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb4, 0x00, 0xb7,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0d, 0x89, 0x07, 0x92, 0x04, 0x99, 0x02, 0xa0,
+    0x01, 0xa6, 0x00, 0xab, 0x00, 0xb0, 0x00, 0xb4, 0x00, 0xb7, 0x00, 0xba,
+    0x00, 0xbd, 0x00, 0xbe, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc4, 0x00, 0xc5,
+    0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xca, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0x2d, 0x00, 0x39, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa3,
+    0x00, 0x91, 0x00, 0x7c, 0x00, 0x66, 0x00, 0x50, 0x00, 0x3a, 0x00, 0x25,
+    0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x39,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3d, 0x00,
+    0x38, 0x00, 0x31, 0x00, 0x28, 0x00, 0x1e, 0x00, 0x13, 0x00, 0x0d, 0x05,
+    0x09, 0x0c, 0x06, 0x13, 0x03, 0x19, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x3a,
+    0x00, 0x45, 0x00, 0x4f, 0x3e, 0x00, 0x3c, 0x00, 0x36, 0x00, 0x2d, 0x00,
+    0x21, 0x00, 0x13, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x26,
+    0x00, 0x33, 0x00, 0x3f, 0x00, 0x4a, 0x00, 0x54, 0x00, 0x5d, 0x00, 0x65,
+    0x35, 0x4c, 0x26, 0x55, 0x1b, 0x5e, 0x13, 0x67, 0x0e, 0x6f, 0x0a, 0x76,
+    0x07, 0x7d, 0x05, 0x82, 0x03, 0x88, 0x02, 0x8e, 0x02, 0x92, 0x01, 0x97,
+    0x00, 0x9b, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xab,
+    0x00, 0xac, 0x00, 0xaf, 0x1b, 0x33, 0x10, 0x42, 0x0a, 0x50, 0x05, 0x5c,
+    0x03, 0x68, 0x01, 0x72, 0x00, 0x7b, 0x00, 0x83, 0x00, 0x8a, 0x00, 0x90,
+    0x00, 0x96, 0x00, 0x99, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa8,
+    0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0d, 0x88, 0x08, 0x8f, 0x05, 0x96, 0x02, 0x9c, 0x01, 0xa2, 0x00, 0xa7,
+    0x00, 0xac, 0x00, 0xb0, 0x00, 0xb3, 0x00, 0xb6, 0x00, 0xb9, 0x00, 0xbb,
+    0x00, 0xbd, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc5,
+    0x00, 0xc6, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x29,
+    0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb3, 0x00, 0xa7, 0x00, 0x98, 0x00, 0x85,
+    0x00, 0x72, 0x00, 0x5d, 0x00, 0x49, 0x00, 0x35, 0x00, 0x22, 0x00, 0x10,
+    0x00, 0x00, 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x33, 0x00,
+    0x2c, 0x00, 0x23, 0x00, 0x19, 0x00, 0x0f, 0x00, 0x0c, 0x07, 0x08, 0x0e,
+    0x05, 0x14, 0x02, 0x1a, 0x00, 0x1f, 0x00, 0x2c, 0x00, 0x38, 0x00, 0x42,
+    0x3e, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x30, 0x00, 0x25, 0x00, 0x19, 0x00,
+    0x0c, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x28, 0x00, 0x34,
+    0x00, 0x3f, 0x00, 0x49, 0x00, 0x53, 0x00, 0x5b, 0x36, 0x4a, 0x28, 0x52,
+    0x1d, 0x5b, 0x16, 0x63, 0x10, 0x6a, 0x0c, 0x71, 0x09, 0x77, 0x07, 0x7d,
+    0x05, 0x82, 0x03, 0x87, 0x02, 0x8c, 0x02, 0x90, 0x01, 0x94, 0x00, 0x99,
+    0x00, 0x9c, 0x00, 0x9e, 0x00, 0xa1, 0x00, 0xa4, 0x00, 0xa7, 0x00, 0xaa,
+    0x1b, 0x30, 0x12, 0x3e, 0x0c, 0x4b, 0x07, 0x57, 0x04, 0x61, 0x02, 0x6b,
+    0x01, 0x73, 0x00, 0x7c, 0x00, 0x82, 0x00, 0x88, 0x00, 0x8f, 0x00, 0x93,
+    0x00, 0x97, 0x00, 0x9c, 0x00, 0x9f, 0x00, 0xa2, 0x00, 0xa5, 0x00, 0xa8,
+    0x00, 0xaa, 0x00, 0xac, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x0d, 0x86, 0x09, 0x8d,
+    0x06, 0x94, 0x03, 0x9a, 0x02, 0x9f, 0x01, 0xa4, 0x00, 0xa8, 0x00, 0xac,
+    0x00, 0xaf, 0x00, 0xb2, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbc,
+    0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1b, 0x00, 0xbe, 0x00, 0xbb,
+    0x00, 0xb5, 0x00, 0xaa, 0x00, 0x9d, 0x00, 0x8d, 0x00, 0x7b, 0x00, 0x68,
+    0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00,
+    0x00, 0x0e, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3e, 0x00, 0x3a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x26, 0x00,
+    0x1d, 0x00, 0x14, 0x00, 0x0e, 0x03, 0x0b, 0x09, 0x08, 0x0f, 0x05, 0x15,
+    0x02, 0x1a, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x36, 0x3f, 0x00, 0x3d, 0x00,
+    0x39, 0x00, 0x32, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x12, 0x00, 0x06, 0x00,
+    0x00, 0x06, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x3f,
+    0x00, 0x49, 0x00, 0x51, 0x37, 0x49, 0x2a, 0x51, 0x20, 0x58, 0x18, 0x5f,
+    0x13, 0x66, 0x0f, 0x6c, 0x0b, 0x73, 0x09, 0x78, 0x07, 0x7e, 0x05, 0x82,
+    0x03, 0x86, 0x02, 0x8b, 0x02, 0x8f, 0x01, 0x92, 0x01, 0x96, 0x00, 0x9a,
+    0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa1, 0x00, 0xa4, 0x1c, 0x2f, 0x13, 0x3b,
+    0x0d, 0x47, 0x09, 0x51, 0x05, 0x5c, 0x04, 0x65, 0x02, 0x6e, 0x01, 0x75,
+    0x00, 0x7c, 0x00, 0x82, 0x00, 0x88, 0x00, 0x8d, 0x00, 0x91, 0x00, 0x96,
+    0x00, 0x99, 0x00, 0x9c, 0x00, 0xa0, 0x00, 0xa2, 0x00, 0xa5, 0x00, 0xa7,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0e, 0x86, 0x09, 0x8c, 0x06, 0x92, 0x04, 0x97,
+    0x02, 0x9c, 0x02, 0xa1, 0x01, 0xa5, 0x00, 0xa9, 0x00, 0xac, 0x00, 0xaf,
+    0x00, 0xb2, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbc,
+    0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x0d, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xad,
+    0x00, 0xa1, 0x00, 0x93, 0x00, 0x83, 0x00, 0x72, 0x00, 0x60, 0x00, 0x4f,
+    0x00, 0x3d, 0x00, 0x2d, 0x00, 0x1d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00,
+    0x3b, 0x00, 0x36, 0x00, 0x30, 0x00, 0x29, 0x00, 0x21, 0x00, 0x19, 0x00,
+    0x10, 0x00, 0x0d, 0x05, 0x0a, 0x0b, 0x07, 0x10, 0x04, 0x16, 0x02, 0x1b,
+    0x00, 0x1f, 0x00, 0x2a, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x33, 0x00,
+    0x2b, 0x00, 0x22, 0x00, 0x17, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0b,
+    0x00, 0x16, 0x00, 0x21, 0x00, 0x2c, 0x00, 0x36, 0x00, 0x3f, 0x00, 0x48,
+    0x38, 0x48, 0x2b, 0x4f, 0x22, 0x56, 0x1a, 0x5c, 0x15, 0x63, 0x11, 0x69,
+    0x0d, 0x6e, 0x0a, 0x74, 0x08, 0x78, 0x06, 0x7e, 0x05, 0x81, 0x04, 0x85,
+    0x03, 0x8a, 0x02, 0x8e, 0x02, 0x90, 0x01, 0x93, 0x00, 0x98, 0x00, 0x9b,
+    0x00, 0x9d, 0x00, 0x9f, 0x1c, 0x2d, 0x14, 0x39, 0x0e, 0x44, 0x0a, 0x4e,
+    0x07, 0x57, 0x04, 0x60, 0x02, 0x67, 0x01, 0x6f, 0x00, 0x76, 0x00, 0x7d,
+    0x00, 0x81, 0x00, 0x87, 0x00, 0x8c, 0x00, 0x90, 0x00, 0x94, 0x00, 0x97,
+    0x00, 0x9a, 0x00, 0x9d, 0x00, 0xa0, 0x00, 0xa2, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0e, 0x85, 0x0a, 0x8b, 0x07, 0x90, 0x05, 0x95, 0x03, 0x9a, 0x02, 0x9e,
+    0x01, 0xa2, 0x00, 0xa6, 0x00, 0xa9, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb2,
+    0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbd,
+    0x00, 0xbe, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x98,
+    0x00, 0x89, 0x00, 0x7a, 0x00, 0x6a, 0x00, 0x59, 0x00, 0x49, 0x00, 0x39,
+    0x00, 0x29, 0x00, 0x1b, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x38, 0x00,
+    0x32, 0x00, 0x2c, 0x00, 0x25, 0x00, 0x1d, 0x00, 0x15, 0x00, 0x0e, 0x01,
+    0x0c, 0x07, 0x09, 0x0c, 0x06, 0x11, 0x04, 0x16, 0x02, 0x1b, 0x00, 0x1f,
+    0x3f, 0x00, 0x3e, 0x00, 0x3a, 0x00, 0x35, 0x00, 0x2e, 0x00, 0x25, 0x00,
+    0x1c, 0x00, 0x11, 0x00, 0x07, 0x00, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x19,
+    0x00, 0x23, 0x00, 0x2d, 0x00, 0x36, 0x00, 0x3f, 0x38, 0x48, 0x2d, 0x4e,
+    0x23, 0x54, 0x1c, 0x5a, 0x17, 0x5f, 0x12, 0x66, 0x0f, 0x6a, 0x0c, 0x71,
+    0x0a, 0x74, 0x08, 0x79, 0x06, 0x7e, 0x05, 0x81, 0x04, 0x84, 0x03, 0x89,
+    0x02, 0x8d, 0x02, 0x8f, 0x01, 0x92, 0x01, 0x95, 0x00, 0x99, 0x00, 0x9b,
+    0x1c, 0x2d, 0x15, 0x37, 0x0f, 0x41, 0x0b, 0x4a, 0x07, 0x53, 0x05, 0x5b,
+    0x04, 0x63, 0x02, 0x69, 0x01, 0x70, 0x00, 0x77, 0x00, 0x7d, 0x00, 0x81,
+    0x00, 0x87, 0x00, 0x8a, 0x00, 0x8f, 0x00, 0x92, 0x00, 0x96, 0x00, 0x99,
+    0x00, 0x9b, 0x00, 0x9e, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x0e, 0x85, 0x0a, 0x8a,
+    0x07, 0x8f, 0x05, 0x93, 0x03, 0x98, 0x02, 0x9c, 0x02, 0xa0, 0x01, 0xa3,
+    0x00, 0xa6, 0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb2, 0x00, 0xb3,
+    0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x39, 0x47, 0x2e, 0x4d, 0x25, 0x53, 0x1e, 0x58,
+    0x19, 0x5e, 0x14, 0x63, 0x11, 0x68, 0x0e, 0x6c, 0x0b, 0x72, 0x09, 0x75,
+    0x07, 0x79, 0x06, 0x7e, 0x05, 0x81, 0x04, 0x84, 0x03, 0x88, 0x02, 0x8c,
+    0x02, 0x8e, 0x01, 0x91, 0x01, 0x93, 0x00, 0x97, 0x1d, 0x2c, 0x16, 0x36,
+    0x10, 0x3e, 0x0c, 0x48, 0x09, 0x50, 0x06, 0x58, 0x04, 0x5f, 0x02, 0x66,
+    0x02, 0x6c, 0x01, 0x71, 0x00, 0x77, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x86,
+    0x00, 0x8a, 0x00, 0x8e, 0x00, 0x91, 0x00, 0x94, 0x00, 0x97, 0x00, 0x9a,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0e, 0x84, 0x0b, 0x89, 0x08, 0x8d, 0x06, 0x92,
+    0x04, 0x96, 0x03, 0x9a, 0x02, 0x9e, 0x01, 0xa1, 0x01, 0xa4, 0x00, 0xa7,
+    0x00, 0xaa, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5,
+    0x00, 0xb7, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x39, 0x46, 0x2f, 0x4c, 0x26, 0x51, 0x20, 0x56, 0x1a, 0x5c, 0x16, 0x60,
+    0x12, 0x66, 0x0f, 0x69, 0x0c, 0x6e, 0x0b, 0x73, 0x09, 0x76, 0x07, 0x7a,
+    0x06, 0x7e, 0x05, 0x81, 0x04, 0x84, 0x03, 0x88, 0x02, 0x8b, 0x02, 0x8e,
+    0x02, 0x90, 0x01, 0x92, 0x1d, 0x2b, 0x16, 0x34, 0x11, 0x3d, 0x0c, 0x45,
+    0x0a, 0x4c, 0x07, 0x54, 0x05, 0x5b, 0x04, 0x61, 0x02, 0x67, 0x01, 0x6d,
+    0x01, 0x73, 0x00, 0x78, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x86, 0x00, 0x89,
+    0x00, 0x8d, 0x00, 0x90, 0x00, 0x93, 0x00, 0x95, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0e, 0x84, 0x0b, 0x88, 0x08, 0x8d, 0x06, 0x91, 0x05, 0x94, 0x03, 0x98,
+    0x02, 0x9c, 0x02, 0x9f, 0x01, 0xa2, 0x00, 0xa5, 0x00, 0xa8, 0x00, 0xaa,
+    0x00, 0xad, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb5, 0x00, 0xb6,
+    0x00, 0xb8, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x46, 0x30, 0x4b,
+    0x28, 0x50, 0x21, 0x55, 0x1c, 0x59, 0x17, 0x5e, 0x14, 0x63, 0x10, 0x68,
+    0x0e, 0x6b, 0x0c, 0x70, 0x0a, 0x74, 0x08, 0x76, 0x07, 0x7b, 0x06, 0x7e,
+    0x05, 0x81, 0x04, 0x83, 0x03, 0x87, 0x02, 0x8a, 0x02, 0x8d, 0x02, 0x8f,
+    0x1e, 0x2a, 0x17, 0x33, 0x12, 0x3b, 0x0e, 0x43, 0x0a, 0x4a, 0x07, 0x51,
+    0x05, 0x58, 0x04, 0x5e, 0x03, 0x64, 0x02, 0x69, 0x01, 0x6f, 0x00, 0x74,
+    0x00, 0x78, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x85, 0x00, 0x89, 0x00, 0x8b,
+    0x00, 0x8f, 0x00, 0x93, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x0f, 0x83, 0x0b, 0x88,
+    0x09, 0x8c, 0x07, 0x90, 0x05, 0x93, 0x03, 0x97, 0x02, 0x9a, 0x02, 0x9d,
+    0x01, 0xa0, 0x01, 0xa3, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xad,
+    0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb8,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x31, 0x4a, 0x29, 0x4e, 0x22, 0x54,
+    0x1d, 0x57, 0x19, 0x5d, 0x15, 0x60, 0x12, 0x65, 0x0f, 0x69, 0x0d, 0x6c,
+    0x0b, 0x71, 0x09, 0x74, 0x08, 0x77, 0x07, 0x7b, 0x06, 0x7f, 0x05, 0x81,
+    0x04, 0x83, 0x03, 0x86, 0x02, 0x8a, 0x02, 0x8c, 0x1e, 0x2a, 0x18, 0x32,
+    0x12, 0x39, 0x0f, 0x40, 0x0c, 0x48, 0x09, 0x4f, 0x07, 0x55, 0x05, 0x5a,
+    0x04, 0x60, 0x02, 0x66, 0x02, 0x6b, 0x01, 0x70, 0x00, 0x75, 0x00, 0x79,
+    0x00, 0x7d, 0x00, 0x81, 0x00, 0x84, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8e,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0f, 0x83, 0x0c, 0x87, 0x09, 0x8b, 0x07, 0x8e,
+    0x06, 0x92, 0x04, 0x96, 0x03, 0x99, 0x02, 0x9b, 0x02, 0x9e, 0x01, 0xa1,
+    0x01, 0xa4, 0x00, 0xa6, 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf,
+    0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3a, 0x45, 0x31, 0x49, 0x2a, 0x4d, 0x24, 0x52, 0x1f, 0x56, 0x1a, 0x5b,
+    0x16, 0x5f, 0x13, 0x63, 0x10, 0x67, 0x0e, 0x6a, 0x0c, 0x6e, 0x0b, 0x72,
+    0x09, 0x75, 0x07, 0x77, 0x07, 0x7b, 0x06, 0x7f, 0x05, 0x81, 0x04, 0x83,
+    0x03, 0x85, 0x02, 0x89, 0x1e, 0x29, 0x18, 0x31, 0x13, 0x38, 0x0f, 0x3f,
+    0x0c, 0x45, 0x0a, 0x4c, 0x07, 0x52, 0x05, 0x58, 0x04, 0x5d, 0x04, 0x63,
+    0x02, 0x67, 0x01, 0x6c, 0x01, 0x71, 0x00, 0x75, 0x00, 0x79, 0x00, 0x7d,
+    0x00, 0x81, 0x00, 0x84, 0x00, 0x88, 0x00, 0x8b, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0f, 0x83, 0x0c, 0x87, 0x09, 0x8a, 0x07, 0x8e, 0x06, 0x91, 0x05, 0x94,
+    0x03, 0x97, 0x02, 0x9a, 0x02, 0x9d, 0x02, 0xa0, 0x01, 0xa2, 0x00, 0xa4,
+    0x00, 0xa7, 0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb0,
+    0x00, 0xb2, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x45, 0x32, 0x48,
+    0x2b, 0x4d, 0x25, 0x51, 0x20, 0x55, 0x1b, 0x59, 0x18, 0x5e, 0x14, 0x60,
+    0x12, 0x65, 0x0f, 0x68, 0x0d, 0x6b, 0x0c, 0x6f, 0x0a, 0x73, 0x09, 0x75,
+    0x07, 0x77, 0x06, 0x7b, 0x06, 0x7f, 0x05, 0x81, 0x04, 0x83, 0x03, 0x85,
+    0x1e, 0x29, 0x19, 0x30, 0x14, 0x37, 0x0f, 0x3d, 0x0c, 0x44, 0x0a, 0x4a,
+    0x07, 0x50, 0x06, 0x55, 0x05, 0x5b, 0x04, 0x60, 0x02, 0x64, 0x02, 0x69,
+    0x01, 0x6d, 0x01, 0x72, 0x00, 0x76, 0x00, 0x7a, 0x00, 0x7d, 0x00, 0x81,
+    0x00, 0x83, 0x00, 0x87, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x0f, 0x83, 0x0c, 0x86,
+    0x0a, 0x8a, 0x07, 0x8d, 0x06, 0x90, 0x05, 0x93, 0x03, 0x96, 0x03, 0x99,
+    0x02, 0x9c, 0x02, 0x9e, 0x01, 0xa0, 0x01, 0xa3, 0x00, 0xa5, 0x00, 0xa7,
+    0x00, 0xa9, 0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb2,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3b, 0x45, 0x33, 0x48, 0x2c, 0x4d, 0x26, 0x4f,
+    0x21, 0x55, 0x1c, 0x57, 0x19, 0x5c, 0x16, 0x5f, 0x13, 0x63, 0x10, 0x67,
+    0x0e, 0x6a, 0x0c, 0x6c, 0x0b, 0x71, 0x0a, 0x73, 0x09, 0x76, 0x07, 0x78,
+    0x06, 0x7c, 0x06, 0x7f, 0x05, 0x81, 0x04, 0x83, 0x1e, 0x28, 0x19, 0x2f,
+    0x15, 0x35, 0x10, 0x3c, 0x0d, 0x42, 0x0b, 0x48, 0x09, 0x4e, 0x07, 0x53,
+    0x05, 0x58, 0x04, 0x5d, 0x04, 0x62, 0x02, 0x66, 0x02, 0x6b, 0x01, 0x6f,
+    0x00, 0x73, 0x00, 0x76, 0x00, 0x7a, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x83,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x0f, 0x82, 0x0c, 0x86, 0x0a, 0x89, 0x08, 0x8c,
+    0x06, 0x8f, 0x05, 0x92, 0x04, 0x95, 0x03, 0x98, 0x02, 0x9a, 0x02, 0x9d,
+    0x02, 0x9f, 0x01, 0xa1, 0x01, 0xa4, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xa9,
+    0x00, 0xab, 0x00, 0xad, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x44, 0x33, 0x47, 0x2c, 0x4c, 0x27, 0x4f, 0x22, 0x54, 0x1e, 0x56,
+    0x1a, 0x5a, 0x17, 0x5e, 0x14, 0x60, 0x12, 0x65, 0x10, 0x68, 0x0e, 0x6a,
+    0x0c, 0x6e, 0x0b, 0x72, 0x09, 0x74, 0x08, 0x76, 0x07, 0x78, 0x06, 0x7c,
+    0x06, 0x7f, 0x05, 0x81, 0x1e, 0x28, 0x19, 0x2f, 0x16, 0x35, 0x12, 0x3b,
+    0x0f, 0x41, 0x0c, 0x46, 0x0a, 0x4c, 0x07, 0x51, 0x05, 0x55, 0x05, 0x5b,
+    0x04, 0x5f, 0x02, 0x63, 0x02, 0x68, 0x01, 0x6b, 0x01, 0x70, 0x00, 0x73,
+    0x00, 0x77, 0x00, 0x7b, 0x00, 0x7d, 0x00, 0x81, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x0f, 0x82, 0x0c, 0x86, 0x0b, 0x89, 0x09, 0x8c, 0x07, 0x8f, 0x06, 0x91,
+    0x05, 0x94, 0x03, 0x97, 0x02, 0x99, 0x02, 0x9c, 0x02, 0x9e, 0x01, 0xa0,
+    0x01, 0xa2, 0x00, 0xa4, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xac,
+    0x00, 0xad, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x23, 0x25, 0x22,
+    0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x21, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0x44, 0x05, 0x25, 0x0d, 0x23, 0x12, 0x22,
+    0x15, 0x22, 0x17, 0x22, 0x18, 0x22, 0x1a, 0x22, 0x1b, 0x22, 0x1b, 0x22,
+    0x1c, 0x22, 0x1c, 0x22, 0x1c, 0x22, 0x1d, 0x22, 0x1d, 0x22, 0x1e, 0x22,
+    0x1e, 0x22, 0x1e, 0x22, 0x1e, 0x22, 0x1e, 0x22, 0x10, 0x33, 0x13, 0x23,
+    0x17, 0x22, 0x1a, 0x22, 0x1b, 0x22, 0x1c, 0x22, 0x1d, 0x22, 0x1e, 0x22,
+    0x1e, 0x22, 0x1e, 0x22, 0x1f, 0x22, 0x1f, 0x22, 0x1f, 0x22, 0x1f, 0x22,
+    0x1f, 0x22, 0x20, 0x22, 0x20, 0x22, 0x20, 0x22, 0x20, 0x22, 0x20, 0x22,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x35, 0x25, 0x2b, 0x23, 0x27, 0x22, 0x25, 0x22,
+    0x24, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0x9d, 0x00, 0x6b, 0x01, 0x51, 0x04, 0x45, 0x08, 0x3d, 0x0b, 0x38,
+    0x0d, 0x35, 0x0f, 0x33, 0x10, 0x30, 0x12, 0x2f, 0x13, 0x2d, 0x14, 0x2d,
+    0x15, 0x2c, 0x16, 0x2b, 0x16, 0x2a, 0x17, 0x2a, 0x18, 0x29, 0x18, 0x29,
+    0x19, 0x28, 0x19, 0x28, 0x10, 0x5f, 0x10, 0x46, 0x11, 0x39, 0x13, 0x33,
+    0x15, 0x2f, 0x16, 0x2d, 0x17, 0x2b, 0x18, 0x2a, 0x19, 0x29, 0x1a, 0x28,
+    0x1a, 0x27, 0x1b, 0x27, 0x1b, 0x27, 0x1c, 0x26, 0x1c, 0x26, 0x1c, 0x26,
+    0x1d, 0x25, 0x1d, 0x25, 0x1d, 0x25, 0x1d, 0x25, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x38, 0x2a, 0x2e, 0x26, 0x2a, 0x25, 0x27, 0x24, 0x26, 0x23, 0x25, 0x23,
+    0x24, 0x23, 0x24, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22,
+    0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x22, 0x22, 0x22, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xbc, 0x00, 0x8e,
+    0x00, 0x73, 0x00, 0x60, 0x02, 0x55, 0x04, 0x4c, 0x06, 0x47, 0x08, 0x42,
+    0x0a, 0x3e, 0x0c, 0x3b, 0x0d, 0x39, 0x0e, 0x37, 0x0f, 0x36, 0x10, 0x34,
+    0x11, 0x33, 0x12, 0x32, 0x12, 0x31, 0x13, 0x30, 0x14, 0x2f, 0x15, 0x2f,
+    0x10, 0x6f, 0x10, 0x58, 0x10, 0x4a, 0x11, 0x41, 0x12, 0x3b, 0x13, 0x37,
+    0x14, 0x34, 0x15, 0x32, 0x16, 0x30, 0x17, 0x2e, 0x17, 0x2d, 0x18, 0x2c,
+    0x18, 0x2c, 0x19, 0x2b, 0x19, 0x2a, 0x1a, 0x2a, 0x1a, 0x29, 0x1a, 0x29,
+    0x1b, 0x28, 0x1b, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x2e, 0x31, 0x29,
+    0x2c, 0x27, 0x2a, 0x26, 0x28, 0x25, 0x27, 0x24, 0x25, 0x24, 0x25, 0x23,
+    0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x23, 0x22, 0x23, 0x22,
+    0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xc6, 0x00, 0xa4, 0x00, 0x89, 0x00, 0x77,
+    0x00, 0x67, 0x01, 0x5e, 0x03, 0x55, 0x04, 0x50, 0x05, 0x4b, 0x07, 0x47,
+    0x09, 0x44, 0x0a, 0x41, 0x0b, 0x3e, 0x0c, 0x3d, 0x0c, 0x3b, 0x0e, 0x39,
+    0x0f, 0x38, 0x0f, 0x37, 0x0f, 0x35, 0x10, 0x35, 0x10, 0x74, 0x10, 0x63,
+    0x10, 0x55, 0x10, 0x4c, 0x11, 0x44, 0x11, 0x40, 0x12, 0x3b, 0x13, 0x39,
+    0x13, 0x36, 0x14, 0x34, 0x15, 0x33, 0x16, 0x31, 0x16, 0x30, 0x17, 0x2f,
+    0x17, 0x2e, 0x18, 0x2d, 0x18, 0x2d, 0x18, 0x2c, 0x18, 0x2b, 0x19, 0x2b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3a, 0x31, 0x33, 0x2c, 0x2f, 0x29, 0x2b, 0x28,
+    0x29, 0x26, 0x28, 0x25, 0x27, 0x25, 0x26, 0x24, 0x25, 0x24, 0x25, 0x24,
+    0x25, 0x23, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x23, 0x23,
+    0x23, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xcd, 0x00, 0xb0, 0x00, 0x9a, 0x00, 0x87, 0x00, 0x78, 0x00, 0x6c,
+    0x01, 0x64, 0x02, 0x5c, 0x03, 0x57, 0x04, 0x51, 0x05, 0x4e, 0x07, 0x4a,
+    0x07, 0x48, 0x09, 0x45, 0x0a, 0x43, 0x0a, 0x40, 0x0c, 0x3f, 0x0c, 0x3d,
+    0x0c, 0x3c, 0x0d, 0x3b, 0x10, 0x77, 0x10, 0x69, 0x10, 0x5e, 0x10, 0x54,
+    0x10, 0x4d, 0x11, 0x47, 0x11, 0x43, 0x12, 0x3f, 0x12, 0x3c, 0x13, 0x39,
+    0x13, 0x38, 0x14, 0x36, 0x14, 0x35, 0x15, 0x33, 0x16, 0x32, 0x16, 0x31,
+    0x17, 0x30, 0x17, 0x2f, 0x17, 0x2f, 0x17, 0x2e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x33, 0x34, 0x2e, 0x30, 0x2b, 0x2d, 0x29, 0x2b, 0x28, 0x29, 0x27,
+    0x29, 0x26, 0x27, 0x25, 0x27, 0x25, 0x26, 0x24, 0x25, 0x24, 0x25, 0x24,
+    0x25, 0x24, 0x24, 0x24, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23,
+    0x23, 0x23, 0x23, 0x23, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xcf, 0x00, 0xb9,
+    0x00, 0xa4, 0x00, 0x94, 0x00, 0x85, 0x00, 0x7a, 0x00, 0x70, 0x00, 0x68,
+    0x01, 0x61, 0x02, 0x5c, 0x04, 0x57, 0x04, 0x53, 0x05, 0x50, 0x06, 0x4c,
+    0x07, 0x4a, 0x07, 0x48, 0x09, 0x45, 0x0a, 0x44, 0x0a, 0x42, 0x0b, 0x41,
+    0x10, 0x78, 0x10, 0x6d, 0x10, 0x63, 0x10, 0x5b, 0x10, 0x53, 0x10, 0x4e,
+    0x11, 0x49, 0x11, 0x45, 0x11, 0x41, 0x12, 0x3f, 0x13, 0x3c, 0x13, 0x3a,
+    0x13, 0x39, 0x14, 0x37, 0x14, 0x36, 0x14, 0x35, 0x15, 0x33, 0x16, 0x33,
+    0x16, 0x32, 0x16, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x34, 0x36, 0x30,
+    0x32, 0x2d, 0x2f, 0x2b, 0x2d, 0x29, 0x2b, 0x28, 0x29, 0x27, 0x28, 0x27,
+    0x27, 0x26, 0x27, 0x25, 0x27, 0x25, 0x25, 0x25, 0x25, 0x24, 0x25, 0x24,
+    0x25, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x23, 0x24, 0x23, 0x24, 0x23,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xd2, 0x00, 0xbe, 0x00, 0xad, 0x00, 0x9d,
+    0x00, 0x90, 0x00, 0x84, 0x00, 0x7a, 0x00, 0x72, 0x00, 0x6b, 0x01, 0x65,
+    0x02, 0x60, 0x02, 0x5b, 0x04, 0x58, 0x04, 0x54, 0x05, 0x51, 0x05, 0x4f,
+    0x07, 0x4c, 0x07, 0x4a, 0x07, 0x48, 0x09, 0x46, 0x10, 0x7a, 0x10, 0x70,
+    0x10, 0x67, 0x10, 0x5f, 0x10, 0x59, 0x10, 0x53, 0x10, 0x4e, 0x11, 0x4a,
+    0x11, 0x46, 0x11, 0x43, 0x12, 0x41, 0x12, 0x3e, 0x13, 0x3d, 0x13, 0x3b,
+    0x13, 0x39, 0x13, 0x38, 0x14, 0x37, 0x14, 0x36, 0x14, 0x35, 0x15, 0x34,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x35, 0x37, 0x31, 0x33, 0x2e, 0x30, 0x2c,
+    0x2d, 0x2a, 0x2c, 0x29, 0x2b, 0x28, 0x29, 0x27, 0x28, 0x27, 0x28, 0x27,
+    0x27, 0x25, 0x27, 0x25, 0x26, 0x25, 0x25, 0x25, 0x25, 0x24, 0x25, 0x24,
+    0x25, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xd3, 0x00, 0xc2, 0x00, 0xb2, 0x00, 0xa4, 0x00, 0x98, 0x00, 0x8d,
+    0x00, 0x83, 0x00, 0x7b, 0x00, 0x73, 0x00, 0x6e, 0x01, 0x67, 0x01, 0x63,
+    0x02, 0x5f, 0x02, 0x5b, 0x04, 0x58, 0x04, 0x55, 0x05, 0x52, 0x05, 0x50,
+    0x06, 0x4e, 0x07, 0x4c, 0x10, 0x7a, 0x10, 0x72, 0x10, 0x6a, 0x10, 0x63,
+    0x10, 0x5d, 0x10, 0x57, 0x10, 0x52, 0x10, 0x4e, 0x11, 0x4a, 0x11, 0x48,
+    0x11, 0x44, 0x11, 0x42, 0x12, 0x40, 0x12, 0x3e, 0x13, 0x3d, 0x13, 0x3b,
+    0x13, 0x3a, 0x13, 0x39, 0x14, 0x38, 0x14, 0x37, 0x0f, 0x00, 0x1f, 0x00,
+    0x33, 0x00, 0x39, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00,
+    0x3f, 0x00, 0x3f, 0x00, 0x0b, 0x3b, 0x17, 0x07, 0x2c, 0x00, 0x36, 0x00,
+    0x3a, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x3d, 0x00,
+    0x4c, 0x00, 0x4c, 0x00, 0x48, 0x00, 0x42, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00,
+    0x3f, 0x00, 0x3f, 0x00, 0x07, 0x47, 0x0f, 0x0f, 0x26, 0x00, 0x33, 0x00,
+    0x38, 0x00, 0x3a, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00,
+    0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00,
+    0x3c, 0x37, 0x37, 0x32, 0x34, 0x30, 0x31, 0x2d, 0x2f, 0x2c, 0x2d, 0x2b,
+    0x2b, 0x29, 0x2b, 0x28, 0x29, 0x27, 0x28, 0x27, 0x28, 0x27, 0x27, 0x26,
+    0x27, 0x25, 0x27, 0x25, 0x26, 0x25, 0x25, 0x25, 0x25, 0x24, 0x25, 0x24,
+    0x25, 0x24, 0x24, 0x24, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xd5, 0x00, 0xc5,
+    0x00, 0xb7, 0x00, 0xaa, 0x00, 0x9f, 0x00, 0x95, 0x00, 0x8b, 0x00, 0x83,
+    0x00, 0x7c, 0x00, 0x75, 0x00, 0x6f, 0x00, 0x69, 0x01, 0x66, 0x02, 0x61,
+    0x02, 0x5e, 0x03, 0x5a, 0x04, 0x58, 0x04, 0x55, 0x05, 0x53, 0x05, 0x51,
+    0x10, 0x7b, 0x10, 0x73, 0x10, 0x6c, 0x10, 0x66, 0x10, 0x60, 0x10, 0x5b,
+    0x10, 0x56, 0x10, 0x52, 0x10, 0x4f, 0x11, 0x4b, 0x11, 0x48, 0x11, 0x45,
+    0x11, 0x44, 0x12, 0x41, 0x12, 0x40, 0x12, 0x3e, 0x13, 0x3d, 0x13, 0x3b,
+    0x13, 0x3a, 0x13, 0x39, 0x00, 0x00, 0x05, 0x00, 0x1f, 0x00, 0x2e, 0x00,
+    0x35, 0x00, 0x38, 0x00, 0x3a, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00,
+    0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x00, 0x6f, 0x02, 0x27, 0x12, 0x02, 0x25, 0x00, 0x2f, 0x00, 0x35, 0x00,
+    0x38, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00,
+    0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x30, 0x00, 0x39, 0x00, 0x42, 0x00,
+    0x41, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00,
+    0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x00, 0x7f, 0x00, 0x3f, 0x05, 0x05, 0x1c, 0x00, 0x2a, 0x00, 0x31, 0x00,
+    0x35, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00,
+    0x3d, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3c, 0x37, 0x38, 0x33,
+    0x34, 0x31, 0x32, 0x2f, 0x30, 0x2d, 0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x29,
+    0x2b, 0x28, 0x29, 0x28, 0x28, 0x27, 0x28, 0x27, 0x27, 0x27, 0x27, 0x25,
+    0x27, 0x25, 0x27, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x24, 0x25, 0x24,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xd5, 0x00, 0xc8, 0x00, 0xbb, 0x00, 0xaf,
+    0x00, 0xa5, 0x00, 0x9b, 0x00, 0x92, 0x00, 0x8a, 0x00, 0x82, 0x00, 0x7c,
+    0x00, 0x76, 0x00, 0x70, 0x00, 0x6c, 0x01, 0x67, 0x01, 0x64, 0x02, 0x60,
+    0x02, 0x5d, 0x04, 0x5b, 0x04, 0x58, 0x04, 0x55, 0x10, 0x7b, 0x10, 0x75,
+    0x10, 0x6e, 0x10, 0x68, 0x10, 0x63, 0x10, 0x5e, 0x10, 0x5a, 0x10, 0x56,
+    0x10, 0x52, 0x10, 0x4f, 0x11, 0x4c, 0x11, 0x49, 0x11, 0x47, 0x11, 0x44,
+    0x11, 0x43, 0x12, 0x41, 0x12, 0x3f, 0x13, 0x3e, 0x13, 0x3d, 0x13, 0x3b,
+    0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x16, 0x00, 0x24, 0x00, 0x2c, 0x00,
+    0x31, 0x00, 0x35, 0x00, 0x37, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00,
+    0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x00, 0x9f, 0x00, 0x6f,
+    0x00, 0x22, 0x0b, 0x09, 0x16, 0x00, 0x23, 0x00, 0x2a, 0x00, 0x2f, 0x00,
+    0x33, 0x00, 0x35, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00,
+    0x3b, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x4c, 0x00, 0x39, 0x00, 0x16, 0x00, 0x28, 0x00, 0x2f, 0x00, 0x2e, 0x00,
+    0x31, 0x00, 0x35, 0x00, 0x37, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00,
+    0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x00, 0xa5, 0x00, 0x7f,
+    0x00, 0x3f, 0x00, 0x12, 0x09, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2a, 0x00,
+    0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36, 0x00, 0x38, 0x00, 0x39, 0x00,
+    0x3a, 0x00, 0x3a, 0x00, 0x3d, 0x38, 0x39, 0x34, 0x35, 0x32, 0x33, 0x30,
+    0x30, 0x2d, 0x2f, 0x2d, 0x2d, 0x2b, 0x2c, 0x2b, 0x2b, 0x29, 0x2b, 0x28,
+    0x29, 0x28, 0x28, 0x26, 0x28, 0x27, 0x27, 0x27, 0x27, 0x26, 0x27, 0x25,
+    0x27, 0x25, 0x26, 0x25, 0x25, 0x25, 0x25, 0x25, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xd6, 0x00, 0xca, 0x00, 0xbe, 0x00, 0xb3, 0x00, 0xaa, 0x00, 0xa0,
+    0x00, 0x98, 0x00, 0x90, 0x00, 0x88, 0x00, 0x82, 0x00, 0x7d, 0x00, 0x77,
+    0x00, 0x71, 0x00, 0x6d, 0x01, 0x69, 0x01, 0x66, 0x02, 0x63, 0x02, 0x60,
+    0x02, 0x5d, 0x04, 0x5b, 0x10, 0x7c, 0x10, 0x76, 0x10, 0x70, 0x10, 0x6a,
+    0x10, 0x65, 0x10, 0x61, 0x10, 0x5d, 0x10, 0x59, 0x10, 0x55, 0x10, 0x52,
+    0x10, 0x4f, 0x11, 0x4c, 0x11, 0x49, 0x11, 0x47, 0x11, 0x45, 0x11, 0x44,
+    0x12, 0x42, 0x12, 0x41, 0x12, 0x3f, 0x13, 0x3e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x1d, 0x00, 0x25, 0x00, 0x2b, 0x00,
+    0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00,
+    0x39, 0x00, 0x3a, 0x00, 0x00, 0xaf, 0x00, 0x93, 0x00, 0x58, 0x00, 0x21,
+    0x08, 0x0e, 0x0e, 0x02, 0x18, 0x00, 0x20, 0x00, 0x27, 0x00, 0x2b, 0x00,
+    0x2f, 0x00, 0x31, 0x00, 0x33, 0x00, 0x35, 0x00, 0x36, 0x00, 0x38, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x42, 0x00,
+    0x28, 0x00, 0x09, 0x00, 0x16, 0x00, 0x1d, 0x00, 0x25, 0x00, 0x2b, 0x00,
+    0x2f, 0x00, 0x32, 0x00, 0x34, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00,
+    0x39, 0x00, 0x3a, 0x00, 0x00, 0xb2, 0x00, 0x9c, 0x00, 0x6d, 0x00, 0x3f,
+    0x00, 0x1d, 0x00, 0x05, 0x0b, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x25, 0x00,
+    0x29, 0x00, 0x2d, 0x00, 0x30, 0x00, 0x32, 0x00, 0x33, 0x00, 0x35, 0x00,
+    0x3d, 0x38, 0x39, 0x35, 0x36, 0x33, 0x33, 0x30, 0x31, 0x2f, 0x30, 0x2d,
+    0x2e, 0x2c, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x28, 0x2b, 0x28, 0x28, 0x28,
+    0x28, 0x27, 0x28, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x26, 0x27, 0x25,
+    0x27, 0x25, 0x25, 0x25, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xd6, 0x00, 0xcc,
+    0x00, 0xc0, 0x00, 0xb7, 0x00, 0xad, 0x00, 0xa5, 0x00, 0x9d, 0x00, 0x96,
+    0x00, 0x8f, 0x00, 0x88, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x77, 0x00, 0x73,
+    0x00, 0x6f, 0x00, 0x6b, 0x01, 0x67, 0x01, 0x64, 0x02, 0x62, 0x02, 0x5f,
+    0x10, 0x7c, 0x10, 0x77, 0x10, 0x71, 0x10, 0x6c, 0x10, 0x67, 0x10, 0x63,
+    0x10, 0x5f, 0x10, 0x5c, 0x10, 0x58, 0x10, 0x55, 0x10, 0x51, 0x10, 0x4f,
+    0x11, 0x4c, 0x11, 0x4a, 0x11, 0x48, 0x11, 0x46, 0x11, 0x44, 0x11, 0x43,
+    0x12, 0x42, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x2a, 0x00,
+    0x2d, 0x00, 0x30, 0x00, 0x32, 0x00, 0x34, 0x00, 0x35, 0x00, 0x37, 0x00,
+    0x00, 0xb5, 0x00, 0xa4, 0x00, 0x7a, 0x00, 0x4a, 0x00, 0x20, 0x06, 0x12,
+    0x0c, 0x07, 0x10, 0x00, 0x18, 0x00, 0x1f, 0x00, 0x24, 0x00, 0x28, 0x00,
+    0x2c, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x41, 0x00, 0x2f, 0x00, 0x16, 0x00,
+    0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x2a, 0x00,
+    0x2d, 0x00, 0x30, 0x00, 0x32, 0x00, 0x34, 0x00, 0x35, 0x00, 0x37, 0x00,
+    0x00, 0xb7, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x62, 0x00, 0x3f, 0x00, 0x24,
+    0x00, 0x0f, 0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00,
+    0x25, 0x00, 0x29, 0x00, 0x2b, 0x00, 0x2e, 0x00, 0x3d, 0x39, 0x3a, 0x36,
+    0x36, 0x33, 0x34, 0x31, 0x32, 0x30, 0x30, 0x2d, 0x2f, 0x2d, 0x2d, 0x2b,
+    0x2d, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x27,
+    0x28, 0x26, 0x28, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x25, 0x27, 0x25,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xd7, 0x00, 0xcc, 0x00, 0xc3, 0x00, 0xba,
+    0x00, 0xb1, 0x00, 0xa8, 0x00, 0xa0, 0x00, 0x99, 0x00, 0x93, 0x00, 0x8d,
+    0x00, 0x87, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x74, 0x00, 0x70,
+    0x00, 0x6c, 0x01, 0x69, 0x01, 0x66, 0x02, 0x63, 0x10, 0x7c, 0x10, 0x77,
+    0x10, 0x72, 0x10, 0x6e, 0x10, 0x69, 0x10, 0x65, 0x10, 0x61, 0x10, 0x5d,
+    0x10, 0x5a, 0x10, 0x57, 0x10, 0x54, 0x10, 0x51, 0x10, 0x4f, 0x11, 0x4d,
+    0x11, 0x4b, 0x11, 0x49, 0x11, 0x47, 0x11, 0x45, 0x11, 0x44, 0x12, 0x42,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00,
+    0x2c, 0x00, 0x2f, 0x00, 0x31, 0x00, 0x32, 0x00, 0x00, 0xb9, 0x00, 0xad,
+    0x00, 0x8f, 0x00, 0x68, 0x00, 0x42, 0x00, 0x20, 0x05, 0x14, 0x0a, 0x0b,
+    0x0d, 0x04, 0x12, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x26, 0x00,
+    0x29, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x00, 0x3d, 0x00, 0x2e, 0x00, 0x1d, 0x00, 0x0d, 0x00, 0x00, 0x00,
+    0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00,
+    0x2c, 0x00, 0x2f, 0x00, 0x31, 0x00, 0x32, 0x00, 0x00, 0xba, 0x00, 0xb1,
+    0x00, 0x99, 0x00, 0x7a, 0x00, 0x5b, 0x00, 0x3f, 0x00, 0x29, 0x00, 0x16,
+    0x00, 0x08, 0x02, 0x00, 0x0c, 0x00, 0x13, 0x00, 0x19, 0x00, 0x1e, 0x00,
+    0x22, 0x00, 0x25, 0x00, 0x3d, 0x39, 0x3a, 0x36, 0x37, 0x34, 0x35, 0x32,
+    0x33, 0x30, 0x31, 0x2f, 0x30, 0x2d, 0x2e, 0x2d, 0x2d, 0x2a, 0x2c, 0x2b,
+    0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x27,
+    0x28, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x26, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xd7, 0x00, 0xce, 0x00, 0xc5, 0x00, 0xbc, 0x00, 0xb4, 0x00, 0xac,
+    0x00, 0xa5, 0x00, 0x9e, 0x00, 0x97, 0x00, 0x91, 0x00, 0x8c, 0x00, 0x87,
+    0x00, 0x81, 0x00, 0x7d, 0x00, 0x78, 0x00, 0x75, 0x00, 0x71, 0x00, 0x6d,
+    0x01, 0x6b, 0x01, 0x68, 0x10, 0x7c, 0x10, 0x78, 0x10, 0x73, 0x10, 0x6f,
+    0x10, 0x6b, 0x10, 0x67, 0x10, 0x63, 0x10, 0x60, 0x10, 0x5c, 0x10, 0x59,
+    0x10, 0x57, 0x10, 0x54, 0x10, 0x51, 0x10, 0x4f, 0x11, 0x4d, 0x11, 0x4b,
+    0x11, 0x49, 0x11, 0x47, 0x11, 0x46, 0x11, 0x45, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
+    0x11, 0x00, 0x18, 0x00, 0x1d, 0x00, 0x22, 0x00, 0x26, 0x00, 0x29, 0x00,
+    0x2b, 0x00, 0x2d, 0x00, 0x00, 0xba, 0x00, 0xb2, 0x00, 0x9c, 0x00, 0x7d,
+    0x00, 0x5c, 0x00, 0x3c, 0x00, 0x20, 0x04, 0x16, 0x08, 0x0e, 0x0c, 0x07,
+    0x0e, 0x02, 0x13, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3a, 0x00,
+    0x31, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x09, 0x00,
+    0x11, 0x00, 0x18, 0x00, 0x1d, 0x00, 0x22, 0x00, 0x26, 0x00, 0x29, 0x00,
+    0x2b, 0x00, 0x2d, 0x00, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xa3, 0x00, 0x8a,
+    0x00, 0x6f, 0x00, 0x56, 0x00, 0x3f, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0f,
+    0x00, 0x04, 0x04, 0x00, 0x0c, 0x00, 0x12, 0x00, 0x17, 0x00, 0x1c, 0x00,
+    0x3d, 0x39, 0x3a, 0x36, 0x37, 0x34, 0x35, 0x33, 0x33, 0x30, 0x32, 0x30,
+    0x30, 0x2e, 0x2f, 0x2d, 0x2d, 0x2c, 0x2d, 0x2a, 0x2c, 0x2b, 0x2b, 0x2a,
+    0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x26, 0x28, 0x27,
+    0x27, 0x27, 0x27, 0x27, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xd8, 0x00, 0xcf,
+    0x00, 0xc6, 0x00, 0xbe, 0x00, 0xb6, 0x00, 0xaf, 0x00, 0xa8, 0x00, 0xa1,
+    0x00, 0x9c, 0x00, 0x96, 0x00, 0x90, 0x00, 0x8a, 0x00, 0x86, 0x00, 0x81,
+    0x00, 0x7d, 0x00, 0x79, 0x00, 0x75, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6b,
+    0x10, 0x7d, 0x10, 0x78, 0x10, 0x74, 0x10, 0x70, 0x10, 0x6c, 0x10, 0x68,
+    0x10, 0x65, 0x10, 0x61, 0x10, 0x5f, 0x10, 0x5c, 0x10, 0x59, 0x10, 0x56,
+    0x10, 0x54, 0x10, 0x51, 0x10, 0x4f, 0x11, 0x4d, 0x11, 0x4b, 0x11, 0x4a,
+    0x11, 0x48, 0x11, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00,
+    0x15, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x22, 0x00, 0x26, 0x00, 0x28, 0x00,
+    0x00, 0xbc, 0x00, 0xb5, 0x00, 0xa4, 0x00, 0x8b, 0x00, 0x6f, 0x00, 0x52,
+    0x00, 0x37, 0x00, 0x20, 0x04, 0x17, 0x07, 0x10, 0x0a, 0x0a, 0x0d, 0x05,
+    0x0f, 0x00, 0x14, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x2b, 0x00,
+    0x1f, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00,
+    0x15, 0x00, 0x1a, 0x00, 0x1f, 0x00, 0x22, 0x00, 0x26, 0x00, 0x28, 0x00,
+    0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaa, 0x00, 0x96, 0x00, 0x7f, 0x00, 0x68,
+    0x00, 0x53, 0x00, 0x3f, 0x00, 0x2e, 0x00, 0x20, 0x00, 0x14, 0x00, 0x0a,
+    0x00, 0x01, 0x06, 0x00, 0x0c, 0x00, 0x11, 0x00, 0x3d, 0x3a, 0x3a, 0x37,
+    0x38, 0x35, 0x36, 0x33, 0x33, 0x32, 0x33, 0x30, 0x30, 0x2f, 0x30, 0x2d,
+    0x2e, 0x2d, 0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x2a, 0x2b, 0x28,
+    0x2a, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x27, 0x29, 0x27, 0x27, 0x27,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xd8, 0x00, 0xd0, 0x00, 0xc8, 0x00, 0xc0,
+    0x00, 0xb9, 0x00, 0xb2, 0x00, 0xab, 0x00, 0xa5, 0x00, 0x9f, 0x00, 0x99,
+    0x00, 0x94, 0x00, 0x8f, 0x00, 0x8a, 0x00, 0x86, 0x00, 0x81, 0x00, 0x7d,
+    0x00, 0x79, 0x00, 0x76, 0x00, 0x73, 0x00, 0x70, 0x10, 0x7d, 0x10, 0x79,
+    0x10, 0x75, 0x10, 0x71, 0x10, 0x6d, 0x10, 0x6a, 0x10, 0x66, 0x10, 0x63,
+    0x10, 0x60, 0x10, 0x5d, 0x10, 0x5b, 0x10, 0x58, 0x10, 0x56, 0x10, 0x54,
+    0x10, 0x51, 0x10, 0x4f, 0x11, 0x4d, 0x11, 0x4c, 0x11, 0x4a, 0x11, 0x49,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x13, 0x00,
+    0x18, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x23, 0x00, 0x00, 0xbc, 0x00, 0xb8,
+    0x00, 0xaa, 0x00, 0x96, 0x00, 0x7e, 0x00, 0x64, 0x00, 0x4c, 0x00, 0x34,
+    0x00, 0x20, 0x03, 0x18, 0x06, 0x11, 0x09, 0x0c, 0x0c, 0x07, 0x0e, 0x03,
+    0x10, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x00, 0x3c, 0x00, 0x37, 0x00, 0x2f, 0x00, 0x25, 0x00, 0x1b, 0x00,
+    0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x13, 0x00,
+    0x18, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x23, 0x00, 0x00, 0xbd, 0x00, 0xb9,
+    0x00, 0xae, 0x00, 0x9e, 0x00, 0x8b, 0x00, 0x77, 0x00, 0x63, 0x00, 0x50,
+    0x00, 0x3f, 0x00, 0x30, 0x00, 0x23, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x06,
+    0x00, 0x00, 0x07, 0x00, 0x3d, 0x3a, 0x3a, 0x38, 0x38, 0x36, 0x36, 0x33,
+    0x34, 0x33, 0x33, 0x30, 0x31, 0x30, 0x30, 0x2e, 0x2f, 0x2d, 0x2d, 0x2d,
+    0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28,
+    0x28, 0x28, 0x28, 0x28, 0x28, 0x27, 0x28, 0x27, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xd9, 0x00, 0xd1, 0x00, 0xc9, 0x00, 0xc2, 0x00, 0xbb, 0x00, 0xb4,
+    0x00, 0xae, 0x00, 0xa8, 0x00, 0xa2, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x92,
+    0x00, 0x8e, 0x00, 0x89, 0x00, 0x85, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x7a,
+    0x00, 0x76, 0x00, 0x73, 0x10, 0x7d, 0x10, 0x79, 0x10, 0x75, 0x10, 0x72,
+    0x10, 0x6e, 0x10, 0x6b, 0x10, 0x68, 0x10, 0x65, 0x10, 0x62, 0x10, 0x5f,
+    0x10, 0x5c, 0x10, 0x5a, 0x10, 0x58, 0x10, 0x55, 0x10, 0x53, 0x10, 0x51,
+    0x10, 0x4f, 0x11, 0x4e, 0x11, 0x4c, 0x11, 0x4a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x11, 0x00, 0x16, 0x00,
+    0x1a, 0x00, 0x1d, 0x00, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9d,
+    0x00, 0x89, 0x00, 0x73, 0x00, 0x5c, 0x00, 0x46, 0x00, 0x32, 0x00, 0x20,
+    0x03, 0x19, 0x06, 0x13, 0x08, 0x0e, 0x0b, 0x09, 0x0d, 0x05, 0x0e, 0x01,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3d, 0x00,
+    0x39, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f, 0x00,
+    0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x11, 0x00, 0x16, 0x00,
+    0x1a, 0x00, 0x1d, 0x00, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa4,
+    0x00, 0x94, 0x00, 0x82, 0x00, 0x70, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3f,
+    0x00, 0x32, 0x00, 0x26, 0x00, 0x1c, 0x00, 0x13, 0x00, 0x0b, 0x00, 0x03,
+    0x3d, 0x3a, 0x3b, 0x38, 0x39, 0x36, 0x36, 0x34, 0x35, 0x33, 0x33, 0x31,
+    0x32, 0x30, 0x30, 0x2f, 0x30, 0x2d, 0x2e, 0x2d, 0x2d, 0x2c, 0x2d, 0x2a,
+    0x2c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28,
+    0x28, 0x28, 0x28, 0x28, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x00, 0xd9, 0x00, 0xd1,
+    0x00, 0xca, 0x00, 0xc3, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xb0, 0x00, 0xaa,
+    0x00, 0xa5, 0x00, 0xa0, 0x00, 0x9a, 0x00, 0x96, 0x00, 0x91, 0x00, 0x8d,
+    0x00, 0x89, 0x00, 0x84, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x7a, 0x00, 0x77,
+    0x10, 0x7d, 0x10, 0x79, 0x10, 0x76, 0x10, 0x72, 0x10, 0x6f, 0x10, 0x6c,
+    0x10, 0x69, 0x10, 0x66, 0x10, 0x63, 0x10, 0x61, 0x10, 0x5e, 0x10, 0x5c,
+    0x10, 0x59, 0x10, 0x57, 0x10, 0x55, 0x10, 0x53, 0x10, 0x51, 0x10, 0x4f,
+    0x11, 0x4e, 0x11, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x10, 0x00, 0x14, 0x00, 0x18, 0x00,
+    0x00, 0xbd, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa3, 0x00, 0x92, 0x00, 0x7e,
+    0x00, 0x6a, 0x00, 0x56, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x03, 0x19,
+    0x05, 0x14, 0x08, 0x0f, 0x0a, 0x0b, 0x0c, 0x07, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00, 0x3a, 0x00, 0x34, 0x00,
+    0x2d, 0x00, 0x25, 0x00, 0x1d, 0x00, 0x15, 0x00, 0x0d, 0x00, 0x06, 0x00,
+    0x00, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x10, 0x00, 0x14, 0x00, 0x18, 0x00,
+    0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb4, 0x00, 0xa9, 0x00, 0x9b, 0x00, 0x8b,
+    0x00, 0x7b, 0x00, 0x6b, 0x00, 0x5b, 0x00, 0x4d, 0x00, 0x3f, 0x00, 0x33,
+    0x00, 0x28, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x0e, 0x3d, 0x3b, 0x3b, 0x39,
+    0x3a, 0x36, 0x36, 0x35, 0x36, 0x33, 0x33, 0x32, 0x33, 0x30, 0x30, 0x30,
+    0x30, 0x2e, 0x2f, 0x2d, 0x2d, 0x2d, 0x2d, 0x2c, 0x2d, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x2b, 0x2b, 0x2a, 0x2b, 0x28, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x28,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x00, 0xd9, 0x00, 0xd2, 0x00, 0xcb, 0x00, 0xc4,
+    0x00, 0xbe, 0x00, 0xb8, 0x00, 0xb2, 0x00, 0xad, 0x00, 0xa8, 0x00, 0xa2,
+    0x00, 0x9d, 0x00, 0x99, 0x00, 0x94, 0x00, 0x90, 0x00, 0x8b, 0x00, 0x88,
+    0x00, 0x84, 0x00, 0x81, 0x00, 0x7d, 0x00, 0x7b, 0x10, 0x7d, 0x10, 0x7a,
+    0x10, 0x76, 0x10, 0x73, 0x10, 0x70, 0x10, 0x6d, 0x10, 0x6a, 0x10, 0x67,
+    0x10, 0x65, 0x10, 0x62, 0x10, 0x5f, 0x10, 0x5d, 0x10, 0x5b, 0x10, 0x59,
+    0x10, 0x56, 0x10, 0x55, 0x10, 0x53, 0x10, 0x51, 0x10, 0x4f, 0x11, 0x4e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x00, 0xbd, 0x00, 0xbb,
+    0x00, 0xb3, 0x00, 0xa8, 0x00, 0x99, 0x00, 0x87, 0x00, 0x75, 0x00, 0x62,
+    0x00, 0x50, 0x00, 0x3f, 0x00, 0x2e, 0x00, 0x1f, 0x02, 0x1a, 0x05, 0x15,
+    0x07, 0x10, 0x09, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x36, 0x00, 0x30, 0x00, 0x29, 0x00,
+    0x22, 0x00, 0x1a, 0x00, 0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x00, 0x00,
+    0x05, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x00, 0xbe, 0x00, 0xbc,
+    0x00, 0xb6, 0x00, 0xac, 0x00, 0xa0, 0x00, 0x93, 0x00, 0x84, 0x00, 0x75,
+    0x00, 0x66, 0x00, 0x58, 0x00, 0x4b, 0x00, 0x3f, 0x00, 0x34, 0x00, 0x2a,
+    0x00, 0x21, 0x00, 0x19, 0x3d, 0x3b, 0x3b, 0x39, 0x39, 0x36, 0x37, 0x35,
+    0x36, 0x33, 0x33, 0x33, 0x33, 0x30, 0x31, 0x30, 0x30, 0x2f, 0x30, 0x2d,
+    0x2e, 0x2d, 0x2d, 0x2d, 0x2d, 0x2b, 0x2d, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+    0x2b, 0x29, 0x2b, 0x28, 0x29, 0x28, 0x28, 0x28, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22, 0x21, 0x22,
+    0x00, 0xd9, 0x00, 0xd3, 0x00, 0xcc, 0x00, 0xc6, 0x00, 0xc0, 0x00, 0xba,
+    0x00, 0xb4, 0x00, 0xaf, 0x00, 0xaa, 0x00, 0xa5, 0x00, 0xa0, 0x00, 0x9b,
+    0x00, 0x97, 0x00, 0x93, 0x00, 0x8f, 0x00, 0x8b, 0x00, 0x88, 0x00, 0x83,
+    0x00, 0x81, 0x00, 0x7d, 0x10, 0x7d, 0x10, 0x7a, 0x10, 0x77, 0x10, 0x74,
+    0x10, 0x71, 0x10, 0x6e, 0x10, 0x6b, 0x10, 0x68, 0x10, 0x65, 0x10, 0x63,
+    0x10, 0x61, 0x10, 0x5e, 0x10, 0x5c, 0x10, 0x5a, 0x10, 0x58, 0x10, 0x56,
+    0x10, 0x55, 0x10, 0x52, 0x10, 0x51, 0x10, 0x4f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
+    0x09, 0x00, 0x0d, 0x00, 0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0xab,
+    0x00, 0x9e, 0x00, 0x8f, 0x00, 0x7e, 0x00, 0x6d, 0x00, 0x5c, 0x00, 0x4c,
+    0x00, 0x3c, 0x00, 0x2d, 0x00, 0x1f, 0x02, 0x1a, 0x04, 0x16, 0x06, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00,
+    0x3b, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2c, 0x00, 0x26, 0x00, 0x1f, 0x00,
+    0x18, 0x00, 0x11, 0x00, 0x0b, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
+    0x09, 0x00, 0x0d, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf,
+    0x00, 0xa5, 0x00, 0x99, 0x00, 0x8b, 0x00, 0x7e, 0x00, 0x70, 0x00, 0x63,
+    0x00, 0x56, 0x00, 0x4a, 0x00, 0x3f, 0x00, 0x35, 0x00, 0x2c, 0x00, 0x23,
+    0x27, 0x76, 0x1a, 0x79, 0x16, 0x7b, 0x15, 0x7c, 0x14, 0x7c, 0x13, 0x7d,
+    0x13, 0x7d, 0x13, 0x7d, 0x12, 0x7d, 0x12, 0x7d, 0x12, 0x7e, 0x12, 0x7e,
+    0x12, 0x7e, 0x12, 0x7e, 0x12, 0x7e, 0x11, 0x7e, 0x11, 0x7e, 0x11, 0x7e,
+    0x11, 0x7f, 0x11, 0x7f, 0x13, 0x5f, 0x10, 0x6f, 0x10, 0x74, 0x10, 0x77,
+    0x10, 0x78, 0x10, 0x7a, 0x10, 0x7a, 0x10, 0x7b, 0x10, 0x7b, 0x10, 0x7c,
+    0x10, 0x7c, 0x10, 0x7c, 0x10, 0x7c, 0x10, 0x7d, 0x10, 0x7d, 0x10, 0x7d,
+    0x10, 0x7d, 0x10, 0x7d, 0x10, 0x7d, 0x10, 0x7d, 0x00, 0x90, 0x02, 0x81,
+    0x06, 0x80, 0x09, 0x7f, 0x0a, 0x7f, 0x0b, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f,
+    0x0d, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0e, 0x7f, 0x0e, 0x7f, 0x0e, 0x7f,
+    0x0e, 0x7f, 0x0f, 0x7f, 0x0f, 0x7f, 0x0f, 0x7f, 0x0f, 0x7f, 0x0f, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00,
+    0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xae, 0x00, 0xa2, 0x00, 0x95,
+    0x00, 0x86, 0x00, 0x77, 0x00, 0x67, 0x00, 0x57, 0x00, 0x48, 0x00, 0x3a,
+    0x00, 0x2c, 0x00, 0x1f, 0x02, 0x1b, 0x04, 0x16, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x38, 0x00,
+    0x34, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x22, 0x00, 0x1c, 0x00, 0x16, 0x00,
+    0x10, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x09, 0x00,
+    0x00, 0xbe, 0x00, 0xbd, 0x00, 0xb8, 0x00, 0xb1, 0x00, 0xa8, 0x00, 0x9d,
+    0x00, 0x92, 0x00, 0x85, 0x00, 0x78, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54,
+    0x00, 0x49, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x2d, 0x32, 0x5f, 0x25, 0x68,
+    0x1f, 0x6d, 0x1c, 0x71, 0x19, 0x72, 0x18, 0x74, 0x17, 0x76, 0x16, 0x77,
+    0x16, 0x77, 0x15, 0x78, 0x15, 0x79, 0x15, 0x79, 0x14, 0x7a, 0x14, 0x7a,
+    0x13, 0x7a, 0x13, 0x7b, 0x13, 0x7b, 0x13, 0x7b, 0x13, 0x7b, 0x13, 0x7b,
+    0x17, 0x46, 0x11, 0x58, 0x10, 0x63, 0x10, 0x69, 0x10, 0x6d, 0x10, 0x70,
+    0x10, 0x72, 0x10, 0x73, 0x10, 0x75, 0x10, 0x76, 0x10, 0x77, 0x10, 0x77,
+    0x10, 0x78, 0x10, 0x78, 0x10, 0x79, 0x10, 0x79, 0x10, 0x79, 0x10, 0x7a,
+    0x10, 0x7a, 0x10, 0x7a, 0x00, 0xbd, 0x00, 0xa4, 0x00, 0x97, 0x02, 0x91,
+    0x04, 0x8d, 0x05, 0x8a, 0x06, 0x89, 0x07, 0x88, 0x08, 0x86, 0x09, 0x86,
+    0x09, 0x85, 0x0a, 0x85, 0x0a, 0x84, 0x0b, 0x84, 0x0b, 0x83, 0x0b, 0x83,
+    0x0c, 0x83, 0x0c, 0x83, 0x0c, 0x82, 0x0c, 0x82, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xbe, 0x00, 0xbc,
+    0x00, 0xb8, 0x00, 0xb0, 0x00, 0xa6, 0x00, 0x9a, 0x00, 0x8d, 0x00, 0x7f,
+    0x00, 0x70, 0x00, 0x61, 0x00, 0x53, 0x00, 0x45, 0x00, 0x38, 0x00, 0x2b,
+    0x00, 0x1f, 0x02, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x39, 0x00, 0x35, 0x00, 0x31, 0x00,
+    0x2b, 0x00, 0x26, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x14, 0x00, 0x0f, 0x00,
+    0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xbe, 0x00, 0xbd,
+    0x00, 0xb9, 0x00, 0xb3, 0x00, 0xab, 0x00, 0xa1, 0x00, 0x97, 0x00, 0x8b,
+    0x00, 0x80, 0x00, 0x74, 0x00, 0x68, 0x00, 0x5d, 0x00, 0x53, 0x00, 0x49,
+    0x00, 0x3f, 0x00, 0x36, 0x36, 0x56, 0x2a, 0x5f, 0x24, 0x65, 0x20, 0x68,
+    0x1e, 0x6c, 0x1c, 0x6e, 0x1b, 0x70, 0x19, 0x71, 0x18, 0x72, 0x18, 0x73,
+    0x18, 0x75, 0x17, 0x75, 0x16, 0x76, 0x15, 0x76, 0x15, 0x76, 0x15, 0x77,
+    0x15, 0x77, 0x15, 0x77, 0x15, 0x78, 0x15, 0x79, 0x1a, 0x39, 0x13, 0x4a,
+    0x11, 0x55, 0x10, 0x5e, 0x10, 0x63, 0x10, 0x67, 0x10, 0x6a, 0x10, 0x6c,
+    0x10, 0x6e, 0x10, 0x70, 0x10, 0x71, 0x10, 0x72, 0x10, 0x73, 0x10, 0x74,
+    0x10, 0x75, 0x10, 0x75, 0x10, 0x76, 0x10, 0x76, 0x10, 0x77, 0x10, 0x77,
+    0x00, 0xcc, 0x00, 0xb5, 0x00, 0xa8, 0x00, 0x9e, 0x01, 0x99, 0x02, 0x94,
+    0x03, 0x92, 0x04, 0x8f, 0x05, 0x8d, 0x06, 0x8c, 0x06, 0x8b, 0x07, 0x8a,
+    0x07, 0x89, 0x08, 0x88, 0x08, 0x88, 0x09, 0x87, 0x09, 0x87, 0x09, 0x86,
+    0x0a, 0x86, 0x0a, 0x86, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb2,
+    0x00, 0xa9, 0x00, 0x9e, 0x00, 0x92, 0x00, 0x85, 0x00, 0x78, 0x00, 0x6a,
+    0x00, 0x5c, 0x00, 0x4f, 0x00, 0x42, 0x00, 0x36, 0x00, 0x2a, 0x00, 0x1f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00,
+    0x3d, 0x00, 0x3a, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x28, 0x00,
+    0x23, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x09, 0x00,
+    0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb4,
+    0x00, 0xad, 0x00, 0xa5, 0x00, 0x9b, 0x00, 0x91, 0x00, 0x86, 0x00, 0x7b,
+    0x00, 0x70, 0x00, 0x65, 0x00, 0x5b, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3f,
+    0x38, 0x52, 0x2e, 0x59, 0x28, 0x5f, 0x24, 0x63, 0x22, 0x67, 0x1f, 0x69,
+    0x1e, 0x6b, 0x1c, 0x6d, 0x1b, 0x6e, 0x1a, 0x70, 0x1a, 0x71, 0x19, 0x72,
+    0x18, 0x72, 0x18, 0x72, 0x18, 0x73, 0x17, 0x75, 0x17, 0x76, 0x16, 0x76,
+    0x15, 0x76, 0x15, 0x76, 0x1b, 0x33, 0x15, 0x41, 0x12, 0x4c, 0x11, 0x54,
+    0x10, 0x5b, 0x10, 0x5f, 0x10, 0x63, 0x10, 0x66, 0x10, 0x68, 0x10, 0x6a,
+    0x10, 0x6c, 0x10, 0x6e, 0x10, 0x6f, 0x10, 0x70, 0x10, 0x71, 0x10, 0x72,
+    0x10, 0x72, 0x10, 0x73, 0x10, 0x74, 0x10, 0x74, 0x00, 0xd1, 0x00, 0xc0,
+    0x00, 0xb3, 0x00, 0xaa, 0x00, 0xa2, 0x00, 0x9d, 0x01, 0x99, 0x02, 0x96,
+    0x02, 0x94, 0x03, 0x92, 0x04, 0x90, 0x05, 0x8f, 0x05, 0x8d, 0x06, 0x8d,
+    0x06, 0x8c, 0x07, 0x8b, 0x07, 0x8a, 0x07, 0x8a, 0x07, 0x89, 0x08, 0x89,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x07, 0x47, 0x0f, 0x0f, 0x26, 0x00, 0x33, 0x00, 0x38, 0x00, 0x3a, 0x00,
+    0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00,
+    0x3e, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x07, 0x47, 0x00, 0x7f, 0x00, 0xa5, 0x00, 0xb2,
+    0x00, 0xb7, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd,
+    0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe, 0x00, 0xbe,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x4f, 0x31, 0x55,
+    0x2b, 0x5b, 0x27, 0x5f, 0x24, 0x63, 0x22, 0x65, 0x20, 0x68, 0x1f, 0x69,
+    0x1d, 0x6b, 0x1d, 0x6d, 0x1b, 0x6d, 0x1a, 0x6e, 0x1a, 0x6f, 0x1a, 0x71,
+    0x19, 0x72, 0x18, 0x72, 0x18, 0x72, 0x18, 0x72, 0x18, 0x73, 0x18, 0x74,
+    0x1c, 0x2f, 0x16, 0x3b, 0x13, 0x44, 0x11, 0x4d, 0x11, 0x53, 0x10, 0x59,
+    0x10, 0x5d, 0x10, 0x60, 0x10, 0x63, 0x10, 0x65, 0x10, 0x67, 0x10, 0x69,
+    0x10, 0x6b, 0x10, 0x6c, 0x10, 0x6d, 0x10, 0x6e, 0x10, 0x6f, 0x10, 0x70,
+    0x10, 0x71, 0x10, 0x71, 0x00, 0xd5, 0x00, 0xc6, 0x00, 0xbb, 0x00, 0xb2,
+    0x00, 0xaa, 0x00, 0xa4, 0x00, 0xa0, 0x01, 0x9c, 0x01, 0x9a, 0x02, 0x97,
+    0x02, 0x95, 0x03, 0x93, 0x03, 0x92, 0x04, 0x91, 0x05, 0x90, 0x05, 0x8e,
+    0x06, 0x8e, 0x06, 0x8d, 0x06, 0x8c, 0x06, 0x8c, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x3f,
+    0x05, 0x05, 0x1c, 0x00, 0x2a, 0x00, 0x31, 0x00, 0x35, 0x00, 0x38, 0x00,
+    0x39, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3d, 0x00,
+    0x3d, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x0f, 0x0f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0x9c, 0x00, 0xaa, 0x00, 0xb1,
+    0x00, 0xb5, 0x00, 0xb7, 0x00, 0xb9, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc,
+    0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3a, 0x4c, 0x33, 0x53, 0x2e, 0x58, 0x29, 0x5c,
+    0x27, 0x5f, 0x24, 0x62, 0x22, 0x64, 0x20, 0x66, 0x20, 0x68, 0x1e, 0x69,
+    0x1d, 0x6a, 0x1d, 0x6c, 0x1c, 0x6d, 0x1a, 0x6d, 0x1a, 0x6e, 0x1a, 0x6f,
+    0x1a, 0x71, 0x19, 0x72, 0x18, 0x72, 0x18, 0x72, 0x1d, 0x2d, 0x17, 0x37,
+    0x14, 0x40, 0x12, 0x47, 0x11, 0x4e, 0x11, 0x53, 0x10, 0x57, 0x10, 0x5b,
+    0x10, 0x5e, 0x10, 0x61, 0x10, 0x63, 0x10, 0x65, 0x10, 0x67, 0x10, 0x68,
+    0x10, 0x6a, 0x10, 0x6b, 0x10, 0x6c, 0x10, 0x6d, 0x10, 0x6e, 0x10, 0x6f,
+    0x00, 0xd6, 0x00, 0xcb, 0x00, 0xc0, 0x00, 0xb8, 0x00, 0xb1, 0x00, 0xab,
+    0x00, 0xa6, 0x00, 0xa2, 0x00, 0x9f, 0x01, 0x9c, 0x02, 0x9a, 0x02, 0x98,
+    0x02, 0x96, 0x03, 0x94, 0x03, 0x93, 0x03, 0x92, 0x04, 0x91, 0x05, 0x90,
+    0x05, 0x8f, 0x05, 0x8f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x7f, 0x00, 0x3f, 0x00, 0x12,
+    0x09, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2a, 0x00, 0x2f, 0x00, 0x32, 0x00,
+    0x34, 0x00, 0x36, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3a, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x05, 0x05,
+    0x00, 0x3f, 0x00, 0x6d, 0x00, 0x88, 0x00, 0x99, 0x00, 0xa3, 0x00, 0xaa,
+    0x00, 0xae, 0x00, 0xb1, 0x00, 0xb4, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8,
+    0x00, 0xb9, 0x00, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x4b, 0x34, 0x51, 0x2f, 0x55, 0x2c, 0x59, 0x29, 0x5c, 0x26, 0x60,
+    0x24, 0x61, 0x23, 0x64, 0x21, 0x65, 0x20, 0x67, 0x1f, 0x69, 0x1d, 0x69,
+    0x1d, 0x6a, 0x1d, 0x6c, 0x1c, 0x6d, 0x1b, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d,
+    0x1a, 0x6f, 0x1a, 0x71, 0x1e, 0x2b, 0x18, 0x34, 0x15, 0x3b, 0x13, 0x43,
+    0x12, 0x49, 0x11, 0x4e, 0x11, 0x52, 0x10, 0x56, 0x10, 0x5a, 0x10, 0x5d,
+    0x10, 0x5f, 0x10, 0x61, 0x10, 0x63, 0x10, 0x65, 0x10, 0x66, 0x10, 0x68,
+    0x10, 0x69, 0x10, 0x6a, 0x10, 0x6b, 0x10, 0x6c, 0x00, 0xd7, 0x00, 0xcd,
+    0x00, 0xc5, 0x00, 0xbd, 0x00, 0xb6, 0x00, 0xb0, 0x00, 0xab, 0x00, 0xa7,
+    0x00, 0xa4, 0x00, 0xa1, 0x01, 0x9e, 0x01, 0x9c, 0x02, 0x9a, 0x02, 0x98,
+    0x02, 0x97, 0x02, 0x96, 0x03, 0x94, 0x03, 0x93, 0x03, 0x92, 0x04, 0x91,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xb2, 0x00, 0x9c, 0x00, 0x6d, 0x00, 0x3f, 0x00, 0x1d, 0x00, 0x05,
+    0x0b, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x29, 0x00, 0x2d, 0x00,
+    0x30, 0x00, 0x32, 0x00, 0x33, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x1c, 0x00, 0x00, 0x12, 0x00, 0x3f,
+    0x00, 0x62, 0x00, 0x7a, 0x00, 0x8a, 0x00, 0x96, 0x00, 0x9e, 0x00, 0xa4,
+    0x00, 0xa9, 0x00, 0xac, 0x00, 0xaf, 0x00, 0xb1, 0x00, 0xb3, 0x00, 0xb4,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x49, 0x36, 0x4f,
+    0x31, 0x54, 0x2d, 0x57, 0x2a, 0x5a, 0x28, 0x5c, 0x26, 0x60, 0x24, 0x61,
+    0x23, 0x64, 0x21, 0x65, 0x20, 0x65, 0x20, 0x68, 0x1e, 0x69, 0x1d, 0x69,
+    0x1d, 0x69, 0x1d, 0x6b, 0x1c, 0x6d, 0x1b, 0x6d, 0x1a, 0x6d, 0x1a, 0x6d,
+    0x1e, 0x2a, 0x19, 0x32, 0x16, 0x39, 0x13, 0x3f, 0x12, 0x45, 0x11, 0x4a,
+    0x11, 0x4e, 0x11, 0x52, 0x10, 0x56, 0x10, 0x59, 0x10, 0x5c, 0x10, 0x5d,
+    0x10, 0x60, 0x10, 0x61, 0x10, 0x63, 0x10, 0x65, 0x10, 0x66, 0x10, 0x67,
+    0x10, 0x68, 0x10, 0x69, 0x00, 0xd8, 0x00, 0xcf, 0x00, 0xc7, 0x00, 0xc0,
+    0x00, 0xba, 0x00, 0xb5, 0x00, 0xb0, 0x00, 0xac, 0x00, 0xa8, 0x00, 0xa5,
+    0x00, 0xa2, 0x00, 0xa0, 0x01, 0x9e, 0x01, 0x9c, 0x02, 0x9a, 0x02, 0x99,
+    0x02, 0x97, 0x02, 0x96, 0x03, 0x95, 0x03, 0x94, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0xaa,
+    0x00, 0x88, 0x00, 0x62, 0x00, 0x3f, 0x00, 0x24, 0x00, 0x0f, 0x00, 0x00,
+    0x0b, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00,
+    0x2b, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x38, 0x00, 0x2a, 0x00, 0x09, 0x00, 0x00, 0x1d, 0x00, 0x3f, 0x00, 0x5b,
+    0x00, 0x6f, 0x00, 0x7f, 0x00, 0x8b, 0x00, 0x94, 0x00, 0x9b, 0x00, 0xa0,
+    0x00, 0xa5, 0x00, 0xa8, 0x00, 0xab, 0x00, 0xad, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x48, 0x37, 0x4d, 0x32, 0x51, 0x2f, 0x55,
+    0x2c, 0x58, 0x29, 0x5b, 0x27, 0x5d, 0x26, 0x60, 0x24, 0x60, 0x23, 0x63,
+    0x22, 0x65, 0x20, 0x65, 0x20, 0x66, 0x1f, 0x68, 0x1e, 0x69, 0x1d, 0x69,
+    0x1d, 0x69, 0x1d, 0x6b, 0x1c, 0x6d, 0x1b, 0x6d, 0x1e, 0x29, 0x1a, 0x30,
+    0x17, 0x36, 0x14, 0x3c, 0x13, 0x41, 0x12, 0x46, 0x11, 0x4a, 0x11, 0x4f,
+    0x11, 0x52, 0x10, 0x55, 0x10, 0x58, 0x10, 0x5a, 0x10, 0x5c, 0x10, 0x5f,
+    0x10, 0x60, 0x10, 0x62, 0x10, 0x63, 0x10, 0x65, 0x10, 0x65, 0x10, 0x67,
+    0x00, 0xd9, 0x00, 0xd1, 0x00, 0xca, 0x00, 0xc3, 0x00, 0xbe, 0x00, 0xb9,
+    0x00, 0xb4, 0x00, 0xb0, 0x00, 0xac, 0x00, 0xa9, 0x00, 0xa6, 0x00, 0xa3,
+    0x00, 0xa1, 0x01, 0x9f, 0x01, 0x9d, 0x01, 0x9b, 0x02, 0x9a, 0x02, 0x99,
+    0x02, 0x98, 0x02, 0x97, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0x00, 0xb1, 0x00, 0x99, 0x00, 0x7a,
+    0x00, 0x5b, 0x00, 0x3f, 0x00, 0x29, 0x00, 0x16, 0x00, 0x08, 0x02, 0x00,
+    0x0c, 0x00, 0x13, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x22, 0x00, 0x25, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x31, 0x00,
+    0x19, 0x00, 0x00, 0x05, 0x00, 0x24, 0x00, 0x3f, 0x00, 0x56, 0x00, 0x68,
+    0x00, 0x77, 0x00, 0x82, 0x00, 0x8b, 0x00, 0x93, 0x00, 0x99, 0x00, 0x9d,
+    0x00, 0xa1, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3c, 0x48, 0x37, 0x4c, 0x33, 0x50, 0x30, 0x54, 0x2d, 0x57, 0x2a, 0x59,
+    0x29, 0x5c, 0x27, 0x5d, 0x26, 0x60, 0x24, 0x60, 0x23, 0x62, 0x22, 0x65,
+    0x20, 0x65, 0x20, 0x65, 0x20, 0x67, 0x1f, 0x69, 0x1d, 0x69, 0x1d, 0x69,
+    0x1d, 0x69, 0x1d, 0x6a, 0x1f, 0x28, 0x1a, 0x2e, 0x17, 0x34, 0x15, 0x39,
+    0x13, 0x3f, 0x13, 0x43, 0x12, 0x48, 0x11, 0x4b, 0x11, 0x4f, 0x11, 0x52,
+    0x10, 0x55, 0x10, 0x57, 0x10, 0x59, 0x10, 0x5c, 0x10, 0x5d, 0x10, 0x5f,
+    0x10, 0x61, 0x10, 0x62, 0x10, 0x63, 0x10, 0x64, 0x00, 0xd9, 0x00, 0xd2,
+    0x00, 0xcc, 0x00, 0xc6, 0x00, 0xc1, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xb3,
+    0x00, 0xaf, 0x00, 0xac, 0x00, 0xa9, 0x00, 0xa6, 0x00, 0xa4, 0x00, 0xa2,
+    0x00, 0xa0, 0x01, 0x9e, 0x01, 0x9d, 0x02, 0x9c, 0x02, 0x9a, 0x02, 0x99,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbb, 0x00, 0xb5, 0x00, 0xa3, 0x00, 0x8a, 0x00, 0x6f, 0x00, 0x56,
+    0x00, 0x3f, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0f, 0x00, 0x04, 0x04, 0x00,
+    0x0c, 0x00, 0x12, 0x00, 0x17, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x35, 0x00, 0x23, 0x00, 0x0b, 0x00,
+    0x00, 0x0f, 0x00, 0x29, 0x00, 0x3f, 0x00, 0x53, 0x00, 0x63, 0x00, 0x70,
+    0x00, 0x7b, 0x00, 0x84, 0x00, 0x8b, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x47, 0x38, 0x4b,
+    0x34, 0x4f, 0x31, 0x53, 0x2e, 0x55, 0x2c, 0x57, 0x2a, 0x5a, 0x28, 0x5c,
+    0x27, 0x5d, 0x26, 0x60, 0x23, 0x60, 0x23, 0x61, 0x23, 0x64, 0x21, 0x65,
+    0x20, 0x65, 0x20, 0x65, 0x20, 0x68, 0x1e, 0x69, 0x1d, 0x69, 0x1d, 0x69,
+    0x1f, 0x27, 0x1b, 0x2d, 0x18, 0x33, 0x16, 0x38, 0x14, 0x3c, 0x13, 0x41,
+    0x12, 0x44, 0x11, 0x48, 0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x54,
+    0x10, 0x57, 0x10, 0x59, 0x10, 0x5b, 0x10, 0x5c, 0x10, 0x5e, 0x10, 0x5f,
+    0x10, 0x61, 0x10, 0x62, 0x00, 0xd9, 0x00, 0xd3, 0x00, 0xcd, 0x00, 0xc8,
+    0x00, 0xc3, 0x00, 0xbe, 0x00, 0xba, 0x00, 0xb6, 0x00, 0xb2, 0x00, 0xaf,
+    0x00, 0xad, 0x00, 0xaa, 0x00, 0xa7, 0x00, 0xa5, 0x00, 0xa3, 0x00, 0xa1,
+    0x01, 0xa0, 0x01, 0x9e, 0x01, 0x9d, 0x02, 0x9c, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xb7,
+    0x00, 0xaa, 0x00, 0x96, 0x00, 0x7f, 0x00, 0x68, 0x00, 0x53, 0x00, 0x3f,
+    0x00, 0x2e, 0x00, 0x20, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x01, 0x06, 0x00,
+    0x0c, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x00, 0x38, 0x00, 0x2a, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x16,
+    0x00, 0x2c, 0x00, 0x3f, 0x00, 0x50, 0x00, 0x5e, 0x00, 0x6b, 0x00, 0x75,
+    0x00, 0x7e, 0x00, 0x85, 0x00, 0x8b, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x47, 0x38, 0x4b, 0x35, 0x4e, 0x32, 0x51,
+    0x2f, 0x53, 0x2d, 0x57, 0x2b, 0x58, 0x2a, 0x5b, 0x27, 0x5c, 0x27, 0x5d,
+    0x25, 0x60, 0x23, 0x60, 0x23, 0x61, 0x23, 0x64, 0x21, 0x65, 0x20, 0x65,
+    0x20, 0x65, 0x20, 0x66, 0x1f, 0x69, 0x1e, 0x69, 0x1f, 0x27, 0x1b, 0x2c,
+    0x18, 0x31, 0x16, 0x36, 0x14, 0x3a, 0x13, 0x3e, 0x13, 0x42, 0x12, 0x45,
+    0x11, 0x49, 0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x54, 0x10, 0x56,
+    0x10, 0x58, 0x10, 0x5a, 0x10, 0x5c, 0x10, 0x5d, 0x10, 0x5e, 0x10, 0x60,
+    0x00, 0xd9, 0x00, 0xd4, 0x00, 0xce, 0x00, 0xca, 0x00, 0xc5, 0x00, 0xc1,
+    0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb6, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xad,
+    0x00, 0xaa, 0x00, 0xa8, 0x00, 0xa6, 0x00, 0xa4, 0x00, 0xa2, 0x00, 0xa0,
+    0x01, 0x9f, 0x01, 0x9e, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xae, 0x00, 0x9e,
+    0x00, 0x8b, 0x00, 0x77, 0x00, 0x63, 0x00, 0x50, 0x00, 0x3f, 0x00, 0x30,
+    0x00, 0x23, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x07, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x39, 0x00,
+    0x2f, 0x00, 0x1f, 0x00, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x2e,
+    0x00, 0x3f, 0x00, 0x4e, 0x00, 0x5b, 0x00, 0x66, 0x00, 0x70, 0x00, 0x78,
+    0x00, 0x80, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x46, 0x39, 0x4a, 0x35, 0x4d, 0x32, 0x50, 0x30, 0x53, 0x2e, 0x55,
+    0x2c, 0x57, 0x2a, 0x58, 0x29, 0x5c, 0x27, 0x5c, 0x27, 0x5d, 0x25, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x63, 0x22, 0x65, 0x20, 0x65, 0x20, 0x65,
+    0x20, 0x65, 0x20, 0x67, 0x1f, 0x27, 0x1c, 0x2c, 0x19, 0x30, 0x17, 0x35,
+    0x15, 0x39, 0x14, 0x3d, 0x13, 0x40, 0x12, 0x44, 0x12, 0x47, 0x11, 0x49,
+    0x11, 0x4c, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x54, 0x10, 0x56, 0x10, 0x58,
+    0x10, 0x59, 0x10, 0x5b, 0x10, 0x5c, 0x10, 0x5e, 0x00, 0xda, 0x00, 0xd4,
+    0x00, 0xd0, 0x00, 0xcb, 0x00, 0xc7, 0x00, 0xc2, 0x00, 0xbe, 0x00, 0xbb,
+    0x00, 0xb8, 0x00, 0xb5, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xaa,
+    0x00, 0xa8, 0x00, 0xa6, 0x00, 0xa4, 0x00, 0xa3, 0x00, 0xa1, 0x01, 0xa0,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbd, 0x00, 0xba, 0x00, 0xb1, 0x00, 0xa4, 0x00, 0x94, 0x00, 0x82,
+    0x00, 0x70, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3f, 0x00, 0x32, 0x00, 0x26,
+    0x00, 0x1c, 0x00, 0x13, 0x00, 0x0b, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3b, 0x00, 0x32, 0x00, 0x25, 0x00,
+    0x14, 0x00, 0x02, 0x00, 0x00, 0x0f, 0x00, 0x20, 0x00, 0x30, 0x00, 0x3f,
+    0x00, 0x4d, 0x00, 0x58, 0x00, 0x63, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x7b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x46, 0x39, 0x49,
+    0x36, 0x4c, 0x33, 0x4f, 0x31, 0x52, 0x2e, 0x53, 0x2d, 0x57, 0x2b, 0x57,
+    0x2a, 0x59, 0x28, 0x5c, 0x27, 0x5c, 0x27, 0x5e, 0x25, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x62, 0x22, 0x65, 0x20, 0x65, 0x20, 0x65, 0x20, 0x65,
+    0x1f, 0x26, 0x1c, 0x2b, 0x19, 0x2f, 0x17, 0x33, 0x16, 0x37, 0x14, 0x3b,
+    0x13, 0x3e, 0x13, 0x41, 0x12, 0x44, 0x11, 0x47, 0x11, 0x4a, 0x11, 0x4d,
+    0x11, 0x4f, 0x11, 0x51, 0x10, 0x54, 0x10, 0x55, 0x10, 0x57, 0x10, 0x59,
+    0x10, 0x5a, 0x10, 0x5b, 0x00, 0xda, 0x00, 0xd5, 0x00, 0xd1, 0x00, 0xcc,
+    0x00, 0xc8, 0x00, 0xc4, 0x00, 0xc1, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb7,
+    0x00, 0xb4, 0x00, 0xb2, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xaa, 0x00, 0xa9,
+    0x00, 0xa7, 0x00, 0xa5, 0x00, 0xa4, 0x00, 0xa2, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0xbb,
+    0x00, 0xb4, 0x00, 0xa9, 0x00, 0x9b, 0x00, 0x8b, 0x00, 0x7b, 0x00, 0x6b,
+    0x00, 0x5b, 0x00, 0x4d, 0x00, 0x3f, 0x00, 0x33, 0x00, 0x28, 0x00, 0x1f,
+    0x00, 0x16, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x00, 0x3c, 0x00, 0x34, 0x00, 0x29, 0x00, 0x1b, 0x00, 0x0c, 0x00,
+    0x00, 0x04, 0x00, 0x14, 0x00, 0x23, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4b,
+    0x00, 0x56, 0x00, 0x60, 0x00, 0x68, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x45, 0x39, 0x48, 0x36, 0x4b, 0x34, 0x4f,
+    0x31, 0x50, 0x30, 0x53, 0x2e, 0x55, 0x2c, 0x57, 0x2a, 0x57, 0x2a, 0x5a,
+    0x28, 0x5c, 0x27, 0x5c, 0x27, 0x5e, 0x25, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x61, 0x22, 0x64, 0x21, 0x65, 0x20, 0x65, 0x20, 0x26, 0x1c, 0x2a,
+    0x1a, 0x2e, 0x18, 0x32, 0x16, 0x36, 0x14, 0x39, 0x13, 0x3d, 0x13, 0x40,
+    0x12, 0x43, 0x12, 0x45, 0x11, 0x48, 0x11, 0x4b, 0x11, 0x4d, 0x11, 0x4f,
+    0x11, 0x51, 0x10, 0x53, 0x10, 0x55, 0x10, 0x56, 0x10, 0x58, 0x10, 0x5a,
+    0x00, 0xda, 0x00, 0xd6, 0x00, 0xd1, 0x00, 0xcd, 0x00, 0xc9, 0x00, 0xc6,
+    0x00, 0xc2, 0x00, 0xbf, 0x00, 0xbc, 0x00, 0xb9, 0x00, 0xb6, 0x00, 0xb3,
+    0x00, 0xb1, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xab, 0x00, 0xa9, 0x00, 0xa7,
+    0x00, 0xa6, 0x00, 0xa4, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb6, 0x00, 0xac,
+    0x00, 0xa0, 0x00, 0x93, 0x00, 0x84, 0x00, 0x75, 0x00, 0x66, 0x00, 0x58,
+    0x00, 0x4b, 0x00, 0x3f, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x19,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3c, 0x00,
+    0x36, 0x00, 0x2d, 0x00, 0x21, 0x00, 0x13, 0x00, 0x04, 0x00, 0x00, 0x0a,
+    0x00, 0x18, 0x00, 0x26, 0x00, 0x33, 0x00, 0x3f, 0x00, 0x4a, 0x00, 0x54,
+    0x00, 0x5d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x45, 0x3a, 0x48, 0x37, 0x4a, 0x35, 0x4e, 0x32, 0x4f, 0x31, 0x53,
+    0x2e, 0x53, 0x2e, 0x56, 0x2b, 0x57, 0x2a, 0x58, 0x29, 0x5b, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5e, 0x25, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x61,
+    0x23, 0x64, 0x21, 0x65, 0x20, 0x26, 0x1d, 0x2a, 0x1a, 0x2d, 0x18, 0x31,
+    0x17, 0x35, 0x15, 0x38, 0x14, 0x3b, 0x13, 0x3e, 0x13, 0x41, 0x12, 0x44,
+    0x12, 0x46, 0x11, 0x49, 0x11, 0x4b, 0x11, 0x4d, 0x11, 0x4f, 0x11, 0x51,
+    0x10, 0x53, 0x10, 0x55, 0x10, 0x56, 0x10, 0x58, 0x00, 0xda, 0x00, 0xd6,
+    0x00, 0xd2, 0x00, 0xce, 0x00, 0xcb, 0x00, 0xc7, 0x00, 0xc4, 0x00, 0xc1,
+    0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb8, 0x00, 0xb6, 0x00, 0xb3, 0x00, 0xb1,
+    0x00, 0xaf, 0x00, 0xad, 0x00, 0xab, 0x00, 0xa9, 0x00, 0xa8, 0x00, 0xa6,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbe, 0x00, 0xbc, 0x00, 0xb7, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x99,
+    0x00, 0x8b, 0x00, 0x7e, 0x00, 0x70, 0x00, 0x63, 0x00, 0x56, 0x00, 0x4a,
+    0x00, 0x3f, 0x00, 0x35, 0x00, 0x2c, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x3d, 0x00, 0x38, 0x00, 0x30, 0x00,
+    0x25, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x1c,
+    0x00, 0x28, 0x00, 0x34, 0x00, 0x3f, 0x00, 0x49, 0x00, 0x53, 0x00, 0x5b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x45, 0x3a, 0x47,
+    0x38, 0x4a, 0x35, 0x4d, 0x33, 0x4f, 0x31, 0x51, 0x2f, 0x53, 0x2e, 0x54,
+    0x2c, 0x57, 0x2a, 0x57, 0x2a, 0x59, 0x29, 0x5c, 0x27, 0x5c, 0x27, 0x5c,
+    0x27, 0x5e, 0x25, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x63,
+    0x20, 0x25, 0x1d, 0x29, 0x1a, 0x2d, 0x18, 0x30, 0x17, 0x33, 0x16, 0x37,
+    0x14, 0x3a, 0x13, 0x3d, 0x13, 0x3f, 0x13, 0x42, 0x12, 0x44, 0x11, 0x47,
+    0x11, 0x49, 0x11, 0x4b, 0x11, 0x4d, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x53,
+    0x10, 0x55, 0x10, 0x56, 0x00, 0xdb, 0x00, 0xd7, 0x00, 0xd3, 0x00, 0xcf,
+    0x00, 0xcc, 0x00, 0xc8, 0x00, 0xc5, 0x00, 0xc2, 0x00, 0xbf, 0x00, 0xbc,
+    0x00, 0xba, 0x00, 0xb7, 0x00, 0xb5, 0x00, 0xb3, 0x00, 0xb1, 0x00, 0xaf,
+    0x00, 0xad, 0x00, 0xab, 0x00, 0xa9, 0x00, 0xa8, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd,
+    0x00, 0xb8, 0x00, 0xb1, 0x00, 0xa8, 0x00, 0x9d, 0x00, 0x92, 0x00, 0x85,
+    0x00, 0x78, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3f,
+    0x00, 0x36, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x00, 0x3d, 0x00, 0x39, 0x00, 0x32, 0x00, 0x29, 0x00, 0x1e, 0x00,
+    0x12, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a,
+    0x00, 0x35, 0x00, 0x3f, 0x00, 0x49, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x44, 0x3a, 0x47, 0x38, 0x4a, 0x35, 0x4c,
+    0x33, 0x4f, 0x31, 0x50, 0x30, 0x53, 0x2e, 0x53, 0x2e, 0x56, 0x2b, 0x57,
+    0x2a, 0x57, 0x2a, 0x5a, 0x28, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5f,
+    0x25, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x20, 0x25, 0x1d, 0x29,
+    0x1b, 0x2c, 0x18, 0x2f, 0x17, 0x33, 0x16, 0x36, 0x14, 0x39, 0x14, 0x3b,
+    0x13, 0x3e, 0x13, 0x41, 0x12, 0x43, 0x12, 0x45, 0x11, 0x47, 0x11, 0x4a,
+    0x11, 0x4c, 0x11, 0x4e, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x52, 0x10, 0x54,
+    0x00, 0xdb, 0x00, 0xd7, 0x00, 0xd3, 0x00, 0xd0, 0x00, 0xcc, 0x00, 0xc9,
+    0x00, 0xc6, 0x00, 0xc3, 0x00, 0xc1, 0x00, 0xbe, 0x00, 0xbb, 0x00, 0xb9,
+    0x00, 0xb7, 0x00, 0xb5, 0x00, 0xb3, 0x00, 0xb0, 0x00, 0xaf, 0x00, 0xad,
+    0x00, 0xab, 0x00, 0xaa, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xbd, 0x00, 0xb9, 0x00, 0xb3,
+    0x00, 0xab, 0x00, 0xa1, 0x00, 0x97, 0x00, 0x8b, 0x00, 0x80, 0x00, 0x74,
+    0x00, 0x68, 0x00, 0x5d, 0x00, 0x53, 0x00, 0x49, 0x00, 0x3f, 0x00, 0x36,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3d, 0x00,
+    0x3a, 0x00, 0x33, 0x00, 0x2b, 0x00, 0x22, 0x00, 0x17, 0x00, 0x0c, 0x00,
+    0x00, 0x00, 0x00, 0x0b, 0x00, 0x16, 0x00, 0x21, 0x00, 0x2c, 0x00, 0x36,
+    0x00, 0x3f, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x44, 0x3b, 0x46, 0x39, 0x4a, 0x35, 0x4b, 0x34, 0x4f, 0x31, 0x4f,
+    0x31, 0x53, 0x2e, 0x53, 0x2e, 0x54, 0x2c, 0x57, 0x2a, 0x57, 0x2a, 0x58,
+    0x2a, 0x5b, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5f, 0x24, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x20, 0x25, 0x1d, 0x28, 0x1b, 0x2b, 0x19, 0x2f,
+    0x17, 0x32, 0x16, 0x35, 0x15, 0x38, 0x14, 0x3a, 0x13, 0x3d, 0x13, 0x3f,
+    0x13, 0x42, 0x12, 0x44, 0x12, 0x46, 0x11, 0x48, 0x11, 0x4a, 0x11, 0x4c,
+    0x11, 0x4e, 0x11, 0x4f, 0x11, 0x51, 0x10, 0x52, 0x00, 0xdb, 0x00, 0xd7,
+    0x00, 0xd4, 0x00, 0xd0, 0x00, 0xcd, 0x00, 0xca, 0x00, 0xc7, 0x00, 0xc5,
+    0x00, 0xc2, 0x00, 0xbf, 0x00, 0xbd, 0x00, 0xbb, 0x00, 0xb8, 0x00, 0xb6,
+    0x00, 0xb4, 0x00, 0xb2, 0x00, 0xb0, 0x00, 0xaf, 0x00, 0xad, 0x00, 0xac,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xbe, 0x00, 0xbd, 0x00, 0xba, 0x00, 0xb4, 0x00, 0xad, 0x00, 0xa5,
+    0x00, 0x9b, 0x00, 0x91, 0x00, 0x86, 0x00, 0x7b, 0x00, 0x70, 0x00, 0x65,
+    0x00, 0x5b, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3a, 0x00, 0x35, 0x00,
+    0x2e, 0x00, 0x25, 0x00, 0x1c, 0x00, 0x11, 0x00, 0x07, 0x00, 0x00, 0x03,
+    0x00, 0x0e, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2d, 0x00, 0x36, 0x00, 0x3f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x44, 0x3b, 0x46,
+    0x39, 0x49, 0x36, 0x4a, 0x35, 0x4e, 0x32, 0x4f, 0x31, 0x51, 0x2f, 0x53,
+    0x2e, 0x53, 0x2e, 0x56, 0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x58, 0x29, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x26, 0x5f, 0x24, 0x60, 0x23, 0x60,
+    0x20, 0x25, 0x1d, 0x28, 0x1c, 0x2b, 0x1a, 0x2e, 0x18, 0x31, 0x17, 0x34,
+    0x16, 0x37, 0x14, 0x39, 0x13, 0x3b, 0x13, 0x3e, 0x13, 0x40, 0x12, 0x42,
+    0x12, 0x45, 0x11, 0x46, 0x11, 0x49, 0x11, 0x4a, 0x11, 0x4c, 0x11, 0x4e,
+    0x11, 0x4f, 0x11, 0x51, 0x00, 0xdb, 0x00, 0xd8, 0x00, 0xd4, 0x00, 0xd1,
+    0x00, 0xce, 0x00, 0xcb, 0x00, 0xc8, 0x00, 0xc6, 0x00, 0xc3, 0x00, 0xc1,
+    0x00, 0xbe, 0x00, 0xbc, 0x00, 0xba, 0x00, 0xb8, 0x00, 0xb6, 0x00, 0xb4,
+    0x00, 0xb2, 0x00, 0xb0, 0x00, 0xaf, 0x00, 0xad, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f, 0x10, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x40, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x56, 0x7f, 0x47, 0x63,
+    0x44, 0x57, 0x43, 0x52, 0x43, 0x4e, 0x42, 0x4c, 0x42, 0x4a, 0x42, 0x49,
+    0x42, 0x48, 0x42, 0x47, 0x42, 0x46, 0x42, 0x45, 0x42, 0x45, 0x42, 0x45,
+    0x42, 0x44, 0x42, 0x44, 0x42, 0x44, 0x42, 0x43, 0x42, 0x43, 0x42, 0x43,
+    0x4c, 0x7f, 0x27, 0x4d, 0x2f, 0x46, 0x33, 0x44, 0x36, 0x43, 0x37, 0x43,
+    0x39, 0x42, 0x3a, 0x41, 0x3a, 0x41, 0x3b, 0x41, 0x3b, 0x41, 0x3b, 0x41,
+    0x3c, 0x41, 0x3c, 0x41, 0x3c, 0x41, 0x3c, 0x41, 0x3c, 0x41, 0x3d, 0x41,
+    0x3d, 0x41, 0x3d, 0x41, 0x8e, 0x7f, 0x47, 0x4d, 0x44, 0x46, 0x43, 0x44,
+    0x43, 0x43, 0x42, 0x43, 0x42, 0x42, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41,
+    0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41,
+    0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x85, 0x1b, 0x60, 0x27, 0x54, 0x2d, 0x4e, 0x30,
+    0x4b, 0x33, 0x49, 0x34, 0x47, 0x35, 0x46, 0x37, 0x45, 0x38, 0x45, 0x38,
+    0x44, 0x39, 0x43, 0x39, 0x43, 0x3a, 0x42, 0x3a, 0x42, 0x3a, 0x42, 0x3b,
+    0x42, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x09, 0x43, 0x16, 0x3f,
+    0x1f, 0x3e, 0x25, 0x3e, 0x29, 0x3e, 0x2c, 0x3e, 0x2f, 0x3e, 0x30, 0x3e,
+    0x32, 0x3e, 0x33, 0x3e, 0x34, 0x3e, 0x35, 0x3e, 0x36, 0x3e, 0x36, 0x3e,
+    0x37, 0x3e, 0x37, 0x3e, 0x38, 0x3e, 0x38, 0x3e, 0x38, 0x3e, 0x39, 0x3e,
+    0x59, 0x31, 0x4f, 0x38, 0x4b, 0x3a, 0x48, 0x3b, 0x47, 0x3c, 0x46, 0x3c,
+    0x45, 0x3d, 0x45, 0x3d, 0x44, 0x3d, 0x43, 0x3d, 0x43, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x4c, 0x00, 0x2f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x4f, 0x00, 0x04, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x96, 0x05, 0x74, 0x0f, 0x63, 0x17, 0x5a, 0x1d, 0x54, 0x21, 0x51, 0x24,
+    0x4e, 0x27, 0x4c, 0x29, 0x4a, 0x2b, 0x49, 0x2d, 0x49, 0x2e, 0x48, 0x2f,
+    0x48, 0x31, 0x47, 0x31, 0x46, 0x32, 0x46, 0x33, 0x44, 0x33, 0x44, 0x34,
+    0x43, 0x34, 0x43, 0x35, 0x09, 0x43, 0x11, 0x3e, 0x18, 0x3c, 0x1d, 0x3c,
+    0x22, 0x3c, 0x25, 0x3c, 0x27, 0x3c, 0x2a, 0x3c, 0x2c, 0x3d, 0x2d, 0x3d,
+    0x2f, 0x3d, 0x30, 0x3e, 0x31, 0x3e, 0x31, 0x3e, 0x32, 0x3e, 0x33, 0x3e,
+    0x33, 0x3e, 0x34, 0x3e, 0x35, 0x3e, 0x35, 0x3e, 0x5b, 0x2a, 0x53, 0x31,
+    0x4f, 0x34, 0x4c, 0x36, 0x4b, 0x38, 0x4a, 0x39, 0x48, 0x39, 0x47, 0x3a,
+    0x46, 0x3b, 0x46, 0x3b, 0x46, 0x3c, 0x46, 0x3c, 0x46, 0x3d, 0x45, 0x3d,
+    0x44, 0x3d, 0x44, 0x3d, 0x43, 0x3d, 0x43, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x45,
+    0x00, 0x22, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x8f, 0x00, 0x73, 0x00, 0x38, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x9e, 0x01, 0x81, 0x06,
+    0x6f, 0x0d, 0x64, 0x12, 0x5d, 0x16, 0x58, 0x1a, 0x54, 0x1d, 0x53, 0x20,
+    0x50, 0x22, 0x4e, 0x24, 0x4c, 0x26, 0x4b, 0x27, 0x4a, 0x29, 0x49, 0x2a,
+    0x49, 0x2b, 0x49, 0x2c, 0x48, 0x2d, 0x48, 0x2e, 0x48, 0x2f, 0x47, 0x2f,
+    0x09, 0x44, 0x0f, 0x3e, 0x14, 0x3c, 0x19, 0x3c, 0x1d, 0x3b, 0x20, 0x3b,
+    0x23, 0x3b, 0x25, 0x3c, 0x27, 0x3c, 0x28, 0x3c, 0x2a, 0x3b, 0x2c, 0x3b,
+    0x2c, 0x3b, 0x2d, 0x3b, 0x2f, 0x3c, 0x2f, 0x3c, 0x30, 0x3d, 0x31, 0x3e,
+    0x32, 0x3e, 0x32, 0x3e, 0x5c, 0x28, 0x56, 0x2d, 0x52, 0x31, 0x4f, 0x33,
+    0x4e, 0x35, 0x4b, 0x36, 0x4a, 0x37, 0x4a, 0x38, 0x49, 0x39, 0x47, 0x39,
+    0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x3a, 0x46, 0x3a, 0x46, 0x3b,
+    0x46, 0x3c, 0x46, 0x3c, 0x46, 0x3d, 0x45, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x4f, 0x00, 0x36, 0x00, 0x19,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x84, 0x00,
+    0x5b, 0x00, 0x2a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xa4, 0x00, 0x8a, 0x03, 0x78, 0x07, 0x6d, 0x0c,
+    0x65, 0x10, 0x60, 0x13, 0x5b, 0x16, 0x57, 0x19, 0x55, 0x1b, 0x53, 0x1e,
+    0x52, 0x1f, 0x4f, 0x22, 0x4d, 0x23, 0x4c, 0x24, 0x4b, 0x25, 0x4b, 0x27,
+    0x4a, 0x28, 0x49, 0x29, 0x49, 0x29, 0x49, 0x2b, 0x09, 0x45, 0x0d, 0x40,
+    0x11, 0x3d, 0x16, 0x3c, 0x19, 0x3b, 0x1d, 0x3b, 0x1f, 0x3b, 0x21, 0x3a,
+    0x23, 0x3b, 0x25, 0x3b, 0x26, 0x3c, 0x28, 0x3c, 0x29, 0x3c, 0x2a, 0x3b,
+    0x2b, 0x3b, 0x2c, 0x3b, 0x2d, 0x3b, 0x2e, 0x3b, 0x2e, 0x3b, 0x2f, 0x3b,
+    0x5d, 0x27, 0x57, 0x2c, 0x54, 0x2f, 0x52, 0x31, 0x4f, 0x32, 0x4e, 0x34,
+    0x4c, 0x35, 0x4a, 0x35, 0x4a, 0x36, 0x4a, 0x37, 0x4a, 0x38, 0x48, 0x39,
+    0x47, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39,
+    0x46, 0x39, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5b, 0x00, 0x55, 0x00, 0x42, 0x00, 0x2b, 0x00, 0x14, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x8d, 0x00, 0x6f, 0x00, 0x48, 0x00,
+    0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xa7, 0x00, 0x91, 0x01, 0x80, 0x04, 0x75, 0x08, 0x6c, 0x0b, 0x65, 0x0e,
+    0x61, 0x11, 0x5d, 0x14, 0x59, 0x16, 0x56, 0x19, 0x55, 0x1a, 0x54, 0x1c,
+    0x53, 0x1e, 0x51, 0x1f, 0x4f, 0x21, 0x4d, 0x22, 0x4c, 0x23, 0x4b, 0x24,
+    0x4b, 0x25, 0x4b, 0x26, 0x09, 0x45, 0x0d, 0x41, 0x10, 0x3e, 0x14, 0x3d,
+    0x17, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b, 0x1e, 0x3b, 0x20, 0x3b, 0x22, 0x3a,
+    0x23, 0x3a, 0x25, 0x3b, 0x26, 0x3c, 0x28, 0x3c, 0x28, 0x3c, 0x29, 0x3c,
+    0x2a, 0x3c, 0x2b, 0x3b, 0x2c, 0x3b, 0x2d, 0x3b, 0x5d, 0x26, 0x59, 0x2a,
+    0x56, 0x2d, 0x53, 0x2f, 0x51, 0x31, 0x4f, 0x32, 0x4f, 0x33, 0x4d, 0x35,
+    0x4b, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x37, 0x4a, 0x38, 0x49, 0x39,
+    0x48, 0x39, 0x47, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x58,
+    0x00, 0x4a, 0x00, 0x38, 0x00, 0x24, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9b, 0x00, 0x92, 0x00, 0x7c, 0x00, 0x5d, 0x00, 0x3c, 0x00, 0x1c, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xa9, 0x00, 0x96, 0x00,
+    0x86, 0x02, 0x7a, 0x05, 0x72, 0x08, 0x6b, 0x0b, 0x65, 0x0e, 0x62, 0x10,
+    0x5f, 0x12, 0x5b, 0x14, 0x58, 0x16, 0x56, 0x18, 0x55, 0x1a, 0x54, 0x1b,
+    0x53, 0x1d, 0x52, 0x1e, 0x50, 0x1f, 0x4f, 0x20, 0x4d, 0x21, 0x4c, 0x22,
+    0x09, 0x46, 0x0c, 0x41, 0x0f, 0x3f, 0x12, 0x3d, 0x15, 0x3c, 0x17, 0x3c,
+    0x1a, 0x3b, 0x1c, 0x3a, 0x1e, 0x3b, 0x1f, 0x3b, 0x21, 0x3a, 0x22, 0x3a,
+    0x24, 0x3a, 0x25, 0x3a, 0x26, 0x3b, 0x27, 0x3c, 0x28, 0x3c, 0x29, 0x3c,
+    0x2a, 0x3c, 0x2a, 0x3c, 0x5e, 0x26, 0x5a, 0x29, 0x57, 0x2c, 0x53, 0x2e,
+    0x53, 0x30, 0x50, 0x31, 0x4f, 0x31, 0x4f, 0x33, 0x4e, 0x34, 0x4c, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x36, 0x4a, 0x37, 0x4a, 0x38,
+    0x48, 0x39, 0x47, 0x39, 0x46, 0x39, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x4f, 0x00, 0x40,
+    0x00, 0x2f, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x95, 0x00,
+    0x84, 0x00, 0x6c, 0x00, 0x4f, 0x00, 0x32, 0x00, 0x18, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xab, 0x00, 0x9a, 0x00, 0x8b, 0x01, 0x7f, 0x03,
+    0x77, 0x06, 0x71, 0x08, 0x6a, 0x0b, 0x66, 0x0d, 0x63, 0x0f, 0x60, 0x11,
+    0x5d, 0x13, 0x59, 0x14, 0x57, 0x16, 0x56, 0x18, 0x55, 0x19, 0x54, 0x1b,
+    0x53, 0x1c, 0x53, 0x1d, 0x51, 0x1e, 0x50, 0x1f, 0x0a, 0x46, 0x0c, 0x42,
+    0x0e, 0x3f, 0x11, 0x3f, 0x13, 0x3c, 0x16, 0x3c, 0x18, 0x3c, 0x1a, 0x3b,
+    0x1c, 0x3a, 0x1e, 0x3b, 0x1f, 0x3b, 0x20, 0x3b, 0x21, 0x3a, 0x23, 0x3a,
+    0x24, 0x3a, 0x25, 0x39, 0x26, 0x3a, 0x27, 0x3c, 0x27, 0x3c, 0x28, 0x3c,
+    0x5e, 0x26, 0x5a, 0x29, 0x57, 0x2b, 0x55, 0x2d, 0x53, 0x2e, 0x53, 0x30,
+    0x50, 0x31, 0x4f, 0x31, 0x4f, 0x32, 0x4f, 0x34, 0x4d, 0x35, 0x4b, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x36, 0x4a, 0x38,
+    0x4a, 0x39, 0x48, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5e, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x47, 0x00, 0x38, 0x00, 0x29,
+    0x00, 0x1a, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x8a, 0x00, 0x76, 0x00,
+    0x5e, 0x00, 0x45, 0x00, 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xac, 0x00, 0x9d, 0x00, 0x8f, 0x01, 0x85, 0x02, 0x7b, 0x04, 0x75, 0x06,
+    0x6f, 0x08, 0x69, 0x0b, 0x66, 0x0d, 0x63, 0x0e, 0x61, 0x10, 0x5e, 0x12,
+    0x5b, 0x13, 0x58, 0x15, 0x57, 0x16, 0x56, 0x18, 0x55, 0x19, 0x55, 0x1a,
+    0x54, 0x1b, 0x53, 0x1c, 0x0a, 0x47, 0x0b, 0x42, 0x0e, 0x40, 0x10, 0x3f,
+    0x12, 0x3d, 0x15, 0x3c, 0x17, 0x3c, 0x18, 0x3c, 0x1a, 0x3b, 0x1c, 0x3a,
+    0x1d, 0x3b, 0x1f, 0x3b, 0x20, 0x3b, 0x21, 0x3b, 0x22, 0x3a, 0x23, 0x3a,
+    0x24, 0x3a, 0x25, 0x39, 0x26, 0x3a, 0x27, 0x3b, 0x5e, 0x26, 0x5b, 0x28,
+    0x57, 0x2a, 0x57, 0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x30, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x33, 0x4e, 0x35, 0x4b, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x36, 0x4a, 0x37,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c,
+    0x00, 0x55, 0x00, 0x4b, 0x00, 0x3f, 0x00, 0x32, 0x00, 0x24, 0x00, 0x17,
+    0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x69, 0x00, 0x53, 0x00,
+    0x3c, 0x00, 0x26, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xad, 0x00, 0xa0, 0x00,
+    0x92, 0x00, 0x89, 0x02, 0x7f, 0x03, 0x78, 0x05, 0x73, 0x07, 0x6e, 0x09,
+    0x69, 0x0b, 0x66, 0x0c, 0x64, 0x0e, 0x62, 0x0f, 0x60, 0x11, 0x5c, 0x12,
+    0x59, 0x14, 0x58, 0x15, 0x57, 0x16, 0x56, 0x18, 0x55, 0x18, 0x55, 0x1a,
+    0x0a, 0x47, 0x0b, 0x43, 0x0d, 0x41, 0x0f, 0x3f, 0x11, 0x3f, 0x13, 0x3c,
+    0x15, 0x3b, 0x17, 0x3c, 0x18, 0x3c, 0x1a, 0x3b, 0x1c, 0x3a, 0x1d, 0x3a,
+    0x1f, 0x3b, 0x1f, 0x3b, 0x21, 0x3b, 0x21, 0x3b, 0x22, 0x3a, 0x24, 0x3a,
+    0x24, 0x3a, 0x24, 0x39, 0x5e, 0x26, 0x5c, 0x27, 0x58, 0x2a, 0x57, 0x2b,
+    0x55, 0x2e, 0x53, 0x2e, 0x53, 0x2f, 0x52, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x32, 0x4e, 0x34, 0x4c, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f,
+    0x00, 0x44, 0x00, 0x38, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a, 0x00,
+    0x91, 0x00, 0x83, 0x00, 0x72, 0x00, 0x5e, 0x00, 0x4a, 0x00, 0x36, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xae, 0x00, 0xa2, 0x00, 0x95, 0x00, 0x8b, 0x01,
+    0x83, 0x02, 0x7b, 0x04, 0x76, 0x05, 0x73, 0x07, 0x6e, 0x09, 0x69, 0x0a,
+    0x66, 0x0c, 0x64, 0x0d, 0x62, 0x0f, 0x61, 0x10, 0x5e, 0x11, 0x5b, 0x13,
+    0x58, 0x14, 0x58, 0x15, 0x56, 0x16, 0x56, 0x18, 0x0a, 0x47, 0x0b, 0x43,
+    0x0d, 0x42, 0x0f, 0x3f, 0x11, 0x3f, 0x12, 0x3e, 0x14, 0x3c, 0x16, 0x3c,
+    0x17, 0x3c, 0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3a, 0x1d, 0x39, 0x1f, 0x3b,
+    0x1f, 0x3b, 0x20, 0x3b, 0x21, 0x3b, 0x21, 0x3a, 0x22, 0x3a, 0x24, 0x3a,
+    0x5e, 0x26, 0x5c, 0x27, 0x59, 0x2a, 0x57, 0x2a, 0x56, 0x2c, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2f, 0x51, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x32, 0x4f, 0x33, 0x4d, 0x35, 0x4b, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5e, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e,
+    0x00, 0x33, 0x00, 0x28, 0x00, 0x1d, 0x00, 0x12, 0x00, 0x09, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x88, 0x00,
+    0x79, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xaf, 0x00, 0xa3, 0x00, 0x98, 0x00, 0x8e, 0x00, 0x87, 0x02, 0x7f, 0x03,
+    0x79, 0x04, 0x75, 0x06, 0x71, 0x07, 0x6c, 0x09, 0x68, 0x0a, 0x66, 0x0c,
+    0x64, 0x0d, 0x63, 0x0e, 0x61, 0x10, 0x5f, 0x11, 0x5c, 0x12, 0x59, 0x13,
+    0x58, 0x14, 0x58, 0x15, 0x0a, 0x47, 0x0b, 0x43, 0x0d, 0x42, 0x0e, 0x40,
+    0x10, 0x3e, 0x11, 0x3f, 0x13, 0x3c, 0x15, 0x3b, 0x17, 0x3c, 0x17, 0x3c,
+    0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b, 0x1c, 0x39, 0x1e, 0x3a, 0x1f, 0x3b,
+    0x1f, 0x3b, 0x21, 0x3b, 0x21, 0x3b, 0x22, 0x3a, 0x5e, 0x25, 0x5c, 0x27,
+    0x5a, 0x29, 0x57, 0x2a, 0x57, 0x2b, 0x54, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2f, 0x50, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x33, 0x4e, 0x34, 0x4c, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d,
+    0x00, 0x59, 0x00, 0x53, 0x00, 0x4c, 0x00, 0x42, 0x00, 0x39, 0x00, 0x2e,
+    0x00, 0x24, 0x00, 0x1a, 0x00, 0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9c, 0x00, 0x95, 0x00, 0x8b, 0x00, 0x7e, 0x00, 0x6f, 0x00,
+    0x5f, 0x00, 0x4e, 0x00, 0x3d, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xaf, 0x00, 0xa5, 0x00,
+    0x9a, 0x00, 0x90, 0x00, 0x8a, 0x01, 0x83, 0x02, 0x7c, 0x03, 0x77, 0x05,
+    0x74, 0x06, 0x70, 0x07, 0x6c, 0x09, 0x68, 0x0a, 0x66, 0x0b, 0x64, 0x0c,
+    0x63, 0x0e, 0x61, 0x0f, 0x60, 0x11, 0x5d, 0x11, 0x5b, 0x13, 0x59, 0x13,
+    0x0a, 0x47, 0x0a, 0x44, 0x0d, 0x42, 0x0e, 0x41, 0x0f, 0x3e, 0x11, 0x3f,
+    0x13, 0x3e, 0x14, 0x3c, 0x15, 0x3a, 0x17, 0x3c, 0x17, 0x3c, 0x19, 0x3c,
+    0x1a, 0x3b, 0x1c, 0x3b, 0x1c, 0x39, 0x1e, 0x3a, 0x1f, 0x3b, 0x1f, 0x3b,
+    0x20, 0x3b, 0x21, 0x3b, 0x5e, 0x25, 0x5c, 0x27, 0x5a, 0x29, 0x57, 0x2a,
+    0x57, 0x2a, 0x56, 0x2d, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x30,
+    0x50, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x32,
+    0x4f, 0x33, 0x4d, 0x35, 0x4b, 0x35, 0x4a, 0x35, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55,
+    0x00, 0x4e, 0x00, 0x46, 0x00, 0x3d, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21,
+    0x00, 0x18, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00,
+    0x97, 0x00, 0x8e, 0x00, 0x83, 0x00, 0x75, 0x00, 0x66, 0x00, 0x57, 0x00,
+    0x47, 0x00, 0x37, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x0c, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xb0, 0x00, 0xa6, 0x00, 0x9d, 0x00, 0x92, 0x00,
+    0x8c, 0x01, 0x86, 0x02, 0x7e, 0x02, 0x7a, 0x04, 0x76, 0x05, 0x73, 0x06,
+    0x70, 0x07, 0x6b, 0x09, 0x68, 0x0a, 0x66, 0x0b, 0x65, 0x0c, 0x63, 0x0e,
+    0x62, 0x0e, 0x61, 0x10, 0x5e, 0x11, 0x5c, 0x12, 0x0a, 0x47, 0x0a, 0x44,
+    0x0c, 0x42, 0x0d, 0x41, 0x0f, 0x3f, 0x11, 0x3f, 0x11, 0x3f, 0x13, 0x3d,
+    0x15, 0x3c, 0x16, 0x3b, 0x17, 0x3c, 0x18, 0x3c, 0x19, 0x3c, 0x1a, 0x3b,
+    0x1c, 0x3b, 0x1c, 0x39, 0x1e, 0x39, 0x1f, 0x3b, 0x1f, 0x3b, 0x1f, 0x3b,
+    0x5f, 0x25, 0x5c, 0x27, 0x5b, 0x28, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2b,
+    0x54, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x30, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x33,
+    0x4e, 0x34, 0x4c, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5f, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x49,
+    0x00, 0x41, 0x00, 0x39, 0x00, 0x30, 0x00, 0x27, 0x00, 0x1e, 0x00, 0x16,
+    0x00, 0x0e, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x90, 0x00,
+    0x86, 0x00, 0x7a, 0x00, 0x6d, 0x00, 0x5f, 0x00, 0x50, 0x00, 0x41, 0x00,
+    0x33, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xb0, 0x00, 0xa7, 0x00, 0x9f, 0x00, 0x95, 0x00, 0x8e, 0x00, 0x88, 0x01,
+    0x82, 0x02, 0x7c, 0x03, 0x78, 0x05, 0x75, 0x06, 0x72, 0x07, 0x6f, 0x08,
+    0x6a, 0x09, 0x68, 0x0a, 0x66, 0x0b, 0x65, 0x0c, 0x63, 0x0d, 0x62, 0x0e,
+    0x61, 0x0f, 0x60, 0x11, 0x0a, 0x47, 0x0a, 0x45, 0x0c, 0x42, 0x0d, 0x42,
+    0x0e, 0x40, 0x10, 0x3d, 0x11, 0x3f, 0x13, 0x3e, 0x14, 0x3c, 0x15, 0x3b,
+    0x17, 0x3b, 0x17, 0x3c, 0x18, 0x3c, 0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b,
+    0x1c, 0x3a, 0x1d, 0x39, 0x1f, 0x3a, 0x1f, 0x3b, 0x5f, 0x25, 0x5c, 0x27,
+    0x5c, 0x27, 0x58, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x56, 0x2d, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x32, 0x4f, 0x34,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e,
+    0x00, 0x5b, 0x00, 0x57, 0x00, 0x52, 0x00, 0x4c, 0x00, 0x44, 0x00, 0x3d,
+    0x00, 0x35, 0x00, 0x2c, 0x00, 0x24, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x0d,
+    0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x92, 0x00, 0x89, 0x00, 0x7e, 0x00,
+    0x72, 0x00, 0x66, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x3d, 0x00, 0x2f, 0x00,
+    0x22, 0x00, 0x16, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xb1, 0x00, 0xa7, 0x00,
+    0xa0, 0x00, 0x97, 0x00, 0x90, 0x00, 0x8a, 0x01, 0x85, 0x02, 0x7e, 0x02,
+    0x7a, 0x03, 0x77, 0x05, 0x74, 0x06, 0x72, 0x07, 0x6e, 0x08, 0x6a, 0x09,
+    0x68, 0x0a, 0x66, 0x0b, 0x65, 0x0c, 0x63, 0x0d, 0x63, 0x0e, 0x61, 0x0f,
+    0x0a, 0x47, 0x0a, 0x45, 0x0b, 0x42, 0x0d, 0x42, 0x0e, 0x40, 0x0f, 0x3e,
+    0x11, 0x3f, 0x12, 0x3f, 0x13, 0x3d, 0x15, 0x3c, 0x15, 0x3a, 0x17, 0x3c,
+    0x17, 0x3c, 0x19, 0x3c, 0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b, 0x1c, 0x3a,
+    0x1d, 0x39, 0x1f, 0x39, 0x5f, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x59, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2f, 0x51, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x00, 0x17, 0x00, 0x2f,
+    0x00, 0x4c, 0x00, 0x56, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5d, 0x00, 0x5d,
+    0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f,
+    0x00, 0x5f, 0x00, 0x5f, 0x00, 0x6c, 0x00, 0x4c, 0x00, 0x5f, 0x00, 0x62,
+    0x00, 0x62, 0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e,
+    0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x5f, 0x00, 0x5f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x14, 0x01, 0x29,
+    0x00, 0x49, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d,
+    0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e,
+    0x00, 0x5f, 0x00, 0x5f, 0x31, 0x11, 0x03, 0x23, 0x00, 0x46, 0x00, 0x52,
+    0x00, 0x58, 0x00, 0x5a, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e,
+    0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xb1, 0x00, 0xa8, 0x00, 0xa1, 0x00, 0x99, 0x00,
+    0x91, 0x00, 0x8c, 0x00, 0x88, 0x01, 0x82, 0x02, 0x7c, 0x03, 0x79, 0x04,
+    0x76, 0x05, 0x74, 0x06, 0x71, 0x07, 0x6d, 0x08, 0x6a, 0x09, 0x68, 0x0a,
+    0x66, 0x0b, 0x65, 0x0c, 0x64, 0x0c, 0x63, 0x0e, 0x0a, 0x47, 0x0a, 0x45,
+    0x0b, 0x42, 0x0d, 0x42, 0x0e, 0x41, 0x0f, 0x3f, 0x11, 0x3e, 0x11, 0x3f,
+    0x13, 0x3e, 0x13, 0x3c, 0x15, 0x3c, 0x16, 0x3a, 0x17, 0x3c, 0x17, 0x3c,
+    0x19, 0x3c, 0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b, 0x1c, 0x3a, 0x1d, 0x39,
+    0x5f, 0x25, 0x5c, 0x27, 0x5c, 0x27, 0x5a, 0x29, 0x57, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x55, 0x2d, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2f, 0x51, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x00, 0x00, 0x00, 0x07, 0x00, 0x2f, 0x00, 0x45,
+    0x00, 0x4f, 0x00, 0x55, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5c,
+    0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e,
+    0x00, 0x4c, 0x00, 0x3b, 0x00, 0x48, 0x00, 0x55, 0x00, 0x58, 0x00, 0x57,
+    0x00, 0x58, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5d,
+    0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x16, 0x04, 0x00, 0x27, 0x00, 0x41,
+    0x00, 0x4d, 0x00, 0x53, 0x00, 0x56, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b,
+    0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e,
+    0x5f, 0x00, 0x20, 0x00, 0x00, 0x1f, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x51,
+    0x00, 0x55, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5b, 0x00, 0x5c,
+    0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0xb1, 0x00, 0xa9, 0x00, 0xa2, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x8e, 0x00,
+    0x89, 0x01, 0x84, 0x02, 0x7e, 0x02, 0x7a, 0x03, 0x78, 0x05, 0x75, 0x05,
+    0x73, 0x06, 0x71, 0x07, 0x6c, 0x08, 0x69, 0x09, 0x68, 0x0a, 0x66, 0x0b,
+    0x65, 0x0c, 0x64, 0x0c, 0x0a, 0x47, 0x0a, 0x46, 0x0b, 0x43, 0x0d, 0x42,
+    0x0e, 0x42, 0x0f, 0x40, 0x10, 0x3d, 0x11, 0x3f, 0x12, 0x3f, 0x13, 0x3d,
+    0x15, 0x3c, 0x15, 0x3b, 0x17, 0x3a, 0x17, 0x3c, 0x17, 0x3c, 0x19, 0x3c,
+    0x19, 0x3c, 0x1a, 0x3b, 0x1c, 0x3b, 0x1c, 0x3b, 0x5f, 0x25, 0x5c, 0x27,
+    0x5c, 0x27, 0x5b, 0x28, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2c,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x30,
+    0x50, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x22, 0x00, 0x36, 0x00, 0x42,
+    0x00, 0x4a, 0x00, 0x4f, 0x00, 0x53, 0x00, 0x55, 0x00, 0x57, 0x00, 0x58,
+    0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5b, 0x00, 0x5f, 0x00, 0x48,
+    0x00, 0x1b, 0x00, 0x34, 0x00, 0x40, 0x00, 0x44, 0x00, 0x4a, 0x00, 0x4f,
+    0x00, 0x53, 0x00, 0x55, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a,
+    0x00, 0x5b, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x82, 0x00, 0x57, 0x00, 0x12, 0x01, 0x00, 0x17, 0x00, 0x2f, 0x00, 0x3e,
+    0x00, 0x47, 0x00, 0x4d, 0x00, 0x51, 0x00, 0x53, 0x00, 0x56, 0x00, 0x57,
+    0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x85, 0x00, 0x5f, 0x00,
+    0x1f, 0x00, 0x00, 0x0d, 0x00, 0x28, 0x00, 0x39, 0x00, 0x43, 0x00, 0x4a,
+    0x00, 0x4e, 0x00, 0x52, 0x00, 0x54, 0x00, 0x56, 0x00, 0x57, 0x00, 0x59,
+    0x00, 0x59, 0x00, 0x5a, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0xb2, 0x00, 0xa9, 0x00,
+    0xa3, 0x00, 0x9d, 0x00, 0x94, 0x00, 0x8f, 0x00, 0x8b, 0x01, 0x87, 0x02,
+    0x81, 0x02, 0x7c, 0x03, 0x79, 0x03, 0x77, 0x05, 0x75, 0x06, 0x72, 0x06,
+    0x70, 0x07, 0x6c, 0x08, 0x69, 0x09, 0x68, 0x0a, 0x66, 0x0b, 0x65, 0x0c,
+    0x0a, 0x47, 0x0a, 0x46, 0x0b, 0x43, 0x0d, 0x42, 0x0d, 0x42, 0x0e, 0x40,
+    0x0f, 0x3e, 0x11, 0x3e, 0x11, 0x3f, 0x13, 0x3f, 0x13, 0x3c, 0x15, 0x3c,
+    0x15, 0x3a, 0x17, 0x3b, 0x17, 0x3c, 0x18, 0x3c, 0x19, 0x3c, 0x19, 0x3c,
+    0x1a, 0x3b, 0x1c, 0x3b, 0x5f, 0x24, 0x5c, 0x27, 0x5c, 0x27, 0x5b, 0x28,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2b, 0x55, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x30, 0x50, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x01, 0x00, 0x19, 0x00, 0x2b, 0x00, 0x38, 0x00, 0x40,
+    0x00, 0x47, 0x00, 0x4b, 0x00, 0x4f, 0x00, 0x51, 0x00, 0x53, 0x00, 0x55,
+    0x00, 0x56, 0x00, 0x57, 0x00, 0x62, 0x00, 0x55, 0x00, 0x34, 0x00, 0x0b,
+    0x00, 0x1f, 0x00, 0x2b, 0x00, 0x38, 0x00, 0x40, 0x00, 0x47, 0x00, 0x4b,
+    0x00, 0x4f, 0x00, 0x51, 0x00, 0x53, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x78, 0x00,
+    0x43, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x00, 0x23, 0x00, 0x31, 0x00, 0x3b,
+    0x00, 0x42, 0x00, 0x48, 0x00, 0x4c, 0x00, 0x4f, 0x00, 0x51, 0x00, 0x53,
+    0x00, 0x55, 0x00, 0x56, 0x92, 0x00, 0x7c, 0x00, 0x4d, 0x00, 0x1f, 0x00,
+    0x00, 0x02, 0x00, 0x1a, 0x00, 0x2a, 0x00, 0x36, 0x00, 0x3e, 0x00, 0x45,
+    0x00, 0x49, 0x00, 0x4d, 0x00, 0x4f, 0x00, 0x52, 0x00, 0x53, 0x00, 0x55,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0xb2, 0x00, 0xaa, 0x00, 0xa4, 0x00, 0x9e, 0x00,
+    0x96, 0x00, 0x90, 0x00, 0x8c, 0x00, 0x88, 0x01, 0x84, 0x02, 0x7e, 0x02,
+    0x7b, 0x03, 0x78, 0x04, 0x76, 0x05, 0x74, 0x06, 0x72, 0x07, 0x6f, 0x07,
+    0x6b, 0x09, 0x69, 0x09, 0x68, 0x0a, 0x66, 0x0b, 0x0a, 0x47, 0x0a, 0x46,
+    0x0b, 0x44, 0x0d, 0x42, 0x0d, 0x42, 0x0e, 0x40, 0x0f, 0x3f, 0x10, 0x3d,
+    0x11, 0x3f, 0x12, 0x3f, 0x13, 0x3e, 0x14, 0x3c, 0x15, 0x3c, 0x16, 0x3a,
+    0x17, 0x3b, 0x17, 0x3c, 0x18, 0x3c, 0x19, 0x3c, 0x19, 0x3c, 0x1a, 0x3b,
+    0x5f, 0x24, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x58, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x56, 0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x30, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x14, 0x00, 0x24, 0x00, 0x2f, 0x00, 0x38, 0x00, 0x3f,
+    0x00, 0x44, 0x00, 0x48, 0x00, 0x4c, 0x00, 0x4e, 0x00, 0x50, 0x00, 0x52,
+    0x00, 0x62, 0x00, 0x58, 0x00, 0x40, 0x00, 0x1f, 0x00, 0x01, 0x00, 0x14,
+    0x00, 0x24, 0x00, 0x2f, 0x00, 0x38, 0x00, 0x3f, 0x00, 0x44, 0x00, 0x48,
+    0x00, 0x4c, 0x00, 0x4e, 0x00, 0x50, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x87, 0x00, 0x61, 0x00, 0x36, 0x00,
+    0x10, 0x00, 0x02, 0x0a, 0x00, 0x1a, 0x00, 0x27, 0x00, 0x32, 0x00, 0x3a,
+    0x00, 0x40, 0x00, 0x44, 0x00, 0x48, 0x00, 0x4b, 0x00, 0x4e, 0x00, 0x50,
+    0x97, 0x00, 0x8a, 0x00, 0x68, 0x00, 0x42, 0x00, 0x1f, 0x00, 0x04, 0x00,
+    0x00, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x41,
+    0x00, 0x45, 0x00, 0x49, 0x00, 0x4b, 0x00, 0x4e, 0x28, 0x3c, 0x16, 0x41,
+    0x11, 0x43, 0x0f, 0x44, 0x0e, 0x45, 0x0d, 0x46, 0x0c, 0x46, 0x0c, 0x46,
+    0x0b, 0x47, 0x0b, 0x47, 0x0b, 0x47, 0x0b, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x6e, 0x1c, 0x3a, 0x29, 0x27, 0x31, 0x1e, 0x36, 0x19, 0x3a, 0x17, 0x3b,
+    0x14, 0x3d, 0x13, 0x3f, 0x11, 0x40, 0x11, 0x40, 0x10, 0x41, 0x0f, 0x42,
+    0x0f, 0x43, 0x0f, 0x43, 0x0e, 0x43, 0x0e, 0x44, 0x0d, 0x44, 0x0d, 0x44,
+    0x0c, 0x44, 0x0c, 0x44, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x3c, 0x32, 0x22, 0x38,
+    0x18, 0x3c, 0x14, 0x3f, 0x11, 0x40, 0x10, 0x41, 0x0f, 0x42, 0x0e, 0x43,
+    0x0e, 0x44, 0x0d, 0x44, 0x0d, 0x44, 0x0c, 0x44, 0x0c, 0x45, 0x0c, 0x45,
+    0x0c, 0x45, 0x0c, 0x45, 0x0b, 0x45, 0x0b, 0x45, 0x0b, 0x46, 0x0b, 0x46,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x10, 0x00, 0x1e, 0x00, 0x29, 0x00, 0x32, 0x00, 0x38, 0x00, 0x3e,
+    0x00, 0x42, 0x00, 0x46, 0x00, 0x49, 0x00, 0x4c, 0x00, 0x5f, 0x00, 0x57,
+    0x00, 0x44, 0x00, 0x2b, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1e,
+    0x00, 0x29, 0x00, 0x32, 0x00, 0x38, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x46,
+    0x00, 0x49, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x99, 0x00, 0x8f, 0x00, 0x74, 0x00, 0x51, 0x00, 0x2e, 0x00, 0x10, 0x00,
+    0x04, 0x08, 0x00, 0x13, 0x00, 0x20, 0x00, 0x2a, 0x00, 0x32, 0x00, 0x38,
+    0x00, 0x3e, 0x00, 0x42, 0x00, 0x45, 0x00, 0x48, 0x9a, 0x00, 0x91, 0x00,
+    0x79, 0x00, 0x5a, 0x00, 0x3b, 0x00, 0x1f, 0x00, 0x09, 0x00, 0x00, 0x08,
+    0x00, 0x17, 0x00, 0x22, 0x00, 0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3e,
+    0x00, 0x42, 0x00, 0x45, 0x30, 0x38, 0x20, 0x3a, 0x18, 0x3d, 0x14, 0x3e,
+    0x12, 0x40, 0x10, 0x41, 0x0f, 0x42, 0x0e, 0x42, 0x0e, 0x42, 0x0d, 0x43,
+    0x0d, 0x43, 0x0d, 0x44, 0x0d, 0x44, 0x0c, 0x45, 0x0c, 0x45, 0x0b, 0x45,
+    0x0b, 0x46, 0x0b, 0x46, 0x0b, 0x46, 0x0b, 0x47, 0x8a, 0x03, 0x59, 0x0f,
+    0x40, 0x18, 0x32, 0x1f, 0x2a, 0x24, 0x24, 0x28, 0x20, 0x2c, 0x1c, 0x2f,
+    0x1b, 0x31, 0x18, 0x33, 0x17, 0x34, 0x16, 0x36, 0x15, 0x37, 0x14, 0x38,
+    0x13, 0x39, 0x12, 0x3a, 0x12, 0x3a, 0x12, 0x3b, 0x11, 0x3c, 0x10, 0x3c,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x4a, 0x25, 0x31, 0x2b, 0x25, 0x30, 0x1e, 0x33,
+    0x1a, 0x36, 0x17, 0x38, 0x15, 0x39, 0x13, 0x3b, 0x12, 0x3c, 0x11, 0x3d,
+    0x10, 0x3e, 0x10, 0x3f, 0x0f, 0x3f, 0x0f, 0x40, 0x0e, 0x40, 0x0e, 0x40,
+    0x0e, 0x41, 0x0e, 0x41, 0x0d, 0x42, 0x0d, 0x42, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
+    0x00, 0x1a, 0x00, 0x24, 0x00, 0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3d,
+    0x00, 0x41, 0x00, 0x44, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x38,
+    0x00, 0x24, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x24,
+    0x00, 0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x41, 0x00, 0x44,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x94, 0x00,
+    0x7f, 0x00, 0x64, 0x00, 0x46, 0x00, 0x29, 0x00, 0x10, 0x00, 0x06, 0x07,
+    0x00, 0x0e, 0x00, 0x1a, 0x00, 0x24, 0x00, 0x2c, 0x00, 0x32, 0x00, 0x38,
+    0x00, 0x3c, 0x00, 0x40, 0x9b, 0x00, 0x95, 0x00, 0x83, 0x00, 0x6a, 0x00,
+    0x4f, 0x00, 0x36, 0x00, 0x1f, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x10,
+    0x00, 0x1b, 0x00, 0x24, 0x00, 0x2c, 0x00, 0x32, 0x00, 0x37, 0x00, 0x3c,
+    0x34, 0x38, 0x25, 0x39, 0x1e, 0x3b, 0x19, 0x3c, 0x16, 0x3d, 0x14, 0x3d,
+    0x13, 0x3f, 0x11, 0x40, 0x10, 0x41, 0x0f, 0x41, 0x0f, 0x42, 0x0e, 0x42,
+    0x0e, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x43, 0x0d, 0x43,
+    0x0d, 0x44, 0x0d, 0x44, 0x97, 0x00, 0x6c, 0x06, 0x52, 0x0d, 0x43, 0x12,
+    0x38, 0x18, 0x30, 0x1c, 0x2a, 0x20, 0x27, 0x23, 0x23, 0x26, 0x20, 0x28,
+    0x1e, 0x2a, 0x1c, 0x2c, 0x1b, 0x2e, 0x19, 0x2f, 0x18, 0x31, 0x17, 0x32,
+    0x16, 0x33, 0x16, 0x34, 0x16, 0x35, 0x15, 0x35, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x50, 0x24, 0x3b, 0x27, 0x2e, 0x2a, 0x26, 0x2d, 0x21, 0x2f, 0x1d, 0x32,
+    0x1a, 0x33, 0x18, 0x35, 0x16, 0x36, 0x15, 0x38, 0x14, 0x39, 0x13, 0x3a,
+    0x12, 0x3a, 0x11, 0x3b, 0x11, 0x3c, 0x11, 0x3c, 0x10, 0x3d, 0x10, 0x3e,
+    0x10, 0x3e, 0x0f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x17,
+    0x00, 0x20, 0x00, 0x28, 0x00, 0x2e, 0x00, 0x34, 0x00, 0x39, 0x00, 0x3d,
+    0x00, 0x5d, 0x00, 0x59, 0x00, 0x4f, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x1e,
+    0x00, 0x0e, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x20, 0x00, 0x28,
+    0x00, 0x2e, 0x00, 0x34, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x87, 0x00, 0x71, 0x00,
+    0x57, 0x00, 0x3d, 0x00, 0x25, 0x00, 0x10, 0x00, 0x07, 0x06, 0x00, 0x0b,
+    0x00, 0x15, 0x00, 0x1f, 0x00, 0x26, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37,
+    0x9c, 0x00, 0x97, 0x00, 0x8a, 0x00, 0x76, 0x00, 0x5f, 0x00, 0x48, 0x00,
+    0x33, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x15,
+    0x00, 0x1e, 0x00, 0x25, 0x00, 0x2c, 0x00, 0x31, 0x36, 0x39, 0x2a, 0x39,
+    0x22, 0x39, 0x1d, 0x3a, 0x1a, 0x3b, 0x17, 0x3d, 0x15, 0x3d, 0x13, 0x3d,
+    0x13, 0x3e, 0x12, 0x3f, 0x11, 0x40, 0x10, 0x41, 0x0f, 0x41, 0x0f, 0x42,
+    0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x42, 0x0e, 0x41, 0x0e, 0x42, 0x0d, 0x42,
+    0x9e, 0x00, 0x79, 0x02, 0x61, 0x07, 0x50, 0x0b, 0x44, 0x10, 0x3b, 0x14,
+    0x34, 0x18, 0x2f, 0x1b, 0x2b, 0x1e, 0x28, 0x20, 0x25, 0x23, 0x23, 0x25,
+    0x21, 0x27, 0x1f, 0x28, 0x1d, 0x2a, 0x1c, 0x2b, 0x1b, 0x2c, 0x19, 0x2e,
+    0x19, 0x2f, 0x19, 0x30, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x54, 0x23, 0x42, 0x25,
+    0x35, 0x27, 0x2d, 0x29, 0x27, 0x2c, 0x22, 0x2e, 0x1f, 0x2f, 0x1c, 0x31,
+    0x1a, 0x33, 0x19, 0x34, 0x17, 0x35, 0x16, 0x36, 0x15, 0x37, 0x14, 0x38,
+    0x13, 0x38, 0x13, 0x39, 0x12, 0x3a, 0x11, 0x3a, 0x11, 0x3b, 0x11, 0x3c,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1d,
+    0x00, 0x24, 0x00, 0x2a, 0x00, 0x30, 0x00, 0x35, 0x00, 0x5e, 0x00, 0x5b,
+    0x00, 0x53, 0x00, 0x47, 0x00, 0x38, 0x00, 0x29, 0x00, 0x1a, 0x00, 0x0c,
+    0x00, 0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1d, 0x00, 0x24, 0x00, 0x2a,
+    0x00, 0x30, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9d, 0x00, 0x98, 0x00, 0x8c, 0x00, 0x7a, 0x00, 0x64, 0x00, 0x4e, 0x00,
+    0x37, 0x00, 0x22, 0x00, 0x10, 0x00, 0x08, 0x05, 0x02, 0x0a, 0x00, 0x12,
+    0x00, 0x1a, 0x00, 0x22, 0x00, 0x28, 0x00, 0x2d, 0x9d, 0x00, 0x99, 0x00,
+    0x8e, 0x00, 0x7e, 0x00, 0x6b, 0x00, 0x57, 0x00, 0x43, 0x00, 0x30, 0x00,
+    0x1f, 0x00, 0x11, 0x00, 0x04, 0x00, 0x00, 0x07, 0x00, 0x10, 0x00, 0x19,
+    0x00, 0x20, 0x00, 0x26, 0x38, 0x39, 0x2d, 0x39, 0x25, 0x39, 0x20, 0x3a,
+    0x1d, 0x3b, 0x1a, 0x3b, 0x18, 0x3c, 0x16, 0x3d, 0x14, 0x3d, 0x13, 0x3d,
+    0x13, 0x3d, 0x12, 0x3e, 0x11, 0x3f, 0x11, 0x40, 0x10, 0x40, 0x0f, 0x41,
+    0x0f, 0x42, 0x0f, 0x42, 0x0e, 0x42, 0x0e, 0x42, 0xa2, 0x00, 0x84, 0x00,
+    0x6c, 0x04, 0x5a, 0x07, 0x4e, 0x0b, 0x45, 0x0f, 0x3e, 0x12, 0x38, 0x15,
+    0x32, 0x18, 0x2f, 0x1a, 0x2c, 0x1d, 0x29, 0x1f, 0x26, 0x21, 0x24, 0x22,
+    0x22, 0x24, 0x21, 0x26, 0x1f, 0x27, 0x1e, 0x28, 0x1d, 0x2a, 0x1c, 0x2b,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x56, 0x23, 0x47, 0x24, 0x3b, 0x25, 0x32, 0x27,
+    0x2c, 0x29, 0x27, 0x2b, 0x24, 0x2d, 0x21, 0x2e, 0x1e, 0x30, 0x1c, 0x31,
+    0x1b, 0x32, 0x19, 0x33, 0x18, 0x34, 0x17, 0x35, 0x16, 0x36, 0x15, 0x37,
+    0x14, 0x37, 0x14, 0x38, 0x13, 0x38, 0x13, 0x39, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x12, 0x00, 0x1a, 0x00, 0x21,
+    0x00, 0x27, 0x00, 0x2c, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x4b,
+    0x00, 0x3f, 0x00, 0x32, 0x00, 0x24, 0x00, 0x17, 0x00, 0x0b, 0x00, 0x00,
+    0x00, 0x09, 0x00, 0x12, 0x00, 0x1a, 0x00, 0x21, 0x00, 0x27, 0x00, 0x2c,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a, 0x00,
+    0x90, 0x00, 0x81, 0x00, 0x6f, 0x00, 0x5b, 0x00, 0x46, 0x00, 0x32, 0x00,
+    0x20, 0x00, 0x10, 0x00, 0x09, 0x04, 0x03, 0x09, 0x00, 0x0f, 0x00, 0x17,
+    0x00, 0x1e, 0x00, 0x24, 0x9d, 0x00, 0x9a, 0x00, 0x92, 0x00, 0x84, 0x00,
+    0x74, 0x00, 0x62, 0x00, 0x50, 0x00, 0x3f, 0x00, 0x2e, 0x00, 0x1f, 0x00,
+    0x12, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x14, 0x00, 0x1b,
+    0x39, 0x3a, 0x2f, 0x39, 0x28, 0x39, 0x23, 0x39, 0x20, 0x3a, 0x1c, 0x3b,
+    0x1a, 0x3a, 0x18, 0x3b, 0x17, 0x3c, 0x15, 0x3e, 0x14, 0x3e, 0x13, 0x3d,
+    0x13, 0x3d, 0x12, 0x3d, 0x11, 0x3e, 0x11, 0x3f, 0x11, 0x40, 0x10, 0x40,
+    0x0f, 0x40, 0x0f, 0x41, 0xa6, 0x00, 0x8b, 0x00, 0x75, 0x02, 0x63, 0x05,
+    0x57, 0x07, 0x4d, 0x0b, 0x45, 0x0e, 0x3e, 0x11, 0x39, 0x13, 0x35, 0x16,
+    0x32, 0x18, 0x2e, 0x1a, 0x2c, 0x1c, 0x29, 0x1d, 0x27, 0x1f, 0x26, 0x22,
+    0x24, 0x22, 0x21, 0x23, 0x21, 0x25, 0x20, 0x26, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x58, 0x23, 0x4a, 0x23, 0x3f, 0x24, 0x36, 0x26, 0x30, 0x27, 0x2b, 0x29,
+    0x27, 0x2a, 0x24, 0x2c, 0x22, 0x2d, 0x20, 0x2e, 0x1e, 0x30, 0x1c, 0x30,
+    0x1b, 0x32, 0x1a, 0x32, 0x18, 0x33, 0x18, 0x34, 0x17, 0x34, 0x16, 0x35,
+    0x16, 0x36, 0x15, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x09, 0x00, 0x11, 0x00, 0x18, 0x00, 0x1e, 0x00, 0x24,
+    0x00, 0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x44, 0x00, 0x38,
+    0x00, 0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09,
+    0x00, 0x11, 0x00, 0x18, 0x00, 0x1e, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x86, 0x00,
+    0x76, 0x00, 0x65, 0x00, 0x52, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x1e, 0x00,
+    0x10, 0x00, 0x09, 0x04, 0x04, 0x08, 0x00, 0x0c, 0x00, 0x14, 0x00, 0x1a,
+    0x9e, 0x00, 0x9b, 0x00, 0x94, 0x00, 0x89, 0x00, 0x7b, 0x00, 0x6b, 0x00,
+    0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2d, 0x00, 0x1f, 0x00, 0x13, 0x00,
+    0x08, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x11, 0x3a, 0x3a, 0x31, 0x3a,
+    0x2a, 0x39, 0x25, 0x3a, 0x22, 0x39, 0x1e, 0x3b, 0x1c, 0x3b, 0x1a, 0x3a,
+    0x19, 0x3a, 0x17, 0x3c, 0x16, 0x3c, 0x15, 0x3e, 0x14, 0x3e, 0x13, 0x3d,
+    0x13, 0x3d, 0x12, 0x3d, 0x11, 0x3d, 0x11, 0x3e, 0x11, 0x3f, 0x10, 0x40,
+    0xa8, 0x00, 0x90, 0x00, 0x7c, 0x01, 0x6b, 0x02, 0x5f, 0x05, 0x55, 0x07,
+    0x4c, 0x0a, 0x45, 0x0d, 0x40, 0x0f, 0x3c, 0x12, 0x37, 0x14, 0x34, 0x16,
+    0x31, 0x18, 0x2e, 0x19, 0x2b, 0x1b, 0x2a, 0x1d, 0x28, 0x1e, 0x26, 0x20,
+    0x25, 0x22, 0x23, 0x22, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x59, 0x23, 0x4d, 0x23,
+    0x43, 0x24, 0x3b, 0x25, 0x34, 0x26, 0x2f, 0x27, 0x2b, 0x29, 0x28, 0x2a,
+    0x25, 0x2b, 0x23, 0x2d, 0x21, 0x2e, 0x1f, 0x2e, 0x1d, 0x30, 0x1c, 0x30,
+    0x1b, 0x31, 0x1a, 0x32, 0x19, 0x32, 0x18, 0x33, 0x17, 0x34, 0x16, 0x34,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x08, 0x00, 0x0f, 0x00, 0x16, 0x00, 0x1c, 0x00, 0x5e, 0x00, 0x5d,
+    0x00, 0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e, 0x00, 0x33, 0x00, 0x28,
+    0x00, 0x1d, 0x00, 0x12, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f,
+    0x00, 0x16, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9b, 0x00, 0x95, 0x00, 0x8a, 0x00, 0x7d, 0x00, 0x6d, 0x00,
+    0x5d, 0x00, 0x4c, 0x00, 0x3b, 0x00, 0x2c, 0x00, 0x1d, 0x00, 0x10, 0x00,
+    0x0a, 0x04, 0x05, 0x07, 0x00, 0x0b, 0x00, 0x11, 0x9e, 0x00, 0x9c, 0x00,
+    0x96, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x73, 0x00, 0x64, 0x00, 0x55, 0x00,
+    0x46, 0x00, 0x38, 0x00, 0x2b, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x0a, 0x00,
+    0x01, 0x00, 0x00, 0x06, 0x3a, 0x3b, 0x32, 0x3a, 0x2c, 0x39, 0x27, 0x3a,
+    0x23, 0x39, 0x21, 0x39, 0x1e, 0x3b, 0x1c, 0x3c, 0x1a, 0x3a, 0x19, 0x3a,
+    0x17, 0x3b, 0x17, 0x3c, 0x15, 0x3d, 0x15, 0x3e, 0x14, 0x3e, 0x13, 0x3d,
+    0x13, 0x3d, 0x13, 0x3d, 0x11, 0x3d, 0x11, 0x3e, 0xaa, 0x00, 0x94, 0x00,
+    0x82, 0x00, 0x72, 0x01, 0x65, 0x04, 0x5b, 0x05, 0x53, 0x07, 0x4b, 0x0a,
+    0x45, 0x0c, 0x41, 0x0f, 0x3d, 0x11, 0x39, 0x12, 0x36, 0x15, 0x33, 0x16,
+    0x30, 0x18, 0x2e, 0x19, 0x2b, 0x1a, 0x2b, 0x1d, 0x29, 0x1d, 0x26, 0x1e,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x5a, 0x23, 0x4f, 0x23, 0x46, 0x24, 0x3e, 0x24,
+    0x37, 0x25, 0x32, 0x26, 0x2e, 0x27, 0x2b, 0x28, 0x28, 0x2a, 0x25, 0x2b,
+    0x23, 0x2c, 0x21, 0x2d, 0x20, 0x2e, 0x1e, 0x2e, 0x1d, 0x30, 0x1c, 0x30,
+    0x1b, 0x31, 0x1a, 0x32, 0x19, 0x32, 0x18, 0x33, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+    0x00, 0x0e, 0x00, 0x14, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53,
+    0x00, 0x4c, 0x00, 0x42, 0x00, 0x39, 0x00, 0x2e, 0x00, 0x24, 0x00, 0x1a,
+    0x00, 0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x14,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00,
+    0x96, 0x00, 0x8d, 0x00, 0x81, 0x00, 0x74, 0x00, 0x65, 0x00, 0x56, 0x00,
+    0x46, 0x00, 0x37, 0x00, 0x29, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x0a, 0x03,
+    0x06, 0x07, 0x01, 0x0a, 0x9e, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x8f, 0x00,
+    0x85, 0x00, 0x79, 0x00, 0x6b, 0x00, 0x5e, 0x00, 0x50, 0x00, 0x43, 0x00,
+    0x36, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x15, 0x00, 0x0c, 0x00, 0x03, 0x00,
+    0x3b, 0x3b, 0x33, 0x3b, 0x2d, 0x39, 0x29, 0x39, 0x25, 0x3a, 0x22, 0x39,
+    0x20, 0x39, 0x1e, 0x3b, 0x1c, 0x3c, 0x1a, 0x3a, 0x19, 0x3a, 0x18, 0x3a,
+    0x17, 0x3c, 0x16, 0x3c, 0x15, 0x3d, 0x15, 0x3e, 0x13, 0x3f, 0x13, 0x3d,
+    0x13, 0x3d, 0x13, 0x3d, 0xaa, 0x00, 0x98, 0x00, 0x87, 0x00, 0x78, 0x01,
+    0x6b, 0x02, 0x61, 0x04, 0x58, 0x06, 0x51, 0x08, 0x4b, 0x0a, 0x46, 0x0c,
+    0x42, 0x0e, 0x3e, 0x0f, 0x3a, 0x12, 0x37, 0x12, 0x35, 0x16, 0x32, 0x16,
+    0x30, 0x18, 0x2e, 0x19, 0x2b, 0x1a, 0x2b, 0x1c, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x5a, 0x23, 0x51, 0x23, 0x48, 0x23, 0x41, 0x24, 0x3a, 0x25, 0x35, 0x25,
+    0x31, 0x26, 0x2e, 0x27, 0x2a, 0x28, 0x28, 0x2a, 0x26, 0x2b, 0x24, 0x2b,
+    0x22, 0x2d, 0x21, 0x2d, 0x1f, 0x2e, 0x1e, 0x2e, 0x1d, 0x30, 0x1c, 0x30,
+    0x1b, 0x30, 0x1a, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d,
+    0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x46,
+    0x00, 0x3d, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f,
+    0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x90, 0x00,
+    0x85, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x5e, 0x00, 0x50, 0x00, 0x42, 0x00,
+    0x34, 0x00, 0x27, 0x00, 0x1b, 0x00, 0x0f, 0x00, 0x0b, 0x03, 0x06, 0x06,
+    0x9e, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x91, 0x00, 0x88, 0x00, 0x7e, 0x00,
+    0x72, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00,
+    0x2a, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x0d, 0x00, 0x3b, 0x3c, 0x34, 0x3a,
+    0x2f, 0x3a, 0x2a, 0x39, 0x26, 0x3a, 0x23, 0x3a, 0x21, 0x39, 0x1f, 0x3a,
+    0x1d, 0x3b, 0x1c, 0x3c, 0x1a, 0x3b, 0x19, 0x3a, 0x18, 0x3a, 0x17, 0x3b,
+    0x17, 0x3c, 0x15, 0x3c, 0x15, 0x3d, 0x15, 0x3f, 0x13, 0x3f, 0x13, 0x3e,
+    0xac, 0x00, 0x9b, 0x00, 0x8b, 0x00, 0x7c, 0x00, 0x71, 0x01, 0x67, 0x03,
+    0x5e, 0x05, 0x57, 0x07, 0x51, 0x08, 0x4b, 0x0a, 0x46, 0x0c, 0x42, 0x0d,
+    0x3f, 0x0f, 0x3b, 0x11, 0x39, 0x12, 0x35, 0x14, 0x34, 0x16, 0x31, 0x16,
+    0x30, 0x18, 0x2e, 0x19, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x5b, 0x23, 0x52, 0x23,
+    0x4a, 0x23, 0x43, 0x24, 0x3d, 0x24, 0x38, 0x25, 0x34, 0x26, 0x30, 0x27,
+    0x2d, 0x27, 0x2a, 0x28, 0x28, 0x2a, 0x26, 0x2a, 0x24, 0x2b, 0x22, 0x2c,
+    0x21, 0x2d, 0x20, 0x2d, 0x1f, 0x2e, 0x1d, 0x2e, 0x1d, 0x30, 0x1c, 0x30,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x5f, 0x00, 0x5e,
+    0x00, 0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x49, 0x00, 0x41, 0x00, 0x39,
+    0x00, 0x30, 0x00, 0x27, 0x00, 0x1e, 0x00, 0x16, 0x00, 0x0e, 0x00, 0x07,
+    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x92, 0x00, 0x89, 0x00, 0x7e, 0x00,
+    0x72, 0x00, 0x65, 0x00, 0x58, 0x00, 0x4b, 0x00, 0x3e, 0x00, 0x31, 0x00,
+    0x25, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x0b, 0x03, 0x9e, 0x00, 0x9d, 0x00,
+    0x99, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x82, 0x00, 0x77, 0x00, 0x6c, 0x00,
+    0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3d, 0x00, 0x33, 0x00, 0x29, 0x00,
+    0x1f, 0x00, 0x17, 0x00, 0x3b, 0x3c, 0x35, 0x3a, 0x30, 0x3b, 0x2c, 0x39,
+    0x28, 0x3a, 0x25, 0x3b, 0x22, 0x39, 0x21, 0x39, 0x1f, 0x3a, 0x1d, 0x3b,
+    0x1c, 0x3c, 0x1a, 0x3b, 0x19, 0x3a, 0x19, 0x3a, 0x17, 0x3a, 0x17, 0x3c,
+    0x16, 0x3c, 0x15, 0x3c, 0x15, 0x3e, 0x14, 0x3f, 0xad, 0x00, 0x9d, 0x00,
+    0x8e, 0x00, 0x81, 0x00, 0x76, 0x01, 0x6b, 0x02, 0x63, 0x04, 0x5c, 0x05,
+    0x56, 0x07, 0x50, 0x08, 0x4b, 0x0a, 0x47, 0x0c, 0x43, 0x0c, 0x40, 0x0f,
+    0x3c, 0x0f, 0x3a, 0x12, 0x37, 0x12, 0x35, 0x14, 0x33, 0x16, 0x30, 0x16,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x5b, 0x23, 0x53, 0x23, 0x4c, 0x23, 0x45, 0x23,
+    0x40, 0x24, 0x3b, 0x25, 0x36, 0x25, 0x33, 0x26, 0x30, 0x27, 0x2d, 0x28,
+    0x2a, 0x28, 0x28, 0x2a, 0x26, 0x2a, 0x25, 0x2b, 0x23, 0x2b, 0x22, 0x2d,
+    0x20, 0x2d, 0x20, 0x2e, 0x1e, 0x2e, 0x1d, 0x2e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x57,
+    0x00, 0x52, 0x00, 0x4c, 0x00, 0x44, 0x00, 0x3d, 0x00, 0x35, 0x00, 0x2c,
+    0x00, 0x24, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x0d, 0x00, 0x06, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00,
+    0x99, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x82, 0x00, 0x77, 0x00, 0x6b, 0x00,
+    0x5f, 0x00, 0x53, 0x00, 0x46, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x24, 0x00,
+    0x19, 0x00, 0x0f, 0x00, 0x9e, 0x00, 0x9d, 0x00, 0x9a, 0x00, 0x95, 0x00,
+    0x8d, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71, 0x00, 0x66, 0x00, 0x5b, 0x00,
+    0x50, 0x00, 0x46, 0x00, 0x3b, 0x00, 0x31, 0x00, 0x28, 0x00, 0x1f, 0x00,
+    0x3c, 0x3d, 0x36, 0x3a, 0x31, 0x3b, 0x2c, 0x3a, 0x29, 0x39, 0x26, 0x3a,
+    0x24, 0x3b, 0x21, 0x39, 0x20, 0x39, 0x1f, 0x3a, 0x1d, 0x3b, 0x1c, 0x3c,
+    0x1a, 0x3c, 0x19, 0x3a, 0x19, 0x3a, 0x17, 0x3a, 0x17, 0x3b, 0x17, 0x3c,
+    0x15, 0x3c, 0x15, 0x3c, 0xad, 0x00, 0x9f, 0x00, 0x91, 0x00, 0x85, 0x00,
+    0x79, 0x00, 0x6f, 0x01, 0x67, 0x02, 0x60, 0x04, 0x59, 0x05, 0x54, 0x07,
+    0x4f, 0x08, 0x4b, 0x0a, 0x47, 0x0c, 0x43, 0x0c, 0x41, 0x0f, 0x3d, 0x0f,
+    0x3b, 0x11, 0x38, 0x12, 0x35, 0x12, 0x35, 0x15, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x5b, 0x23, 0x54, 0x23, 0x4e, 0x23, 0x47, 0x23, 0x42, 0x24, 0x3c, 0x24,
+    0x38, 0x25, 0x35, 0x25, 0x32, 0x26, 0x2f, 0x27, 0x2d, 0x28, 0x2a, 0x28,
+    0x28, 0x2a, 0x26, 0x2a, 0x25, 0x2b, 0x23, 0x2b, 0x22, 0x2c, 0x21, 0x2d,
+    0x20, 0x2d, 0x20, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3d, 0x36, 0x3a,
+    0x32, 0x3b, 0x2d, 0x3b, 0x2b, 0x39, 0x28, 0x3a, 0x25, 0x3a, 0x23, 0x3a,
+    0x21, 0x39, 0x1f, 0x39, 0x1f, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c, 0x1a, 0x3c,
+    0x19, 0x3a, 0x19, 0x3a, 0x18, 0x3a, 0x17, 0x3a, 0x17, 0x3c, 0x16, 0x3c,
+    0xad, 0x00, 0xa0, 0x00, 0x94, 0x00, 0x88, 0x00, 0x7e, 0x00, 0x74, 0x01,
+    0x6c, 0x02, 0x65, 0x03, 0x5e, 0x04, 0x58, 0x05, 0x53, 0x07, 0x4f, 0x08,
+    0x4b, 0x0a, 0x47, 0x0b, 0x44, 0x0c, 0x41, 0x0e, 0x3e, 0x0f, 0x3b, 0x0f,
+    0x3a, 0x12, 0x37, 0x12, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x5c, 0x23, 0x55, 0x23,
+    0x4f, 0x23, 0x49, 0x23, 0x44, 0x24, 0x3f, 0x24, 0x3b, 0x25, 0x37, 0x25,
+    0x34, 0x26, 0x31, 0x26, 0x2e, 0x27, 0x2c, 0x28, 0x2a, 0x28, 0x28, 0x29,
+    0x27, 0x2a, 0x25, 0x2b, 0x24, 0x2b, 0x22, 0x2b, 0x22, 0x2d, 0x20, 0x2d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x37, 0x3b, 0x33, 0x3b, 0x2f, 0x3b,
+    0x2b, 0x39, 0x29, 0x39, 0x26, 0x3a, 0x24, 0x3b, 0x22, 0x3a, 0x21, 0x39,
+    0x1f, 0x39, 0x1e, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c, 0x1a, 0x3c, 0x19, 0x3b,
+    0x19, 0x3a, 0x18, 0x3a, 0x17, 0x3a, 0x17, 0x3b, 0xae, 0x00, 0xa2, 0x00,
+    0x97, 0x00, 0x8b, 0x00, 0x80, 0x00, 0x77, 0x00, 0x6f, 0x01, 0x67, 0x02,
+    0x61, 0x04, 0x5c, 0x05, 0x57, 0x05, 0x52, 0x07, 0x4e, 0x08, 0x4b, 0x0a,
+    0x47, 0x0b, 0x44, 0x0c, 0x41, 0x0d, 0x3f, 0x0f, 0x3c, 0x0f, 0x3b, 0x11,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x5c, 0x23, 0x56, 0x23, 0x50, 0x23, 0x4a, 0x23,
+    0x45, 0x23, 0x40, 0x24, 0x3c, 0x24, 0x39, 0x25, 0x35, 0x25, 0x33, 0x26,
+    0x30, 0x26, 0x2e, 0x27, 0x2c, 0x28, 0x2a, 0x28, 0x28, 0x29, 0x27, 0x2a,
+    0x25, 0x2a, 0x24, 0x2b, 0x23, 0x2b, 0x22, 0x2c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3c, 0x3e, 0x37, 0x3b, 0x33, 0x3a, 0x2f, 0x3b, 0x2c, 0x3a, 0x2a, 0x39,
+    0x27, 0x3a, 0x25, 0x3a, 0x23, 0x3b, 0x21, 0x39, 0x20, 0x39, 0x1f, 0x39,
+    0x1e, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c, 0x1a, 0x3c, 0x19, 0x3b, 0x19, 0x3a,
+    0x19, 0x3a, 0x17, 0x3a, 0xaf, 0x00, 0xa3, 0x00, 0x98, 0x00, 0x8e, 0x00,
+    0x84, 0x00, 0x7a, 0x00, 0x72, 0x01, 0x6c, 0x02, 0x65, 0x02, 0x5f, 0x04,
+    0x5a, 0x05, 0x56, 0x05, 0x52, 0x07, 0x4e, 0x09, 0x4a, 0x0a, 0x47, 0x0b,
+    0x45, 0x0c, 0x41, 0x0c, 0x40, 0x0f, 0x3d, 0x0f, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x5c, 0x23, 0x56, 0x23, 0x51, 0x23, 0x4c, 0x23, 0x47, 0x23, 0x42, 0x24,
+    0x3e, 0x24, 0x3b, 0x25, 0x37, 0x25, 0x34, 0x25, 0x32, 0x26, 0x30, 0x26,
+    0x2e, 0x27, 0x2c, 0x28, 0x2a, 0x28, 0x28, 0x29, 0x27, 0x2a, 0x25, 0x2a,
+    0x25, 0x2b, 0x23, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3e, 0x38, 0x3c,
+    0x34, 0x3a, 0x30, 0x3b, 0x2d, 0x3b, 0x2a, 0x39, 0x28, 0x39, 0x26, 0x3a,
+    0x24, 0x3b, 0x22, 0x3b, 0x21, 0x39, 0x20, 0x39, 0x1f, 0x39, 0x1e, 0x3b,
+    0x1c, 0x3b, 0x1c, 0x3c, 0x1a, 0x3c, 0x19, 0x3b, 0x19, 0x3a, 0x19, 0x3a,
+    0xaf, 0x00, 0xa5, 0x00, 0x99, 0x00, 0x90, 0x00, 0x87, 0x00, 0x7e, 0x00,
+    0x76, 0x00, 0x6f, 0x01, 0x68, 0x02, 0x62, 0x04, 0x5e, 0x04, 0x59, 0x05,
+    0x55, 0x06, 0x51, 0x07, 0x4e, 0x09, 0x4a, 0x0a, 0x47, 0x0a, 0x45, 0x0c,
+    0x41, 0x0c, 0x41, 0x0f, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x5c, 0x23, 0x57, 0x23,
+    0x52, 0x23, 0x4d, 0x23, 0x48, 0x23, 0x44, 0x23, 0x40, 0x24, 0x3c, 0x24,
+    0x39, 0x25, 0x36, 0x25, 0x34, 0x25, 0x31, 0x26, 0x2f, 0x27, 0x2d, 0x27,
+    0x2c, 0x28, 0x2a, 0x28, 0x28, 0x29, 0x27, 0x2a, 0x25, 0x2a, 0x25, 0x2b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x38, 0x3c, 0x34, 0x3a, 0x31, 0x3b,
+    0x2e, 0x3c, 0x2b, 0x39, 0x29, 0x39, 0x27, 0x3a, 0x25, 0x3a, 0x24, 0x3b,
+    0x21, 0x3a, 0x21, 0x39, 0x1f, 0x39, 0x1f, 0x3a, 0x1d, 0x3b, 0x1c, 0x3b,
+    0x1c, 0x3c, 0x1a, 0x3c, 0x19, 0x3c, 0x19, 0x3a, 0xaf, 0x00, 0xa6, 0x00,
+    0x9b, 0x00, 0x91, 0x00, 0x88, 0x00, 0x80, 0x00, 0x78, 0x00, 0x71, 0x01,
+    0x6b, 0x02, 0x66, 0x02, 0x61, 0x04, 0x5c, 0x04, 0x58, 0x05, 0x55, 0x07,
+    0x50, 0x07, 0x4e, 0x09, 0x4a, 0x0a, 0x47, 0x0a, 0x45, 0x0c, 0x42, 0x0c,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x5c, 0x23, 0x58, 0x23, 0x53, 0x23, 0x4d, 0x23,
+    0x49, 0x23, 0x45, 0x23, 0x41, 0x24, 0x3d, 0x24, 0x3b, 0x24, 0x38, 0x25,
+    0x35, 0x25, 0x33, 0x26, 0x31, 0x26, 0x2f, 0x27, 0x2d, 0x27, 0x2c, 0x28,
+    0x2a, 0x28, 0x28, 0x28, 0x28, 0x2a, 0x26, 0x2a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x3e, 0x38, 0x3d, 0x35, 0x3a, 0x32, 0x3b, 0x2e, 0x3b, 0x2c, 0x3a,
+    0x2a, 0x39, 0x27, 0x39, 0x26, 0x3a, 0x24, 0x3a, 0x23, 0x3b, 0x21, 0x39,
+    0x21, 0x39, 0x1f, 0x39, 0x1f, 0x3a, 0x1d, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c,
+    0x1a, 0x3c, 0x19, 0x3c, 0xb0, 0x00, 0xa6, 0x00, 0x9d, 0x00, 0x93, 0x00,
+    0x8b, 0x00, 0x83, 0x00, 0x7c, 0x00, 0x75, 0x00, 0x6e, 0x01, 0x69, 0x02,
+    0x63, 0x03, 0x5f, 0x04, 0x5b, 0x05, 0x56, 0x05, 0x54, 0x07, 0x4f, 0x07,
+    0x4e, 0x09, 0x4a, 0x0a, 0x47, 0x0a, 0x46, 0x0c, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x5d, 0x23, 0x58, 0x23, 0x53, 0x23, 0x4f, 0x23, 0x4a, 0x23, 0x46, 0x23,
+    0x43, 0x24, 0x3f, 0x24, 0x3c, 0x24, 0x39, 0x25, 0x36, 0x25, 0x34, 0x25,
+    0x33, 0x26, 0x30, 0x26, 0x2f, 0x27, 0x2d, 0x27, 0x2c, 0x28, 0x2a, 0x28,
+    0x28, 0x28, 0x28, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x39, 0x3e,
+    0x35, 0x3a, 0x32, 0x3a, 0x2f, 0x3b, 0x2d, 0x3c, 0x2a, 0x39, 0x28, 0x39,
+    0x27, 0x3a, 0x24, 0x3a, 0x24, 0x3b, 0x22, 0x3b, 0x21, 0x39, 0x20, 0x39,
+    0x1f, 0x39, 0x1f, 0x3a, 0x1d, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c, 0x1a, 0x3c,
+    0xb0, 0x00, 0xa7, 0x00, 0x9e, 0x00, 0x96, 0x00, 0x8d, 0x00, 0x86, 0x00,
+    0x7e, 0x00, 0x77, 0x00, 0x71, 0x01, 0x6b, 0x01, 0x66, 0x02, 0x62, 0x04,
+    0x5d, 0x04, 0x5a, 0x05, 0x55, 0x05, 0x53, 0x07, 0x4f, 0x07, 0x4e, 0x09,
+    0x4a, 0x0a, 0x47, 0x0a, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x5d, 0x23, 0x58, 0x23,
+    0x54, 0x23, 0x50, 0x23, 0x4c, 0x23, 0x48, 0x23, 0x44, 0x23, 0x40, 0x24,
+    0x3d, 0x24, 0x3a, 0x24, 0x38, 0x25, 0x36, 0x25, 0x33, 0x25, 0x32, 0x26,
+    0x2f, 0x26, 0x2f, 0x27, 0x2c, 0x27, 0x2c, 0x28, 0x2a, 0x28, 0x28, 0x28,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x39, 0x3e, 0x35, 0x3b, 0x32, 0x3a,
+    0x30, 0x3b, 0x2e, 0x3c, 0x2b, 0x3a, 0x2a, 0x39, 0x27, 0x39, 0x26, 0x3a,
+    0x24, 0x3a, 0x23, 0x3b, 0x21, 0x3a, 0x21, 0x39, 0x1f, 0x39, 0x1f, 0x39,
+    0x1e, 0x3b, 0x1c, 0x3b, 0x1c, 0x3b, 0x1c, 0x3c, 0xb1, 0x00, 0xa7, 0x00,
+    0x9f, 0x00, 0x97, 0x00, 0x8f, 0x00, 0x87, 0x00, 0x80, 0x00, 0x79, 0x00,
+    0x73, 0x00, 0x6e, 0x01, 0x69, 0x02, 0x64, 0x02, 0x60, 0x04, 0x5c, 0x04,
+    0x59, 0x05, 0x55, 0x05, 0x53, 0x07, 0x4e, 0x07, 0x4e, 0x09, 0x4a, 0x0a,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47,
+    0x0a, 0x47, 0x0a, 0x47, 0x5d, 0x23, 0x58, 0x23, 0x54, 0x23, 0x50, 0x23,
+    0x4c, 0x23, 0x48, 0x23, 0x45, 0x23, 0x42, 0x24, 0x3f, 0x24, 0x3c, 0x24,
+    0x39, 0x25, 0x37, 0x25, 0x35, 0x25, 0x33, 0x25, 0x31, 0x26, 0x2f, 0x26,
+    0x2e, 0x27, 0x2c, 0x27, 0x2c, 0x28, 0x2a, 0x28, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7f, 0x00, 0x94, 0x00, 0x9e, 0x00, 0xa3, 0x00, 0xa7, 0x00, 0xa9, 0x00,
+    0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xae, 0x00, 0xaf, 0x00,
+    0xaf, 0x00, 0xb0, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb1, 0x00, 0xb1, 0x00,
+    0xb2, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x21, 0x00, 0x6e, 0x00,
+    0x8a, 0x00, 0x97, 0x00, 0x9e, 0x00, 0xa2, 0x00, 0xa6, 0x00, 0xa8, 0x00,
+    0xaa, 0x00, 0xaa, 0x00, 0xac, 0x00, 0xad, 0x00, 0xad, 0x00, 0xad, 0x00,
+    0xae, 0x00, 0xaf, 0x00, 0xaf, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb0, 0x00,
+    0x6c, 0x00, 0x92, 0x00, 0xa1, 0x00, 0xa7, 0x00, 0xaa, 0x00, 0xac, 0x00,
+    0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb1, 0x00, 0xb2, 0x00,
+    0xb2, 0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xb3, 0x00,
+    0xb3, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x04, 0x70, 0x01,
+    0x7f, 0x00, 0x88, 0x00, 0x90, 0x00, 0x95, 0x00, 0x99, 0x00, 0x9c, 0x00,
+    0x9f, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, 0x00,
+    0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xaa, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x0a, 0x1c, 0x3a, 0x03, 0x59, 0x00, 0x6c, 0x00,
+    0x79, 0x00, 0x84, 0x00, 0x8b, 0x00, 0x90, 0x00, 0x94, 0x00, 0x98, 0x00,
+    0x9b, 0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa2, 0x00, 0xa3, 0x00,
+    0xa5, 0x00, 0xa6, 0x00, 0xa6, 0x00, 0xa7, 0x00, 0x60, 0x0e, 0x79, 0x01,
+    0x88, 0x00, 0x92, 0x00, 0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa3, 0x00,
+    0xa5, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00,
+    0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xae, 0x00, 0xae, 0x00, 0xaf, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x4e, 0x0f, 0x60, 0x07, 0x6d, 0x03, 0x77, 0x01,
+    0x7f, 0x00, 0x85, 0x00, 0x8b, 0x00, 0x8f, 0x00, 0x92, 0x00, 0x94, 0x00,
+    0x97, 0x00, 0x9a, 0x00, 0x9c, 0x00, 0x9e, 0x00, 0xa0, 0x00, 0xa1, 0x00,
+    0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa4, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x0a, 0x29, 0x27, 0x0f, 0x40, 0x06, 0x52, 0x02, 0x61, 0x00, 0x6c, 0x00,
+    0x75, 0x00, 0x7c, 0x00, 0x82, 0x00, 0x87, 0x00, 0x8b, 0x00, 0x8e, 0x00,
+    0x91, 0x00, 0x94, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9b, 0x00,
+    0x9d, 0x00, 0x9e, 0x00, 0x60, 0x14, 0x6f, 0x07, 0x7b, 0x03, 0x84, 0x01,
+    0x8c, 0x00, 0x91, 0x00, 0x96, 0x00, 0x99, 0x00, 0x9d, 0x00, 0x9f, 0x00,
+    0xa1, 0x00, 0xa2, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa7, 0x00, 0xa7, 0x00,
+    0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x49, 0x17, 0x56, 0x0d, 0x62, 0x07, 0x6b, 0x04, 0x73, 0x02, 0x79, 0x01,
+    0x7e, 0x01, 0x83, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00,
+    0x92, 0x00, 0x94, 0x00, 0x96, 0x00, 0x98, 0x00, 0x9a, 0x00, 0x9c, 0x00,
+    0x9e, 0x00, 0x9f, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x09, 0x31, 0x1e, 0x18,
+    0x32, 0x0d, 0x43, 0x07, 0x50, 0x04, 0x5a, 0x02, 0x63, 0x01, 0x6b, 0x00,
+    0x72, 0x00, 0x78, 0x00, 0x7c, 0x00, 0x81, 0x00, 0x85, 0x00, 0x88, 0x00,
+    0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x91, 0x00, 0x93, 0x00, 0x96, 0x00,
+    0x60, 0x18, 0x6b, 0x0c, 0x74, 0x06, 0x7d, 0x03, 0x83, 0x02, 0x89, 0x01,
+    0x8d, 0x00, 0x91, 0x00, 0x95, 0x00, 0x98, 0x00, 0x9a, 0x00, 0x9c, 0x00,
+    0x9e, 0x00, 0x9f, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xa4, 0x00,
+    0xa5, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x1d, 0x51, 0x12,
+    0x5b, 0x0c, 0x63, 0x08, 0x6a, 0x05, 0x70, 0x03, 0x77, 0x02, 0x7b, 0x02,
+    0x7e, 0x01, 0x82, 0x00, 0x86, 0x00, 0x8a, 0x00, 0x8c, 0x00, 0x8e, 0x00,
+    0x90, 0x00, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x97, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x09, 0x36, 0x19, 0x1f, 0x2a, 0x12, 0x38, 0x0b,
+    0x44, 0x07, 0x4e, 0x05, 0x57, 0x02, 0x5f, 0x01, 0x65, 0x01, 0x6b, 0x00,
+    0x71, 0x00, 0x76, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x84, 0x00,
+    0x87, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8d, 0x00, 0x60, 0x1b, 0x68, 0x0f,
+    0x70, 0x09, 0x77, 0x05, 0x7d, 0x03, 0x82, 0x02, 0x87, 0x01, 0x8b, 0x00,
+    0x8e, 0x00, 0x91, 0x00, 0x94, 0x00, 0x96, 0x00, 0x98, 0x00, 0x9a, 0x00,
+    0x9b, 0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x45, 0x21, 0x4e, 0x16, 0x56, 0x10, 0x5d, 0x0b,
+    0x65, 0x08, 0x69, 0x06, 0x6f, 0x04, 0x74, 0x03, 0x78, 0x02, 0x7b, 0x02,
+    0x7e, 0x01, 0x81, 0x01, 0x85, 0x00, 0x88, 0x00, 0x8a, 0x00, 0x8c, 0x00,
+    0x8e, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x92, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x09, 0x3a, 0x17, 0x24, 0x24, 0x18, 0x30, 0x10, 0x3b, 0x0b, 0x45, 0x07,
+    0x4d, 0x05, 0x55, 0x04, 0x5b, 0x02, 0x61, 0x01, 0x67, 0x01, 0x6b, 0x00,
+    0x6f, 0x00, 0x74, 0x00, 0x77, 0x00, 0x7a, 0x00, 0x7e, 0x00, 0x80, 0x00,
+    0x83, 0x00, 0x86, 0x00, 0x60, 0x1d, 0x67, 0x12, 0x6d, 0x0c, 0x73, 0x08,
+    0x79, 0x05, 0x7e, 0x03, 0x82, 0x02, 0x86, 0x02, 0x89, 0x01, 0x8c, 0x00,
+    0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x96, 0x00, 0x97, 0x00, 0x99, 0x00,
+    0x9a, 0x00, 0x9b, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x44, 0x24, 0x4c, 0x1a, 0x53, 0x13, 0x59, 0x0e, 0x5f, 0x0b, 0x65, 0x08,
+    0x69, 0x06, 0x6d, 0x05, 0x73, 0x04, 0x76, 0x03, 0x79, 0x02, 0x7c, 0x02,
+    0x7e, 0x01, 0x81, 0x01, 0x84, 0x00, 0x87, 0x00, 0x89, 0x00, 0x8b, 0x00,
+    0x8c, 0x00, 0x8d, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x09, 0x3b, 0x14, 0x28,
+    0x20, 0x1c, 0x2a, 0x14, 0x34, 0x0f, 0x3e, 0x0b, 0x45, 0x07, 0x4c, 0x05,
+    0x53, 0x04, 0x58, 0x03, 0x5e, 0x02, 0x63, 0x01, 0x67, 0x01, 0x6c, 0x00,
+    0x6f, 0x00, 0x72, 0x00, 0x76, 0x00, 0x78, 0x00, 0x7c, 0x00, 0x7e, 0x00,
+    0x60, 0x1d, 0x66, 0x14, 0x6b, 0x0e, 0x71, 0x0a, 0x76, 0x07, 0x7a, 0x05,
+    0x7e, 0x03, 0x81, 0x02, 0x85, 0x02, 0x88, 0x01, 0x8b, 0x01, 0x8d, 0x00,
+    0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x96, 0x00, 0x98, 0x00,
+    0x99, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x27, 0x4a, 0x1d,
+    0x4f, 0x16, 0x57, 0x11, 0x5b, 0x0e, 0x61, 0x0b, 0x66, 0x08, 0x69, 0x07,
+    0x6d, 0x05, 0x71, 0x04, 0x75, 0x03, 0x77, 0x02, 0x7a, 0x02, 0x7c, 0x02,
+    0x7e, 0x01, 0x80, 0x01, 0x83, 0x01, 0x86, 0x00, 0x88, 0x00, 0x89, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x09, 0x3d, 0x13, 0x2c, 0x1c, 0x20, 0x27, 0x18,
+    0x2f, 0x12, 0x38, 0x0e, 0x3e, 0x0a, 0x45, 0x07, 0x4b, 0x06, 0x51, 0x05,
+    0x57, 0x04, 0x5c, 0x02, 0x60, 0x02, 0x65, 0x01, 0x67, 0x01, 0x6c, 0x00,
+    0x6f, 0x00, 0x71, 0x00, 0x75, 0x00, 0x77, 0x00, 0x60, 0x1e, 0x65, 0x16,
+    0x6a, 0x10, 0x6f, 0x0c, 0x73, 0x09, 0x77, 0x07, 0x7b, 0x05, 0x7e, 0x03,
+    0x81, 0x03, 0x84, 0x02, 0x87, 0x02, 0x89, 0x01, 0x8b, 0x01, 0x8e, 0x00,
+    0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x96, 0x00, 0x97, 0x00,
+    0x27, 0x00, 0x4f, 0x00, 0x7f, 0x00, 0x8f, 0x00, 0x96, 0x00, 0x99, 0x00,
+    0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00,
+    0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x2c, 0x14, 0x57, 0x00,
+    0x82, 0x00, 0x91, 0x00, 0x96, 0x00, 0x99, 0x00, 0x9b, 0x00, 0x9c, 0x00,
+    0x9d, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00,
+    0x9e, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x8c, 0x00, 0x63, 0x00, 0x7f, 0x00, 0x89, 0x00, 0x90, 0x00, 0x96, 0x00,
+    0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00,
+    0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x31, 0x11, 0x5f, 0x00,
+    0x85, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00,
+    0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00,
+    0x9e, 0x00, 0x9e, 0x00, 0x43, 0x29, 0x48, 0x20, 0x4d, 0x19, 0x54, 0x14,
+    0x58, 0x10, 0x5c, 0x0d, 0x62, 0x0b, 0x66, 0x09, 0x69, 0x07, 0x6c, 0x06,
+    0x70, 0x05, 0x74, 0x04, 0x76, 0x03, 0x78, 0x02, 0x7a, 0x02, 0x7c, 0x02,
+    0x7e, 0x02, 0x80, 0x01, 0x82, 0x01, 0x85, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x09, 0x3f, 0x11, 0x2f, 0x1b, 0x23, 0x23, 0x1b, 0x2b, 0x15, 0x32, 0x11,
+    0x39, 0x0d, 0x40, 0x0a, 0x45, 0x08, 0x4b, 0x07, 0x51, 0x05, 0x56, 0x04,
+    0x59, 0x03, 0x5e, 0x02, 0x61, 0x02, 0x65, 0x01, 0x68, 0x01, 0x6b, 0x00,
+    0x6e, 0x00, 0x71, 0x00, 0x60, 0x1f, 0x64, 0x17, 0x69, 0x11, 0x6d, 0x0d,
+    0x71, 0x0a, 0x75, 0x08, 0x78, 0x06, 0x7b, 0x05, 0x7e, 0x04, 0x81, 0x03,
+    0x84, 0x02, 0x86, 0x02, 0x88, 0x01, 0x8a, 0x01, 0x8c, 0x01, 0x8e, 0x00,
+    0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x00, 0x00, 0x0d, 0x00,
+    0x4f, 0x00, 0x73, 0x00, 0x84, 0x00, 0x8d, 0x00, 0x92, 0x00, 0x95, 0x00,
+    0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00,
+    0x9c, 0x00, 0x9d, 0x00, 0x01, 0x29, 0x16, 0x04, 0x57, 0x00, 0x78, 0x00,
+    0x87, 0x00, 0x8f, 0x00, 0x94, 0x00, 0x96, 0x00, 0x98, 0x00, 0x9a, 0x00,
+    0x9b, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x4d, 0x00,
+    0x60, 0x00, 0x77, 0x00, 0x83, 0x00, 0x8c, 0x00, 0x92, 0x00, 0x95, 0x00,
+    0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00,
+    0x9c, 0x00, 0x9d, 0x00, 0x03, 0x23, 0x20, 0x00, 0x5f, 0x00, 0x7c, 0x00,
+    0x8a, 0x00, 0x91, 0x00, 0x95, 0x00, 0x97, 0x00, 0x99, 0x00, 0x9a, 0x00,
+    0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9d, 0x00,
+    0x43, 0x2b, 0x47, 0x22, 0x4c, 0x1b, 0x51, 0x16, 0x56, 0x12, 0x59, 0x0f,
+    0x5e, 0x0d, 0x63, 0x0b, 0x66, 0x09, 0x69, 0x07, 0x6b, 0x06, 0x6f, 0x05,
+    0x73, 0x05, 0x75, 0x03, 0x77, 0x03, 0x79, 0x02, 0x7a, 0x02, 0x7c, 0x02,
+    0x7e, 0x02, 0x7f, 0x01, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x09, 0x40, 0x11, 0x31,
+    0x18, 0x26, 0x20, 0x1e, 0x28, 0x18, 0x2f, 0x13, 0x35, 0x0f, 0x3c, 0x0c,
+    0x41, 0x0a, 0x46, 0x08, 0x4b, 0x07, 0x50, 0x05, 0x54, 0x04, 0x58, 0x04,
+    0x5c, 0x02, 0x5f, 0x02, 0x62, 0x02, 0x66, 0x01, 0x69, 0x01, 0x6b, 0x00,
+    0x60, 0x20, 0x64, 0x18, 0x68, 0x13, 0x6b, 0x0f, 0x6f, 0x0c, 0x73, 0x09,
+    0x76, 0x07, 0x79, 0x06, 0x7c, 0x05, 0x7e, 0x04, 0x81, 0x03, 0x83, 0x02,
+    0x85, 0x02, 0x88, 0x02, 0x89, 0x01, 0x8b, 0x01, 0x8d, 0x01, 0x8e, 0x00,
+    0x90, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x38, 0x00,
+    0x5b, 0x00, 0x6f, 0x00, 0x7c, 0x00, 0x84, 0x00, 0x8a, 0x00, 0x8e, 0x00,
+    0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00,
+    0x00, 0x49, 0x00, 0x27, 0x12, 0x01, 0x43, 0x00, 0x61, 0x00, 0x74, 0x00,
+    0x7f, 0x00, 0x87, 0x00, 0x8c, 0x00, 0x90, 0x00, 0x93, 0x00, 0x95, 0x00,
+    0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x60, 0x00, 0x24, 0x00, 0x48, 0x00,
+    0x60, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x84, 0x00, 0x8a, 0x00, 0x8e, 0x00,
+    0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00,
+    0x00, 0x46, 0x00, 0x1f, 0x1f, 0x00, 0x4d, 0x00, 0x68, 0x00, 0x79, 0x00,
+    0x83, 0x00, 0x8a, 0x00, 0x8e, 0x00, 0x92, 0x00, 0x94, 0x00, 0x96, 0x00,
+    0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x43, 0x2d, 0x46, 0x24,
+    0x4b, 0x1e, 0x4f, 0x19, 0x55, 0x14, 0x58, 0x11, 0x5b, 0x0e, 0x5f, 0x0c,
+    0x64, 0x0a, 0x66, 0x09, 0x68, 0x07, 0x6a, 0x06, 0x6e, 0x06, 0x72, 0x05,
+    0x74, 0x04, 0x76, 0x03, 0x78, 0x03, 0x79, 0x02, 0x7b, 0x02, 0x7c, 0x02,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x09, 0x40, 0x10, 0x33, 0x17, 0x28, 0x1e, 0x20,
+    0x25, 0x1a, 0x2c, 0x16, 0x32, 0x12, 0x37, 0x0f, 0x3d, 0x0c, 0x42, 0x0a,
+    0x46, 0x08, 0x4b, 0x07, 0x4f, 0x05, 0x53, 0x05, 0x57, 0x04, 0x5a, 0x04,
+    0x5e, 0x02, 0x61, 0x02, 0x63, 0x01, 0x66, 0x01, 0x60, 0x20, 0x63, 0x19,
+    0x67, 0x14, 0x6a, 0x10, 0x6e, 0x0d, 0x71, 0x0b, 0x74, 0x09, 0x77, 0x07,
+    0x7a, 0x06, 0x7c, 0x05, 0x7f, 0x04, 0x81, 0x03, 0x83, 0x02, 0x85, 0x02,
+    0x87, 0x02, 0x88, 0x02, 0x8a, 0x01, 0x8c, 0x01, 0x8d, 0x00, 0x8e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00, 0x48, 0x00,
+    0x5d, 0x00, 0x6c, 0x00, 0x76, 0x00, 0x7e, 0x00, 0x83, 0x00, 0x88, 0x00,
+    0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x92, 0x00, 0x00, 0x54, 0x00, 0x41,
+    0x00, 0x17, 0x10, 0x00, 0x36, 0x00, 0x51, 0x00, 0x64, 0x00, 0x71, 0x00,
+    0x7a, 0x00, 0x81, 0x00, 0x86, 0x00, 0x8a, 0x00, 0x8d, 0x00, 0x90, 0x00,
+    0x92, 0x00, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x89, 0x00, 0x77, 0x00, 0x48, 0x00, 0x0f, 0x00, 0x30, 0x00, 0x48, 0x00,
+    0x5d, 0x00, 0x6c, 0x00, 0x76, 0x00, 0x7e, 0x00, 0x83, 0x00, 0x88, 0x00,
+    0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x92, 0x00, 0x00, 0x52, 0x00, 0x3c,
+    0x00, 0x0d, 0x1f, 0x00, 0x42, 0x00, 0x5a, 0x00, 0x6a, 0x00, 0x76, 0x00,
+    0x7e, 0x00, 0x84, 0x00, 0x89, 0x00, 0x8c, 0x00, 0x8f, 0x00, 0x91, 0x00,
+    0x93, 0x00, 0x95, 0x00, 0x42, 0x2e, 0x45, 0x26, 0x4b, 0x1f, 0x4d, 0x1a,
+    0x52, 0x16, 0x56, 0x13, 0x59, 0x10, 0x5c, 0x0e, 0x61, 0x0c, 0x64, 0x0a,
+    0x66, 0x09, 0x68, 0x07, 0x6a, 0x07, 0x6d, 0x06, 0x71, 0x05, 0x74, 0x05,
+    0x75, 0x03, 0x77, 0x03, 0x78, 0x02, 0x7a, 0x02, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x09, 0x41, 0x0f, 0x34, 0x16, 0x2a, 0x1c, 0x23, 0x23, 0x1d, 0x29, 0x18,
+    0x2e, 0x14, 0x34, 0x11, 0x39, 0x0e, 0x3e, 0x0c, 0x42, 0x0a, 0x47, 0x08,
+    0x4b, 0x07, 0x4f, 0x05, 0x52, 0x05, 0x56, 0x04, 0x59, 0x04, 0x5c, 0x03,
+    0x5f, 0x02, 0x62, 0x02, 0x60, 0x20, 0x63, 0x1a, 0x66, 0x15, 0x6a, 0x11,
+    0x6d, 0x0e, 0x70, 0x0c, 0x73, 0x0a, 0x75, 0x08, 0x78, 0x07, 0x7a, 0x06,
+    0x7d, 0x05, 0x7f, 0x04, 0x81, 0x03, 0x83, 0x02, 0x85, 0x02, 0x86, 0x02,
+    0x88, 0x02, 0x89, 0x01, 0x8b, 0x01, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x00, 0x3c, 0x00, 0x4f, 0x00,
+    0x5e, 0x00, 0x69, 0x00, 0x72, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x83, 0x00,
+    0x86, 0x00, 0x89, 0x00, 0x00, 0x59, 0x00, 0x4d, 0x00, 0x2f, 0x00, 0x0e,
+    0x10, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x57, 0x00, 0x64, 0x00, 0x6f, 0x00,
+    0x76, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x85, 0x00, 0x89, 0x00, 0x8b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x83, 0x00,
+    0x60, 0x00, 0x30, 0x00, 0x02, 0x00, 0x22, 0x00, 0x3c, 0x00, 0x4f, 0x00,
+    0x5e, 0x00, 0x69, 0x00, 0x72, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x83, 0x00,
+    0x86, 0x00, 0x89, 0x00, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x28, 0x00, 0x02,
+    0x1f, 0x00, 0x3b, 0x00, 0x4f, 0x00, 0x5f, 0x00, 0x6b, 0x00, 0x74, 0x00,
+    0x7b, 0x00, 0x80, 0x00, 0x85, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8d, 0x00,
+    0x42, 0x2f, 0x44, 0x27, 0x4a, 0x22, 0x4c, 0x1c, 0x50, 0x18, 0x55, 0x14,
+    0x57, 0x12, 0x5a, 0x0f, 0x5d, 0x0d, 0x62, 0x0c, 0x64, 0x0a, 0x66, 0x09,
+    0x68, 0x08, 0x6a, 0x07, 0x6c, 0x06, 0x70, 0x05, 0x73, 0x05, 0x75, 0x04,
+    0x76, 0x03, 0x78, 0x03, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x09, 0x42, 0x0f, 0x36,
+    0x15, 0x2c, 0x1b, 0x25, 0x21, 0x1f, 0x26, 0x1a, 0x2c, 0x16, 0x31, 0x12,
+    0x36, 0x0f, 0x3a, 0x0d, 0x3f, 0x0c, 0x43, 0x0a, 0x47, 0x08, 0x4b, 0x07,
+    0x4e, 0x05, 0x52, 0x05, 0x55, 0x04, 0x58, 0x04, 0x5b, 0x04, 0x5d, 0x02,
+    0x60, 0x21, 0x63, 0x1b, 0x66, 0x16, 0x69, 0x12, 0x6c, 0x0f, 0x6e, 0x0d,
+    0x71, 0x0b, 0x74, 0x09, 0x76, 0x07, 0x79, 0x06, 0x7b, 0x06, 0x7d, 0x05,
+    0x7f, 0x04, 0x81, 0x03, 0x82, 0x02, 0x84, 0x02, 0x86, 0x02, 0x87, 0x02,
+    0x89, 0x02, 0x8a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x33, 0x00, 0x45, 0x00, 0x53, 0x00,
+    0x5e, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x7a, 0x00, 0x7e, 0x00,
+    0x00, 0x5b, 0x00, 0x53, 0x00, 0x3e, 0x00, 0x23, 0x02, 0x0a, 0x10, 0x00,
+    0x29, 0x00, 0x3d, 0x00, 0x4e, 0x00, 0x5b, 0x00, 0x65, 0x00, 0x6d, 0x00,
+    0x74, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x8c, 0x00, 0x70, 0x00, 0x48, 0x00,
+    0x22, 0x00, 0x01, 0x00, 0x1c, 0x00, 0x33, 0x00, 0x45, 0x00, 0x53, 0x00,
+    0x5e, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x7a, 0x00, 0x7e, 0x00,
+    0x00, 0x5a, 0x00, 0x51, 0x00, 0x39, 0x00, 0x1a, 0x04, 0x00, 0x1f, 0x00,
+    0x36, 0x00, 0x48, 0x00, 0x57, 0x00, 0x62, 0x00, 0x6b, 0x00, 0x73, 0x00,
+    0x79, 0x00, 0x7e, 0x00, 0x82, 0x00, 0x85, 0x00, 0x42, 0x31, 0x44, 0x29,
+    0x49, 0x23, 0x4c, 0x1e, 0x4e, 0x1a, 0x53, 0x16, 0x56, 0x13, 0x58, 0x11,
+    0x5a, 0x0f, 0x5f, 0x0d, 0x63, 0x0b, 0x64, 0x0a, 0x66, 0x09, 0x68, 0x08,
+    0x6a, 0x07, 0x6b, 0x06, 0x6f, 0x06, 0x72, 0x05, 0x74, 0x05, 0x75, 0x03,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x09, 0x43, 0x0f, 0x37, 0x14, 0x2e, 0x19, 0x27,
+    0x1f, 0x21, 0x24, 0x1c, 0x29, 0x18, 0x2e, 0x15, 0x33, 0x12, 0x37, 0x0f,
+    0x3b, 0x0c, 0x40, 0x0c, 0x43, 0x0a, 0x47, 0x08, 0x4b, 0x07, 0x4e, 0x06,
+    0x51, 0x05, 0x55, 0x05, 0x56, 0x04, 0x5a, 0x04, 0x60, 0x21, 0x63, 0x1b,
+    0x65, 0x17, 0x68, 0x13, 0x6b, 0x10, 0x6e, 0x0e, 0x70, 0x0c, 0x73, 0x0a,
+    0x75, 0x09, 0x77, 0x07, 0x79, 0x06, 0x7b, 0x06, 0x7d, 0x05, 0x7f, 0x04,
+    0x81, 0x03, 0x82, 0x03, 0x84, 0x02, 0x86, 0x02, 0x87, 0x02, 0x88, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x18, 0x00, 0x2c, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x55, 0x00,
+    0x5f, 0x00, 0x66, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x00, 0x5c, 0x00, 0x56,
+    0x00, 0x47, 0x00, 0x31, 0x00, 0x1a, 0x04, 0x08, 0x10, 0x00, 0x25, 0x00,
+    0x37, 0x00, 0x46, 0x00, 0x52, 0x00, 0x5d, 0x00, 0x65, 0x00, 0x6c, 0x00,
+    0x72, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9b, 0x00, 0x92, 0x00, 0x7c, 0x00, 0x5d, 0x00, 0x3c, 0x00, 0x1c, 0x00,
+    0x01, 0x00, 0x18, 0x00, 0x2c, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x55, 0x00,
+    0x5f, 0x00, 0x66, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x00, 0x5c, 0x00, 0x55,
+    0x00, 0x43, 0x00, 0x2a, 0x00, 0x10, 0x09, 0x00, 0x1f, 0x00, 0x33, 0x00,
+    0x43, 0x00, 0x50, 0x00, 0x5b, 0x00, 0x64, 0x00, 0x6b, 0x00, 0x72, 0x00,
+    0x77, 0x00, 0x7b, 0x00, 0x42, 0x31, 0x44, 0x2a, 0x48, 0x24, 0x4b, 0x1f,
+    0x4d, 0x1b, 0x51, 0x18, 0x55, 0x15, 0x57, 0x12, 0x59, 0x10, 0x5b, 0x0e,
+    0x5f, 0x0c, 0x63, 0x0b, 0x65, 0x0a, 0x66, 0x09, 0x68, 0x08, 0x6a, 0x07,
+    0x6b, 0x06, 0x6e, 0x06, 0x71, 0x05, 0x73, 0x05, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x0a, 0x43, 0x0e, 0x38, 0x13, 0x2f, 0x18, 0x28, 0x1d, 0x22, 0x22, 0x1d,
+    0x27, 0x19, 0x2b, 0x16, 0x30, 0x12, 0x35, 0x11, 0x39, 0x0f, 0x3c, 0x0c,
+    0x41, 0x0b, 0x44, 0x0a, 0x47, 0x09, 0x4a, 0x07, 0x4e, 0x07, 0x50, 0x05,
+    0x54, 0x05, 0x55, 0x04, 0x60, 0x21, 0x63, 0x1c, 0x65, 0x17, 0x68, 0x14,
+    0x6a, 0x11, 0x6c, 0x0e, 0x6f, 0x0c, 0x71, 0x0b, 0x73, 0x09, 0x76, 0x08,
+    0x78, 0x07, 0x79, 0x06, 0x7c, 0x05, 0x7d, 0x05, 0x7f, 0x04, 0x81, 0x03,
+    0x82, 0x03, 0x84, 0x02, 0x85, 0x02, 0x86, 0x02, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x14, 0x00, 0x26, 0x00, 0x36, 0x00, 0x43, 0x00, 0x4e, 0x00, 0x57, 0x00,
+    0x5f, 0x00, 0x66, 0x00, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x4d, 0x00, 0x3b,
+    0x00, 0x27, 0x00, 0x13, 0x06, 0x07, 0x10, 0x00, 0x22, 0x00, 0x32, 0x00,
+    0x40, 0x00, 0x4c, 0x00, 0x56, 0x00, 0x5e, 0x00, 0x65, 0x00, 0x6b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x95, 0x00,
+    0x84, 0x00, 0x6c, 0x00, 0x4f, 0x00, 0x32, 0x00, 0x18, 0x00, 0x00, 0x00,
+    0x14, 0x00, 0x26, 0x00, 0x36, 0x00, 0x43, 0x00, 0x4e, 0x00, 0x57, 0x00,
+    0x5f, 0x00, 0x66, 0x00, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x36,
+    0x00, 0x1f, 0x00, 0x08, 0x0c, 0x00, 0x1f, 0x00, 0x30, 0x00, 0x3f, 0x00,
+    0x4b, 0x00, 0x55, 0x00, 0x5e, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x71, 0x00,
+    0x42, 0x32, 0x44, 0x2b, 0x47, 0x25, 0x4b, 0x21, 0x4c, 0x1d, 0x4f, 0x19,
+    0x54, 0x16, 0x56, 0x14, 0x58, 0x11, 0x5a, 0x10, 0x5d, 0x0e, 0x61, 0x0c,
+    0x63, 0x0b, 0x65, 0x0a, 0x66, 0x09, 0x68, 0x08, 0x69, 0x07, 0x6b, 0x07,
+    0x6d, 0x06, 0x71, 0x05, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x0a, 0x43, 0x0e, 0x39,
+    0x12, 0x31, 0x17, 0x2a, 0x1c, 0x24, 0x21, 0x1f, 0x26, 0x1b, 0x2a, 0x18,
+    0x2e, 0x16, 0x32, 0x12, 0x35, 0x0f, 0x3a, 0x0f, 0x3d, 0x0c, 0x41, 0x0b,
+    0x44, 0x0a, 0x47, 0x09, 0x4a, 0x07, 0x4e, 0x07, 0x4f, 0x05, 0x53, 0x05,
+    0x60, 0x21, 0x62, 0x1c, 0x65, 0x18, 0x67, 0x15, 0x6a, 0x12, 0x6c, 0x0f,
+    0x6e, 0x0d, 0x71, 0x0c, 0x73, 0x0b, 0x74, 0x09, 0x76, 0x07, 0x79, 0x07,
+    0x7a, 0x06, 0x7c, 0x05, 0x7d, 0x05, 0x7f, 0x04, 0x81, 0x03, 0x82, 0x03,
+    0x83, 0x02, 0x85, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x47, 0x00, 0x50, 0x00, 0x58, 0x00,
+    0x00, 0x5d, 0x00, 0x5a, 0x00, 0x51, 0x00, 0x42, 0x00, 0x32, 0x00, 0x20,
+    0x00, 0x0e, 0x07, 0x06, 0x10, 0x00, 0x20, 0x00, 0x2f, 0x00, 0x3b, 0x00,
+    0x46, 0x00, 0x50, 0x00, 0x58, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x8a, 0x00, 0x76, 0x00,
+    0x5e, 0x00, 0x45, 0x00, 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x12, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x47, 0x00, 0x50, 0x00, 0x58, 0x00,
+    0x00, 0x5d, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2b, 0x00, 0x17,
+    0x00, 0x03, 0x0f, 0x00, 0x1f, 0x00, 0x2e, 0x00, 0x3b, 0x00, 0x46, 0x00,
+    0x50, 0x00, 0x59, 0x00, 0x60, 0x00, 0x66, 0x00, 0x42, 0x33, 0x43, 0x2c,
+    0x46, 0x27, 0x4a, 0x22, 0x4c, 0x1e, 0x4d, 0x1b, 0x52, 0x18, 0x55, 0x15,
+    0x57, 0x13, 0x58, 0x11, 0x5a, 0x0f, 0x5e, 0x0e, 0x62, 0x0c, 0x63, 0x0b,
+    0x65, 0x0a, 0x66, 0x09, 0x68, 0x08, 0x69, 0x07, 0x6b, 0x07, 0x6c, 0x06,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x0a, 0x44, 0x0d, 0x3a, 0x12, 0x32, 0x16, 0x2b,
+    0x1b, 0x26, 0x1f, 0x22, 0x24, 0x1d, 0x28, 0x19, 0x2b, 0x16, 0x30, 0x14,
+    0x34, 0x12, 0x37, 0x0f, 0x3b, 0x0e, 0x3e, 0x0c, 0x41, 0x0b, 0x45, 0x0a,
+    0x47, 0x09, 0x4a, 0x07, 0x4e, 0x07, 0x4f, 0x05, 0x60, 0x22, 0x62, 0x1d,
+    0x65, 0x19, 0x66, 0x15, 0x69, 0x13, 0x6b, 0x11, 0x6d, 0x0e, 0x6f, 0x0c,
+    0x71, 0x0b, 0x73, 0x0a, 0x76, 0x09, 0x77, 0x07, 0x79, 0x07, 0x7a, 0x06,
+    0x7c, 0x05, 0x7e, 0x05, 0x7f, 0x04, 0x80, 0x03, 0x82, 0x03, 0x83, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2c, 0x00, 0x37, 0x00, 0x41, 0x00, 0x4a, 0x00, 0x00, 0x5e, 0x00, 0x5b,
+    0x00, 0x53, 0x00, 0x48, 0x00, 0x3a, 0x00, 0x2a, 0x00, 0x1a, 0x00, 0x0b,
+    0x08, 0x05, 0x10, 0x00, 0x1e, 0x00, 0x2c, 0x00, 0x37, 0x00, 0x42, 0x00,
+    0x4b, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x69, 0x00, 0x53, 0x00,
+    0x3c, 0x00, 0x26, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x2c, 0x00, 0x37, 0x00, 0x41, 0x00, 0x4a, 0x00, 0x00, 0x5e, 0x00, 0x5b,
+    0x00, 0x52, 0x00, 0x45, 0x00, 0x34, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00,
+    0x11, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x38, 0x00, 0x43, 0x00, 0x4c, 0x00,
+    0x54, 0x00, 0x5b, 0x00, 0x42, 0x33, 0x43, 0x2d, 0x45, 0x28, 0x49, 0x23,
+    0x4b, 0x1f, 0x4d, 0x1c, 0x50, 0x19, 0x55, 0x16, 0x56, 0x14, 0x58, 0x12,
+    0x59, 0x11, 0x5b, 0x0e, 0x5f, 0x0d, 0x62, 0x0c, 0x63, 0x0b, 0x65, 0x0a,
+    0x66, 0x09, 0x68, 0x09, 0x69, 0x07, 0x6b, 0x07, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0x0a, 0x44, 0x0d, 0x3a, 0x12, 0x33, 0x16, 0x2c, 0x19, 0x27, 0x1e, 0x22,
+    0x21, 0x1e, 0x26, 0x1a, 0x2b, 0x18, 0x2e, 0x16, 0x31, 0x12, 0x35, 0x11,
+    0x38, 0x0f, 0x3b, 0x0d, 0x3f, 0x0c, 0x41, 0x0a, 0x45, 0x0a, 0x47, 0x09,
+    0x4a, 0x07, 0x4e, 0x07, 0x60, 0x22, 0x62, 0x1d, 0x64, 0x19, 0x66, 0x16,
+    0x68, 0x13, 0x6a, 0x11, 0x6c, 0x0f, 0x6e, 0x0d, 0x71, 0x0c, 0x73, 0x0b,
+    0x74, 0x09, 0x76, 0x08, 0x78, 0x07, 0x79, 0x06, 0x7b, 0x06, 0x7c, 0x05,
+    0x7e, 0x05, 0x7f, 0x04, 0x80, 0x03, 0x82, 0x03, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x28, 0x00,
+    0x33, 0x00, 0x3d, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x56, 0x00, 0x4c,
+    0x00, 0x40, 0x00, 0x32, 0x00, 0x24, 0x00, 0x15, 0x02, 0x0a, 0x09, 0x04,
+    0x10, 0x00, 0x1d, 0x00, 0x29, 0x00, 0x34, 0x00, 0x3e, 0x00, 0x46, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a, 0x00,
+    0x91, 0x00, 0x83, 0x00, 0x72, 0x00, 0x5e, 0x00, 0x4a, 0x00, 0x36, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x28, 0x00,
+    0x33, 0x00, 0x3d, 0x00, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x49,
+    0x00, 0x3b, 0x00, 0x2c, 0x00, 0x1b, 0x00, 0x0b, 0x04, 0x00, 0x12, 0x00,
+    0x1f, 0x00, 0x2b, 0x00, 0x36, 0x00, 0x40, 0x00, 0x49, 0x00, 0x50, 0x00,
+    0x42, 0x34, 0x43, 0x2e, 0x44, 0x29, 0x49, 0x24, 0x4b, 0x20, 0x4c, 0x1d,
+    0x4e, 0x1a, 0x53, 0x18, 0x55, 0x15, 0x56, 0x13, 0x58, 0x11, 0x5a, 0x10,
+    0x5c, 0x0e, 0x60, 0x0d, 0x63, 0x0c, 0x64, 0x0b, 0x65, 0x0a, 0x66, 0x09,
+    0x68, 0x09, 0x69, 0x07, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0x0a, 0x44, 0x0c, 0x3b,
+    0x11, 0x34, 0x16, 0x2e, 0x19, 0x28, 0x1d, 0x23, 0x21, 0x20, 0x25, 0x1d,
+    0x29, 0x19, 0x2b, 0x16, 0x30, 0x14, 0x33, 0x12, 0x35, 0x0f, 0x3a, 0x0f,
+    0x3c, 0x0c, 0x40, 0x0c, 0x41, 0x0a, 0x45, 0x0a, 0x47, 0x09, 0x4a, 0x07,
+    0x60, 0x22, 0x62, 0x1d, 0x64, 0x1a, 0x66, 0x17, 0x68, 0x14, 0x6a, 0x11,
+    0x6c, 0x10, 0x6e, 0x0e, 0x70, 0x0c, 0x71, 0x0b, 0x73, 0x0a, 0x75, 0x09,
+    0x76, 0x07, 0x78, 0x07, 0x79, 0x06, 0x7b, 0x06, 0x7c, 0x05, 0x7e, 0x05,
+    0x7f, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x1a, 0x00, 0x25, 0x00, 0x2f, 0x00,
+    0x00, 0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x44, 0x00, 0x38,
+    0x00, 0x2c, 0x00, 0x1f, 0x00, 0x12, 0x03, 0x09, 0x09, 0x04, 0x10, 0x00,
+    0x1c, 0x00, 0x27, 0x00, 0x31, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x88, 0x00,
+    0x79, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x1a, 0x00, 0x25, 0x00, 0x2f, 0x00,
+    0x00, 0x5e, 0x00, 0x5c, 0x00, 0x56, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x33,
+    0x00, 0x24, 0x00, 0x15, 0x00, 0x07, 0x06, 0x00, 0x13, 0x00, 0x1f, 0x00,
+    0x2a, 0x00, 0x34, 0x00, 0x3d, 0x00, 0x46, 0x00, 0x42, 0x34, 0x43, 0x2f,
+    0x44, 0x29, 0x49, 0x25, 0x4b, 0x21, 0x4c, 0x1e, 0x4d, 0x1b, 0x51, 0x18,
+    0x55, 0x16, 0x56, 0x14, 0x58, 0x13, 0x59, 0x11, 0x5a, 0x0f, 0x5d, 0x0e,
+    0x61, 0x0c, 0x63, 0x0c, 0x64, 0x0b, 0x65, 0x0a, 0x66, 0x09, 0x68, 0x09,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00,
+    0xb7, 0x00, 0xb7, 0x00, 0x0a, 0x44, 0x0c, 0x3c, 0x10, 0x35, 0x15, 0x2f,
+    0x19, 0x2a, 0x1c, 0x25, 0x20, 0x22, 0x23, 0x1d, 0x26, 0x1a, 0x2b, 0x18,
+    0x2e, 0x16, 0x30, 0x12, 0x35, 0x12, 0x37, 0x0f, 0x3b, 0x0f, 0x3d, 0x0c,
+    0x41, 0x0c, 0x42, 0x0a, 0x46, 0x0a, 0x47, 0x09, 0x60, 0x22, 0x62, 0x1e,
+    0x64, 0x1a, 0x66, 0x17, 0x68, 0x15, 0x6a, 0x12, 0x6b, 0x11, 0x6d, 0x0e,
+    0x6e, 0x0d, 0x71, 0x0c, 0x72, 0x0b, 0x74, 0x09, 0x76, 0x09, 0x77, 0x07,
+    0x79, 0x07, 0x7a, 0x06, 0x7c, 0x06, 0x7c, 0x05, 0x7e, 0x05, 0x7f, 0x04,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x22, 0x00, 0x00, 0x5e, 0x00, 0x5d,
+    0x00, 0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x26,
+    0x00, 0x1a, 0x00, 0x0f, 0x04, 0x08, 0x0a, 0x04, 0x10, 0x00, 0x1b, 0x00,
+    0x25, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9c, 0x00, 0x95, 0x00, 0x8b, 0x00, 0x7e, 0x00, 0x6f, 0x00,
+    0x5f, 0x00, 0x4e, 0x00, 0x3d, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x22, 0x00, 0x00, 0x5e, 0x00, 0x5d,
+    0x00, 0x57, 0x00, 0x4f, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x1e,
+    0x00, 0x10, 0x00, 0x03, 0x08, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x2a, 0x00,
+    0x33, 0x00, 0x3b, 0x00, 0x4f, 0x2a, 0x56, 0x28, 0x59, 0x27, 0x5a, 0x26,
+    0x5c, 0x26, 0x5c, 0x26, 0x5c, 0x26, 0x5d, 0x26, 0x5d, 0x26, 0x5d, 0x25,
+    0x5d, 0x25, 0x5d, 0x25, 0x5d, 0x25, 0x5d, 0x25, 0x5e, 0x25, 0x5e, 0x25,
+    0x5e, 0x24, 0x5e, 0x24, 0x5e, 0x24, 0x5e, 0x24, 0x92, 0x0e, 0x79, 0x14,
+    0x6f, 0x18, 0x6b, 0x1b, 0x68, 0x1d, 0x67, 0x1d, 0x66, 0x1e, 0x65, 0x1f,
+    0x64, 0x20, 0x64, 0x20, 0x63, 0x20, 0x63, 0x21, 0x63, 0x21, 0x63, 0x21,
+    0x63, 0x21, 0x62, 0x22, 0x62, 0x22, 0x62, 0x22, 0x62, 0x22, 0x62, 0x22,
+    0x16, 0x23, 0x3c, 0x23, 0x4a, 0x23, 0x50, 0x23, 0x54, 0x23, 0x56, 0x23,
+    0x58, 0x23, 0x59, 0x23, 0x5a, 0x23, 0x5a, 0x23, 0x5b, 0x23, 0x5b, 0x23,
+    0x5b, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23,
+    0x5d, 0x23, 0x5d, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x0b, 0x00, 0x16, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53,
+    0x00, 0x4b, 0x00, 0x42, 0x00, 0x38, 0x00, 0x2d, 0x00, 0x22, 0x00, 0x17,
+    0x00, 0x0c, 0x05, 0x07, 0x0a, 0x03, 0x0f, 0x00, 0x1a, 0x00, 0x24, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00,
+    0x97, 0x00, 0x8e, 0x00, 0x83, 0x00, 0x75, 0x00, 0x66, 0x00, 0x57, 0x00,
+    0x47, 0x00, 0x37, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x0c, 0x00, 0x00, 0x00,
+    0x0b, 0x00, 0x16, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x52,
+    0x00, 0x49, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x25, 0x00, 0x19, 0x00, 0x0c,
+    0x00, 0x00, 0x0a, 0x00, 0x15, 0x00, 0x1f, 0x00, 0x29, 0x00, 0x31, 0x00,
+    0x48, 0x31, 0x4f, 0x2e, 0x53, 0x2c, 0x55, 0x2a, 0x57, 0x29, 0x58, 0x29,
+    0x59, 0x28, 0x59, 0x27, 0x5a, 0x27, 0x5b, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0x5c, 0x27, 0x5c, 0x27, 0xa1, 0x01, 0x88, 0x07, 0x7b, 0x0c, 0x74, 0x0f,
+    0x70, 0x12, 0x6d, 0x14, 0x6b, 0x16, 0x6a, 0x17, 0x69, 0x18, 0x68, 0x19,
+    0x67, 0x1a, 0x66, 0x1b, 0x66, 0x1b, 0x65, 0x1c, 0x65, 0x1c, 0x65, 0x1d,
+    0x65, 0x1d, 0x64, 0x1d, 0x64, 0x1e, 0x64, 0x1e, 0x0a, 0x32, 0x22, 0x25,
+    0x31, 0x24, 0x3b, 0x23, 0x42, 0x23, 0x47, 0x23, 0x4a, 0x23, 0x4d, 0x23,
+    0x4f, 0x23, 0x51, 0x23, 0x52, 0x23, 0x53, 0x23, 0x54, 0x23, 0x55, 0x23,
+    0x56, 0x23, 0x56, 0x23, 0x57, 0x23, 0x58, 0x23, 0x58, 0x23, 0x58, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,
+    0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x45,
+    0x00, 0x3c, 0x00, 0x32, 0x00, 0x28, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x0b,
+    0x06, 0x07, 0x0b, 0x03, 0x0f, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x90, 0x00,
+    0x86, 0x00, 0x7a, 0x00, 0x6d, 0x00, 0x5f, 0x00, 0x50, 0x00, 0x41, 0x00,
+    0x33, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00,
+    0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00, 0x4b, 0x00, 0x42,
+    0x00, 0x37, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x01, 0x00,
+    0x0c, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x28, 0x00, 0x45, 0x34, 0x4b, 0x31,
+    0x4f, 0x2f, 0x52, 0x2d, 0x54, 0x2c, 0x55, 0x2b, 0x57, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x29, 0x58, 0x29, 0x59, 0x28, 0x59, 0x27, 0x5a, 0x27,
+    0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27,
+    0xa7, 0x00, 0x92, 0x03, 0x84, 0x06, 0x7d, 0x09, 0x77, 0x0c, 0x73, 0x0e,
+    0x71, 0x10, 0x6f, 0x11, 0x6d, 0x13, 0x6b, 0x14, 0x6a, 0x15, 0x6a, 0x16,
+    0x69, 0x17, 0x68, 0x17, 0x68, 0x18, 0x67, 0x19, 0x66, 0x19, 0x66, 0x1a,
+    0x66, 0x1a, 0x66, 0x1a, 0x0a, 0x38, 0x18, 0x2b, 0x25, 0x27, 0x2e, 0x25,
+    0x35, 0x24, 0x3b, 0x23, 0x3f, 0x23, 0x43, 0x23, 0x46, 0x23, 0x48, 0x23,
+    0x4a, 0x23, 0x4c, 0x23, 0x4e, 0x23, 0x4f, 0x23, 0x50, 0x23, 0x51, 0x23,
+    0x52, 0x23, 0x53, 0x23, 0x53, 0x23, 0x54, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e,
+    0x00, 0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x48, 0x00, 0x40, 0x00, 0x37,
+    0x00, 0x2d, 0x00, 0x24, 0x00, 0x1a, 0x00, 0x11, 0x01, 0x0a, 0x06, 0x06,
+    0x0b, 0x03, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x92, 0x00, 0x89, 0x00, 0x7e, 0x00,
+    0x72, 0x00, 0x66, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x3d, 0x00, 0x2f, 0x00,
+    0x22, 0x00, 0x16, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5d,
+    0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x45, 0x00, 0x3c, 0x00, 0x31,
+    0x00, 0x26, 0x00, 0x1b, 0x00, 0x11, 0x00, 0x06, 0x03, 0x00, 0x0d, 0x00,
+    0x17, 0x00, 0x1f, 0x00, 0x44, 0x36, 0x49, 0x33, 0x4d, 0x31, 0x4f, 0x2f,
+    0x51, 0x2e, 0x53, 0x2d, 0x53, 0x2c, 0x55, 0x2b, 0x56, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x29, 0x58, 0x29,
+    0x59, 0x28, 0x5a, 0x27, 0x5b, 0x27, 0x5c, 0x27, 0xaa, 0x00, 0x98, 0x01,
+    0x8c, 0x03, 0x83, 0x05, 0x7d, 0x08, 0x79, 0x0a, 0x76, 0x0c, 0x73, 0x0d,
+    0x71, 0x0f, 0x6f, 0x10, 0x6e, 0x11, 0x6d, 0x12, 0x6c, 0x13, 0x6b, 0x14,
+    0x6a, 0x15, 0x6a, 0x15, 0x69, 0x16, 0x68, 0x17, 0x68, 0x17, 0x68, 0x18,
+    0x0a, 0x3c, 0x14, 0x30, 0x1e, 0x2a, 0x26, 0x27, 0x2d, 0x25, 0x32, 0x24,
+    0x36, 0x24, 0x3b, 0x24, 0x3e, 0x23, 0x41, 0x23, 0x43, 0x23, 0x45, 0x23,
+    0x47, 0x23, 0x49, 0x23, 0x4a, 0x23, 0x4c, 0x23, 0x4d, 0x23, 0x4d, 0x23,
+    0x4f, 0x23, 0x50, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x31, 0x11, 0x5f, 0x00, 0x85, 0x00, 0x92, 0x00,
+    0x97, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00,
+    0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x11, 0x03, 0x23,
+    0x00, 0x46, 0x00, 0x52, 0x00, 0x58, 0x00, 0x5a, 0x00, 0x5c, 0x00, 0x5d,
+    0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e,
+    0x00, 0x5e, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x43, 0x38, 0x48, 0x35, 0x4b, 0x32, 0x4e, 0x31, 0x4f, 0x30, 0x50, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2c, 0x54, 0x2b, 0x56, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x58, 0x29, 0xac, 0x00, 0x9d, 0x00, 0x91, 0x02, 0x89, 0x03,
+    0x82, 0x05, 0x7e, 0x07, 0x7a, 0x09, 0x77, 0x0a, 0x75, 0x0c, 0x73, 0x0d,
+    0x71, 0x0e, 0x70, 0x0f, 0x6e, 0x10, 0x6e, 0x11, 0x6c, 0x12, 0x6c, 0x13,
+    0x6b, 0x13, 0x6a, 0x14, 0x6a, 0x15, 0x6a, 0x15, 0x09, 0x3f, 0x11, 0x33,
+    0x1a, 0x2d, 0x21, 0x29, 0x27, 0x27, 0x2c, 0x26, 0x30, 0x25, 0x34, 0x24,
+    0x37, 0x24, 0x3a, 0x24, 0x3d, 0x23, 0x40, 0x23, 0x42, 0x23, 0x44, 0x23,
+    0x45, 0x23, 0x47, 0x23, 0x48, 0x23, 0x49, 0x23, 0x4a, 0x23, 0x4c, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x03, 0x23, 0x20, 0x00, 0x5f, 0x00, 0x7c, 0x00, 0x8a, 0x00, 0x91, 0x00,
+    0x95, 0x00, 0x97, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00,
+    0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x20, 0x00, 0x00, 0x1f, 0x00, 0x3c,
+    0x00, 0x4a, 0x00, 0x51, 0x00, 0x55, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5b,
+    0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x39, 0x46, 0x36,
+    0x4a, 0x34, 0x4b, 0x32, 0x4e, 0x31, 0x4f, 0x30, 0x50, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2d, 0x54, 0x2b, 0x55, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a,
+    0xae, 0x00, 0xa1, 0x00, 0x96, 0x01, 0x8d, 0x02, 0x87, 0x03, 0x82, 0x05,
+    0x7e, 0x07, 0x7b, 0x08, 0x78, 0x09, 0x76, 0x0b, 0x74, 0x0c, 0x73, 0x0d,
+    0x71, 0x0e, 0x70, 0x0e, 0x6f, 0x0f, 0x6e, 0x11, 0x6d, 0x11, 0x6c, 0x11,
+    0x6c, 0x12, 0x6b, 0x13, 0x09, 0x40, 0x10, 0x36, 0x17, 0x2f, 0x1d, 0x2c,
+    0x22, 0x29, 0x27, 0x27, 0x2b, 0x26, 0x2f, 0x25, 0x32, 0x25, 0x35, 0x24,
+    0x38, 0x24, 0x3b, 0x24, 0x3c, 0x24, 0x3f, 0x23, 0x40, 0x23, 0x42, 0x23,
+    0x44, 0x23, 0x45, 0x23, 0x46, 0x23, 0x48, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x1f,
+    0x1f, 0x00, 0x4d, 0x00, 0x68, 0x00, 0x79, 0x00, 0x83, 0x00, 0x8a, 0x00,
+    0x8e, 0x00, 0x92, 0x00, 0x94, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00,
+    0x99, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x85, 0x00, 0x5f, 0x00, 0x1f, 0x00, 0x00, 0x0d, 0x00, 0x28, 0x00, 0x39,
+    0x00, 0x43, 0x00, 0x4a, 0x00, 0x4e, 0x00, 0x52, 0x00, 0x54, 0x00, 0x56,
+    0x00, 0x57, 0x00, 0x59, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x39, 0x45, 0x37, 0x48, 0x35, 0x4a, 0x33,
+    0x4c, 0x31, 0x4f, 0x31, 0x4f, 0x30, 0x50, 0x2e, 0x52, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2d, 0x54, 0x2c, 0x55, 0x2a, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0xaf, 0x00, 0xa3, 0x00,
+    0x99, 0x00, 0x91, 0x01, 0x8b, 0x02, 0x86, 0x03, 0x81, 0x05, 0x7e, 0x06,
+    0x7b, 0x07, 0x79, 0x09, 0x77, 0x0a, 0x75, 0x0b, 0x74, 0x0c, 0x73, 0x0c,
+    0x71, 0x0d, 0x71, 0x0e, 0x6f, 0x0f, 0x6e, 0x10, 0x6e, 0x11, 0x6d, 0x11,
+    0x09, 0x41, 0x0f, 0x38, 0x15, 0x32, 0x1a, 0x2e, 0x1f, 0x2b, 0x24, 0x29,
+    0x27, 0x27, 0x2b, 0x26, 0x2e, 0x25, 0x31, 0x25, 0x34, 0x25, 0x36, 0x24,
+    0x38, 0x24, 0x3b, 0x24, 0x3c, 0x24, 0x3e, 0x23, 0x40, 0x23, 0x41, 0x23,
+    0x43, 0x23, 0x44, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x3c, 0x00, 0x0d, 0x1f, 0x00,
+    0x42, 0x00, 0x5a, 0x00, 0x6a, 0x00, 0x76, 0x00, 0x7e, 0x00, 0x84, 0x00,
+    0x89, 0x00, 0x8c, 0x00, 0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x7c, 0x00,
+    0x4d, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x1a, 0x00, 0x2a, 0x00, 0x36,
+    0x00, 0x3e, 0x00, 0x45, 0x00, 0x49, 0x00, 0x4d, 0x00, 0x4f, 0x00, 0x52,
+    0x00, 0x53, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3a, 0x45, 0x38, 0x47, 0x35, 0x4a, 0x35, 0x4a, 0x33, 0x4d, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x2f, 0x52, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2d, 0x53, 0x2c, 0x55, 0x2b, 0x57, 0x2a,
+    0x57, 0x2a, 0x57, 0x2a, 0xb0, 0x00, 0xa5, 0x00, 0x9d, 0x00, 0x95, 0x00,
+    0x8e, 0x02, 0x89, 0x02, 0x85, 0x03, 0x81, 0x05, 0x7e, 0x06, 0x7c, 0x07,
+    0x7a, 0x08, 0x78, 0x09, 0x76, 0x0a, 0x75, 0x0b, 0x73, 0x0c, 0x73, 0x0c,
+    0x71, 0x0d, 0x71, 0x0e, 0x70, 0x0e, 0x6e, 0x0f, 0x09, 0x42, 0x0e, 0x39,
+    0x13, 0x33, 0x18, 0x2f, 0x1c, 0x2d, 0x21, 0x2a, 0x24, 0x29, 0x28, 0x27,
+    0x2b, 0x26, 0x2e, 0x26, 0x30, 0x25, 0x33, 0x25, 0x35, 0x25, 0x37, 0x24,
+    0x39, 0x24, 0x3b, 0x24, 0x3c, 0x24, 0x3d, 0x24, 0x3f, 0x23, 0x40, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x58, 0x00, 0x4a, 0x00, 0x28, 0x00, 0x02, 0x1f, 0x00, 0x3b, 0x00,
+    0x4f, 0x00, 0x5f, 0x00, 0x6b, 0x00, 0x74, 0x00, 0x7b, 0x00, 0x80, 0x00,
+    0x85, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x97, 0x00, 0x8a, 0x00, 0x68, 0x00, 0x42, 0x00,
+    0x1f, 0x00, 0x04, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x34,
+    0x00, 0x3b, 0x00, 0x41, 0x00, 0x45, 0x00, 0x49, 0x00, 0x4b, 0x00, 0x4e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3b, 0x44, 0x39,
+    0x46, 0x36, 0x49, 0x35, 0x4a, 0x34, 0x4b, 0x32, 0x4e, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x2f, 0x51, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2c, 0x54, 0x2b, 0x56, 0x2a,
+    0xb1, 0x00, 0xa8, 0x00, 0x9f, 0x00, 0x98, 0x00, 0x91, 0x01, 0x8c, 0x02,
+    0x88, 0x03, 0x84, 0x04, 0x81, 0x05, 0x7e, 0x06, 0x7c, 0x07, 0x7a, 0x07,
+    0x79, 0x09, 0x77, 0x09, 0x76, 0x0b, 0x74, 0x0b, 0x73, 0x0c, 0x73, 0x0c,
+    0x71, 0x0d, 0x71, 0x0e, 0x09, 0x43, 0x0e, 0x3b, 0x12, 0x35, 0x16, 0x31,
+    0x1a, 0x2e, 0x1e, 0x2c, 0x22, 0x2a, 0x25, 0x28, 0x28, 0x27, 0x2a, 0x27,
+    0x2d, 0x26, 0x30, 0x25, 0x32, 0x25, 0x34, 0x25, 0x35, 0x25, 0x37, 0x24,
+    0x39, 0x24, 0x3b, 0x24, 0x3c, 0x24, 0x3d, 0x24, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x51,
+    0x00, 0x39, 0x00, 0x1a, 0x04, 0x00, 0x1f, 0x00, 0x36, 0x00, 0x48, 0x00,
+    0x57, 0x00, 0x62, 0x00, 0x6b, 0x00, 0x73, 0x00, 0x79, 0x00, 0x7e, 0x00,
+    0x82, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9a, 0x00, 0x91, 0x00, 0x79, 0x00, 0x5a, 0x00, 0x3b, 0x00, 0x1f, 0x00,
+    0x09, 0x00, 0x00, 0x08, 0x00, 0x17, 0x00, 0x22, 0x00, 0x2c, 0x00, 0x33,
+    0x00, 0x39, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3b, 0x44, 0x39, 0x46, 0x37, 0x48, 0x35,
+    0x4a, 0x35, 0x4a, 0x34, 0x4c, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x30, 0x50, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2d, 0xb1, 0x00, 0xa9, 0x00,
+    0xa1, 0x00, 0x9a, 0x00, 0x94, 0x00, 0x8f, 0x01, 0x8b, 0x02, 0x87, 0x03,
+    0x84, 0x04, 0x81, 0x05, 0x7f, 0x06, 0x7d, 0x06, 0x7b, 0x07, 0x79, 0x08,
+    0x78, 0x09, 0x76, 0x0a, 0x76, 0x0b, 0x74, 0x0b, 0x73, 0x0c, 0x72, 0x0c,
+    0x09, 0x44, 0x0d, 0x3c, 0x11, 0x36, 0x15, 0x33, 0x19, 0x30, 0x1c, 0x2d,
+    0x20, 0x2b, 0x23, 0x2a, 0x25, 0x28, 0x28, 0x27, 0x2a, 0x27, 0x2d, 0x26,
+    0x2f, 0x26, 0x31, 0x25, 0x33, 0x25, 0x34, 0x25, 0x36, 0x24, 0x38, 0x24,
+    0x39, 0x24, 0x3a, 0x24, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x43, 0x00, 0x2a,
+    0x00, 0x10, 0x09, 0x00, 0x1f, 0x00, 0x33, 0x00, 0x43, 0x00, 0x50, 0x00,
+    0x5b, 0x00, 0x64, 0x00, 0x6b, 0x00, 0x72, 0x00, 0x77, 0x00, 0x7b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x95, 0x00,
+    0x83, 0x00, 0x6a, 0x00, 0x4f, 0x00, 0x36, 0x00, 0x1f, 0x00, 0x0c, 0x00,
+    0x00, 0x03, 0x00, 0x10, 0x00, 0x1b, 0x00, 0x24, 0x00, 0x2c, 0x00, 0x32,
+    0x00, 0x37, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3c, 0x43, 0x39, 0x46, 0x38, 0x46, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x33, 0x4d, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x30,
+    0x50, 0x2e, 0x52, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0xb2, 0x00, 0xaa, 0x00, 0xa2, 0x00, 0x9c, 0x00,
+    0x96, 0x00, 0x91, 0x01, 0x8d, 0x02, 0x89, 0x02, 0x86, 0x03, 0x83, 0x04,
+    0x81, 0x05, 0x7f, 0x06, 0x7d, 0x06, 0x7b, 0x07, 0x79, 0x07, 0x79, 0x09,
+    0x77, 0x09, 0x76, 0x0a, 0x75, 0x0b, 0x74, 0x0b, 0x0a, 0x44, 0x0d, 0x3d,
+    0x10, 0x38, 0x14, 0x34, 0x17, 0x31, 0x1b, 0x2e, 0x1e, 0x2d, 0x21, 0x2b,
+    0x23, 0x2a, 0x26, 0x28, 0x28, 0x28, 0x2a, 0x27, 0x2d, 0x26, 0x2e, 0x26,
+    0x30, 0x25, 0x32, 0x25, 0x34, 0x25, 0x35, 0x25, 0x36, 0x24, 0x38, 0x24,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x36, 0x00, 0x1f, 0x00, 0x08,
+    0x0c, 0x00, 0x1f, 0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x55, 0x00,
+    0x5e, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x8a, 0x00, 0x76, 0x00,
+    0x5f, 0x00, 0x48, 0x00, 0x33, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x25, 0x00, 0x2c, 0x00, 0x31,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3c, 0x43, 0x39,
+    0x46, 0x39, 0x46, 0x37, 0x49, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4b, 0x32,
+    0x4e, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x2f,
+    0x52, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0xb2, 0x00, 0xab, 0x00, 0xa4, 0x00, 0x9e, 0x00, 0x98, 0x00, 0x93, 0x00,
+    0x8f, 0x01, 0x8b, 0x02, 0x88, 0x02, 0x85, 0x03, 0x83, 0x04, 0x81, 0x05,
+    0x7f, 0x06, 0x7d, 0x06, 0x7c, 0x07, 0x7a, 0x07, 0x79, 0x08, 0x78, 0x09,
+    0x76, 0x09, 0x76, 0x0a, 0x0a, 0x44, 0x0c, 0x3e, 0x10, 0x39, 0x13, 0x35,
+    0x16, 0x32, 0x19, 0x30, 0x1c, 0x2e, 0x1f, 0x2c, 0x21, 0x2b, 0x24, 0x2a,
+    0x26, 0x28, 0x28, 0x28, 0x2a, 0x27, 0x2c, 0x26, 0x2e, 0x26, 0x30, 0x25,
+    0x31, 0x25, 0x33, 0x25, 0x34, 0x25, 0x36, 0x25, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x59,
+    0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2b, 0x00, 0x17, 0x00, 0x03, 0x0f, 0x00,
+    0x1f, 0x00, 0x2e, 0x00, 0x3b, 0x00, 0x46, 0x00, 0x50, 0x00, 0x59, 0x00,
+    0x60, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x6b, 0x00, 0x57, 0x00,
+    0x43, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x11, 0x00, 0x04, 0x00, 0x00, 0x07,
+    0x00, 0x10, 0x00, 0x19, 0x00, 0x20, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x42, 0x39, 0x46, 0x39, 0x46, 0x38,
+    0x47, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x34, 0x4b, 0x32, 0x4e, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x2f, 0x51, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0xb2, 0x00, 0xac, 0x00,
+    0xa5, 0x00, 0x9f, 0x00, 0x9a, 0x00, 0x96, 0x00, 0x91, 0x01, 0x8e, 0x01,
+    0x8a, 0x02, 0x88, 0x02, 0x85, 0x03, 0x83, 0x04, 0x81, 0x05, 0x7f, 0x05,
+    0x7d, 0x06, 0x7c, 0x07, 0x7a, 0x07, 0x79, 0x07, 0x78, 0x09, 0x77, 0x09,
+    0x0a, 0x44, 0x0c, 0x3f, 0x0f, 0x3a, 0x12, 0x36, 0x15, 0x33, 0x18, 0x30,
+    0x1b, 0x2e, 0x1d, 0x2d, 0x20, 0x2b, 0x22, 0x2a, 0x24, 0x2a, 0x26, 0x28,
+    0x28, 0x28, 0x2a, 0x27, 0x2c, 0x26, 0x2e, 0x26, 0x2f, 0x26, 0x31, 0x25,
+    0x33, 0x25, 0x33, 0x25, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x52, 0x00, 0x45,
+    0x00, 0x34, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x11, 0x00, 0x1f, 0x00,
+    0x2d, 0x00, 0x38, 0x00, 0x43, 0x00, 0x4c, 0x00, 0x54, 0x00, 0x5b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a, 0x00,
+    0x92, 0x00, 0x84, 0x00, 0x74, 0x00, 0x62, 0x00, 0x50, 0x00, 0x3f, 0x00,
+    0x2e, 0x00, 0x1f, 0x00, 0x12, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0c,
+    0x00, 0x14, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3d, 0x42, 0x3a, 0x45, 0x39, 0x46, 0x39, 0x46, 0x36, 0x49, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x33, 0x4d, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x30, 0x50, 0x2e, 0x53, 0x2e,
+    0x53, 0x2e, 0x53, 0x2e, 0xb3, 0x00, 0xac, 0x00, 0xa7, 0x00, 0xa1, 0x00,
+    0x9b, 0x00, 0x97, 0x00, 0x93, 0x00, 0x8f, 0x01, 0x8c, 0x02, 0x89, 0x02,
+    0x87, 0x02, 0x85, 0x03, 0x82, 0x04, 0x81, 0x05, 0x7f, 0x05, 0x7d, 0x06,
+    0x7c, 0x06, 0x7b, 0x07, 0x79, 0x07, 0x79, 0x08, 0x0a, 0x45, 0x0c, 0x3f,
+    0x0f, 0x3a, 0x11, 0x37, 0x14, 0x34, 0x17, 0x32, 0x1a, 0x30, 0x1c, 0x2e,
+    0x1e, 0x2d, 0x21, 0x2b, 0x22, 0x2a, 0x25, 0x2a, 0x26, 0x28, 0x28, 0x28,
+    0x2a, 0x27, 0x2c, 0x27, 0x2d, 0x26, 0x2f, 0x26, 0x30, 0x25, 0x32, 0x25,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5e, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3b, 0x00, 0x2c,
+    0x00, 0x1b, 0x00, 0x0b, 0x04, 0x00, 0x12, 0x00, 0x1f, 0x00, 0x2b, 0x00,
+    0x36, 0x00, 0x40, 0x00, 0x49, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x94, 0x00, 0x89, 0x00,
+    0x7b, 0x00, 0x6b, 0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2d, 0x00,
+    0x1f, 0x00, 0x13, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x42, 0x3a,
+    0x44, 0x39, 0x46, 0x39, 0x46, 0x37, 0x48, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x33, 0x4d, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x30, 0x50, 0x2e, 0x53, 0x2e, 0x53, 0x2e,
+    0xb3, 0x00, 0xad, 0x00, 0xa7, 0x00, 0xa3, 0x00, 0x9d, 0x00, 0x99, 0x00,
+    0x95, 0x00, 0x91, 0x01, 0x8e, 0x01, 0x8b, 0x02, 0x88, 0x02, 0x86, 0x02,
+    0x84, 0x03, 0x82, 0x04, 0x81, 0x05, 0x7f, 0x05, 0x7e, 0x06, 0x7c, 0x06,
+    0x7b, 0x07, 0x7a, 0x07, 0x0a, 0x45, 0x0c, 0x40, 0x0e, 0x3b, 0x11, 0x38,
+    0x13, 0x35, 0x16, 0x32, 0x18, 0x30, 0x1b, 0x2e, 0x1d, 0x2d, 0x1f, 0x2c,
+    0x21, 0x2b, 0x23, 0x2a, 0x25, 0x29, 0x27, 0x28, 0x28, 0x28, 0x2a, 0x27,
+    0x2c, 0x27, 0x2d, 0x26, 0x2f, 0x26, 0x2f, 0x25, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c,
+    0x00, 0x56, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x33, 0x00, 0x24, 0x00, 0x15,
+    0x00, 0x07, 0x06, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x34, 0x00,
+    0x3d, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x73, 0x00,
+    0x64, 0x00, 0x55, 0x00, 0x46, 0x00, 0x38, 0x00, 0x2b, 0x00, 0x1f, 0x00,
+    0x14, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x42, 0x3b, 0x44, 0x39, 0x46, 0x39,
+    0x46, 0x38, 0x47, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x34,
+    0x4b, 0x32, 0x4e, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x30, 0x50, 0x2f, 0x52, 0x2e, 0xb3, 0x00, 0xae, 0x00,
+    0xa8, 0x00, 0xa3, 0x00, 0x9f, 0x00, 0x9a, 0x00, 0x96, 0x00, 0x93, 0x00,
+    0x8f, 0x01, 0x8d, 0x02, 0x8a, 0x02, 0x88, 0x02, 0x86, 0x03, 0x84, 0x03,
+    0x82, 0x04, 0x81, 0x05, 0x7f, 0x05, 0x7e, 0x06, 0x7c, 0x06, 0x7c, 0x07,
+    0x0a, 0x45, 0x0c, 0x40, 0x0e, 0x3c, 0x11, 0x38, 0x13, 0x36, 0x15, 0x33,
+    0x18, 0x31, 0x1a, 0x30, 0x1c, 0x2e, 0x1e, 0x2d, 0x20, 0x2b, 0x22, 0x2b,
+    0x23, 0x2a, 0x25, 0x29, 0x27, 0x28, 0x28, 0x28, 0x2a, 0x27, 0x2c, 0x27,
+    0x2d, 0x26, 0x2f, 0x26, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x57, 0x00, 0x4f,
+    0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x1e, 0x00, 0x10, 0x00, 0x03,
+    0x08, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x33, 0x00, 0x3b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00,
+    0x97, 0x00, 0x8f, 0x00, 0x85, 0x00, 0x79, 0x00, 0x6b, 0x00, 0x5e, 0x00,
+    0x50, 0x00, 0x43, 0x00, 0x36, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x15, 0x00,
+    0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3d, 0x42, 0x3c, 0x43, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x36,
+    0x49, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x33, 0x4c, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x2f, 0xb3, 0x00, 0xae, 0x00, 0xa9, 0x00, 0xa4, 0x00,
+    0xa0, 0x00, 0x9b, 0x00, 0x98, 0x00, 0x94, 0x00, 0x91, 0x01, 0x8e, 0x01,
+    0x8c, 0x02, 0x89, 0x02, 0x87, 0x02, 0x86, 0x03, 0x84, 0x03, 0x82, 0x04,
+    0x80, 0x05, 0x7f, 0x05, 0x7e, 0x06, 0x7c, 0x06, 0x0a, 0x45, 0x0b, 0x40,
+    0x0e, 0x3c, 0x10, 0x39, 0x12, 0x37, 0x14, 0x34, 0x17, 0x32, 0x19, 0x30,
+    0x1b, 0x2e, 0x1d, 0x2d, 0x1f, 0x2d, 0x20, 0x2b, 0x22, 0x2b, 0x24, 0x2a,
+    0x25, 0x29, 0x27, 0x28, 0x28, 0x28, 0x2a, 0x27, 0x2c, 0x27, 0x2c, 0x26,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x52, 0x00, 0x49, 0x00, 0x3e,
+    0x00, 0x32, 0x00, 0x25, 0x00, 0x19, 0x00, 0x0c, 0x00, 0x00, 0x0a, 0x00,
+    0x15, 0x00, 0x1f, 0x00, 0x29, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x91, 0x00,
+    0x88, 0x00, 0x7e, 0x00, 0x72, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c, 0x00,
+    0x40, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x0d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x42, 0x3c,
+    0x43, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x37, 0x48, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x33, 0x4d, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0xb3, 0x00, 0xae, 0x00, 0xaa, 0x00, 0xa5, 0x00, 0xa1, 0x00, 0x9d, 0x00,
+    0x99, 0x00, 0x96, 0x00, 0x93, 0x00, 0x90, 0x01, 0x8d, 0x01, 0x8b, 0x02,
+    0x89, 0x02, 0x87, 0x02, 0x85, 0x03, 0x83, 0x03, 0x82, 0x04, 0x80, 0x05,
+    0x7f, 0x05, 0x7e, 0x06, 0x0a, 0x45, 0x0b, 0x41, 0x0e, 0x3d, 0x10, 0x3a,
+    0x11, 0x37, 0x14, 0x34, 0x16, 0x32, 0x18, 0x31, 0x1a, 0x30, 0x1c, 0x2e,
+    0x1d, 0x2d, 0x20, 0x2c, 0x21, 0x2b, 0x22, 0x2a, 0x24, 0x2a, 0x25, 0x29,
+    0x27, 0x28, 0x28, 0x28, 0x2a, 0x27, 0x2c, 0x27, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d,
+    0x00, 0x59, 0x00, 0x53, 0x00, 0x4b, 0x00, 0x42, 0x00, 0x37, 0x00, 0x2c,
+    0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x01, 0x00, 0x0c, 0x00, 0x16, 0x00,
+    0x1f, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x82, 0x00,
+    0x77, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3d, 0x00,
+    0x33, 0x00, 0x29, 0x00, 0x1f, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x39, 0x46, 0x39,
+    0x46, 0x39, 0x46, 0x39, 0x46, 0x36, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x35, 0x4a, 0x34, 0x4b, 0x32, 0x4e, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0xb4, 0x00, 0xaf, 0x00,
+    0xaa, 0x00, 0xa6, 0x00, 0xa2, 0x00, 0x9e, 0x00, 0x9a, 0x00, 0x97, 0x00,
+    0x94, 0x00, 0x91, 0x00, 0x8e, 0x01, 0x8c, 0x02, 0x8a, 0x02, 0x88, 0x02,
+    0x86, 0x02, 0x85, 0x03, 0x83, 0x03, 0x82, 0x04, 0x80, 0x05, 0x7f, 0x05,
+    0x0a, 0x45, 0x0b, 0x41, 0x0d, 0x3e, 0x10, 0x3a, 0x11, 0x38, 0x13, 0x35,
+    0x16, 0x33, 0x17, 0x32, 0x19, 0x30, 0x1b, 0x2e, 0x1d, 0x2e, 0x1e, 0x2d,
+    0x20, 0x2b, 0x22, 0x2b, 0x23, 0x2a, 0x25, 0x2a, 0x25, 0x28, 0x28, 0x28,
+    0x28, 0x28, 0x2a, 0x27, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55,
+    0x00, 0x4e, 0x00, 0x45, 0x00, 0x3c, 0x00, 0x31, 0x00, 0x26, 0x00, 0x1b,
+    0x00, 0x11, 0x00, 0x06, 0x03, 0x00, 0x0d, 0x00, 0x17, 0x00, 0x1f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00,
+    0x9a, 0x00, 0x95, 0x00, 0x8d, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71, 0x00,
+    0x66, 0x00, 0x5b, 0x00, 0x50, 0x00, 0x46, 0x00, 0x3b, 0x00, 0x31, 0x00,
+    0x28, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3a, 0x45, 0x39, 0x46, 0x39, 0x46, 0x39,
+    0x46, 0x37, 0x49, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35,
+    0x4a, 0x34, 0x4c, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31,
+    0x4f, 0x31, 0x4f, 0x31, 0xb4, 0x00, 0xaf, 0x00, 0xab, 0x00, 0xa7, 0x00,
+    0xa3, 0x00, 0x9f, 0x00, 0x9b, 0x00, 0x98, 0x00, 0x95, 0x00, 0x92, 0x00,
+    0x90, 0x01, 0x8d, 0x01, 0x8b, 0x02, 0x89, 0x02, 0x88, 0x02, 0x86, 0x02,
+    0x85, 0x03, 0x82, 0x03, 0x82, 0x04, 0x80, 0x05, 0x0a, 0x46, 0x0b, 0x42,
+    0x0d, 0x3e, 0x0f, 0x3b, 0x11, 0x38, 0x13, 0x36, 0x15, 0x34, 0x16, 0x32,
+    0x18, 0x30, 0x1a, 0x30, 0x1c, 0x2e, 0x1d, 0x2d, 0x20, 0x2d, 0x20, 0x2b,
+    0x22, 0x2b, 0x23, 0x2a, 0x25, 0x2a, 0x26, 0x28, 0x28, 0x28, 0x28, 0x28,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23,
+    0x60, 0x23, 0x60, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x32, 0x74, 0x38, 0x57, 0x3a, 0x4f, 0x3c, 0x4b, 0x3c, 0x49, 0x3d, 0x47,
+    0x3d, 0x46, 0x3d, 0x45, 0x3d, 0x45, 0x3d, 0x44, 0x3d, 0x43, 0x3d, 0x43,
+    0x3d, 0x43, 0x3d, 0x43, 0x3d, 0x43, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42,
+    0x3d, 0x42, 0x3d, 0x42, 0x41, 0x09, 0x1b, 0x31, 0x27, 0x38, 0x2d, 0x3a,
+    0x31, 0x3b, 0x33, 0x3c, 0x35, 0x3c, 0x36, 0x3d, 0x37, 0x3d, 0x38, 0x3d,
+    0x38, 0x3d, 0x39, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d, 0x3a, 0x3d,
+    0x3b, 0x3d, 0x3b, 0x3d, 0x3b, 0x3d, 0x3c, 0x3d, 0x73, 0x00, 0x38, 0x31,
+    0x3a, 0x38, 0x3c, 0x3a, 0x3c, 0x3b, 0x3d, 0x3c, 0x3d, 0x3c, 0x3d, 0x3d,
+    0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
+    0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x2f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x3d, 0x28, 0x38, 0x30,
+    0x38, 0x34, 0x39, 0x36, 0x39, 0x38, 0x3a, 0x39, 0x3a, 0x39, 0x3b, 0x3a,
+    0x3b, 0x3b, 0x3c, 0x3b, 0x3c, 0x3b, 0x3d, 0x3c, 0x3d, 0x3c, 0x3e, 0x3c,
+    0x3e, 0x3c, 0x3e, 0x3c, 0x3e, 0x3c, 0x3e, 0x3d, 0x3e, 0x3d, 0x3e, 0x3d,
+    0x00, 0x7e, 0x05, 0x58, 0x0f, 0x4e, 0x17, 0x49, 0x1d, 0x47, 0x21, 0x45,
+    0x24, 0x44, 0x27, 0x43, 0x29, 0x43, 0x2b, 0x43, 0x2d, 0x43, 0x2e, 0x42,
+    0x2f, 0x42, 0x31, 0x42, 0x31, 0x42, 0x32, 0x42, 0x33, 0x42, 0x33, 0x42,
+    0x34, 0x42, 0x34, 0x42, 0x2b, 0x4e, 0x31, 0x47, 0x34, 0x45, 0x36, 0x44,
+    0x38, 0x43, 0x39, 0x42, 0x39, 0x42, 0x3a, 0x41, 0x3b, 0x41, 0x3b, 0x41,
+    0x3c, 0x41, 0x3c, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41,
+    0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x3d, 0x41, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x4f, 0x00, 0x04, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x2f, 0x00,
+    0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x41, 0x16, 0x3a, 0x20, 0x39, 0x25, 0x39, 0x29,
+    0x39, 0x2d, 0x39, 0x2f, 0x3a, 0x31, 0x3a, 0x32, 0x3b, 0x33, 0x3a, 0x34,
+    0x3a, 0x35, 0x3a, 0x36, 0x3a, 0x36, 0x3b, 0x37, 0x3b, 0x37, 0x3c, 0x38,
+    0x3c, 0x38, 0x3d, 0x38, 0x3e, 0x39, 0x3e, 0x39, 0x00, 0x93, 0x01, 0x70,
+    0x06, 0x60, 0x0d, 0x56, 0x12, 0x52, 0x16, 0x4e, 0x1a, 0x4c, 0x1d, 0x4a,
+    0x20, 0x48, 0x22, 0x47, 0x24, 0x46, 0x26, 0x45, 0x27, 0x44, 0x29, 0x44,
+    0x2a, 0x44, 0x2b, 0x44, 0x2c, 0x43, 0x2d, 0x43, 0x2e, 0x43, 0x2f, 0x43,
+    0x28, 0x56, 0x2e, 0x4f, 0x31, 0x4b, 0x33, 0x49, 0x35, 0x48, 0x36, 0x46,
+    0x37, 0x45, 0x38, 0x45, 0x39, 0x44, 0x39, 0x44, 0x39, 0x43, 0x39, 0x43,
+    0x39, 0x42, 0x3a, 0x42, 0x3a, 0x42, 0x3b, 0x42, 0x3c, 0x42, 0x3c, 0x42,
+    0x3d, 0x42, 0x3d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x8f, 0x00, 0x73, 0x00, 0x38, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x45, 0x00, 0x22, 0x00, 0x01, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x43, 0x11, 0x3d, 0x18, 0x3b, 0x1e, 0x3a, 0x22, 0x39, 0x25, 0x39, 0x28,
+    0x39, 0x2a, 0x39, 0x2c, 0x39, 0x2d, 0x3a, 0x2f, 0x3b, 0x30, 0x3b, 0x31,
+    0x3b, 0x32, 0x3b, 0x33, 0x3a, 0x33, 0x3a, 0x34, 0x3a, 0x34, 0x3a, 0x35,
+    0x3a, 0x35, 0x3b, 0x35, 0x00, 0x9d, 0x00, 0x7f, 0x03, 0x6d, 0x07, 0x62,
+    0x0c, 0x5b, 0x10, 0x56, 0x13, 0x52, 0x16, 0x50, 0x19, 0x4d, 0x1c, 0x4c,
+    0x1e, 0x4b, 0x1f, 0x4b, 0x22, 0x4a, 0x23, 0x49, 0x24, 0x48, 0x25, 0x47,
+    0x27, 0x46, 0x28, 0x45, 0x29, 0x44, 0x29, 0x44, 0x27, 0x59, 0x2c, 0x53,
+    0x2f, 0x4f, 0x31, 0x4d, 0x32, 0x4b, 0x34, 0x4a, 0x35, 0x48, 0x35, 0x47,
+    0x36, 0x46, 0x37, 0x46, 0x38, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x45,
+    0x39, 0x44, 0x39, 0x44, 0x39, 0x43, 0x39, 0x43, 0x39, 0x42, 0x3a, 0x42,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x84,
+    0x00, 0x5b, 0x00, 0x2a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x59, 0x00, 0x4f, 0x00, 0x36, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x44, 0x0f, 0x3e, 0x14,
+    0x3c, 0x19, 0x3a, 0x1d, 0x3a, 0x20, 0x39, 0x23, 0x3a, 0x25, 0x3a, 0x27,
+    0x39, 0x29, 0x39, 0x2a, 0x39, 0x2c, 0x3a, 0x2c, 0x3b, 0x2d, 0x3b, 0x2f,
+    0x3b, 0x2f, 0x3b, 0x30, 0x3b, 0x31, 0x3b, 0x32, 0x3a, 0x32, 0x3a, 0x33,
+    0x00, 0xa3, 0x00, 0x88, 0x01, 0x77, 0x04, 0x6b, 0x08, 0x63, 0x0b, 0x5d,
+    0x0e, 0x59, 0x11, 0x57, 0x14, 0x54, 0x16, 0x51, 0x19, 0x4f, 0x1a, 0x4d,
+    0x1c, 0x4c, 0x1e, 0x4c, 0x1f, 0x4b, 0x21, 0x4b, 0x22, 0x4a, 0x23, 0x49,
+    0x24, 0x49, 0x25, 0x49, 0x27, 0x5a, 0x2a, 0x55, 0x2d, 0x52, 0x2f, 0x4f,
+    0x31, 0x4e, 0x32, 0x4b, 0x33, 0x4a, 0x35, 0x4a, 0x35, 0x49, 0x35, 0x48,
+    0x35, 0x46, 0x37, 0x46, 0x38, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46,
+    0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x45, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x8d, 0x00, 0x6f, 0x00, 0x48,
+    0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x55, 0x00,
+    0x42, 0x00, 0x2b, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x45, 0x0e, 0x40, 0x12, 0x3d, 0x16, 0x3b, 0x1a,
+    0x3b, 0x1d, 0x3a, 0x20, 0x39, 0x22, 0x39, 0x23, 0x3a, 0x25, 0x3a, 0x26,
+    0x3a, 0x28, 0x39, 0x29, 0x39, 0x2a, 0x39, 0x2b, 0x3a, 0x2c, 0x3b, 0x2d,
+    0x3c, 0x2e, 0x3b, 0x2e, 0x3b, 0x2f, 0x3b, 0x30, 0x00, 0xa7, 0x00, 0x90,
+    0x00, 0x7e, 0x02, 0x73, 0x05, 0x6a, 0x08, 0x65, 0x0b, 0x5f, 0x0d, 0x5b,
+    0x10, 0x58, 0x12, 0x56, 0x14, 0x55, 0x16, 0x52, 0x18, 0x50, 0x1a, 0x4e,
+    0x1b, 0x4d, 0x1d, 0x4c, 0x1e, 0x4c, 0x1f, 0x4b, 0x20, 0x4b, 0x21, 0x4b,
+    0x26, 0x5b, 0x2a, 0x57, 0x2c, 0x54, 0x2e, 0x51, 0x30, 0x4f, 0x31, 0x4e,
+    0x31, 0x4c, 0x33, 0x4a, 0x34, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x49,
+    0x35, 0x47, 0x36, 0x46, 0x37, 0x46, 0x38, 0x46, 0x39, 0x46, 0x39, 0x46,
+    0x39, 0x46, 0x39, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9b, 0x00, 0x92, 0x00, 0x7c, 0x00, 0x5d, 0x00, 0x3c, 0x00, 0x1c,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x38, 0x00,
+    0x24, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x46, 0x0d, 0x41, 0x11, 0x3d, 0x14, 0x3d, 0x17, 0x3b, 0x1a, 0x3b, 0x1c,
+    0x3b, 0x1e, 0x39, 0x21, 0x39, 0x22, 0x3a, 0x23, 0x3a, 0x25, 0x3a, 0x26,
+    0x3a, 0x28, 0x39, 0x29, 0x39, 0x2a, 0x39, 0x2a, 0x39, 0x2b, 0x3b, 0x2c,
+    0x3c, 0x2d, 0x3c, 0x2e, 0x00, 0xa9, 0x00, 0x95, 0x00, 0x85, 0x01, 0x79,
+    0x03, 0x70, 0x06, 0x69, 0x08, 0x65, 0x0b, 0x61, 0x0d, 0x5c, 0x0f, 0x59,
+    0x11, 0x58, 0x13, 0x56, 0x14, 0x55, 0x16, 0x53, 0x18, 0x51, 0x19, 0x4f,
+    0x1b, 0x4d, 0x1c, 0x4d, 0x1d, 0x4c, 0x1e, 0x4c, 0x26, 0x5c, 0x29, 0x58,
+    0x2b, 0x55, 0x2d, 0x53, 0x2e, 0x50, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4d,
+    0x32, 0x4b, 0x34, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x49,
+    0x35, 0x48, 0x35, 0x47, 0x36, 0x46, 0x38, 0x46, 0x39, 0x46, 0x39, 0x46,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x95,
+    0x00, 0x84, 0x00, 0x6c, 0x00, 0x4f, 0x00, 0x32, 0x00, 0x18, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5d, 0x00, 0x59, 0x00, 0x4f, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x1e, 0x00,
+    0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x46, 0x0c, 0x42, 0x0f,
+    0x3f, 0x13, 0x3d, 0x15, 0x3c, 0x18, 0x3a, 0x1a, 0x3b, 0x1c, 0x3b, 0x1e,
+    0x39, 0x20, 0x39, 0x21, 0x39, 0x22, 0x3b, 0x24, 0x3a, 0x25, 0x3a, 0x26,
+    0x3a, 0x27, 0x39, 0x28, 0x39, 0x29, 0x39, 0x2a, 0x39, 0x2a, 0x3a, 0x2b,
+    0x00, 0xab, 0x00, 0x99, 0x00, 0x8b, 0x01, 0x7e, 0x02, 0x77, 0x04, 0x6f,
+    0x06, 0x69, 0x08, 0x66, 0x0b, 0x62, 0x0d, 0x5e, 0x0e, 0x5b, 0x10, 0x59,
+    0x12, 0x57, 0x13, 0x56, 0x15, 0x55, 0x16, 0x54, 0x18, 0x52, 0x19, 0x50,
+    0x1a, 0x4e, 0x1b, 0x4d, 0x26, 0x5c, 0x28, 0x59, 0x2a, 0x57, 0x2c, 0x53,
+    0x2e, 0x53, 0x2e, 0x50, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4e, 0x31, 0x4c,
+    0x33, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x35, 0x49, 0x35, 0x48, 0x36, 0x46, 0x37, 0x46, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x8a, 0x00, 0x76,
+    0x00, 0x5e, 0x00, 0x45, 0x00, 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5b, 0x00,
+    0x53, 0x00, 0x47, 0x00, 0x38, 0x00, 0x29, 0x00, 0x1a, 0x00, 0x0c, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x46, 0x0c, 0x42, 0x0e, 0x40, 0x11, 0x3d, 0x13,
+    0x3d, 0x16, 0x3b, 0x18, 0x3b, 0x1a, 0x3c, 0x1c, 0x3b, 0x1e, 0x3a, 0x1f,
+    0x39, 0x21, 0x39, 0x21, 0x3a, 0x23, 0x3b, 0x24, 0x3a, 0x25, 0x3a, 0x26,
+    0x3a, 0x27, 0x39, 0x27, 0x39, 0x28, 0x39, 0x2a, 0x00, 0xac, 0x00, 0x9c,
+    0x00, 0x8f, 0x00, 0x83, 0x02, 0x7b, 0x03, 0x74, 0x05, 0x6d, 0x07, 0x69,
+    0x09, 0x66, 0x0b, 0x63, 0x0c, 0x5f, 0x0e, 0x5c, 0x0f, 0x5a, 0x11, 0x58,
+    0x12, 0x57, 0x14, 0x56, 0x15, 0x55, 0x16, 0x55, 0x18, 0x53, 0x18, 0x51,
+    0x26, 0x5d, 0x27, 0x59, 0x2a, 0x57, 0x2b, 0x55, 0x2e, 0x53, 0x2e, 0x53,
+    0x2f, 0x50, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4d, 0x32, 0x4b,
+    0x34, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x35, 0x4a, 0x35, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x69, 0x00, 0x53,
+    0x00, 0x3c, 0x00, 0x26, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x4b, 0x00,
+    0x3f, 0x00, 0x32, 0x00, 0x24, 0x00, 0x17, 0x00, 0x0b, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x47, 0x0b, 0x42, 0x0d, 0x41, 0x10, 0x3e, 0x13, 0x3d, 0x15, 0x3c, 0x17,
+    0x3a, 0x19, 0x3b, 0x1a, 0x3c, 0x1c, 0x3b, 0x1d, 0x3a, 0x1f, 0x39, 0x20,
+    0x39, 0x21, 0x3a, 0x22, 0x3b, 0x23, 0x3b, 0x24, 0x3a, 0x25, 0x3a, 0x26,
+    0x3a, 0x27, 0x39, 0x27, 0x00, 0xad, 0x00, 0x9f, 0x00, 0x92, 0x00, 0x88,
+    0x01, 0x7e, 0x02, 0x78, 0x04, 0x72, 0x05, 0x6d, 0x07, 0x69, 0x09, 0x66,
+    0x0a, 0x64, 0x0c, 0x61, 0x0d, 0x5d, 0x0f, 0x5a, 0x10, 0x59, 0x11, 0x58,
+    0x13, 0x57, 0x14, 0x56, 0x15, 0x55, 0x16, 0x55, 0x26, 0x5d, 0x27, 0x5a,
+    0x2a, 0x57, 0x2a, 0x56, 0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2f, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4e, 0x32, 0x4b, 0x33, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a,
+    0x00, 0x91, 0x00, 0x83, 0x00, 0x72, 0x00, 0x5e, 0x00, 0x4a, 0x00, 0x36,
+    0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x44, 0x00, 0x38, 0x00,
+    0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0b, 0x43, 0x0d,
+    0x41, 0x0f, 0x3f, 0x12, 0x3d, 0x13, 0x3e, 0x15, 0x3c, 0x17, 0x3a, 0x19,
+    0x3a, 0x1a, 0x3c, 0x1c, 0x3b, 0x1d, 0x3a, 0x1f, 0x39, 0x1f, 0x39, 0x21,
+    0x39, 0x21, 0x3b, 0x22, 0x3b, 0x24, 0x3a, 0x24, 0x3a, 0x24, 0x3a, 0x26,
+    0x00, 0xae, 0x00, 0xa2, 0x00, 0x94, 0x00, 0x8b, 0x00, 0x82, 0x02, 0x7b,
+    0x03, 0x76, 0x05, 0x71, 0x06, 0x6c, 0x07, 0x69, 0x09, 0x66, 0x0a, 0x64,
+    0x0c, 0x62, 0x0d, 0x5f, 0x0e, 0x5b, 0x10, 0x5a, 0x10, 0x58, 0x12, 0x58,
+    0x13, 0x56, 0x14, 0x56, 0x25, 0x5d, 0x27, 0x5b, 0x29, 0x57, 0x2a, 0x57,
+    0x2b, 0x54, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2f, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4e, 0x31, 0x4d, 0x33, 0x4a, 0x34, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x88,
+    0x00, 0x79, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00,
+    0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e, 0x00, 0x33, 0x00, 0x28, 0x00,
+    0x1d, 0x00, 0x12, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0b, 0x43, 0x0d, 0x42, 0x0f, 0x40, 0x11,
+    0x3d, 0x13, 0x3e, 0x14, 0x3c, 0x16, 0x3b, 0x17, 0x3a, 0x19, 0x3b, 0x1a,
+    0x3c, 0x1c, 0x3b, 0x1d, 0x3b, 0x1f, 0x39, 0x1f, 0x39, 0x20, 0x39, 0x21,
+    0x3a, 0x21, 0x3b, 0x22, 0x3b, 0x24, 0x3a, 0x24, 0x00, 0xae, 0x00, 0xa3,
+    0x00, 0x97, 0x00, 0x8e, 0x00, 0x86, 0x01, 0x7e, 0x02, 0x79, 0x03, 0x75,
+    0x05, 0x70, 0x06, 0x6b, 0x07, 0x68, 0x09, 0x66, 0x0a, 0x64, 0x0b, 0x63,
+    0x0c, 0x5f, 0x0e, 0x5d, 0x0f, 0x5a, 0x10, 0x59, 0x11, 0x58, 0x13, 0x58,
+    0x25, 0x5d, 0x27, 0x5c, 0x29, 0x58, 0x2a, 0x57, 0x2a, 0x56, 0x2d, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x51, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4d, 0x32, 0x4b, 0x33, 0x4a, 0x35, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9c, 0x00, 0x95, 0x00, 0x8b, 0x00, 0x7e, 0x00, 0x6f,
+    0x00, 0x5f, 0x00, 0x4e, 0x00, 0x3d, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00,
+    0x4c, 0x00, 0x42, 0x00, 0x39, 0x00, 0x2e, 0x00, 0x24, 0x00, 0x1a, 0x00,
+    0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x47, 0x0b, 0x44, 0x0d, 0x42, 0x0e, 0x41, 0x10, 0x3e, 0x12, 0x3d, 0x13,
+    0x3e, 0x15, 0x3c, 0x17, 0x3a, 0x18, 0x3b, 0x19, 0x3b, 0x1a, 0x3c, 0x1c,
+    0x3b, 0x1c, 0x3b, 0x1e, 0x39, 0x1f, 0x39, 0x20, 0x39, 0x21, 0x39, 0x21,
+    0x3b, 0x22, 0x3b, 0x23, 0x00, 0xaf, 0x00, 0xa5, 0x00, 0x99, 0x00, 0x90,
+    0x00, 0x8a, 0x01, 0x81, 0x02, 0x7c, 0x02, 0x77, 0x04, 0x74, 0x05, 0x6f,
+    0x06, 0x6a, 0x07, 0x68, 0x09, 0x66, 0x0a, 0x64, 0x0b, 0x63, 0x0c, 0x61,
+    0x0e, 0x5e, 0x0e, 0x5b, 0x10, 0x5a, 0x10, 0x59, 0x25, 0x5d, 0x27, 0x5c,
+    0x28, 0x59, 0x2a, 0x57, 0x2a, 0x57, 0x2b, 0x54, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x50, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4e, 0x31, 0x4c, 0x33, 0x4a, 0x34, 0x4a, 0x35, 0x4a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c,
+    0x00, 0x97, 0x00, 0x8e, 0x00, 0x83, 0x00, 0x75, 0x00, 0x66, 0x00, 0x57,
+    0x00, 0x47, 0x00, 0x37, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x0c, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x46, 0x00,
+    0x3d, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f, 0x00,
+    0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0a, 0x44, 0x0d,
+    0x42, 0x0e, 0x41, 0x0f, 0x3f, 0x11, 0x3d, 0x13, 0x3e, 0x14, 0x3d, 0x15,
+    0x3c, 0x17, 0x3a, 0x18, 0x3a, 0x19, 0x3c, 0x1a, 0x3c, 0x1c, 0x3b, 0x1c,
+    0x3b, 0x1e, 0x39, 0x1f, 0x39, 0x1f, 0x39, 0x21, 0x39, 0x21, 0x3a, 0x21,
+    0x00, 0xaf, 0x00, 0xa6, 0x00, 0x9c, 0x00, 0x92, 0x00, 0x8c, 0x00, 0x85,
+    0x01, 0x7e, 0x02, 0x7a, 0x03, 0x76, 0x05, 0x73, 0x06, 0x6e, 0x07, 0x6a,
+    0x08, 0x68, 0x09, 0x66, 0x0a, 0x65, 0x0b, 0x63, 0x0c, 0x62, 0x0d, 0x5f,
+    0x0e, 0x5c, 0x0f, 0x5a, 0x25, 0x5d, 0x27, 0x5c, 0x27, 0x59, 0x2a, 0x57,
+    0x2a, 0x57, 0x2a, 0x55, 0x2d, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x50, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4d, 0x32, 0x4b, 0x34, 0x4a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x90,
+    0x00, 0x86, 0x00, 0x7a, 0x00, 0x6d, 0x00, 0x5f, 0x00, 0x50, 0x00, 0x41,
+    0x00, 0x33, 0x00, 0x25, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e, 0x00,
+    0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x49, 0x00, 0x41, 0x00, 0x39, 0x00,
+    0x30, 0x00, 0x27, 0x00, 0x1e, 0x00, 0x16, 0x00, 0x0e, 0x00, 0x07, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0a, 0x45, 0x0c, 0x42, 0x0d, 0x42, 0x0f,
+    0x40, 0x11, 0x3d, 0x12, 0x3d, 0x13, 0x3e, 0x15, 0x3c, 0x16, 0x3b, 0x17,
+    0x3a, 0x19, 0x3a, 0x19, 0x3c, 0x1a, 0x3c, 0x1c, 0x3b, 0x1c, 0x3b, 0x1e,
+    0x3a, 0x1f, 0x39, 0x1f, 0x39, 0x20, 0x39, 0x21, 0x00, 0xb0, 0x00, 0xa7,
+    0x00, 0x9e, 0x00, 0x94, 0x00, 0x8e, 0x00, 0x88, 0x01, 0x81, 0x02, 0x7c,
+    0x02, 0x78, 0x03, 0x75, 0x05, 0x72, 0x06, 0x6d, 0x07, 0x6a, 0x08, 0x68,
+    0x09, 0x66, 0x0a, 0x65, 0x0b, 0x63, 0x0c, 0x62, 0x0d, 0x60, 0x0e, 0x5d,
+    0x25, 0x5d, 0x27, 0x5c, 0x27, 0x5a, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57,
+    0x2c, 0x54, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2f, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4e, 0x31, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x92, 0x00, 0x89, 0x00, 0x7e,
+    0x00, 0x72, 0x00, 0x66, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x3d, 0x00, 0x2f,
+    0x00, 0x22, 0x00, 0x16, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x57, 0x00,
+    0x52, 0x00, 0x4c, 0x00, 0x44, 0x00, 0x3d, 0x00, 0x35, 0x00, 0x2c, 0x00,
+    0x24, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x0d, 0x00, 0x06, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x47, 0x0a, 0x45, 0x0c, 0x42, 0x0d, 0x42, 0x0e, 0x40, 0x10, 0x3e, 0x11,
+    0x3d, 0x13, 0x3e, 0x14, 0x3d, 0x15, 0x3c, 0x17, 0x3a, 0x17, 0x3a, 0x19,
+    0x3b, 0x19, 0x3c, 0x1a, 0x3c, 0x1c, 0x3b, 0x1c, 0x3b, 0x1d, 0x3a, 0x1f,
+    0x39, 0x1f, 0x39, 0x1f, 0x00, 0xb0, 0x00, 0xa7, 0x00, 0xa0, 0x00, 0x96,
+    0x00, 0x90, 0x00, 0x8a, 0x00, 0x84, 0x01, 0x7e, 0x02, 0x7a, 0x03, 0x77,
+    0x04, 0x74, 0x05, 0x71, 0x06, 0x6c, 0x07, 0x6a, 0x08, 0x68, 0x09, 0x66,
+    0x0a, 0x65, 0x0b, 0x63, 0x0c, 0x63, 0x0c, 0x61, 0x25, 0x5e, 0x27, 0x5c,
+    0x27, 0x5c, 0x29, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x55, 0x2d, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2f, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x00, 0x27, 0x00, 0x4f, 0x00, 0x7f, 0x00, 0x8f, 0x00, 0x96, 0x00, 0x99,
+    0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e,
+    0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x8c, 0x00, 0x63,
+    0x00, 0x7f, 0x00, 0x89, 0x00, 0x90, 0x00, 0x96, 0x00, 0x9b, 0x00, 0x9c,
+    0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e,
+    0x00, 0x9e, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x14, 0x2c, 0x00, 0x57, 0x00, 0x82, 0x00, 0x91, 0x00, 0x96, 0x00, 0x99,
+    0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e,
+    0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x11, 0x31, 0x00, 0x5f,
+    0x00, 0x85, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c,
+    0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e,
+    0x00, 0x9e, 0x00, 0x9e, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0a, 0x45, 0x0b,
+    0x42, 0x0d, 0x42, 0x0e, 0x41, 0x0f, 0x3f, 0x11, 0x3d, 0x12, 0x3d, 0x13,
+    0x3e, 0x15, 0x3c, 0x15, 0x3c, 0x17, 0x3a, 0x17, 0x3a, 0x19, 0x3b, 0x19,
+    0x3c, 0x1a, 0x3c, 0x1c, 0x3b, 0x1c, 0x3b, 0x1d, 0x3a, 0x1f, 0x39, 0x1f,
+    0x00, 0xb1, 0x00, 0xa8, 0x00, 0xa1, 0x00, 0x98, 0x00, 0x91, 0x00, 0x8c,
+    0x00, 0x87, 0x01, 0x80, 0x02, 0x7c, 0x02, 0x79, 0x03, 0x76, 0x05, 0x74,
+    0x05, 0x70, 0x06, 0x6b, 0x07, 0x6a, 0x08, 0x68, 0x09, 0x66, 0x0a, 0x65,
+    0x0b, 0x64, 0x0c, 0x63, 0x25, 0x5e, 0x27, 0x5c, 0x27, 0x5c, 0x29, 0x58,
+    0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x51, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x00, 0x00, 0x00, 0x0d,
+    0x00, 0x4f, 0x00, 0x73, 0x00, 0x84, 0x00, 0x8d, 0x00, 0x92, 0x00, 0x95,
+    0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c,
+    0x00, 0x9c, 0x00, 0x9d, 0x00, 0x63, 0x00, 0x4d, 0x00, 0x60, 0x00, 0x77,
+    0x00, 0x83, 0x00, 0x8c, 0x00, 0x92, 0x00, 0x95, 0x00, 0x98, 0x00, 0x99,
+    0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x01, 0x04, 0x16,
+    0x00, 0x57, 0x00, 0x78, 0x00, 0x87, 0x00, 0x8f, 0x00, 0x94, 0x00, 0x96,
+    0x00, 0x98, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c,
+    0x00, 0x9d, 0x00, 0x9d, 0x23, 0x03, 0x00, 0x20, 0x00, 0x5f, 0x00, 0x7c,
+    0x00, 0x8a, 0x00, 0x91, 0x00, 0x95, 0x00, 0x97, 0x00, 0x99, 0x00, 0x9a,
+    0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9d,
+    0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0a, 0x46, 0x0b, 0x43, 0x0d, 0x41, 0x0e,
+    0x42, 0x0f, 0x40, 0x11, 0x3d, 0x11, 0x3d, 0x13, 0x3f, 0x13, 0x3d, 0x15,
+    0x3c, 0x16, 0x3b, 0x17, 0x3a, 0x18, 0x3a, 0x19, 0x3b, 0x19, 0x3c, 0x1a,
+    0x3c, 0x1c, 0x3b, 0x1c, 0x3b, 0x1d, 0x3b, 0x1e, 0x00, 0xb1, 0x00, 0xa9,
+    0x00, 0xa2, 0x00, 0x9a, 0x00, 0x93, 0x00, 0x8d, 0x00, 0x89, 0x01, 0x83,
+    0x02, 0x7e, 0x02, 0x7a, 0x03, 0x78, 0x03, 0x75, 0x05, 0x73, 0x06, 0x6f,
+    0x06, 0x6b, 0x07, 0x69, 0x08, 0x68, 0x09, 0x66, 0x0a, 0x66, 0x0b, 0x64,
+    0x24, 0x5e, 0x27, 0x5c, 0x27, 0x5c, 0x28, 0x59, 0x2a, 0x57, 0x2a, 0x57,
+    0x2a, 0x57, 0x2b, 0x55, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x50, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x38,
+    0x00, 0x5b, 0x00, 0x6f, 0x00, 0x7c, 0x00, 0x84, 0x00, 0x8a, 0x00, 0x8e,
+    0x00, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99,
+    0x00, 0x7f, 0x00, 0x60, 0x00, 0x24, 0x00, 0x48, 0x00, 0x60, 0x00, 0x70,
+    0x00, 0x7c, 0x00, 0x84, 0x00, 0x8a, 0x00, 0x8e, 0x00, 0x91, 0x00, 0x93,
+    0x00, 0x95, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x27, 0x00, 0x01, 0x12, 0x00, 0x43,
+    0x00, 0x61, 0x00, 0x74, 0x00, 0x7f, 0x00, 0x87, 0x00, 0x8c, 0x00, 0x90,
+    0x00, 0x93, 0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99,
+    0x46, 0x00, 0x1f, 0x00, 0x00, 0x1f, 0x00, 0x4d, 0x00, 0x68, 0x00, 0x79,
+    0x00, 0x83, 0x00, 0x8a, 0x00, 0x8e, 0x00, 0x92, 0x00, 0x94, 0x00, 0x96,
+    0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x41, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x47, 0x0a, 0x46, 0x0b, 0x43, 0x0d, 0x41, 0x0e, 0x42, 0x0f, 0x40, 0x10,
+    0x3e, 0x11, 0x3d, 0x13, 0x3d, 0x13, 0x3f, 0x15, 0x3c, 0x15, 0x3c, 0x17,
+    0x3a, 0x17, 0x3a, 0x18, 0x3b, 0x19, 0x3b, 0x19, 0x3c, 0x1a, 0x3c, 0x1c,
+    0x3b, 0x1c, 0x3b, 0x1c, 0x00, 0xb1, 0x00, 0xa9, 0x00, 0xa3, 0x00, 0x9c,
+    0x00, 0x94, 0x00, 0x8f, 0x00, 0x8b, 0x00, 0x86, 0x01, 0x80, 0x02, 0x7c,
+    0x02, 0x79, 0x03, 0x77, 0x04, 0x75, 0x05, 0x72, 0x06, 0x6e, 0x07, 0x6b,
+    0x07, 0x69, 0x09, 0x68, 0x09, 0x66, 0x0a, 0x66, 0x24, 0x5e, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5a, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57,
+    0x2c, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x50, 0x30, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00, 0x48,
+    0x00, 0x5d, 0x00, 0x6c, 0x00, 0x76, 0x00, 0x7e, 0x00, 0x83, 0x00, 0x88,
+    0x00, 0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x92, 0x00, 0x89, 0x00, 0x77,
+    0x00, 0x48, 0x00, 0x0f, 0x00, 0x30, 0x00, 0x48, 0x00, 0x5d, 0x00, 0x6c,
+    0x00, 0x76, 0x00, 0x7e, 0x00, 0x83, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8e,
+    0x00, 0x90, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x54, 0x00, 0x41, 0x00, 0x17, 0x00, 0x00, 0x10, 0x00, 0x36, 0x00, 0x51,
+    0x00, 0x64, 0x00, 0x71, 0x00, 0x7a, 0x00, 0x81, 0x00, 0x86, 0x00, 0x8a,
+    0x00, 0x8d, 0x00, 0x90, 0x00, 0x92, 0x00, 0x93, 0x52, 0x00, 0x3c, 0x00,
+    0x0d, 0x00, 0x00, 0x1f, 0x00, 0x42, 0x00, 0x5a, 0x00, 0x6a, 0x00, 0x76,
+    0x00, 0x7e, 0x00, 0x84, 0x00, 0x89, 0x00, 0x8c, 0x00, 0x8f, 0x00, 0x91,
+    0x00, 0x93, 0x00, 0x95, 0x41, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d, 0x42, 0x3d, 0x42, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x41, 0x3d,
+    0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x47, 0x0a, 0x46, 0x0b,
+    0x44, 0x0d, 0x42, 0x0d, 0x42, 0x0e, 0x40, 0x0f, 0x40, 0x11, 0x3d, 0x11,
+    0x3d, 0x13, 0x3f, 0x13, 0x3e, 0x15, 0x3c, 0x15, 0x3c, 0x17, 0x3a, 0x17,
+    0x3a, 0x18, 0x3b, 0x19, 0x3c, 0x19, 0x3c, 0x1a, 0x3c, 0x1c, 0x3b, 0x1c,
+    0x00, 0xb2, 0x00, 0xaa, 0x00, 0xa4, 0x00, 0x9e, 0x00, 0x95, 0x00, 0x90,
+    0x00, 0x8c, 0x00, 0x88, 0x01, 0x82, 0x02, 0x7e, 0x02, 0x7b, 0x02, 0x78,
+    0x03, 0x76, 0x05, 0x74, 0x05, 0x71, 0x06, 0x6d, 0x07, 0x6b, 0x07, 0x69,
+    0x09, 0x68, 0x09, 0x66, 0x24, 0x5e, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5b,
+    0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2b, 0x54, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x52, 0x2f, 0x50,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x00, 0x3c, 0x00, 0x4f,
+    0x00, 0x5e, 0x00, 0x69, 0x00, 0x72, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x83,
+    0x00, 0x86, 0x00, 0x89, 0x00, 0x90, 0x00, 0x83, 0x00, 0x60, 0x00, 0x30,
+    0x00, 0x02, 0x00, 0x22, 0x00, 0x3c, 0x00, 0x4f, 0x00, 0x5e, 0x00, 0x69,
+    0x00, 0x72, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x83, 0x00, 0x86, 0x00, 0x89,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x4d, 0x00,
+    0x2f, 0x00, 0x0e, 0x00, 0x00, 0x10, 0x00, 0x2e, 0x00, 0x46, 0x00, 0x57,
+    0x00, 0x64, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x7d, 0x00, 0x81, 0x00, 0x85,
+    0x00, 0x89, 0x00, 0x8b, 0x58, 0x00, 0x4a, 0x00, 0x28, 0x00, 0x02, 0x00,
+    0x00, 0x1f, 0x00, 0x3b, 0x00, 0x4f, 0x00, 0x5f, 0x00, 0x6b, 0x00, 0x74,
+    0x00, 0x7b, 0x00, 0x80, 0x00, 0x85, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8d,
+    0x1b, 0x85, 0x05, 0x96, 0x01, 0x9e, 0x00, 0xa4, 0x00, 0xa7, 0x00, 0xa9,
+    0x00, 0xab, 0x00, 0xac, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xaf,
+    0x00, 0xb0, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb1, 0x00, 0xb1, 0x00, 0xb2,
+    0x00, 0xb2, 0x00, 0xb2, 0x1c, 0x6e, 0x03, 0x8a, 0x00, 0x97, 0x00, 0x9e,
+    0x00, 0xa2, 0x00, 0xa6, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xac,
+    0x00, 0xad, 0x00, 0xad, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xaf,
+    0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x0e, 0x92, 0x01, 0xa1, 0x00, 0xa7, 0x00, 0xaa, 0x00, 0xac, 0x00, 0xae,
+    0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb2,
+    0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xb3, 0x00, 0xb3,
+    0x00, 0xb4, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x33, 0x00, 0x45, 0x00, 0x53,
+    0x00, 0x5e, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x75, 0x00, 0x7a, 0x00, 0x7e,
+    0x00, 0x96, 0x00, 0x8c, 0x00, 0x70, 0x00, 0x48, 0x00, 0x22, 0x00, 0x01,
+    0x00, 0x1c, 0x00, 0x33, 0x00, 0x45, 0x00, 0x53, 0x00, 0x5e, 0x00, 0x68,
+    0x00, 0x6f, 0x00, 0x75, 0x00, 0x7a, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x3e, 0x00, 0x23, 0x00,
+    0x0a, 0x02, 0x00, 0x10, 0x00, 0x29, 0x00, 0x3d, 0x00, 0x4e, 0x00, 0x5b,
+    0x00, 0x65, 0x00, 0x6d, 0x00, 0x74, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x82,
+    0x5a, 0x00, 0x51, 0x00, 0x39, 0x00, 0x1a, 0x00, 0x00, 0x04, 0x00, 0x1f,
+    0x00, 0x36, 0x00, 0x48, 0x00, 0x57, 0x00, 0x62, 0x00, 0x6b, 0x00, 0x73,
+    0x00, 0x79, 0x00, 0x7e, 0x00, 0x82, 0x00, 0x85, 0x27, 0x60, 0x0f, 0x73,
+    0x07, 0x81, 0x03, 0x8a, 0x01, 0x91, 0x00, 0x95, 0x00, 0x99, 0x00, 0x9d,
+    0x00, 0xa0, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7,
+    0x00, 0xa7, 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xaa,
+    0x29, 0x3a, 0x0f, 0x59, 0x06, 0x6c, 0x02, 0x79, 0x00, 0x84, 0x00, 0x8b,
+    0x00, 0x90, 0x00, 0x94, 0x00, 0x98, 0x00, 0x9b, 0x00, 0x9d, 0x00, 0x9f,
+    0x00, 0xa0, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa6,
+    0x00, 0xa7, 0x00, 0xa7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x14, 0x79, 0x07, 0x88,
+    0x03, 0x92, 0x01, 0x98, 0x00, 0x9d, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xa5,
+    0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xac,
+    0x00, 0xad, 0x00, 0xae, 0x00, 0xae, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xaf,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x18, 0x00, 0x2c, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x55,
+    0x00, 0x5f, 0x00, 0x66, 0x00, 0x6d, 0x00, 0x72, 0x00, 0x9b, 0x00, 0x92,
+    0x00, 0x7c, 0x00, 0x5d, 0x00, 0x3c, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x18,
+    0x00, 0x2c, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x55, 0x00, 0x5f, 0x00, 0x66,
+    0x00, 0x6d, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5c, 0x00, 0x56, 0x00, 0x47, 0x00, 0x31, 0x00, 0x1a, 0x00, 0x08, 0x04,
+    0x00, 0x10, 0x00, 0x25, 0x00, 0x37, 0x00, 0x46, 0x00, 0x52, 0x00, 0x5d,
+    0x00, 0x65, 0x00, 0x6c, 0x00, 0x72, 0x00, 0x77, 0x5c, 0x00, 0x55, 0x00,
+    0x43, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x09, 0x00, 0x1f, 0x00, 0x33,
+    0x00, 0x43, 0x00, 0x50, 0x00, 0x5b, 0x00, 0x64, 0x00, 0x6b, 0x00, 0x72,
+    0x00, 0x77, 0x00, 0x7b, 0x2d, 0x54, 0x17, 0x63, 0x0d, 0x6f, 0x07, 0x78,
+    0x04, 0x80, 0x02, 0x86, 0x01, 0x8b, 0x01, 0x8f, 0x00, 0x92, 0x00, 0x95,
+    0x00, 0x98, 0x00, 0x9a, 0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1,
+    0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa4, 0x31, 0x27, 0x18, 0x40,
+    0x0d, 0x52, 0x07, 0x61, 0x04, 0x6c, 0x02, 0x75, 0x01, 0x7c, 0x00, 0x82,
+    0x00, 0x87, 0x00, 0x8b, 0x00, 0x8e, 0x00, 0x91, 0x00, 0x94, 0x00, 0x97,
+    0x00, 0x98, 0x00, 0x99, 0x00, 0x9b, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x18, 0x6f, 0x0c, 0x7b, 0x06, 0x84, 0x03, 0x8c,
+    0x02, 0x91, 0x01, 0x96, 0x00, 0x99, 0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa1,
+    0x00, 0xa2, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa7, 0x00, 0xa7, 0x00, 0xa8,
+    0x00, 0xa9, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xab, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x14, 0x00, 0x26, 0x00, 0x36, 0x00, 0x43, 0x00, 0x4e, 0x00, 0x57,
+    0x00, 0x5f, 0x00, 0x66, 0x00, 0x9c, 0x00, 0x95, 0x00, 0x84, 0x00, 0x6c,
+    0x00, 0x4f, 0x00, 0x32, 0x00, 0x18, 0x00, 0x00, 0x00, 0x14, 0x00, 0x26,
+    0x00, 0x36, 0x00, 0x43, 0x00, 0x4e, 0x00, 0x57, 0x00, 0x5f, 0x00, 0x66,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x59, 0x00,
+    0x4d, 0x00, 0x3b, 0x00, 0x27, 0x00, 0x13, 0x00, 0x07, 0x06, 0x00, 0x10,
+    0x00, 0x22, 0x00, 0x32, 0x00, 0x40, 0x00, 0x4c, 0x00, 0x56, 0x00, 0x5e,
+    0x00, 0x65, 0x00, 0x6b, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x36, 0x00,
+    0x1f, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x1f, 0x00, 0x30, 0x00, 0x3f,
+    0x00, 0x4b, 0x00, 0x55, 0x00, 0x5e, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x71,
+    0x30, 0x4e, 0x1d, 0x5a, 0x12, 0x64, 0x0c, 0x6d, 0x08, 0x75, 0x05, 0x7a,
+    0x03, 0x7f, 0x02, 0x85, 0x02, 0x89, 0x01, 0x8b, 0x00, 0x8e, 0x00, 0x90,
+    0x00, 0x92, 0x00, 0x94, 0x00, 0x97, 0x00, 0x99, 0x00, 0x9b, 0x00, 0x9c,
+    0x00, 0x9e, 0x00, 0x9f, 0x36, 0x1e, 0x1f, 0x32, 0x12, 0x43, 0x0b, 0x50,
+    0x07, 0x5a, 0x05, 0x63, 0x02, 0x6b, 0x01, 0x72, 0x01, 0x78, 0x00, 0x7c,
+    0x00, 0x81, 0x00, 0x85, 0x00, 0x88, 0x00, 0x8b, 0x00, 0x8e, 0x00, 0x90,
+    0x00, 0x91, 0x00, 0x93, 0x00, 0x96, 0x00, 0x97, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x1b, 0x6b, 0x0f, 0x74, 0x09, 0x7d, 0x05, 0x83, 0x03, 0x89, 0x02, 0x8d,
+    0x01, 0x91, 0x00, 0x95, 0x00, 0x98, 0x00, 0x9a, 0x00, 0x9c, 0x00, 0x9e,
+    0x00, 0x9f, 0x00, 0xa1, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5,
+    0x00, 0xa6, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+    0x00, 0x22, 0x00, 0x30, 0x00, 0x3d, 0x00, 0x47, 0x00, 0x50, 0x00, 0x58,
+    0x00, 0x9c, 0x00, 0x98, 0x00, 0x8a, 0x00, 0x76, 0x00, 0x5e, 0x00, 0x45,
+    0x00, 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x12, 0x00, 0x22, 0x00, 0x30,
+    0x00, 0x3d, 0x00, 0x47, 0x00, 0x50, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x51, 0x00, 0x42, 0x00,
+    0x32, 0x00, 0x20, 0x00, 0x0e, 0x00, 0x06, 0x07, 0x00, 0x10, 0x00, 0x20,
+    0x00, 0x2f, 0x00, 0x3b, 0x00, 0x46, 0x00, 0x50, 0x00, 0x58, 0x00, 0x5f,
+    0x5d, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2b, 0x00, 0x17, 0x00,
+    0x03, 0x00, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x2e, 0x00, 0x3b, 0x00, 0x46,
+    0x00, 0x50, 0x00, 0x59, 0x00, 0x60, 0x00, 0x66, 0x33, 0x4b, 0x21, 0x54,
+    0x16, 0x5d, 0x10, 0x65, 0x0b, 0x6c, 0x08, 0x72, 0x06, 0x77, 0x04, 0x7b,
+    0x03, 0x7f, 0x02, 0x83, 0x02, 0x87, 0x01, 0x8a, 0x01, 0x8c, 0x00, 0x8e,
+    0x00, 0x90, 0x00, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x98,
+    0x3a, 0x19, 0x24, 0x2a, 0x18, 0x38, 0x10, 0x44, 0x0b, 0x4e, 0x07, 0x57,
+    0x05, 0x5f, 0x04, 0x65, 0x02, 0x6b, 0x01, 0x71, 0x01, 0x76, 0x00, 0x79,
+    0x00, 0x7e, 0x00, 0x80, 0x00, 0x84, 0x00, 0x87, 0x00, 0x88, 0x00, 0x8b,
+    0x00, 0x8d, 0x00, 0x8f, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x1d, 0x68, 0x12, 0x70,
+    0x0c, 0x77, 0x08, 0x7d, 0x05, 0x82, 0x03, 0x87, 0x02, 0x8b, 0x02, 0x8e,
+    0x01, 0x91, 0x00, 0x94, 0x00, 0x96, 0x00, 0x98, 0x00, 0x9a, 0x00, 0x9b,
+    0x00, 0x9d, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0x2c, 0x00, 0x37, 0x00, 0x41, 0x00, 0x4a, 0x00, 0x9d, 0x00, 0x99,
+    0x00, 0x8e, 0x00, 0x7e, 0x00, 0x69, 0x00, 0x53, 0x00, 0x3c, 0x00, 0x26,
+    0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x2c, 0x00, 0x37,
+    0x00, 0x41, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5b, 0x00, 0x53, 0x00, 0x48, 0x00, 0x3a, 0x00, 0x2a, 0x00,
+    0x1a, 0x00, 0x0b, 0x00, 0x05, 0x08, 0x00, 0x10, 0x00, 0x1e, 0x00, 0x2c,
+    0x00, 0x37, 0x00, 0x42, 0x00, 0x4b, 0x00, 0x53, 0x5e, 0x00, 0x5b, 0x00,
+    0x52, 0x00, 0x45, 0x00, 0x34, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00,
+    0x00, 0x11, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x38, 0x00, 0x43, 0x00, 0x4c,
+    0x00, 0x54, 0x00, 0x5b, 0x34, 0x49, 0x25, 0x51, 0x1a, 0x58, 0x13, 0x60,
+    0x0e, 0x65, 0x0b, 0x6b, 0x08, 0x71, 0x06, 0x75, 0x05, 0x78, 0x04, 0x7b,
+    0x03, 0x7f, 0x02, 0x83, 0x02, 0x86, 0x01, 0x88, 0x01, 0x8a, 0x00, 0x8c,
+    0x00, 0x8d, 0x00, 0x8f, 0x00, 0x90, 0x00, 0x92, 0x3b, 0x17, 0x28, 0x24,
+    0x1c, 0x30, 0x14, 0x3b, 0x0f, 0x45, 0x0b, 0x4d, 0x07, 0x55, 0x05, 0x5b,
+    0x04, 0x61, 0x03, 0x67, 0x02, 0x6b, 0x01, 0x6f, 0x01, 0x74, 0x00, 0x77,
+    0x00, 0x7a, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x83, 0x00, 0x86, 0x00, 0x87,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x1d, 0x67, 0x14, 0x6d, 0x0e, 0x73, 0x0a, 0x79,
+    0x07, 0x7e, 0x05, 0x82, 0x03, 0x86, 0x02, 0x89, 0x02, 0x8c, 0x01, 0x8f,
+    0x01, 0x91, 0x00, 0x93, 0x00, 0x96, 0x00, 0x97, 0x00, 0x99, 0x00, 0x9a,
+    0x00, 0x9b, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x28,
+    0x00, 0x33, 0x00, 0x3d, 0x00, 0x9d, 0x00, 0x9a, 0x00, 0x91, 0x00, 0x83,
+    0x00, 0x72, 0x00, 0x5e, 0x00, 0x4a, 0x00, 0x36, 0x00, 0x22, 0x00, 0x10,
+    0x00, 0x00, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x28, 0x00, 0x33, 0x00, 0x3d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00,
+    0x56, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x32, 0x00, 0x24, 0x00, 0x15, 0x00,
+    0x0a, 0x02, 0x04, 0x09, 0x00, 0x10, 0x00, 0x1d, 0x00, 0x29, 0x00, 0x34,
+    0x00, 0x3e, 0x00, 0x46, 0x5e, 0x00, 0x5b, 0x00, 0x54, 0x00, 0x49, 0x00,
+    0x3b, 0x00, 0x2c, 0x00, 0x1b, 0x00, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x12,
+    0x00, 0x1f, 0x00, 0x2b, 0x00, 0x36, 0x00, 0x40, 0x00, 0x49, 0x00, 0x50,
+    0x36, 0x47, 0x27, 0x4e, 0x1d, 0x54, 0x16, 0x5b, 0x11, 0x61, 0x0e, 0x65,
+    0x0b, 0x6a, 0x08, 0x6f, 0x07, 0x73, 0x05, 0x76, 0x05, 0x79, 0x03, 0x7c,
+    0x02, 0x7e, 0x02, 0x82, 0x02, 0x85, 0x01, 0x88, 0x01, 0x89, 0x01, 0x8b,
+    0x00, 0x8c, 0x00, 0x8d, 0x3d, 0x14, 0x2c, 0x20, 0x20, 0x2a, 0x18, 0x34,
+    0x12, 0x3e, 0x0e, 0x45, 0x0a, 0x4c, 0x07, 0x53, 0x06, 0x58, 0x05, 0x5e,
+    0x04, 0x63, 0x02, 0x67, 0x02, 0x6c, 0x01, 0x6f, 0x01, 0x72, 0x00, 0x76,
+    0x00, 0x78, 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x80, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x1e, 0x66, 0x16, 0x6b, 0x10, 0x71, 0x0c, 0x76, 0x09, 0x7a, 0x07, 0x7e,
+    0x05, 0x81, 0x03, 0x85, 0x03, 0x88, 0x02, 0x8b, 0x02, 0x8d, 0x01, 0x8f,
+    0x01, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x96, 0x00, 0x98, 0x00, 0x99,
+    0x00, 0x9a, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x1a, 0x00, 0x25, 0x00, 0x2f,
+    0x00, 0x9e, 0x00, 0x9b, 0x00, 0x93, 0x00, 0x88, 0x00, 0x79, 0x00, 0x68,
+    0x00, 0x55, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00,
+    0x00, 0x0d, 0x00, 0x1a, 0x00, 0x25, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f, 0x00,
+    0x44, 0x00, 0x38, 0x00, 0x2c, 0x00, 0x1f, 0x00, 0x12, 0x00, 0x09, 0x03,
+    0x04, 0x09, 0x00, 0x10, 0x00, 0x1c, 0x00, 0x27, 0x00, 0x31, 0x00, 0x3a,
+    0x5e, 0x00, 0x5c, 0x00, 0x56, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x33, 0x00,
+    0x24, 0x00, 0x15, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, 0x13, 0x00, 0x1f,
+    0x00, 0x2a, 0x00, 0x34, 0x00, 0x3d, 0x00, 0x46, 0x37, 0x46, 0x29, 0x4c,
+    0x20, 0x52, 0x19, 0x57, 0x14, 0x5d, 0x10, 0x62, 0x0d, 0x66, 0x0b, 0x69,
+    0x09, 0x6e, 0x07, 0x73, 0x06, 0x75, 0x05, 0x77, 0x04, 0x7a, 0x03, 0x7c,
+    0x02, 0x7e, 0x02, 0x82, 0x02, 0x84, 0x02, 0x87, 0x01, 0x88, 0x01, 0x89,
+    0x3f, 0x13, 0x2f, 0x1c, 0x23, 0x27, 0x1b, 0x2f, 0x15, 0x38, 0x10, 0x3e,
+    0x0d, 0x45, 0x0a, 0x4b, 0x08, 0x51, 0x07, 0x57, 0x05, 0x5c, 0x04, 0x60,
+    0x03, 0x65, 0x02, 0x67, 0x02, 0x6c, 0x01, 0x6f, 0x01, 0x71, 0x00, 0x75,
+    0x00, 0x77, 0x00, 0x79, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x1f, 0x65, 0x17, 0x6a,
+    0x11, 0x6f, 0x0d, 0x73, 0x0a, 0x77, 0x08, 0x7b, 0x06, 0x7e, 0x05, 0x81,
+    0x04, 0x84, 0x03, 0x87, 0x02, 0x89, 0x02, 0x8b, 0x01, 0x8e, 0x01, 0x8f,
+    0x01, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x22, 0x00, 0x9e, 0x00, 0x9c,
+    0x00, 0x95, 0x00, 0x8b, 0x00, 0x7e, 0x00, 0x6f, 0x00, 0x5f, 0x00, 0x4e,
+    0x00, 0x3d, 0x00, 0x2c, 0x00, 0x1c, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c,
+    0x00, 0x18, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e, 0x00,
+    0x32, 0x00, 0x26, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x08, 0x04, 0x04, 0x0a,
+    0x00, 0x10, 0x00, 0x1b, 0x00, 0x25, 0x00, 0x2f, 0x5e, 0x00, 0x5d, 0x00,
+    0x57, 0x00, 0x4f, 0x00, 0x45, 0x00, 0x39, 0x00, 0x2c, 0x00, 0x1e, 0x00,
+    0x10, 0x00, 0x03, 0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x2a,
+    0x00, 0x33, 0x00, 0x3b, 0x38, 0x45, 0x2b, 0x4a, 0x22, 0x50, 0x1c, 0x55,
+    0x16, 0x59, 0x12, 0x5f, 0x0f, 0x63, 0x0d, 0x66, 0x0b, 0x69, 0x09, 0x6e,
+    0x07, 0x71, 0x06, 0x74, 0x05, 0x76, 0x05, 0x78, 0x03, 0x7a, 0x03, 0x7c,
+    0x02, 0x7e, 0x02, 0x81, 0x02, 0x84, 0x02, 0x86, 0x40, 0x11, 0x31, 0x1b,
+    0x26, 0x23, 0x1e, 0x2b, 0x18, 0x33, 0x13, 0x39, 0x0f, 0x40, 0x0c, 0x45,
+    0x0a, 0x4b, 0x08, 0x51, 0x07, 0x56, 0x05, 0x59, 0x04, 0x5e, 0x04, 0x61,
+    0x02, 0x65, 0x02, 0x68, 0x02, 0x6b, 0x01, 0x6e, 0x01, 0x71, 0x00, 0x73,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x20, 0x64, 0x18, 0x69, 0x13, 0x6d, 0x0f, 0x71,
+    0x0c, 0x75, 0x09, 0x78, 0x07, 0x7b, 0x06, 0x7e, 0x05, 0x81, 0x04, 0x84,
+    0x03, 0x86, 0x02, 0x88, 0x02, 0x8a, 0x02, 0x8c, 0x01, 0x8e, 0x01, 0x8f,
+    0x01, 0x91, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x0b, 0x00, 0x16, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x8e,
+    0x00, 0x83, 0x00, 0x75, 0x00, 0x66, 0x00, 0x57, 0x00, 0x47, 0x00, 0x37,
+    0x00, 0x28, 0x00, 0x1a, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x16,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00,
+    0x59, 0x00, 0x53, 0x00, 0x4b, 0x00, 0x42, 0x00, 0x38, 0x00, 0x2d, 0x00,
+    0x22, 0x00, 0x17, 0x00, 0x0c, 0x00, 0x07, 0x05, 0x03, 0x0a, 0x00, 0x0f,
+    0x00, 0x1a, 0x00, 0x24, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x52, 0x00,
+    0x49, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x25, 0x00, 0x19, 0x00, 0x0c, 0x00,
+    0x00, 0x00, 0x00, 0x0a, 0x00, 0x15, 0x00, 0x1f, 0x00, 0x29, 0x00, 0x31,
+    0x38, 0x45, 0x2d, 0x49, 0x24, 0x4e, 0x1e, 0x53, 0x19, 0x56, 0x14, 0x5b,
+    0x11, 0x60, 0x0e, 0x63, 0x0c, 0x66, 0x0a, 0x69, 0x09, 0x6c, 0x07, 0x70,
+    0x06, 0x73, 0x06, 0x75, 0x05, 0x77, 0x04, 0x79, 0x03, 0x7a, 0x03, 0x7c,
+    0x02, 0x7e, 0x02, 0x80, 0x40, 0x11, 0x32, 0x18, 0x28, 0x20, 0x20, 0x28,
+    0x1a, 0x2f, 0x16, 0x35, 0x12, 0x3c, 0x0f, 0x41, 0x0c, 0x46, 0x0a, 0x4b,
+    0x08, 0x50, 0x07, 0x54, 0x05, 0x58, 0x05, 0x5c, 0x04, 0x5f, 0x04, 0x62,
+    0x02, 0x66, 0x02, 0x69, 0x01, 0x6b, 0x01, 0x6e, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x20, 0x64, 0x19, 0x68, 0x14, 0x6b, 0x10, 0x6f, 0x0d, 0x73, 0x0b, 0x76,
+    0x09, 0x79, 0x07, 0x7c, 0x06, 0x7e, 0x05, 0x81, 0x04, 0x83, 0x03, 0x85,
+    0x02, 0x88, 0x02, 0x89, 0x02, 0x8b, 0x02, 0x8d, 0x01, 0x8e, 0x01, 0x90,
+    0x00, 0x91, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
+    0x00, 0x9e, 0x00, 0x9c, 0x00, 0x98, 0x00, 0x90, 0x00, 0x86, 0x00, 0x7a,
+    0x00, 0x6d, 0x00, 0x5f, 0x00, 0x50, 0x00, 0x41, 0x00, 0x33, 0x00, 0x25,
+    0x00, 0x18, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00,
+    0x4e, 0x00, 0x45, 0x00, 0x3c, 0x00, 0x32, 0x00, 0x28, 0x00, 0x1e, 0x00,
+    0x14, 0x00, 0x0b, 0x00, 0x07, 0x06, 0x03, 0x0b, 0x00, 0x0f, 0x00, 0x19,
+    0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00, 0x4b, 0x00, 0x42, 0x00,
+    0x37, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x01,
+    0x00, 0x0c, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x28, 0x39, 0x44, 0x2e, 0x49,
+    0x26, 0x4c, 0x1f, 0x52, 0x1a, 0x55, 0x16, 0x58, 0x13, 0x5d, 0x10, 0x61,
+    0x0e, 0x64, 0x0c, 0x66, 0x0a, 0x68, 0x09, 0x6c, 0x07, 0x70, 0x07, 0x72,
+    0x06, 0x74, 0x05, 0x76, 0x05, 0x78, 0x03, 0x79, 0x03, 0x7b, 0x02, 0x7c,
+    0x41, 0x10, 0x34, 0x17, 0x2a, 0x1e, 0x23, 0x25, 0x1d, 0x2c, 0x18, 0x32,
+    0x14, 0x37, 0x10, 0x3d, 0x0e, 0x42, 0x0c, 0x46, 0x0a, 0x4b, 0x08, 0x4f,
+    0x07, 0x53, 0x05, 0x57, 0x05, 0x5a, 0x04, 0x5e, 0x04, 0x61, 0x03, 0x63,
+    0x02, 0x66, 0x02, 0x69, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x20, 0x63, 0x1a, 0x67,
+    0x15, 0x6a, 0x11, 0x6e, 0x0e, 0x71, 0x0c, 0x74, 0x0a, 0x77, 0x08, 0x7a,
+    0x07, 0x7c, 0x06, 0x7f, 0x05, 0x81, 0x04, 0x83, 0x03, 0x85, 0x02, 0x87,
+    0x02, 0x88, 0x02, 0x8a, 0x02, 0x8c, 0x01, 0x8d, 0x01, 0x8e, 0x01, 0x90,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d,
+    0x00, 0x99, 0x00, 0x92, 0x00, 0x89, 0x00, 0x7e, 0x00, 0x72, 0x00, 0x66,
+    0x00, 0x58, 0x00, 0x4a, 0x00, 0x3d, 0x00, 0x2f, 0x00, 0x22, 0x00, 0x16,
+    0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5f, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x48, 0x00,
+    0x40, 0x00, 0x37, 0x00, 0x2d, 0x00, 0x24, 0x00, 0x1a, 0x00, 0x11, 0x00,
+    0x0a, 0x01, 0x06, 0x06, 0x03, 0x0b, 0x00, 0x0f, 0x5f, 0x00, 0x5d, 0x00,
+    0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x45, 0x00, 0x3c, 0x00, 0x31, 0x00,
+    0x26, 0x00, 0x1b, 0x00, 0x11, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0d,
+    0x00, 0x17, 0x00, 0x1f, 0x39, 0x43, 0x2f, 0x48, 0x27, 0x4b, 0x22, 0x4f,
+    0x1c, 0x54, 0x18, 0x56, 0x14, 0x59, 0x12, 0x5e, 0x0f, 0x62, 0x0d, 0x64,
+    0x0c, 0x66, 0x0a, 0x68, 0x09, 0x6b, 0x08, 0x6f, 0x07, 0x72, 0x06, 0x74,
+    0x05, 0x75, 0x05, 0x77, 0x04, 0x78, 0x03, 0x7a, 0x42, 0x0f, 0x36, 0x16,
+    0x2c, 0x1c, 0x25, 0x23, 0x1f, 0x29, 0x1a, 0x2e, 0x16, 0x34, 0x12, 0x39,
+    0x0f, 0x3e, 0x0d, 0x42, 0x0c, 0x47, 0x0a, 0x4b, 0x08, 0x4f, 0x07, 0x52,
+    0x05, 0x56, 0x05, 0x59, 0x04, 0x5c, 0x04, 0x5f, 0x04, 0x62, 0x02, 0x64,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x21, 0x63, 0x1b, 0x66, 0x16, 0x6a, 0x12, 0x6d,
+    0x0f, 0x70, 0x0d, 0x73, 0x0b, 0x75, 0x09, 0x78, 0x07, 0x7a, 0x06, 0x7d,
+    0x06, 0x7f, 0x05, 0x81, 0x04, 0x83, 0x03, 0x85, 0x02, 0x86, 0x02, 0x88,
+    0x02, 0x89, 0x02, 0x8b, 0x02, 0x8c, 0x01, 0x8d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3a, 0x43, 0x31, 0x48, 0x29, 0x4a, 0x23, 0x4d, 0x1e, 0x53, 0x1a, 0x55,
+    0x16, 0x57, 0x13, 0x5b, 0x11, 0x60, 0x0f, 0x62, 0x0d, 0x64, 0x0b, 0x66,
+    0x0a, 0x68, 0x09, 0x6a, 0x08, 0x6e, 0x07, 0x71, 0x06, 0x73, 0x06, 0x75,
+    0x05, 0x76, 0x05, 0x78, 0x43, 0x0f, 0x37, 0x15, 0x2e, 0x1b, 0x27, 0x21,
+    0x21, 0x26, 0x1c, 0x2c, 0x18, 0x31, 0x15, 0x36, 0x12, 0x3a, 0x0f, 0x3f,
+    0x0c, 0x43, 0x0c, 0x47, 0x0a, 0x4b, 0x08, 0x4e, 0x07, 0x52, 0x06, 0x55,
+    0x05, 0x58, 0x05, 0x5b, 0x04, 0x5d, 0x04, 0x60, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x21, 0x63, 0x1b, 0x66, 0x17, 0x69, 0x13, 0x6c, 0x10, 0x6e, 0x0e, 0x71,
+    0x0c, 0x74, 0x0a, 0x76, 0x09, 0x79, 0x07, 0x7b, 0x06, 0x7d, 0x06, 0x7f,
+    0x05, 0x81, 0x04, 0x82, 0x03, 0x84, 0x03, 0x86, 0x02, 0x87, 0x02, 0x89,
+    0x02, 0x8a, 0x02, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x42, 0x31, 0x47,
+    0x2a, 0x49, 0x24, 0x4c, 0x1f, 0x51, 0x1b, 0x54, 0x18, 0x56, 0x15, 0x58,
+    0x12, 0x5c, 0x10, 0x61, 0x0e, 0x63, 0x0c, 0x64, 0x0b, 0x66, 0x0a, 0x68,
+    0x09, 0x6a, 0x08, 0x6d, 0x07, 0x71, 0x06, 0x72, 0x06, 0x74, 0x05, 0x75,
+    0x43, 0x0f, 0x38, 0x14, 0x2f, 0x19, 0x28, 0x1f, 0x22, 0x24, 0x1d, 0x29,
+    0x19, 0x2e, 0x16, 0x33, 0x12, 0x37, 0x11, 0x3b, 0x0f, 0x40, 0x0c, 0x43,
+    0x0b, 0x47, 0x0a, 0x4b, 0x09, 0x4e, 0x07, 0x51, 0x07, 0x55, 0x05, 0x56,
+    0x05, 0x5a, 0x04, 0x5c, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x21, 0x63, 0x1c, 0x65,
+    0x17, 0x68, 0x14, 0x6b, 0x11, 0x6e, 0x0e, 0x70, 0x0c, 0x73, 0x0b, 0x75,
+    0x09, 0x77, 0x08, 0x79, 0x07, 0x7b, 0x06, 0x7d, 0x05, 0x7f, 0x05, 0x81,
+    0x04, 0x82, 0x03, 0x84, 0x03, 0x86, 0x02, 0x87, 0x02, 0x88, 0x02, 0x89,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3a, 0x42, 0x32, 0x46, 0x2b, 0x49, 0x25, 0x4b,
+    0x21, 0x4f, 0x1d, 0x53, 0x19, 0x55, 0x16, 0x57, 0x14, 0x59, 0x11, 0x5e,
+    0x10, 0x61, 0x0e, 0x63, 0x0c, 0x65, 0x0b, 0x66, 0x0a, 0x68, 0x09, 0x6a,
+    0x08, 0x6c, 0x07, 0x70, 0x07, 0x72, 0x06, 0x73, 0x43, 0x0e, 0x39, 0x13,
+    0x31, 0x18, 0x2a, 0x1d, 0x24, 0x22, 0x1f, 0x27, 0x1b, 0x2b, 0x18, 0x30,
+    0x16, 0x35, 0x12, 0x39, 0x0f, 0x3c, 0x0f, 0x41, 0x0c, 0x44, 0x0b, 0x47,
+    0x0a, 0x4a, 0x09, 0x4e, 0x07, 0x50, 0x07, 0x54, 0x05, 0x55, 0x05, 0x59,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x21, 0x63, 0x1c, 0x65, 0x18, 0x68, 0x15, 0x6a,
+    0x12, 0x6c, 0x0f, 0x6f, 0x0d, 0x71, 0x0c, 0x73, 0x0b, 0x76, 0x09, 0x78,
+    0x07, 0x79, 0x07, 0x7c, 0x06, 0x7d, 0x05, 0x7f, 0x05, 0x81, 0x04, 0x82,
+    0x03, 0x84, 0x03, 0x85, 0x02, 0x86, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x42, 0x33, 0x45, 0x2c, 0x49, 0x27, 0x4b, 0x22, 0x4d, 0x1e, 0x52,
+    0x1b, 0x54, 0x18, 0x56, 0x15, 0x58, 0x13, 0x5b, 0x10, 0x5f, 0x0f, 0x61,
+    0x0e, 0x63, 0x0c, 0x65, 0x0b, 0x66, 0x0a, 0x68, 0x09, 0x69, 0x08, 0x6c,
+    0x07, 0x6f, 0x07, 0x72, 0x44, 0x0e, 0x3a, 0x12, 0x32, 0x17, 0x2b, 0x1c,
+    0x26, 0x21, 0x21, 0x26, 0x1d, 0x2a, 0x19, 0x2e, 0x16, 0x32, 0x14, 0x35,
+    0x12, 0x3a, 0x0f, 0x3d, 0x0e, 0x41, 0x0c, 0x44, 0x0b, 0x47, 0x0a, 0x4a,
+    0x09, 0x4e, 0x07, 0x4f, 0x07, 0x53, 0x05, 0x55, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x22, 0x62, 0x1d, 0x65, 0x19, 0x67, 0x15, 0x6a, 0x13, 0x6c, 0x10, 0x6e,
+    0x0e, 0x71, 0x0c, 0x73, 0x0b, 0x74, 0x0a, 0x76, 0x09, 0x79, 0x07, 0x7a,
+    0x07, 0x7c, 0x06, 0x7d, 0x05, 0x7f, 0x05, 0x81, 0x04, 0x82, 0x03, 0x83,
+    0x03, 0x85, 0x02, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x42, 0x33, 0x44,
+    0x2d, 0x48, 0x28, 0x4a, 0x23, 0x4c, 0x1f, 0x50, 0x1c, 0x53, 0x19, 0x55,
+    0x16, 0x57, 0x14, 0x58, 0x12, 0x5c, 0x10, 0x60, 0x0e, 0x62, 0x0d, 0x63,
+    0x0c, 0x65, 0x0b, 0x66, 0x0a, 0x68, 0x09, 0x69, 0x09, 0x6b, 0x07, 0x6e,
+    0x44, 0x0d, 0x3a, 0x12, 0x33, 0x16, 0x2c, 0x1b, 0x27, 0x1f, 0x21, 0x24,
+    0x1e, 0x28, 0x1a, 0x2b, 0x18, 0x30, 0x16, 0x34, 0x12, 0x37, 0x11, 0x3b,
+    0x0f, 0x3e, 0x0d, 0x41, 0x0c, 0x45, 0x0a, 0x47, 0x0a, 0x4a, 0x09, 0x4e,
+    0x07, 0x4f, 0x07, 0x53, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x22, 0x62, 0x1d, 0x65,
+    0x19, 0x66, 0x16, 0x69, 0x13, 0x6b, 0x10, 0x6d, 0x0f, 0x6f, 0x0d, 0x71,
+    0x0c, 0x73, 0x0b, 0x76, 0x09, 0x77, 0x08, 0x79, 0x07, 0x7a, 0x06, 0x7c,
+    0x06, 0x7e, 0x05, 0x7f, 0x05, 0x80, 0x04, 0x82, 0x03, 0x83, 0x03, 0x85,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3b, 0x42, 0x34, 0x44, 0x2e, 0x48, 0x29, 0x49,
+    0x24, 0x4b, 0x20, 0x4f, 0x1d, 0x53, 0x1a, 0x55, 0x18, 0x56, 0x15, 0x58,
+    0x13, 0x59, 0x11, 0x5d, 0x10, 0x61, 0x0e, 0x62, 0x0d, 0x63, 0x0c, 0x65,
+    0x0b, 0x66, 0x0a, 0x68, 0x09, 0x69, 0x09, 0x6b, 0x44, 0x0d, 0x3b, 0x12,
+    0x34, 0x16, 0x2e, 0x19, 0x28, 0x1e, 0x23, 0x22, 0x20, 0x26, 0x1d, 0x2b,
+    0x19, 0x2e, 0x16, 0x31, 0x14, 0x35, 0x12, 0x38, 0x0f, 0x3b, 0x0f, 0x3f,
+    0x0c, 0x41, 0x0c, 0x45, 0x0a, 0x47, 0x0a, 0x4a, 0x09, 0x4e, 0x07, 0x4e,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x22, 0x62, 0x1d, 0x64, 0x1a, 0x66, 0x17, 0x68,
+    0x14, 0x6a, 0x11, 0x6c, 0x10, 0x6e, 0x0e, 0x71, 0x0c, 0x73, 0x0b, 0x74,
+    0x0a, 0x76, 0x09, 0x78, 0x07, 0x79, 0x07, 0x7b, 0x06, 0x7c, 0x06, 0x7e,
+    0x05, 0x7f, 0x05, 0x80, 0x04, 0x82, 0x03, 0x82, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3b, 0x42, 0x34, 0x43, 0x2f, 0x48, 0x29, 0x49, 0x25, 0x4b, 0x21, 0x4d,
+    0x1e, 0x51, 0x1b, 0x54, 0x18, 0x55, 0x16, 0x56, 0x14, 0x58, 0x13, 0x5b,
+    0x10, 0x5e, 0x0f, 0x61, 0x0e, 0x63, 0x0c, 0x64, 0x0c, 0x66, 0x0b, 0x66,
+    0x0a, 0x68, 0x09, 0x69, 0x44, 0x0c, 0x3c, 0x11, 0x35, 0x16, 0x2f, 0x19,
+    0x2a, 0x1d, 0x25, 0x22, 0x21, 0x25, 0x1d, 0x29, 0x1a, 0x2b, 0x18, 0x30,
+    0x16, 0x33, 0x12, 0x35, 0x12, 0x3a, 0x0f, 0x3c, 0x0f, 0x40, 0x0c, 0x41,
+    0x0c, 0x45, 0x0a, 0x47, 0x0a, 0x4a, 0x09, 0x4e, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x22, 0x62, 0x1e, 0x64, 0x1a, 0x66, 0x17, 0x68, 0x15, 0x6a, 0x12, 0x6c,
+    0x10, 0x6e, 0x0e, 0x70, 0x0d, 0x71, 0x0c, 0x73, 0x0b, 0x75, 0x09, 0x76,
+    0x09, 0x78, 0x07, 0x79, 0x07, 0x7b, 0x06, 0x7c, 0x06, 0x7e, 0x05, 0x7f,
+    0x05, 0x80, 0x04, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x42, 0x35, 0x43,
+    0x2f, 0x47, 0x2b, 0x49, 0x26, 0x4b, 0x22, 0x4c, 0x1f, 0x4f, 0x1c, 0x53,
+    0x1a, 0x55, 0x18, 0x56, 0x15, 0x58, 0x13, 0x59, 0x12, 0x5c, 0x10, 0x60,
+    0x0f, 0x61, 0x0e, 0x63, 0x0c, 0x64, 0x0c, 0x66, 0x0b, 0x66, 0x0a, 0x68,
+    0x44, 0x0c, 0x3c, 0x10, 0x35, 0x15, 0x30, 0x19, 0x2b, 0x1c, 0x26, 0x20,
+    0x21, 0x23, 0x1e, 0x26, 0x1c, 0x2b, 0x19, 0x2e, 0x16, 0x30, 0x15, 0x35,
+    0x12, 0x37, 0x11, 0x3b, 0x0f, 0x3d, 0x0f, 0x41, 0x0c, 0x42, 0x0c, 0x46,
+    0x0a, 0x47, 0x0a, 0x4a, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7,
+    0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x00, 0xb7, 0x22, 0x62, 0x1e, 0x64,
+    0x1a, 0x66, 0x18, 0x68, 0x15, 0x6a, 0x13, 0x6b, 0x10, 0x6d, 0x0f, 0x6e,
+    0x0e, 0x71, 0x0c, 0x72, 0x0b, 0x74, 0x0a, 0x76, 0x09, 0x77, 0x08, 0x79,
+    0x07, 0x7a, 0x07, 0x7c, 0x06, 0x7c, 0x06, 0x7e, 0x05, 0x7f, 0x05, 0x80,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x44, 0x09, 0x43, 0x09, 0x44, 0x09, 0x45, 0x09,
+    0x45, 0x09, 0x46, 0x09, 0x46, 0x09, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0x22, 0x1c, 0x0a, 0x29, 0x0a, 0x31, 0x09, 0x36, 0x09, 0x3a, 0x09,
+    0x3b, 0x09, 0x3d, 0x09, 0x3f, 0x09, 0x40, 0x09, 0x40, 0x09, 0x41, 0x09,
+    0x42, 0x09, 0x43, 0x09, 0x43, 0x0a, 0x43, 0x0a, 0x44, 0x0a, 0x44, 0x0a,
+    0x44, 0x0a, 0x44, 0x0a, 0x23, 0x16, 0x32, 0x0a, 0x38, 0x0a, 0x3c, 0x0a,
+    0x3f, 0x09, 0x40, 0x09, 0x41, 0x09, 0x42, 0x09, 0x43, 0x09, 0x44, 0x09,
+    0x44, 0x0a, 0x44, 0x0a, 0x44, 0x0a, 0x45, 0x0a, 0x45, 0x0a, 0x45, 0x0a,
+    0x45, 0x0a, 0x45, 0x0a, 0x45, 0x0a, 0x46, 0x0a, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3f, 0x16, 0x3e, 0x11, 0x3f, 0x0f, 0x40, 0x0d, 0x41, 0x0d, 0x41, 0x0c,
+    0x42, 0x0c, 0x43, 0x0b, 0x43, 0x0b, 0x43, 0x0b, 0x43, 0x0b, 0x44, 0x0a,
+    0x44, 0x0a, 0x45, 0x0a, 0x45, 0x0a, 0x45, 0x0a, 0x46, 0x0a, 0x46, 0x0a,
+    0x46, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0x6e, 0x03, 0x3a,
+    0x0f, 0x27, 0x18, 0x1e, 0x1f, 0x19, 0x24, 0x17, 0x28, 0x14, 0x2c, 0x13,
+    0x2f, 0x11, 0x31, 0x11, 0x32, 0x10, 0x34, 0x0f, 0x36, 0x0f, 0x37, 0x0f,
+    0x38, 0x0e, 0x39, 0x0e, 0x3a, 0x0d, 0x3a, 0x0d, 0x3b, 0x0c, 0x3c, 0x0c,
+    0x23, 0x3c, 0x25, 0x22, 0x2b, 0x18, 0x30, 0x14, 0x33, 0x11, 0x36, 0x10,
+    0x38, 0x0f, 0x39, 0x0e, 0x3b, 0x0e, 0x3c, 0x0d, 0x3d, 0x0d, 0x3e, 0x0c,
+    0x3f, 0x0c, 0x3f, 0x0c, 0x40, 0x0c, 0x40, 0x0c, 0x40, 0x0b, 0x41, 0x0b,
+    0x41, 0x0b, 0x42, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x1f, 0x3c, 0x18,
+    0x3c, 0x14, 0x3d, 0x11, 0x3e, 0x11, 0x3f, 0x0f, 0x3f, 0x0e, 0x40, 0x0e,
+    0x41, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0c, 0x42, 0x0c,
+    0x42, 0x0b, 0x42, 0x0b, 0x43, 0x0b, 0x43, 0x0b, 0x44, 0x0b, 0x44, 0x0b,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0x8a, 0x00, 0x59, 0x06, 0x40, 0x0d, 0x32,
+    0x12, 0x2a, 0x18, 0x24, 0x1c, 0x20, 0x20, 0x1c, 0x23, 0x1b, 0x26, 0x18,
+    0x28, 0x17, 0x2a, 0x16, 0x2c, 0x15, 0x2e, 0x14, 0x2f, 0x13, 0x31, 0x12,
+    0x32, 0x12, 0x33, 0x12, 0x34, 0x11, 0x35, 0x10, 0x23, 0x4a, 0x24, 0x31,
+    0x27, 0x25, 0x2a, 0x1e, 0x2d, 0x1a, 0x2f, 0x17, 0x32, 0x15, 0x33, 0x13,
+    0x35, 0x12, 0x36, 0x11, 0x38, 0x10, 0x39, 0x10, 0x3a, 0x0f, 0x3a, 0x0f,
+    0x3b, 0x0e, 0x3c, 0x0e, 0x3c, 0x0e, 0x3d, 0x0e, 0x3e, 0x0d, 0x3e, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x25, 0x3c, 0x1d, 0x3c, 0x19, 0x3c, 0x16,
+    0x3d, 0x14, 0x3d, 0x12, 0x3f, 0x11, 0x3f, 0x10, 0x3f, 0x0f, 0x3f, 0x0f,
+    0x40, 0x0e, 0x41, 0x0e, 0x41, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0d,
+    0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0d, 0x42, 0x0c, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0x97, 0x00, 0x6c, 0x02, 0x52, 0x07, 0x43, 0x0b, 0x38, 0x10, 0x30,
+    0x14, 0x2a, 0x18, 0x27, 0x1b, 0x23, 0x1e, 0x20, 0x20, 0x1e, 0x23, 0x1c,
+    0x25, 0x1b, 0x27, 0x19, 0x28, 0x18, 0x2a, 0x17, 0x2b, 0x16, 0x2c, 0x16,
+    0x2e, 0x16, 0x2f, 0x15, 0x23, 0x50, 0x23, 0x3b, 0x25, 0x2e, 0x27, 0x26,
+    0x29, 0x21, 0x2c, 0x1d, 0x2e, 0x1a, 0x2f, 0x18, 0x31, 0x16, 0x33, 0x15,
+    0x34, 0x14, 0x35, 0x13, 0x36, 0x12, 0x37, 0x11, 0x38, 0x11, 0x38, 0x11,
+    0x39, 0x10, 0x3a, 0x10, 0x3a, 0x10, 0x3b, 0x0f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x29, 0x3c, 0x22, 0x3b, 0x1d, 0x3b, 0x19, 0x3c, 0x17, 0x3c, 0x15,
+    0x3c, 0x13, 0x3d, 0x12, 0x3f, 0x11, 0x3f, 0x11, 0x3e, 0x10, 0x3e, 0x0f,
+    0x3f, 0x0f, 0x40, 0x0e, 0x40, 0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x42, 0x0d,
+    0x42, 0x0d, 0x42, 0x0d, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0x9e, 0x00, 0x79,
+    0x00, 0x61, 0x04, 0x50, 0x07, 0x44, 0x0b, 0x3b, 0x0f, 0x34, 0x12, 0x2f,
+    0x15, 0x2b, 0x18, 0x28, 0x1a, 0x25, 0x1d, 0x23, 0x1f, 0x21, 0x21, 0x1f,
+    0x22, 0x1d, 0x24, 0x1c, 0x26, 0x1b, 0x27, 0x19, 0x28, 0x19, 0x2a, 0x19,
+    0x23, 0x54, 0x23, 0x42, 0x24, 0x35, 0x25, 0x2d, 0x27, 0x27, 0x29, 0x22,
+    0x2b, 0x1f, 0x2d, 0x1c, 0x2e, 0x1a, 0x30, 0x19, 0x31, 0x17, 0x32, 0x16,
+    0x33, 0x15, 0x34, 0x14, 0x35, 0x13, 0x36, 0x13, 0x37, 0x12, 0x37, 0x11,
+    0x38, 0x11, 0x38, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x2c, 0x3c, 0x25,
+    0x3b, 0x20, 0x3b, 0x1d, 0x3b, 0x1a, 0x3c, 0x17, 0x3c, 0x16, 0x3c, 0x14,
+    0x3c, 0x13, 0x3e, 0x12, 0x3f, 0x11, 0x3f, 0x11, 0x3f, 0x11, 0x3d, 0x10,
+    0x3e, 0x0f, 0x3f, 0x0f, 0x40, 0x0f, 0x40, 0x0e, 0x40, 0x0e, 0x41, 0x0e,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0xa2, 0x00, 0x84, 0x00, 0x6c, 0x02, 0x5a,
+    0x05, 0x4e, 0x07, 0x45, 0x0b, 0x3e, 0x0e, 0x38, 0x10, 0x33, 0x13, 0x2f,
+    0x16, 0x2c, 0x18, 0x29, 0x1a, 0x26, 0x1c, 0x24, 0x1d, 0x22, 0x1f, 0x21,
+    0x21, 0x1f, 0x21, 0x1e, 0x23, 0x1d, 0x25, 0x1c, 0x23, 0x56, 0x23, 0x47,
+    0x23, 0x3b, 0x24, 0x32, 0x26, 0x2c, 0x27, 0x27, 0x29, 0x24, 0x2a, 0x21,
+    0x2c, 0x1e, 0x2d, 0x1c, 0x2e, 0x1b, 0x30, 0x19, 0x30, 0x18, 0x32, 0x17,
+    0x32, 0x16, 0x33, 0x15, 0x34, 0x14, 0x34, 0x14, 0x35, 0x13, 0x36, 0x13,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3e, 0x2e, 0x3c, 0x27, 0x3b, 0x23, 0x3b, 0x1f,
+    0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x18, 0x3c, 0x17, 0x3b, 0x15, 0x3c, 0x14,
+    0x3c, 0x13, 0x3e, 0x13, 0x3f, 0x11, 0x3f, 0x11, 0x3f, 0x11, 0x3e, 0x11,
+    0x3d, 0x10, 0x3e, 0x0f, 0x3f, 0x0f, 0x40, 0x0f, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0xa6, 0x00, 0x8b, 0x00, 0x75, 0x01, 0x63, 0x02, 0x57, 0x05, 0x4d,
+    0x07, 0x45, 0x0a, 0x3e, 0x0d, 0x39, 0x0f, 0x35, 0x12, 0x32, 0x14, 0x2e,
+    0x16, 0x2c, 0x18, 0x29, 0x19, 0x27, 0x1b, 0x26, 0x1d, 0x24, 0x1e, 0x22,
+    0x20, 0x22, 0x21, 0x20, 0x23, 0x58, 0x23, 0x4a, 0x23, 0x3f, 0x24, 0x36,
+    0x25, 0x30, 0x26, 0x2b, 0x27, 0x27, 0x29, 0x24, 0x2a, 0x22, 0x2b, 0x20,
+    0x2d, 0x1e, 0x2e, 0x1c, 0x2e, 0x1b, 0x30, 0x1a, 0x30, 0x18, 0x31, 0x18,
+    0x32, 0x17, 0x32, 0x16, 0x33, 0x16, 0x34, 0x15, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x30, 0x3c, 0x2a, 0x3c, 0x25, 0x3a, 0x21, 0x3b, 0x1e, 0x3a, 0x1c,
+    0x3b, 0x1a, 0x3c, 0x18, 0x3c, 0x17, 0x3c, 0x16, 0x3b, 0x15, 0x3c, 0x14,
+    0x3d, 0x13, 0x3e, 0x13, 0x3f, 0x12, 0x3f, 0x11, 0x3f, 0x11, 0x3e, 0x11,
+    0x3d, 0x10, 0x3e, 0x0f, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0xa8, 0x00, 0x90,
+    0x00, 0x7c, 0x00, 0x6b, 0x01, 0x5f, 0x04, 0x55, 0x05, 0x4c, 0x07, 0x45,
+    0x0a, 0x40, 0x0c, 0x3c, 0x0f, 0x37, 0x10, 0x34, 0x12, 0x31, 0x15, 0x2e,
+    0x16, 0x2b, 0x18, 0x2a, 0x19, 0x28, 0x1a, 0x26, 0x1d, 0x25, 0x1d, 0x23,
+    0x23, 0x59, 0x23, 0x4d, 0x23, 0x43, 0x24, 0x3b, 0x24, 0x34, 0x25, 0x2f,
+    0x26, 0x2b, 0x27, 0x28, 0x28, 0x25, 0x2a, 0x23, 0x2b, 0x21, 0x2c, 0x1f,
+    0x2d, 0x1d, 0x2e, 0x1c, 0x2e, 0x1b, 0x30, 0x1a, 0x30, 0x19, 0x31, 0x18,
+    0x32, 0x17, 0x32, 0x16, 0x17, 0x00, 0x2f, 0x00, 0x4c, 0x00, 0x56, 0x00,
+    0x59, 0x00, 0x5b, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00,
+    0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x5f, 0x00, 0x5f, 0x00,
+    0x14, 0x2c, 0x29, 0x01, 0x49, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5b, 0x00,
+    0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00,
+    0x5e, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x4c, 0x00, 0x5f, 0x00, 0x62, 0x00,
+    0x62, 0x00, 0x5f, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00,
+    0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x5f, 0x00, 0x5f, 0x00,
+    0x11, 0x31, 0x23, 0x03, 0x46, 0x00, 0x52, 0x00, 0x58, 0x00, 0x5a, 0x00,
+    0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00,
+    0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x3e, 0x32, 0x3d, 0x2c,
+    0x3c, 0x26, 0x3b, 0x23, 0x3b, 0x20, 0x3b, 0x1e, 0x3a, 0x1c, 0x3b, 0x1a,
+    0x3c, 0x18, 0x3c, 0x17, 0x3c, 0x17, 0x3a, 0x15, 0x3c, 0x15, 0x3c, 0x14,
+    0x3d, 0x13, 0x3e, 0x13, 0x3f, 0x12, 0x3f, 0x11, 0x3f, 0x11, 0x3e, 0x11,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0xaa, 0x00, 0x94, 0x00, 0x82, 0x00, 0x72,
+    0x01, 0x65, 0x02, 0x5b, 0x04, 0x53, 0x06, 0x4b, 0x08, 0x45, 0x0a, 0x41,
+    0x0c, 0x3d, 0x0e, 0x39, 0x0f, 0x36, 0x12, 0x33, 0x12, 0x30, 0x16, 0x2e,
+    0x16, 0x2b, 0x18, 0x2b, 0x19, 0x29, 0x1a, 0x26, 0x23, 0x5a, 0x23, 0x4f,
+    0x23, 0x46, 0x23, 0x3e, 0x24, 0x37, 0x25, 0x32, 0x25, 0x2e, 0x26, 0x2b,
+    0x27, 0x28, 0x28, 0x25, 0x2a, 0x23, 0x2b, 0x21, 0x2b, 0x20, 0x2d, 0x1e,
+    0x2d, 0x1d, 0x2e, 0x1c, 0x2e, 0x1b, 0x30, 0x1a, 0x30, 0x19, 0x30, 0x18,
+    0x00, 0x00, 0x07, 0x00, 0x2f, 0x00, 0x45, 0x00, 0x4f, 0x00, 0x55, 0x00,
+    0x58, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5d, 0x00,
+    0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x00, 0x57, 0x04, 0x16,
+    0x27, 0x00, 0x41, 0x00, 0x4d, 0x00, 0x53, 0x00, 0x56, 0x00, 0x59, 0x00,
+    0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00,
+    0x5d, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x4c, 0x00, 0x3b, 0x00, 0x48, 0x00, 0x55, 0x00, 0x58, 0x00, 0x57, 0x00,
+    0x58, 0x00, 0x59, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5d, 0x00,
+    0x5d, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x00, 0x5f, 0x00, 0x20,
+    0x1f, 0x00, 0x3c, 0x00, 0x4a, 0x00, 0x51, 0x00, 0x55, 0x00, 0x58, 0x00,
+    0x59, 0x00, 0x5b, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00,
+    0x5d, 0x00, 0x5d, 0x00, 0x3e, 0x33, 0x3d, 0x2d, 0x3c, 0x28, 0x3b, 0x25,
+    0x3a, 0x22, 0x3b, 0x1f, 0x3b, 0x1e, 0x3a, 0x1c, 0x3b, 0x1a, 0x3c, 0x19,
+    0x3c, 0x17, 0x3c, 0x17, 0x3b, 0x16, 0x3b, 0x15, 0x3c, 0x15, 0x3c, 0x13,
+    0x3d, 0x13, 0x3f, 0x13, 0x3f, 0x12, 0x3f, 0x11, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0xaa, 0x00, 0x98, 0x00, 0x87, 0x00, 0x78, 0x00, 0x6b, 0x01, 0x61,
+    0x03, 0x58, 0x05, 0x51, 0x07, 0x4b, 0x08, 0x46, 0x0a, 0x42, 0x0c, 0x3e,
+    0x0d, 0x3a, 0x0f, 0x37, 0x11, 0x35, 0x12, 0x32, 0x14, 0x30, 0x16, 0x2e,
+    0x16, 0x2b, 0x18, 0x2b, 0x23, 0x5a, 0x23, 0x51, 0x23, 0x48, 0x23, 0x41,
+    0x24, 0x3a, 0x24, 0x35, 0x25, 0x31, 0x26, 0x2e, 0x27, 0x2a, 0x27, 0x28,
+    0x28, 0x26, 0x2a, 0x24, 0x2a, 0x22, 0x2b, 0x21, 0x2c, 0x1f, 0x2d, 0x1e,
+    0x2d, 0x1d, 0x2e, 0x1c, 0x2e, 0x1b, 0x30, 0x1a, 0x00, 0x00, 0x00, 0x00,
+    0x02, 0x00, 0x22, 0x00, 0x36, 0x00, 0x42, 0x00, 0x4a, 0x00, 0x4f, 0x00,
+    0x53, 0x00, 0x55, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00,
+    0x5b, 0x00, 0x5b, 0x00, 0x00, 0x82, 0x00, 0x57, 0x01, 0x12, 0x17, 0x00,
+    0x2f, 0x00, 0x3e, 0x00, 0x47, 0x00, 0x4d, 0x00, 0x51, 0x00, 0x53, 0x00,
+    0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x48, 0x00,
+    0x1b, 0x00, 0x34, 0x00, 0x40, 0x00, 0x44, 0x00, 0x4a, 0x00, 0x4f, 0x00,
+    0x53, 0x00, 0x55, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00,
+    0x5b, 0x00, 0x5b, 0x00, 0x00, 0x85, 0x00, 0x5f, 0x00, 0x1f, 0x0d, 0x00,
+    0x28, 0x00, 0x39, 0x00, 0x43, 0x00, 0x4a, 0x00, 0x4e, 0x00, 0x52, 0x00,
+    0x54, 0x00, 0x56, 0x00, 0x57, 0x00, 0x59, 0x00, 0x59, 0x00, 0x5a, 0x00,
+    0x3e, 0x34, 0x3d, 0x2f, 0x3b, 0x2a, 0x3c, 0x26, 0x3a, 0x23, 0x3b, 0x21,
+    0x3b, 0x1f, 0x3b, 0x1d, 0x3a, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x17,
+    0x3c, 0x17, 0x3b, 0x17, 0x3a, 0x15, 0x3c, 0x15, 0x3c, 0x15, 0x3c, 0x13,
+    0x3e, 0x13, 0x3f, 0x13, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0xac, 0x00, 0x9b,
+    0x00, 0x8b, 0x00, 0x7c, 0x00, 0x71, 0x01, 0x67, 0x02, 0x5e, 0x04, 0x57,
+    0x05, 0x51, 0x07, 0x4b, 0x08, 0x46, 0x0a, 0x42, 0x0c, 0x3f, 0x0c, 0x3b,
+    0x0f, 0x39, 0x0f, 0x35, 0x12, 0x34, 0x12, 0x31, 0x14, 0x30, 0x16, 0x2e,
+    0x23, 0x5b, 0x23, 0x52, 0x23, 0x4a, 0x23, 0x43, 0x23, 0x3d, 0x24, 0x38,
+    0x25, 0x34, 0x25, 0x30, 0x26, 0x2d, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x26,
+    0x2a, 0x24, 0x2a, 0x22, 0x2b, 0x21, 0x2b, 0x20, 0x2d, 0x1f, 0x2d, 0x1d,
+    0x2e, 0x1d, 0x2e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+    0x19, 0x00, 0x2b, 0x00, 0x38, 0x00, 0x40, 0x00, 0x47, 0x00, 0x4b, 0x00,
+    0x4f, 0x00, 0x51, 0x00, 0x53, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00,
+    0x00, 0x91, 0x00, 0x78, 0x00, 0x43, 0x00, 0x10, 0x0e, 0x00, 0x23, 0x00,
+    0x31, 0x00, 0x3b, 0x00, 0x42, 0x00, 0x48, 0x00, 0x4c, 0x00, 0x4f, 0x00,
+    0x51, 0x00, 0x53, 0x00, 0x55, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x55, 0x00, 0x34, 0x00, 0x0b, 0x00,
+    0x1f, 0x00, 0x2b, 0x00, 0x38, 0x00, 0x40, 0x00, 0x47, 0x00, 0x4b, 0x00,
+    0x4f, 0x00, 0x51, 0x00, 0x53, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00,
+    0x00, 0x92, 0x00, 0x7c, 0x00, 0x4d, 0x00, 0x1f, 0x02, 0x00, 0x1a, 0x00,
+    0x2a, 0x00, 0x36, 0x00, 0x3e, 0x00, 0x45, 0x00, 0x49, 0x00, 0x4d, 0x00,
+    0x4f, 0x00, 0x52, 0x00, 0x53, 0x00, 0x55, 0x00, 0x3e, 0x35, 0x3e, 0x30,
+    0x3b, 0x2c, 0x3c, 0x28, 0x3b, 0x25, 0x3a, 0x22, 0x3b, 0x20, 0x3b, 0x1f,
+    0x3a, 0x1d, 0x3a, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x18, 0x3c, 0x17,
+    0x3c, 0x17, 0x3a, 0x16, 0x3b, 0x15, 0x3c, 0x15, 0x3c, 0x14, 0x3c, 0x13,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0xad, 0x00, 0x9d, 0x00, 0x8e, 0x00, 0x81,
+    0x00, 0x76, 0x00, 0x6b, 0x01, 0x63, 0x02, 0x5c, 0x04, 0x56, 0x05, 0x50,
+    0x07, 0x4b, 0x08, 0x47, 0x0a, 0x43, 0x0c, 0x40, 0x0c, 0x3c, 0x0f, 0x3a,
+    0x0f, 0x37, 0x11, 0x35, 0x12, 0x33, 0x12, 0x30, 0x23, 0x5b, 0x23, 0x53,
+    0x23, 0x4c, 0x23, 0x45, 0x23, 0x40, 0x24, 0x3b, 0x24, 0x36, 0x25, 0x33,
+    0x25, 0x30, 0x26, 0x2d, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x26, 0x2a, 0x25,
+    0x2a, 0x23, 0x2b, 0x22, 0x2b, 0x20, 0x2c, 0x20, 0x2d, 0x1e, 0x2d, 0x1d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,
+    0x24, 0x00, 0x2f, 0x00, 0x38, 0x00, 0x3f, 0x00, 0x44, 0x00, 0x48, 0x00,
+    0x4c, 0x00, 0x4e, 0x00, 0x50, 0x00, 0x52, 0x00, 0x00, 0x96, 0x00, 0x87,
+    0x00, 0x61, 0x00, 0x36, 0x00, 0x10, 0x0a, 0x02, 0x1a, 0x00, 0x27, 0x00,
+    0x32, 0x00, 0x3a, 0x00, 0x40, 0x00, 0x44, 0x00, 0x48, 0x00, 0x4b, 0x00,
+    0x4e, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x62, 0x00, 0x58, 0x00, 0x40, 0x00, 0x1f, 0x00, 0x01, 0x00, 0x14, 0x00,
+    0x24, 0x00, 0x2f, 0x00, 0x38, 0x00, 0x3f, 0x00, 0x44, 0x00, 0x48, 0x00,
+    0x4c, 0x00, 0x4e, 0x00, 0x50, 0x00, 0x52, 0x00, 0x00, 0x97, 0x00, 0x8a,
+    0x00, 0x68, 0x00, 0x42, 0x00, 0x1f, 0x00, 0x04, 0x10, 0x00, 0x1f, 0x00,
+    0x2b, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x41, 0x00, 0x45, 0x00, 0x49, 0x00,
+    0x4b, 0x00, 0x4e, 0x00, 0x3e, 0x36, 0x3e, 0x31, 0x3b, 0x2c, 0x3c, 0x29,
+    0x3c, 0x26, 0x3a, 0x24, 0x3a, 0x21, 0x3b, 0x20, 0x3b, 0x1f, 0x39, 0x1d,
+    0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x18, 0x3c, 0x17, 0x3c, 0x17,
+    0x3a, 0x17, 0x3a, 0x15, 0x3c, 0x15, 0x3c, 0x15, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0xad, 0x00, 0x9f, 0x00, 0x91, 0x00, 0x85, 0x00, 0x79, 0x00, 0x6f,
+    0x01, 0x67, 0x02, 0x60, 0x03, 0x59, 0x04, 0x54, 0x05, 0x4f, 0x07, 0x4b,
+    0x08, 0x47, 0x0a, 0x43, 0x0b, 0x41, 0x0c, 0x3d, 0x0e, 0x3b, 0x0f, 0x38,
+    0x0f, 0x35, 0x12, 0x35, 0x23, 0x5b, 0x23, 0x54, 0x23, 0x4e, 0x23, 0x47,
+    0x23, 0x42, 0x24, 0x3c, 0x24, 0x38, 0x25, 0x35, 0x25, 0x32, 0x26, 0x2f,
+    0x26, 0x2d, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x26, 0x29, 0x25, 0x2a, 0x23,
+    0x2b, 0x22, 0x2b, 0x21, 0x2b, 0x20, 0x2d, 0x20, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1e, 0x00,
+    0x29, 0x00, 0x32, 0x00, 0x38, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x46, 0x00,
+    0x49, 0x00, 0x4c, 0x00, 0x00, 0x99, 0x00, 0x8f, 0x00, 0x74, 0x00, 0x51,
+    0x00, 0x2e, 0x00, 0x10, 0x08, 0x04, 0x13, 0x00, 0x20, 0x00, 0x2a, 0x00,
+    0x32, 0x00, 0x38, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x45, 0x00, 0x48, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x57, 0x00,
+    0x44, 0x00, 0x2b, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1e, 0x00,
+    0x29, 0x00, 0x32, 0x00, 0x38, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x46, 0x00,
+    0x49, 0x00, 0x4c, 0x00, 0x00, 0x9a, 0x00, 0x91, 0x00, 0x79, 0x00, 0x5a,
+    0x00, 0x3b, 0x00, 0x1f, 0x00, 0x09, 0x08, 0x00, 0x17, 0x00, 0x22, 0x00,
+    0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x45, 0x00,
+    0x3e, 0x36, 0x3e, 0x31, 0x3b, 0x2d, 0x3b, 0x2a, 0x3c, 0x27, 0x3a, 0x25,
+    0x3a, 0x23, 0x3b, 0x21, 0x3b, 0x1f, 0x3b, 0x1f, 0x39, 0x1c, 0x3b, 0x1c,
+    0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x19, 0x3c, 0x17, 0x3c, 0x17, 0x3b, 0x17,
+    0x3a, 0x16, 0x3b, 0x15, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0xad, 0x00, 0xa0,
+    0x00, 0x94, 0x00, 0x88, 0x00, 0x7e, 0x00, 0x74, 0x00, 0x6c, 0x01, 0x65,
+    0x02, 0x5e, 0x04, 0x58, 0x05, 0x53, 0x05, 0x4f, 0x07, 0x4b, 0x08, 0x47,
+    0x0a, 0x44, 0x0b, 0x41, 0x0c, 0x3e, 0x0d, 0x3b, 0x0f, 0x3a, 0x0f, 0x37,
+    0x23, 0x5c, 0x23, 0x55, 0x23, 0x4f, 0x23, 0x49, 0x23, 0x44, 0x23, 0x3f,
+    0x24, 0x3b, 0x24, 0x37, 0x25, 0x34, 0x25, 0x31, 0x26, 0x2e, 0x26, 0x2c,
+    0x27, 0x2a, 0x28, 0x28, 0x28, 0x27, 0x29, 0x25, 0x2a, 0x24, 0x2a, 0x22,
+    0x2b, 0x22, 0x2b, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x24, 0x00,
+    0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x41, 0x00, 0x44, 0x00,
+    0x00, 0x9b, 0x00, 0x94, 0x00, 0x7f, 0x00, 0x64, 0x00, 0x46, 0x00, 0x29,
+    0x00, 0x10, 0x07, 0x06, 0x0e, 0x00, 0x1a, 0x00, 0x24, 0x00, 0x2c, 0x00,
+    0x32, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x58, 0x00, 0x4a, 0x00, 0x38, 0x00,
+    0x24, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x24, 0x00,
+    0x2c, 0x00, 0x33, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x41, 0x00, 0x44, 0x00,
+    0x00, 0x9b, 0x00, 0x95, 0x00, 0x83, 0x00, 0x6a, 0x00, 0x4f, 0x00, 0x36,
+    0x00, 0x1f, 0x00, 0x0c, 0x03, 0x00, 0x10, 0x00, 0x1b, 0x00, 0x24, 0x00,
+    0x2c, 0x00, 0x32, 0x00, 0x37, 0x00, 0x3c, 0x00, 0x3e, 0x37, 0x3e, 0x32,
+    0x3c, 0x2f, 0x3b, 0x2b, 0x3c, 0x28, 0x3b, 0x26, 0x3a, 0x24, 0x3a, 0x22,
+    0x3b, 0x21, 0x3b, 0x1f, 0x3a, 0x1e, 0x39, 0x1c, 0x3b, 0x1c, 0x3b, 0x1a,
+    0x3c, 0x19, 0x3c, 0x19, 0x3c, 0x17, 0x3c, 0x17, 0x3b, 0x17, 0x3a, 0x17,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0xae, 0x00, 0xa2, 0x00, 0x97, 0x00, 0x8b,
+    0x00, 0x80, 0x00, 0x77, 0x00, 0x6f, 0x01, 0x67, 0x02, 0x61, 0x02, 0x5c,
+    0x04, 0x57, 0x05, 0x52, 0x05, 0x4e, 0x07, 0x4b, 0x09, 0x47, 0x0a, 0x44,
+    0x0b, 0x41, 0x0c, 0x3f, 0x0c, 0x3c, 0x0f, 0x3b, 0x23, 0x5c, 0x23, 0x56,
+    0x23, 0x50, 0x23, 0x4a, 0x23, 0x45, 0x23, 0x40, 0x24, 0x3c, 0x24, 0x39,
+    0x25, 0x35, 0x25, 0x33, 0x25, 0x30, 0x26, 0x2e, 0x26, 0x2c, 0x27, 0x2a,
+    0x28, 0x28, 0x28, 0x27, 0x29, 0x25, 0x2a, 0x24, 0x2a, 0x23, 0x2b, 0x22,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x20, 0x00, 0x28, 0x00,
+    0x2e, 0x00, 0x34, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x00, 0x9c, 0x00, 0x96,
+    0x00, 0x87, 0x00, 0x71, 0x00, 0x57, 0x00, 0x3d, 0x00, 0x25, 0x00, 0x10,
+    0x06, 0x07, 0x0b, 0x00, 0x15, 0x00, 0x1f, 0x00, 0x26, 0x00, 0x2d, 0x00,
+    0x32, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5d, 0x00, 0x59, 0x00, 0x4f, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x1e, 0x00,
+    0x0e, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x20, 0x00, 0x28, 0x00,
+    0x2e, 0x00, 0x34, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x00, 0x9c, 0x00, 0x97,
+    0x00, 0x8a, 0x00, 0x76, 0x00, 0x5f, 0x00, 0x48, 0x00, 0x33, 0x00, 0x1f,
+    0x00, 0x0f, 0x00, 0x00, 0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x25, 0x00,
+    0x2c, 0x00, 0x31, 0x00, 0x3e, 0x37, 0x3e, 0x33, 0x3c, 0x2f, 0x3b, 0x2c,
+    0x3c, 0x29, 0x3c, 0x27, 0x39, 0x25, 0x3a, 0x23, 0x3b, 0x21, 0x3b, 0x20,
+    0x3b, 0x1f, 0x3a, 0x1e, 0x39, 0x1c, 0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x19,
+    0x3c, 0x19, 0x3c, 0x18, 0x3c, 0x17, 0x3b, 0x17, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0xaf, 0x00, 0xa3, 0x00, 0x98, 0x00, 0x8e, 0x00, 0x84, 0x00, 0x7a,
+    0x00, 0x72, 0x00, 0x6c, 0x01, 0x65, 0x02, 0x5f, 0x04, 0x5a, 0x04, 0x56,
+    0x05, 0x52, 0x06, 0x4e, 0x07, 0x4a, 0x09, 0x47, 0x0a, 0x45, 0x0a, 0x41,
+    0x0c, 0x40, 0x0c, 0x3d, 0x23, 0x5c, 0x23, 0x56, 0x23, 0x51, 0x23, 0x4c,
+    0x23, 0x47, 0x23, 0x42, 0x23, 0x3e, 0x24, 0x3b, 0x24, 0x37, 0x25, 0x34,
+    0x25, 0x32, 0x25, 0x30, 0x26, 0x2e, 0x27, 0x2c, 0x27, 0x2a, 0x28, 0x28,
+    0x28, 0x27, 0x29, 0x25, 0x2a, 0x25, 0x2a, 0x23, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1d, 0x00, 0x24, 0x00, 0x2a, 0x00,
+    0x30, 0x00, 0x35, 0x00, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x8c, 0x00, 0x7a,
+    0x00, 0x64, 0x00, 0x4e, 0x00, 0x37, 0x00, 0x22, 0x00, 0x10, 0x05, 0x08,
+    0x0a, 0x02, 0x12, 0x00, 0x1a, 0x00, 0x22, 0x00, 0x28, 0x00, 0x2d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5b, 0x00,
+    0x53, 0x00, 0x47, 0x00, 0x38, 0x00, 0x29, 0x00, 0x1a, 0x00, 0x0c, 0x00,
+    0x00, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x1d, 0x00, 0x24, 0x00, 0x2a, 0x00,
+    0x30, 0x00, 0x35, 0x00, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e,
+    0x00, 0x6b, 0x00, 0x57, 0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x11,
+    0x00, 0x04, 0x07, 0x00, 0x10, 0x00, 0x19, 0x00, 0x20, 0x00, 0x26, 0x00,
+    0x3e, 0x38, 0x3e, 0x33, 0x3d, 0x30, 0x3b, 0x2d, 0x3c, 0x2a, 0x3c, 0x27,
+    0x3a, 0x26, 0x3a, 0x24, 0x3a, 0x22, 0x3b, 0x21, 0x3b, 0x1f, 0x3b, 0x1f,
+    0x39, 0x1e, 0x3a, 0x1c, 0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x19,
+    0x3c, 0x18, 0x3c, 0x17, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0xaf, 0x00, 0xa5,
+    0x00, 0x99, 0x00, 0x90, 0x00, 0x87, 0x00, 0x7e, 0x00, 0x76, 0x00, 0x6f,
+    0x01, 0x68, 0x02, 0x62, 0x02, 0x5e, 0x04, 0x59, 0x04, 0x55, 0x05, 0x51,
+    0x07, 0x4e, 0x07, 0x4a, 0x09, 0x47, 0x0a, 0x45, 0x0a, 0x41, 0x0c, 0x41,
+    0x23, 0x5c, 0x23, 0x57, 0x23, 0x52, 0x23, 0x4d, 0x23, 0x48, 0x23, 0x44,
+    0x23, 0x40, 0x24, 0x3c, 0x24, 0x39, 0x24, 0x36, 0x25, 0x34, 0x25, 0x31,
+    0x26, 0x2f, 0x26, 0x2d, 0x27, 0x2c, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x27,
+    0x28, 0x25, 0x2a, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x09, 0x00, 0x12, 0x00, 0x1a, 0x00, 0x21, 0x00, 0x27, 0x00, 0x2c, 0x00,
+    0x00, 0x9d, 0x00, 0x9a, 0x00, 0x90, 0x00, 0x81, 0x00, 0x6f, 0x00, 0x5b,
+    0x00, 0x46, 0x00, 0x32, 0x00, 0x20, 0x00, 0x10, 0x04, 0x09, 0x09, 0x03,
+    0x0f, 0x00, 0x17, 0x00, 0x1e, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x55, 0x00, 0x4b, 0x00,
+    0x3f, 0x00, 0x32, 0x00, 0x24, 0x00, 0x17, 0x00, 0x0b, 0x00, 0x00, 0x00,
+    0x09, 0x00, 0x12, 0x00, 0x1a, 0x00, 0x21, 0x00, 0x27, 0x00, 0x2c, 0x00,
+    0x00, 0x9d, 0x00, 0x9a, 0x00, 0x92, 0x00, 0x84, 0x00, 0x74, 0x00, 0x62,
+    0x00, 0x50, 0x00, 0x3f, 0x00, 0x2e, 0x00, 0x1f, 0x00, 0x12, 0x00, 0x06,
+    0x03, 0x00, 0x0c, 0x00, 0x14, 0x00, 0x1b, 0x00, 0x3e, 0x38, 0x3e, 0x34,
+    0x3e, 0x31, 0x3b, 0x2e, 0x3b, 0x2b, 0x3c, 0x29, 0x3c, 0x27, 0x39, 0x25,
+    0x3a, 0x24, 0x3a, 0x21, 0x3b, 0x21, 0x3b, 0x1f, 0x3b, 0x1f, 0x39, 0x1d,
+    0x3a, 0x1c, 0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x19, 0x3c, 0x19,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x00, 0xaf, 0x00, 0xa6, 0x00, 0x9b, 0x00, 0x91,
+    0x00, 0x88, 0x00, 0x80, 0x00, 0x78, 0x00, 0x71, 0x00, 0x6b, 0x01, 0x66,
+    0x02, 0x61, 0x03, 0x5c, 0x04, 0x58, 0x05, 0x55, 0x05, 0x50, 0x07, 0x4e,
+    0x07, 0x4a, 0x09, 0x47, 0x0a, 0x45, 0x0a, 0x42, 0x23, 0x5c, 0x23, 0x58,
+    0x23, 0x53, 0x23, 0x4d, 0x23, 0x49, 0x23, 0x45, 0x23, 0x41, 0x24, 0x3d,
+    0x24, 0x3b, 0x24, 0x38, 0x25, 0x35, 0x25, 0x33, 0x25, 0x31, 0x26, 0x2f,
+    0x26, 0x2d, 0x27, 0x2c, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x28, 0x26,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
+    0x11, 0x00, 0x18, 0x00, 0x1e, 0x00, 0x24, 0x00, 0x00, 0x9d, 0x00, 0x9b,
+    0x00, 0x93, 0x00, 0x86, 0x00, 0x76, 0x00, 0x65, 0x00, 0x52, 0x00, 0x40,
+    0x00, 0x2f, 0x00, 0x1e, 0x00, 0x10, 0x04, 0x09, 0x08, 0x04, 0x0c, 0x00,
+    0x14, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x44, 0x00, 0x38, 0x00,
+    0x2c, 0x00, 0x20, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00,
+    0x11, 0x00, 0x18, 0x00, 0x1e, 0x00, 0x24, 0x00, 0x00, 0x9e, 0x00, 0x9b,
+    0x00, 0x94, 0x00, 0x89, 0x00, 0x7b, 0x00, 0x6b, 0x00, 0x5b, 0x00, 0x4b,
+    0x00, 0x3b, 0x00, 0x2d, 0x00, 0x1f, 0x00, 0x13, 0x00, 0x08, 0x00, 0x00,
+    0x09, 0x00, 0x11, 0x00, 0x3e, 0x38, 0x3e, 0x35, 0x3e, 0x32, 0x3b, 0x2e,
+    0x3b, 0x2c, 0x3c, 0x2a, 0x3c, 0x27, 0x3a, 0x26, 0x3a, 0x24, 0x3a, 0x23,
+    0x3b, 0x21, 0x3b, 0x20, 0x3b, 0x1f, 0x3a, 0x1f, 0x39, 0x1d, 0x3a, 0x1c,
+    0x3b, 0x1c, 0x3b, 0x1a, 0x3c, 0x19, 0x3c, 0x19, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x00, 0xb0, 0x00, 0xa6, 0x00, 0x9d, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x83,
+    0x00, 0x7c, 0x00, 0x75, 0x00, 0x6e, 0x01, 0x69, 0x01, 0x63, 0x02, 0x5f,
+    0x04, 0x5b, 0x04, 0x56, 0x05, 0x54, 0x05, 0x4f, 0x07, 0x4e, 0x07, 0x4a,
+    0x09, 0x47, 0x0a, 0x46, 0x23, 0x5d, 0x23, 0x58, 0x23, 0x53, 0x23, 0x4f,
+    0x23, 0x4a, 0x23, 0x46, 0x23, 0x43, 0x23, 0x3f, 0x24, 0x3c, 0x24, 0x39,
+    0x24, 0x36, 0x25, 0x34, 0x25, 0x32, 0x25, 0x30, 0x26, 0x2f, 0x26, 0x2d,
+    0x27, 0x2c, 0x27, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00,
+    0x16, 0x00, 0x1c, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x95, 0x00, 0x8a,
+    0x00, 0x7d, 0x00, 0x6d, 0x00, 0x5d, 0x00, 0x4c, 0x00, 0x3b, 0x00, 0x2c,
+    0x00, 0x1d, 0x00, 0x10, 0x04, 0x0a, 0x07, 0x05, 0x0b, 0x00, 0x11, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00,
+    0x58, 0x00, 0x51, 0x00, 0x48, 0x00, 0x3e, 0x00, 0x33, 0x00, 0x28, 0x00,
+    0x1d, 0x00, 0x12, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00,
+    0x16, 0x00, 0x1c, 0x00, 0x00, 0x9e, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x8c,
+    0x00, 0x80, 0x00, 0x73, 0x00, 0x64, 0x00, 0x55, 0x00, 0x46, 0x00, 0x38,
+    0x00, 0x2b, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x01, 0x06, 0x00,
+    0x3e, 0x39, 0x3e, 0x35, 0x3e, 0x32, 0x3b, 0x2f, 0x3b, 0x2d, 0x3c, 0x2a,
+    0x3c, 0x28, 0x3b, 0x27, 0x39, 0x24, 0x3a, 0x24, 0x3a, 0x22, 0x3b, 0x21,
+    0x3b, 0x1f, 0x3b, 0x1f, 0x39, 0x1f, 0x39, 0x1d, 0x3b, 0x1c, 0x3b, 0x1c,
+    0x3b, 0x1a, 0x3c, 0x19, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a,
+    0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x47, 0x0a, 0x00, 0xb0, 0x00, 0xa7,
+    0x00, 0x9e, 0x00, 0x96, 0x00, 0x8d, 0x00, 0x86, 0x00, 0x7e, 0x00, 0x77,
+    0x00, 0x71, 0x00, 0x6b, 0x01, 0x66, 0x02, 0x62, 0x02, 0x5d, 0x04, 0x5a,
+    0x04, 0x55, 0x05, 0x53, 0x05, 0x4f, 0x07, 0x4e, 0x07, 0x4a, 0x09, 0x47,
+    0x23, 0x5d, 0x23, 0x58, 0x23, 0x54, 0x23, 0x50, 0x23, 0x4c, 0x23, 0x48,
+    0x23, 0x44, 0x23, 0x40, 0x24, 0x3d, 0x24, 0x3a, 0x24, 0x38, 0x25, 0x36,
+    0x25, 0x33, 0x25, 0x32, 0x25, 0x2f, 0x26, 0x2f, 0x26, 0x2c, 0x27, 0x2c,
+    0x27, 0x2a, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x14, 0x00,
+    0x00, 0x9e, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x8d, 0x00, 0x81, 0x00, 0x74,
+    0x00, 0x65, 0x00, 0x56, 0x00, 0x46, 0x00, 0x37, 0x00, 0x29, 0x00, 0x1c,
+    0x00, 0x10, 0x03, 0x0a, 0x07, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00,
+    0x4c, 0x00, 0x42, 0x00, 0x39, 0x00, 0x2e, 0x00, 0x24, 0x00, 0x1a, 0x00,
+    0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x14, 0x00,
+    0x00, 0x9e, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x8f, 0x00, 0x85, 0x00, 0x79,
+    0x00, 0x6b, 0x00, 0x5e, 0x00, 0x50, 0x00, 0x43, 0x00, 0x36, 0x00, 0x2a,
+    0x00, 0x1f, 0x00, 0x15, 0x00, 0x0c, 0x00, 0x03, 0x32, 0x59, 0x2a, 0x5b,
+    0x28, 0x5c, 0x27, 0x5d, 0x27, 0x5d, 0x26, 0x5e, 0x26, 0x5e, 0x26, 0x5e,
+    0x26, 0x5e, 0x26, 0x5e, 0x25, 0x5e, 0x25, 0x5e, 0x25, 0x5f, 0x25, 0x5f,
+    0x25, 0x5f, 0x25, 0x5f, 0x25, 0x5f, 0x24, 0x5f, 0x24, 0x5f, 0x24, 0x60,
+    0x32, 0x3c, 0x25, 0x4a, 0x24, 0x50, 0x23, 0x54, 0x23, 0x56, 0x23, 0x58,
+    0x23, 0x59, 0x23, 0x5a, 0x23, 0x5a, 0x23, 0x5b, 0x23, 0x5b, 0x23, 0x5b,
+    0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5c, 0x23, 0x5d,
+    0x23, 0x5d, 0x23, 0x5d, 0x00, 0x6c, 0x0e, 0x60, 0x14, 0x60, 0x18, 0x60,
+    0x1b, 0x60, 0x1d, 0x60, 0x1d, 0x60, 0x1e, 0x60, 0x1f, 0x60, 0x20, 0x60,
+    0x20, 0x60, 0x20, 0x60, 0x21, 0x60, 0x21, 0x60, 0x21, 0x60, 0x21, 0x60,
+    0x22, 0x60, 0x22, 0x60, 0x22, 0x60, 0x22, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x9e, 0x00, 0x9c,
+    0x00, 0x97, 0x00, 0x90, 0x00, 0x85, 0x00, 0x79, 0x00, 0x6c, 0x00, 0x5e,
+    0x00, 0x50, 0x00, 0x42, 0x00, 0x34, 0x00, 0x27, 0x00, 0x1b, 0x00, 0x0f,
+    0x03, 0x0b, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x46, 0x00,
+    0x3d, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0f, 0x00,
+    0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x9e, 0x00, 0x9d,
+    0x00, 0x98, 0x00, 0x91, 0x00, 0x88, 0x00, 0x7e, 0x00, 0x72, 0x00, 0x65,
+    0x00, 0x59, 0x00, 0x4c, 0x00, 0x40, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x1f,
+    0x00, 0x16, 0x00, 0x0d, 0x38, 0x4f, 0x31, 0x53, 0x2e, 0x56, 0x2c, 0x57,
+    0x2a, 0x59, 0x29, 0x5a, 0x29, 0x5a, 0x28, 0x5b, 0x27, 0x5c, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x38, 0x22, 0x2b, 0x31,
+    0x27, 0x3b, 0x25, 0x42, 0x24, 0x47, 0x23, 0x4a, 0x23, 0x4d, 0x23, 0x4f,
+    0x23, 0x51, 0x23, 0x52, 0x23, 0x53, 0x23, 0x54, 0x23, 0x55, 0x23, 0x56,
+    0x23, 0x56, 0x23, 0x57, 0x23, 0x58, 0x23, 0x58, 0x23, 0x58, 0x23, 0x58,
+    0x00, 0x92, 0x01, 0x79, 0x07, 0x6f, 0x0c, 0x6b, 0x0f, 0x68, 0x12, 0x67,
+    0x14, 0x66, 0x16, 0x65, 0x17, 0x64, 0x18, 0x64, 0x19, 0x63, 0x1a, 0x63,
+    0x1b, 0x63, 0x1b, 0x63, 0x1c, 0x63, 0x1c, 0x62, 0x1d, 0x62, 0x1d, 0x62,
+    0x1d, 0x62, 0x1e, 0x62, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x06, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x92,
+    0x00, 0x89, 0x00, 0x7e, 0x00, 0x72, 0x00, 0x65, 0x00, 0x58, 0x00, 0x4b,
+    0x00, 0x3e, 0x00, 0x31, 0x00, 0x25, 0x00, 0x1a, 0x00, 0x0f, 0x03, 0x0b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e, 0x00,
+    0x5b, 0x00, 0x56, 0x00, 0x50, 0x00, 0x49, 0x00, 0x41, 0x00, 0x39, 0x00,
+    0x30, 0x00, 0x27, 0x00, 0x1e, 0x00, 0x16, 0x00, 0x0e, 0x00, 0x07, 0x00,
+    0x00, 0x00, 0x06, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x93,
+    0x00, 0x8b, 0x00, 0x82, 0x00, 0x77, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54,
+    0x00, 0x49, 0x00, 0x3d, 0x00, 0x33, 0x00, 0x29, 0x00, 0x1f, 0x00, 0x17,
+    0x3a, 0x4b, 0x34, 0x4f, 0x31, 0x52, 0x2f, 0x54, 0x2d, 0x56, 0x2c, 0x57,
+    0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x59, 0x29, 0x5a, 0x29, 0x5a,
+    0x28, 0x5b, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c, 0x27, 0x5c,
+    0x27, 0x5c, 0x27, 0x5c, 0x3c, 0x18, 0x30, 0x25, 0x2a, 0x2e, 0x27, 0x35,
+    0x25, 0x3b, 0x24, 0x3f, 0x24, 0x43, 0x24, 0x46, 0x23, 0x48, 0x23, 0x4a,
+    0x23, 0x4c, 0x23, 0x4e, 0x23, 0x4f, 0x23, 0x50, 0x23, 0x51, 0x23, 0x52,
+    0x23, 0x53, 0x23, 0x53, 0x23, 0x54, 0x23, 0x54, 0x00, 0xa1, 0x00, 0x88,
+    0x03, 0x7b, 0x06, 0x74, 0x09, 0x70, 0x0c, 0x6d, 0x0e, 0x6b, 0x10, 0x6a,
+    0x11, 0x69, 0x13, 0x68, 0x14, 0x67, 0x15, 0x66, 0x16, 0x66, 0x17, 0x65,
+    0x17, 0x65, 0x18, 0x65, 0x19, 0x65, 0x19, 0x64, 0x1a, 0x64, 0x1a, 0x64,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x82,
+    0x00, 0x77, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x53, 0x00, 0x46, 0x00, 0x3a,
+    0x00, 0x2f, 0x00, 0x24, 0x00, 0x19, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x5e, 0x00, 0x5b, 0x00, 0x57, 0x00,
+    0x52, 0x00, 0x4c, 0x00, 0x44, 0x00, 0x3d, 0x00, 0x35, 0x00, 0x2c, 0x00,
+    0x24, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x0d, 0x00, 0x06, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9d, 0x00, 0x9a, 0x00, 0x95, 0x00, 0x8d, 0x00, 0x85,
+    0x00, 0x7b, 0x00, 0x71, 0x00, 0x66, 0x00, 0x5b, 0x00, 0x50, 0x00, 0x46,
+    0x00, 0x3b, 0x00, 0x31, 0x00, 0x28, 0x00, 0x1f, 0x3b, 0x48, 0x36, 0x4c,
+    0x33, 0x4f, 0x31, 0x52, 0x2f, 0x53, 0x2e, 0x53, 0x2d, 0x55, 0x2c, 0x57,
+    0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x58,
+    0x2a, 0x59, 0x29, 0x5a, 0x29, 0x5b, 0x28, 0x5b, 0x27, 0x5c, 0x27, 0x5c,
+    0x3f, 0x14, 0x33, 0x1e, 0x2d, 0x26, 0x29, 0x2d, 0x27, 0x32, 0x26, 0x36,
+    0x25, 0x3b, 0x24, 0x3e, 0x24, 0x41, 0x24, 0x43, 0x23, 0x45, 0x23, 0x47,
+    0x23, 0x49, 0x23, 0x4a, 0x23, 0x4c, 0x23, 0x4d, 0x23, 0x4d, 0x23, 0x4f,
+    0x23, 0x50, 0x23, 0x50, 0x00, 0xa7, 0x00, 0x92, 0x01, 0x84, 0x03, 0x7d,
+    0x05, 0x77, 0x08, 0x73, 0x0a, 0x71, 0x0c, 0x6f, 0x0d, 0x6d, 0x0f, 0x6b,
+    0x10, 0x6a, 0x11, 0x6a, 0x12, 0x69, 0x13, 0x68, 0x14, 0x68, 0x15, 0x67,
+    0x15, 0x66, 0x16, 0x66, 0x17, 0x66, 0x17, 0x66, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x31, 0x23, 0x03,
+    0x46, 0x00, 0x52, 0x00, 0x58, 0x00, 0x5a, 0x00, 0x5c, 0x00, 0x5d, 0x00,
+    0x5d, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00,
+    0x5e, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x11, 0x31, 0x00, 0x5f, 0x00, 0x85, 0x00, 0x92, 0x00, 0x97, 0x00, 0x9a,
+    0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9e,
+    0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3c, 0x47, 0x38, 0x4b, 0x35, 0x4e, 0x32, 0x4f,
+    0x31, 0x51, 0x30, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x55, 0x2c, 0x56,
+    0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57,
+    0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x58, 0x2a, 0x59, 0x40, 0x11, 0x36, 0x1a,
+    0x2f, 0x21, 0x2c, 0x27, 0x29, 0x2c, 0x27, 0x30, 0x26, 0x34, 0x25, 0x37,
+    0x25, 0x3a, 0x24, 0x3d, 0x24, 0x40, 0x24, 0x42, 0x24, 0x44, 0x23, 0x45,
+    0x23, 0x47, 0x23, 0x48, 0x23, 0x49, 0x23, 0x4a, 0x23, 0x4c, 0x23, 0x4c,
+    0x00, 0xaa, 0x00, 0x98, 0x00, 0x8c, 0x02, 0x83, 0x03, 0x7d, 0x05, 0x79,
+    0x07, 0x76, 0x09, 0x73, 0x0a, 0x71, 0x0c, 0x6f, 0x0d, 0x6e, 0x0e, 0x6d,
+    0x0f, 0x6c, 0x10, 0x6b, 0x11, 0x6a, 0x12, 0x6a, 0x13, 0x69, 0x13, 0x68,
+    0x14, 0x68, 0x15, 0x68, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x20, 0x1f, 0x00, 0x3c, 0x00,
+    0x4a, 0x00, 0x51, 0x00, 0x55, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5b, 0x00,
+    0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00, 0x5d, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x03, 0x00, 0x20,
+    0x00, 0x5f, 0x00, 0x7c, 0x00, 0x8a, 0x00, 0x91, 0x00, 0x95, 0x00, 0x97,
+    0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0x9c, 0x00, 0x9d,
+    0x00, 0x9d, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x46, 0x39, 0x4a, 0x36, 0x4b, 0x34, 0x4e, 0x32, 0x4f, 0x31, 0x50,
+    0x30, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x54, 0x2d, 0x56,
+    0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57,
+    0x2a, 0x57, 0x2a, 0x57, 0x41, 0x10, 0x38, 0x17, 0x32, 0x1d, 0x2e, 0x22,
+    0x2b, 0x27, 0x29, 0x2b, 0x27, 0x2f, 0x26, 0x32, 0x25, 0x35, 0x25, 0x38,
+    0x25, 0x3b, 0x24, 0x3c, 0x24, 0x3f, 0x24, 0x40, 0x24, 0x42, 0x23, 0x44,
+    0x23, 0x45, 0x23, 0x46, 0x23, 0x48, 0x23, 0x48, 0x00, 0xac, 0x00, 0x9d,
+    0x00, 0x91, 0x01, 0x89, 0x02, 0x82, 0x03, 0x7e, 0x05, 0x7a, 0x07, 0x77,
+    0x08, 0x75, 0x09, 0x73, 0x0b, 0x71, 0x0c, 0x70, 0x0d, 0x6e, 0x0e, 0x6e,
+    0x0e, 0x6c, 0x0f, 0x6c, 0x10, 0x6b, 0x10, 0x6a, 0x11, 0x6a, 0x12, 0x6a,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x85, 0x00, 0x5f, 0x00, 0x1f, 0x0d, 0x00, 0x28, 0x00, 0x39, 0x00,
+    0x43, 0x00, 0x4a, 0x00, 0x4e, 0x00, 0x52, 0x00, 0x54, 0x00, 0x56, 0x00,
+    0x57, 0x00, 0x59, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x1f, 0x00, 0x00, 0x1f, 0x00, 0x4d,
+    0x00, 0x68, 0x00, 0x79, 0x00, 0x83, 0x00, 0x8a, 0x00, 0x8e, 0x00, 0x92,
+    0x00, 0x94, 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x45, 0x39, 0x48,
+    0x37, 0x4a, 0x35, 0x4c, 0x33, 0x4f, 0x31, 0x4f, 0x31, 0x50, 0x30, 0x52,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x54, 0x2d, 0x56,
+    0x2c, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x2a, 0x57,
+    0x42, 0x0f, 0x39, 0x15, 0x33, 0x1a, 0x2f, 0x1f, 0x2d, 0x24, 0x2a, 0x27,
+    0x29, 0x2b, 0x27, 0x2e, 0x26, 0x31, 0x26, 0x34, 0x25, 0x36, 0x25, 0x38,
+    0x25, 0x3b, 0x24, 0x3c, 0x24, 0x3e, 0x24, 0x40, 0x24, 0x41, 0x24, 0x43,
+    0x23, 0x44, 0x23, 0x45, 0x00, 0xae, 0x00, 0xa1, 0x00, 0x96, 0x00, 0x8d,
+    0x01, 0x87, 0x02, 0x82, 0x03, 0x7e, 0x05, 0x7b, 0x06, 0x78, 0x07, 0x76,
+    0x09, 0x74, 0x0a, 0x73, 0x0b, 0x71, 0x0c, 0x70, 0x0c, 0x6f, 0x0d, 0x6e,
+    0x0e, 0x6d, 0x0f, 0x6c, 0x10, 0x6c, 0x10, 0x6b, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x7c,
+    0x00, 0x4d, 0x00, 0x1f, 0x02, 0x00, 0x1a, 0x00, 0x2a, 0x00, 0x36, 0x00,
+    0x3e, 0x00, 0x45, 0x00, 0x49, 0x00, 0x4d, 0x00, 0x4f, 0x00, 0x52, 0x00,
+    0x53, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x52, 0x00, 0x3c, 0x00, 0x0d, 0x00, 0x00, 0x1f, 0x00, 0x42, 0x00, 0x5a,
+    0x00, 0x6a, 0x00, 0x76, 0x00, 0x7e, 0x00, 0x84, 0x00, 0x89, 0x00, 0x8c,
+    0x00, 0x8f, 0x00, 0x91, 0x00, 0x93, 0x00, 0x95, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x45, 0x3a, 0x47, 0x38, 0x4a, 0x35, 0x4a,
+    0x35, 0x4d, 0x33, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x52, 0x2f, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2d, 0x55,
+    0x2c, 0x57, 0x2b, 0x57, 0x2a, 0x57, 0x2a, 0x57, 0x43, 0x0e, 0x3b, 0x13,
+    0x35, 0x18, 0x31, 0x1c, 0x2e, 0x21, 0x2c, 0x24, 0x2a, 0x28, 0x28, 0x2b,
+    0x27, 0x2e, 0x27, 0x30, 0x26, 0x33, 0x25, 0x35, 0x25, 0x37, 0x25, 0x39,
+    0x25, 0x3b, 0x24, 0x3c, 0x24, 0x3d, 0x24, 0x3f, 0x24, 0x40, 0x24, 0x42,
+    0x00, 0xaf, 0x00, 0xa3, 0x00, 0x99, 0x00, 0x91, 0x00, 0x8b, 0x02, 0x86,
+    0x02, 0x81, 0x03, 0x7e, 0x05, 0x7b, 0x06, 0x79, 0x07, 0x77, 0x08, 0x75,
+    0x09, 0x74, 0x0a, 0x73, 0x0b, 0x71, 0x0c, 0x71, 0x0c, 0x6f, 0x0d, 0x6e,
+    0x0e, 0x6e, 0x0e, 0x6d, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x00, 0x8a, 0x00, 0x68, 0x00, 0x42,
+    0x00, 0x1f, 0x00, 0x04, 0x10, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x34, 0x00,
+    0x3b, 0x00, 0x41, 0x00, 0x45, 0x00, 0x49, 0x00, 0x4b, 0x00, 0x4e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x4a, 0x00,
+    0x28, 0x00, 0x02, 0x00, 0x00, 0x1f, 0x00, 0x3b, 0x00, 0x4f, 0x00, 0x5f,
+    0x00, 0x6b, 0x00, 0x74, 0x00, 0x7b, 0x00, 0x80, 0x00, 0x85, 0x00, 0x88,
+    0x00, 0x8b, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x44, 0x3b, 0x46, 0x39, 0x49, 0x36, 0x4a, 0x35, 0x4b, 0x34, 0x4e,
+    0x32, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x51, 0x2f, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x55,
+    0x2c, 0x56, 0x2b, 0x57, 0x44, 0x0e, 0x3c, 0x12, 0x36, 0x16, 0x33, 0x1a,
+    0x30, 0x1e, 0x2d, 0x22, 0x2b, 0x25, 0x2a, 0x28, 0x28, 0x2a, 0x27, 0x2d,
+    0x27, 0x30, 0x26, 0x32, 0x26, 0x34, 0x25, 0x35, 0x25, 0x37, 0x25, 0x39,
+    0x24, 0x3b, 0x24, 0x3c, 0x24, 0x3d, 0x24, 0x3f, 0x00, 0xb0, 0x00, 0xa5,
+    0x00, 0x9d, 0x00, 0x95, 0x00, 0x8e, 0x01, 0x89, 0x02, 0x85, 0x03, 0x81,
+    0x04, 0x7e, 0x05, 0x7c, 0x06, 0x7a, 0x07, 0x78, 0x07, 0x76, 0x09, 0x75,
+    0x09, 0x73, 0x0b, 0x73, 0x0b, 0x71, 0x0c, 0x71, 0x0c, 0x70, 0x0d, 0x6e,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9a, 0x00, 0x91, 0x00, 0x79, 0x00, 0x5a, 0x00, 0x3b, 0x00, 0x1f,
+    0x00, 0x09, 0x08, 0x00, 0x17, 0x00, 0x22, 0x00, 0x2c, 0x00, 0x33, 0x00,
+    0x39, 0x00, 0x3e, 0x00, 0x42, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x51, 0x00, 0x39, 0x00, 0x1a, 0x00,
+    0x00, 0x04, 0x00, 0x1f, 0x00, 0x36, 0x00, 0x48, 0x00, 0x57, 0x00, 0x62,
+    0x00, 0x6b, 0x00, 0x73, 0x00, 0x79, 0x00, 0x7e, 0x00, 0x82, 0x00, 0x85,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x44, 0x3b, 0x46,
+    0x39, 0x48, 0x37, 0x4a, 0x35, 0x4a, 0x35, 0x4c, 0x34, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x50, 0x30, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x55,
+    0x44, 0x0d, 0x3d, 0x11, 0x38, 0x15, 0x34, 0x19, 0x31, 0x1c, 0x2e, 0x20,
+    0x2d, 0x23, 0x2b, 0x25, 0x2a, 0x28, 0x28, 0x2a, 0x28, 0x2d, 0x27, 0x2f,
+    0x26, 0x31, 0x26, 0x33, 0x25, 0x34, 0x25, 0x36, 0x25, 0x38, 0x25, 0x39,
+    0x24, 0x3a, 0x24, 0x3c, 0x00, 0xb1, 0x00, 0xa8, 0x00, 0x9f, 0x00, 0x98,
+    0x00, 0x91, 0x00, 0x8c, 0x01, 0x88, 0x02, 0x84, 0x03, 0x81, 0x04, 0x7e,
+    0x05, 0x7c, 0x06, 0x7a, 0x06, 0x79, 0x07, 0x77, 0x08, 0x76, 0x09, 0x74,
+    0x0a, 0x73, 0x0b, 0x73, 0x0b, 0x71, 0x0c, 0x71, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x95,
+    0x00, 0x83, 0x00, 0x6a, 0x00, 0x4f, 0x00, 0x36, 0x00, 0x1f, 0x00, 0x0c,
+    0x03, 0x00, 0x10, 0x00, 0x1b, 0x00, 0x24, 0x00, 0x2c, 0x00, 0x32, 0x00,
+    0x37, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5c, 0x00, 0x55, 0x00, 0x43, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x09,
+    0x00, 0x1f, 0x00, 0x33, 0x00, 0x43, 0x00, 0x50, 0x00, 0x5b, 0x00, 0x64,
+    0x00, 0x6b, 0x00, 0x72, 0x00, 0x77, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x43, 0x3c, 0x46, 0x39, 0x46, 0x39, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4d, 0x33, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x50, 0x30, 0x52, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x44, 0x0d, 0x3e, 0x10,
+    0x39, 0x14, 0x35, 0x17, 0x32, 0x1b, 0x30, 0x1e, 0x2e, 0x21, 0x2c, 0x23,
+    0x2b, 0x26, 0x2a, 0x28, 0x28, 0x2a, 0x28, 0x2d, 0x27, 0x2e, 0x26, 0x30,
+    0x26, 0x32, 0x25, 0x34, 0x25, 0x35, 0x25, 0x36, 0x25, 0x38, 0x25, 0x39,
+    0x00, 0xb1, 0x00, 0xa9, 0x00, 0xa1, 0x00, 0x9a, 0x00, 0x94, 0x00, 0x8f,
+    0x01, 0x8b, 0x02, 0x87, 0x02, 0x84, 0x03, 0x81, 0x04, 0x7f, 0x05, 0x7d,
+    0x06, 0x7b, 0x06, 0x79, 0x07, 0x78, 0x07, 0x76, 0x09, 0x76, 0x09, 0x74,
+    0x0a, 0x73, 0x0b, 0x72, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x97, 0x00, 0x8a, 0x00, 0x76,
+    0x00, 0x5f, 0x00, 0x48, 0x00, 0x33, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00,
+    0x0b, 0x00, 0x15, 0x00, 0x1e, 0x00, 0x25, 0x00, 0x2c, 0x00, 0x31, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x58, 0x00,
+    0x4a, 0x00, 0x36, 0x00, 0x1f, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x1f,
+    0x00, 0x30, 0x00, 0x3f, 0x00, 0x4b, 0x00, 0x55, 0x00, 0x5e, 0x00, 0x65,
+    0x00, 0x6c, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x42, 0x3c, 0x46, 0x39, 0x46, 0x39, 0x48, 0x37, 0x4a, 0x35, 0x4a,
+    0x35, 0x4b, 0x35, 0x4e, 0x32, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x52, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x44, 0x0c, 0x3f, 0x10, 0x3a, 0x13, 0x36, 0x16,
+    0x33, 0x19, 0x30, 0x1c, 0x2e, 0x1f, 0x2d, 0x21, 0x2b, 0x24, 0x2a, 0x26,
+    0x2a, 0x28, 0x28, 0x2a, 0x28, 0x2c, 0x27, 0x2e, 0x26, 0x30, 0x26, 0x31,
+    0x26, 0x33, 0x25, 0x34, 0x25, 0x36, 0x25, 0x37, 0x00, 0xb2, 0x00, 0xaa,
+    0x00, 0xa2, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x91, 0x00, 0x8d, 0x01, 0x89,
+    0x02, 0x86, 0x02, 0x83, 0x03, 0x81, 0x04, 0x7f, 0x05, 0x7d, 0x06, 0x7b,
+    0x06, 0x79, 0x07, 0x79, 0x07, 0x77, 0x08, 0x76, 0x09, 0x75, 0x09, 0x74,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9d, 0x00, 0x99, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x6b, 0x00, 0x57,
+    0x00, 0x43, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x11, 0x00, 0x04, 0x07, 0x00,
+    0x10, 0x00, 0x19, 0x00, 0x20, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x4e, 0x00, 0x3e, 0x00,
+    0x2b, 0x00, 0x17, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x2e,
+    0x00, 0x3b, 0x00, 0x46, 0x00, 0x50, 0x00, 0x59, 0x00, 0x60, 0x00, 0x66,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x46,
+    0x39, 0x46, 0x39, 0x47, 0x38, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4b,
+    0x34, 0x4e, 0x32, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x51, 0x2f, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53,
+    0x45, 0x0c, 0x3f, 0x0f, 0x3a, 0x12, 0x37, 0x15, 0x34, 0x18, 0x32, 0x1b,
+    0x30, 0x1d, 0x2e, 0x20, 0x2d, 0x22, 0x2b, 0x24, 0x2a, 0x26, 0x2a, 0x28,
+    0x28, 0x2a, 0x28, 0x2c, 0x27, 0x2e, 0x27, 0x2f, 0x26, 0x31, 0x26, 0x32,
+    0x25, 0x33, 0x25, 0x35, 0x00, 0xb2, 0x00, 0xab, 0x00, 0xa4, 0x00, 0x9e,
+    0x00, 0x98, 0x00, 0x93, 0x00, 0x8f, 0x01, 0x8b, 0x01, 0x88, 0x02, 0x85,
+    0x02, 0x83, 0x03, 0x81, 0x04, 0x7f, 0x05, 0x7d, 0x05, 0x7c, 0x06, 0x7a,
+    0x07, 0x79, 0x07, 0x78, 0x07, 0x76, 0x09, 0x76, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x9a,
+    0x00, 0x92, 0x00, 0x84, 0x00, 0x74, 0x00, 0x62, 0x00, 0x50, 0x00, 0x3f,
+    0x00, 0x2e, 0x00, 0x1f, 0x00, 0x12, 0x00, 0x06, 0x03, 0x00, 0x0c, 0x00,
+    0x14, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5b, 0x00, 0x52, 0x00, 0x45, 0x00, 0x34, 0x00, 0x22, 0x00,
+    0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x38,
+    0x00, 0x43, 0x00, 0x4c, 0x00, 0x54, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x45, 0x3a, 0x46, 0x39, 0x46,
+    0x39, 0x49, 0x36, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4c, 0x33, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x51,
+    0x30, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x2e, 0x53, 0x45, 0x0c, 0x40, 0x0f,
+    0x3b, 0x11, 0x38, 0x14, 0x35, 0x17, 0x32, 0x1a, 0x30, 0x1c, 0x2e, 0x1e,
+    0x2d, 0x21, 0x2c, 0x22, 0x2b, 0x25, 0x2a, 0x26, 0x29, 0x28, 0x28, 0x2a,
+    0x28, 0x2c, 0x27, 0x2d, 0x27, 0x2f, 0x26, 0x30, 0x26, 0x32, 0x25, 0x33,
+    0x00, 0xb2, 0x00, 0xac, 0x00, 0xa5, 0x00, 0x9f, 0x00, 0x9a, 0x00, 0x96,
+    0x00, 0x91, 0x00, 0x8e, 0x01, 0x8a, 0x02, 0x88, 0x02, 0x85, 0x02, 0x83,
+    0x03, 0x81, 0x04, 0x7f, 0x05, 0x7d, 0x05, 0x7c, 0x06, 0x7a, 0x06, 0x79,
+    0x07, 0x78, 0x07, 0x77, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x94, 0x00, 0x89,
+    0x00, 0x7b, 0x00, 0x6b, 0x00, 0x5b, 0x00, 0x4b, 0x00, 0x3b, 0x00, 0x2d,
+    0x00, 0x1f, 0x00, 0x13, 0x00, 0x08, 0x00, 0x00, 0x09, 0x00, 0x11, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5b, 0x00,
+    0x54, 0x00, 0x49, 0x00, 0x3b, 0x00, 0x2c, 0x00, 0x1b, 0x00, 0x0b, 0x00,
+    0x00, 0x04, 0x00, 0x12, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x36, 0x00, 0x40,
+    0x00, 0x49, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x42, 0x3d, 0x44, 0x3a, 0x46, 0x39, 0x46, 0x39, 0x48, 0x37, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4d, 0x33, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x50, 0x30, 0x53,
+    0x2e, 0x53, 0x2e, 0x53, 0x45, 0x0c, 0x40, 0x0e, 0x3c, 0x11, 0x38, 0x13,
+    0x36, 0x16, 0x33, 0x18, 0x31, 0x1b, 0x30, 0x1d, 0x2e, 0x1f, 0x2d, 0x21,
+    0x2b, 0x23, 0x2b, 0x25, 0x2a, 0x27, 0x29, 0x28, 0x28, 0x2a, 0x28, 0x2c,
+    0x27, 0x2d, 0x27, 0x2f, 0x26, 0x2f, 0x26, 0x31, 0x00, 0xb3, 0x00, 0xac,
+    0x00, 0xa7, 0x00, 0xa1, 0x00, 0x9b, 0x00, 0x97, 0x00, 0x93, 0x00, 0x8f,
+    0x01, 0x8c, 0x01, 0x89, 0x02, 0x87, 0x02, 0x85, 0x02, 0x82, 0x03, 0x81,
+    0x04, 0x7f, 0x05, 0x7d, 0x05, 0x7c, 0x06, 0x7b, 0x06, 0x79, 0x07, 0x79,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9c, 0x00, 0x96, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x73,
+    0x00, 0x64, 0x00, 0x55, 0x00, 0x46, 0x00, 0x38, 0x00, 0x2b, 0x00, 0x1f,
+    0x00, 0x14, 0x00, 0x0a, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5c, 0x00, 0x56, 0x00, 0x4d, 0x00,
+    0x41, 0x00, 0x33, 0x00, 0x24, 0x00, 0x15, 0x00, 0x07, 0x00, 0x00, 0x06,
+    0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x34, 0x00, 0x3d, 0x00, 0x46,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x44,
+    0x3b, 0x46, 0x39, 0x46, 0x39, 0x47, 0x38, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x35, 0x4a, 0x35, 0x4b, 0x34, 0x4e, 0x32, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x50, 0x30, 0x52, 0x2f, 0x53,
+    0x45, 0x0c, 0x40, 0x0e, 0x3c, 0x11, 0x39, 0x13, 0x37, 0x15, 0x34, 0x18,
+    0x32, 0x1a, 0x30, 0x1c, 0x2e, 0x1e, 0x2d, 0x20, 0x2d, 0x22, 0x2b, 0x23,
+    0x2b, 0x25, 0x2a, 0x27, 0x29, 0x28, 0x28, 0x2a, 0x28, 0x2c, 0x27, 0x2d,
+    0x27, 0x2f, 0x26, 0x2f, 0x00, 0xb3, 0x00, 0xad, 0x00, 0xa7, 0x00, 0xa3,
+    0x00, 0x9d, 0x00, 0x99, 0x00, 0x95, 0x00, 0x91, 0x00, 0x8e, 0x01, 0x8b,
+    0x02, 0x88, 0x02, 0x86, 0x02, 0x84, 0x03, 0x82, 0x03, 0x81, 0x04, 0x7f,
+    0x05, 0x7e, 0x05, 0x7c, 0x06, 0x7b, 0x06, 0x7a, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9c,
+    0x00, 0x97, 0x00, 0x8f, 0x00, 0x85, 0x00, 0x79, 0x00, 0x6b, 0x00, 0x5e,
+    0x00, 0x50, 0x00, 0x43, 0x00, 0x36, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x15,
+    0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5e, 0x00, 0x5d, 0x00, 0x57, 0x00, 0x4f, 0x00, 0x45, 0x00, 0x39, 0x00,
+    0x2c, 0x00, 0x1e, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x08, 0x00, 0x14,
+    0x00, 0x1f, 0x00, 0x2a, 0x00, 0x33, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x43, 0x3c, 0x46, 0x39, 0x46,
+    0x39, 0x46, 0x39, 0x49, 0x36, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x35, 0x4c, 0x33, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x52, 0x45, 0x0b, 0x41, 0x0e,
+    0x3d, 0x10, 0x3a, 0x12, 0x37, 0x14, 0x34, 0x17, 0x32, 0x19, 0x31, 0x1b,
+    0x30, 0x1d, 0x2e, 0x1f, 0x2d, 0x20, 0x2c, 0x22, 0x2b, 0x24, 0x2a, 0x25,
+    0x2a, 0x27, 0x29, 0x28, 0x28, 0x2a, 0x28, 0x2c, 0x27, 0x2c, 0x27, 0x2e,
+    0x00, 0xb3, 0x00, 0xae, 0x00, 0xa8, 0x00, 0xa3, 0x00, 0x9f, 0x00, 0x9a,
+    0x00, 0x96, 0x00, 0x93, 0x00, 0x8f, 0x01, 0x8d, 0x01, 0x8a, 0x02, 0x88,
+    0x02, 0x86, 0x02, 0x84, 0x03, 0x82, 0x03, 0x81, 0x04, 0x7f, 0x05, 0x7e,
+    0x05, 0x7c, 0x06, 0x7c, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d, 0x00, 0x98, 0x00, 0x91,
+    0x00, 0x88, 0x00, 0x7e, 0x00, 0x72, 0x00, 0x65, 0x00, 0x59, 0x00, 0x4c,
+    0x00, 0x40, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x0d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00,
+    0x59, 0x00, 0x52, 0x00, 0x49, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x25, 0x00,
+    0x19, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x15, 0x00, 0x1f,
+    0x00, 0x29, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3d, 0x42, 0x3d, 0x43, 0x3c, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x47,
+    0x38, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4d,
+    0x33, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x45, 0x0b, 0x41, 0x0e, 0x3e, 0x10, 0x3a, 0x11,
+    0x38, 0x14, 0x35, 0x16, 0x33, 0x18, 0x32, 0x1a, 0x30, 0x1c, 0x2e, 0x1d,
+    0x2e, 0x20, 0x2d, 0x21, 0x2b, 0x22, 0x2b, 0x24, 0x2a, 0x25, 0x2a, 0x27,
+    0x28, 0x28, 0x28, 0x2a, 0x28, 0x2c, 0x27, 0x2c, 0x00, 0xb3, 0x00, 0xae,
+    0x00, 0xa9, 0x00, 0xa4, 0x00, 0xa0, 0x00, 0x9b, 0x00, 0x98, 0x00, 0x94,
+    0x00, 0x91, 0x00, 0x8e, 0x01, 0x8c, 0x01, 0x89, 0x02, 0x87, 0x02, 0x86,
+    0x02, 0x84, 0x03, 0x82, 0x03, 0x80, 0x04, 0x7f, 0x05, 0x7e, 0x05, 0x7c,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9e, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x93, 0x00, 0x8b, 0x00, 0x82,
+    0x00, 0x77, 0x00, 0x6c, 0x00, 0x60, 0x00, 0x54, 0x00, 0x49, 0x00, 0x3d,
+    0x00, 0x33, 0x00, 0x29, 0x00, 0x1f, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x5d, 0x00, 0x59, 0x00, 0x53, 0x00,
+    0x4b, 0x00, 0x42, 0x00, 0x37, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x14, 0x00,
+    0x09, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x28,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x42,
+    0x3d, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x46, 0x39, 0x4a, 0x36, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4b, 0x34, 0x4e, 0x32, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x46, 0x0b, 0x42, 0x0d, 0x3e, 0x10, 0x3b, 0x11, 0x38, 0x13, 0x36, 0x16,
+    0x34, 0x17, 0x32, 0x19, 0x30, 0x1b, 0x30, 0x1d, 0x2e, 0x1e, 0x2d, 0x20,
+    0x2d, 0x22, 0x2b, 0x23, 0x2b, 0x25, 0x2a, 0x25, 0x2a, 0x28, 0x28, 0x28,
+    0x28, 0x2a, 0x28, 0x2c, 0x00, 0xb3, 0x00, 0xae, 0x00, 0xaa, 0x00, 0xa5,
+    0x00, 0xa1, 0x00, 0x9d, 0x00, 0x99, 0x00, 0x96, 0x00, 0x93, 0x00, 0x90,
+    0x00, 0x8d, 0x01, 0x8b, 0x02, 0x89, 0x02, 0x87, 0x02, 0x85, 0x02, 0x83,
+    0x03, 0x82, 0x03, 0x80, 0x04, 0x7f, 0x05, 0x7e, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x9d,
+    0x00, 0x9a, 0x00, 0x95, 0x00, 0x8d, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71,
+    0x00, 0x66, 0x00, 0x5b, 0x00, 0x50, 0x00, 0x46, 0x00, 0x3b, 0x00, 0x31,
+    0x00, 0x28, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x5f, 0x00, 0x5d, 0x00, 0x5a, 0x00, 0x55, 0x00, 0x4e, 0x00, 0x45, 0x00,
+    0x3c, 0x00, 0x31, 0x00, 0x26, 0x00, 0x1b, 0x00, 0x11, 0x00, 0x06, 0x00,
+    0x00, 0x03, 0x00, 0x0d, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x3d, 0x42, 0x3d, 0x45, 0x3a, 0x46,
+    0x39, 0x46, 0x39, 0x46, 0x39, 0x48, 0x37, 0x4a, 0x35, 0x4a, 0x35, 0x4a,
+    0x35, 0x4a, 0x35, 0x4a, 0x35, 0x4c, 0x34, 0x4f, 0x31, 0x4f, 0x31, 0x4f,
+    0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x31, 0x4f, 0x46, 0x0b, 0x42, 0x0d,
+    0x3e, 0x0f, 0x3c, 0x11, 0x39, 0x13, 0x37, 0x15, 0x34, 0x16, 0x33, 0x18,
+    0x32, 0x1a, 0x30, 0x1c, 0x2e, 0x1d, 0x2e, 0x20, 0x2d, 0x20, 0x2c, 0x22,
+    0x2b, 0x23, 0x2b, 0x25, 0x2a, 0x26, 0x2a, 0x28, 0x28, 0x28, 0x28, 0x2a,
+    0x00, 0xb4, 0x00, 0xaf, 0x00, 0xaa, 0x00, 0xa6, 0x00, 0xa2, 0x00, 0x9e,
+    0x00, 0x9a, 0x00, 0x97, 0x00, 0x94, 0x00, 0x91, 0x00, 0x8e, 0x01, 0x8c,
+    0x01, 0x8a, 0x02, 0x88, 0x02, 0x86, 0x02, 0x85, 0x02, 0x83, 0x03, 0x82,
+    0x03, 0x80, 0x04, 0x7f, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60,
+    0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x0f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x0f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xb2, 0x00, 0x6f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x17, 0x00, 0x0b, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0xa2, 0x00,
+    0x4f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1e, 0x00, 0x1a, 0x00, 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x7f, 0x00, 0x3c, 0x00,
+    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c,
+    0x00, 0x16, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xd6, 0x00, 0xc6, 0x00, 0x9c, 0x00, 0x66, 0x00, 0x2f, 0x00, 0x01, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x12,
+    0x00, 0x0c, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0x00, 0xcd, 0x00,
+    0xae, 0x00, 0x82, 0x00, 0x54, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1a, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x0a,
+    0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x97, 0x00,
+    0x6f, 0x00, 0x47, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e,
+    0x00, 0x1b, 0x00, 0x17, 0x00, 0x12, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x04,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdb, 0x00, 0xd4, 0x00, 0xc2, 0x00, 0xa5, 0x00, 0x84, 0x00, 0x60, 0x00,
+    0x3d, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x19,
+    0x00, 0x15, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd7, 0x00,
+    0xc7, 0x00, 0xb0, 0x00, 0x93, 0x00, 0x74, 0x00, 0x55, 0x00, 0x36, 0x00,
+    0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x16, 0x00, 0x12,
+    0x00, 0x0e, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0xb8, 0x00,
+    0xa0, 0x00, 0x84, 0x00, 0x68, 0x00, 0x4b, 0x00, 0x30, 0x00, 0x17, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1d, 0x00, 0x1b, 0x00, 0x18, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0d,
+    0x00, 0x09, 0x00, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xd9, 0x00, 0xcf, 0x00, 0xbe, 0x00, 0xa9, 0x00, 0x91, 0x00,
+    0x78, 0x00, 0x5d, 0x00, 0x44, 0x00, 0x2b, 0x00, 0x15, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b,
+    0x00, 0x19, 0x00, 0x16, 0x00, 0x13, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x08,
+    0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda, 0x00,
+    0xd1, 0x00, 0xc3, 0x00, 0xb1, 0x00, 0x9c, 0x00, 0x85, 0x00, 0x6d, 0x00,
+    0x55, 0x00, 0x3e, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x1a, 0x00, 0x17,
+    0x00, 0x14, 0x00, 0x11, 0x00, 0x0e, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x05,
+    0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd3, 0x00, 0xc7, 0x00,
+    0xb7, 0x00, 0xa4, 0x00, 0x90, 0x00, 0x7a, 0x00, 0x64, 0x00, 0x4e, 0x00,
+    0x39, 0x00, 0x24, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1e, 0x00, 0x1c, 0x00, 0x1a, 0x00, 0x18, 0x00, 0x15, 0x00, 0x13,
+    0x00, 0x10, 0x00, 0x0d, 0x00, 0x0a, 0x00, 0x07, 0x00, 0x04, 0x00, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xdb, 0x00, 0xd5, 0x00, 0xca, 0x00, 0xbc, 0x00, 0xab, 0x00,
+    0x99, 0x00, 0x85, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x48, 0x00, 0x34, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d,
+    0x00, 0x1b, 0x00, 0x19, 0x00, 0x16, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0e,
+    0x00, 0x0c, 0x00, 0x09, 0x00, 0x06, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00,
+    0xd6, 0x00, 0xcd, 0x00, 0xc0, 0x00, 0xb1, 0x00, 0xa0, 0x00, 0x8e, 0x00,
+    0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x1c,
+    0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x3e, 0x00, 0x2b, 0x00, 0x34, 0x00, 0x32, 0x00, 0x2c, 0x00, 0x24,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x11, 0x09, 0x01, 0x11, 0x00, 0x17,
+    0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x61, 0x01, 0x23, 0x03, 0x03, 0x09, 0x00, 0x13, 0x00, 0x18, 0x00, 0x1a,
+    0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e,
+    0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x00, 0x17, 0x00, 0x1a, 0x00, 0x1c,
+    0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x2b, 0x00, 0x21,
+    0x00, 0x27, 0x00, 0x2b, 0x00, 0x28, 0x00, 0x21, 0x00, 0x1d, 0x00, 0x1e,
+    0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x87, 0x00, 0x39, 0x01, 0x0f, 0x07, 0x02, 0x0c, 0x00, 0x12, 0x00, 0x17,
+    0x00, 0x19, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d,
+    0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x9f, 0x00, 0x5f, 0x00,
+    0x1f, 0x00, 0x04, 0x01, 0x00, 0x0a, 0x00, 0x11, 0x00, 0x15, 0x00, 0x18,
+    0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d,
+    0x00, 0x1d, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x0b, 0x00, 0x12, 0x00, 0x16, 0x00, 0x18, 0x00, 0x1a,
+    0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e,
+    0x00, 0x1e, 0x00, 0x1e, 0x00, 0x34, 0x00, 0x27, 0x00, 0x0f, 0x00, 0x1a,
+    0x00, 0x1c, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c,
+    0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0x87, 0x00,
+    0x32, 0x00, 0x19, 0x05, 0x0b, 0x09, 0x03, 0x0b, 0x00, 0x0e, 0x00, 0x12,
+    0x00, 0x15, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1b,
+    0x00, 0x1c, 0x00, 0x1c, 0xc5, 0x00, 0x9f, 0x00, 0x5f, 0x00, 0x32, 0x00,
+    0x16, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x12,
+    0x00, 0x14, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x08, 0x00, 0x0e, 0x00, 0x12, 0x00, 0x15, 0x00, 0x17, 0x00, 0x19,
+    0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d,
+    0x00, 0x32, 0x00, 0x2b, 0x00, 0x1a, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x0e,
+    0x00, 0x12, 0x00, 0x15, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b,
+    0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xcd, 0x00, 0xaf, 0x00, 0x6e, 0x00, 0x31, 0x00,
+    0x1e, 0x04, 0x12, 0x07, 0x0a, 0x09, 0x04, 0x0a, 0x00, 0x0b, 0x00, 0x0f,
+    0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19,
+    0xd2, 0x00, 0xbc, 0x00, 0x8d, 0x00, 0x5f, 0x00, 0x3d, 0x00, 0x25, 0x00,
+    0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x0d,
+    0x00, 0x10, 0x00, 0x12, 0x00, 0x14, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
+    0x00, 0x0c, 0x00, 0x0f, 0x00, 0x12, 0x00, 0x15, 0x00, 0x16, 0x00, 0x18,
+    0x00, 0x19, 0x00, 0x1a, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x2c, 0x00, 0x28,
+    0x00, 0x1c, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x0f,
+    0x00, 0x12, 0x00, 0x15, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a,
+    0x00, 0x1a, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xd4, 0x00, 0xc1, 0x00, 0x93, 0x00, 0x5f, 0x00, 0x30, 0x00, 0x22, 0x03,
+    0x17, 0x06, 0x0f, 0x07, 0x0a, 0x09, 0x05, 0x0a, 0x02, 0x0b, 0x00, 0x0c,
+    0x00, 0x0f, 0x00, 0x11, 0x00, 0x13, 0x00, 0x15, 0xd7, 0x00, 0xc9, 0x00,
+    0xa8, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x44, 0x00, 0x2f, 0x00, 0x1f, 0x00,
+    0x14, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x09,
+    0x00, 0x0c, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a,
+    0x00, 0x0d, 0x00, 0x10, 0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17,
+    0x00, 0x18, 0x00, 0x19, 0x00, 0x24, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0e,
+    0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x10,
+    0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00, 0xcb, 0x00,
+    0xaa, 0x00, 0x7f, 0x00, 0x55, 0x00, 0x30, 0x00, 0x24, 0x02, 0x1b, 0x05,
+    0x14, 0x06, 0x0e, 0x08, 0x09, 0x09, 0x06, 0x0a, 0x03, 0x0b, 0x00, 0x0b,
+    0x00, 0x0d, 0x00, 0x0f, 0xda, 0x00, 0xd0, 0x00, 0xb8, 0x00, 0x99, 0x00,
+    0x7a, 0x00, 0x5f, 0x00, 0x49, 0x00, 0x36, 0x00, 0x28, 0x00, 0x1c, 0x00,
+    0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x05,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c,
+    0x00, 0x0e, 0x00, 0x11, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16,
+    0x00, 0x1f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x12, 0x00, 0x0c, 0x00, 0x05,
+    0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x11,
+    0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd1, 0x00, 0xb8, 0x00, 0x96, 0x00,
+    0x71, 0x00, 0x4e, 0x00, 0x30, 0x00, 0x26, 0x02, 0x1e, 0x04, 0x17, 0x06,
+    0x12, 0x07, 0x0d, 0x08, 0x09, 0x09, 0x06, 0x0a, 0x04, 0x0a, 0x01, 0x0b,
+    0xdb, 0x00, 0xd5, 0x00, 0xc3, 0x00, 0xaa, 0x00, 0x8f, 0x00, 0x76, 0x00,
+    0x5f, 0x00, 0x4c, 0x00, 0x3c, 0x00, 0x2f, 0x00, 0x24, 0x00, 0x1b, 0x00,
+    0x13, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x0d,
+    0x00, 0x0f, 0x00, 0x11, 0x00, 0x13, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x1e,
+    0x00, 0x1a, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00,
+    0x00, 0x04, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x0f, 0x00, 0x11,
+    0x00, 0x13, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdb, 0x00, 0xd4, 0x00, 0xc1, 0x00, 0xa6, 0x00, 0x87, 0x00, 0x67, 0x00,
+    0x4a, 0x00, 0x30, 0x00, 0x27, 0x02, 0x20, 0x03, 0x1a, 0x05, 0x14, 0x06,
+    0x10, 0x07, 0x0c, 0x08, 0x09, 0x09, 0x07, 0x0a, 0xdc, 0x00, 0xd7, 0x00,
+    0xc9, 0x00, 0xb6, 0x00, 0x9f, 0x00, 0x88, 0x00, 0x72, 0x00, 0x5f, 0x00,
+    0x4e, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00, 0x21, 0x00, 0x19, 0x00,
+    0x13, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e,
+    0x00, 0x10, 0x00, 0x11, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17,
+    0x00, 0x12, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03,
+    0x00, 0x06, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x11,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd7, 0x00,
+    0xc8, 0x00, 0xb2, 0x00, 0x97, 0x00, 0x7b, 0x00, 0x60, 0x00, 0x46, 0x00,
+    0x30, 0x00, 0x28, 0x01, 0x21, 0x03, 0x1c, 0x04, 0x17, 0x06, 0x13, 0x07,
+    0x0f, 0x08, 0x0c, 0x08, 0xdd, 0x00, 0xd9, 0x00, 0xce, 0x00, 0xbe, 0x00,
+    0xab, 0x00, 0x96, 0x00, 0x82, 0x00, 0x70, 0x00, 0x5f, 0x00, 0x50, 0x00,
+    0x43, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x26, 0x00, 0x1f, 0x00, 0x18, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x03, 0x00, 0x06, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x0d, 0x00, 0x0e,
+    0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x19, 0x00, 0x15, 0x00, 0x10,
+    0x00, 0x0c, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06,
+    0x00, 0x08, 0x00, 0x0b, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0xba, 0x00,
+    0xa4, 0x00, 0x8b, 0x00, 0x72, 0x00, 0x5a, 0x00, 0x44, 0x00, 0x2f, 0x00,
+    0x29, 0x01, 0x23, 0x03, 0x1e, 0x04, 0x19, 0x05, 0x15, 0x06, 0x11, 0x07,
+    0xdd, 0x00, 0xda, 0x00, 0xd1, 0x00, 0xc4, 0x00, 0xb4, 0x00, 0xa2, 0x00,
+    0x90, 0x00, 0x7e, 0x00, 0x6e, 0x00, 0x5f, 0x00, 0x52, 0x00, 0x46, 0x00,
+    0x3c, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+    0x00, 0x05, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x0c, 0x00, 0x1f, 0x00, 0x1e,
+    0x00, 0x1d, 0x00, 0x1a, 0x00, 0x16, 0x00, 0x12, 0x00, 0x0e, 0x00, 0x0a,
+    0x00, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x08,
+    0x00, 0x0a, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xd9, 0x00, 0xd0, 0x00, 0xc0, 0x00, 0xad, 0x00, 0x98, 0x00,
+    0x81, 0x00, 0x6b, 0x00, 0x56, 0x00, 0x42, 0x00, 0x2f, 0x00, 0x29, 0x01,
+    0x24, 0x02, 0x1f, 0x04, 0x1b, 0x05, 0x17, 0x06, 0xdd, 0x00, 0xdb, 0x00,
+    0xd4, 0x00, 0xc9, 0x00, 0xbb, 0x00, 0xab, 0x00, 0x9b, 0x00, 0x8a, 0x00,
+    0x7b, 0x00, 0x6c, 0x00, 0x5f, 0x00, 0x53, 0x00, 0x48, 0x00, 0x3f, 0x00,
+    0x36, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05,
+    0x00, 0x07, 0x00, 0x09, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b,
+    0x00, 0x18, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0d, 0x00, 0x09, 0x00, 0x06,
+    0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x07, 0x00, 0x09,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda, 0x00,
+    0xd2, 0x00, 0xc5, 0x00, 0xb5, 0x00, 0xa2, 0x00, 0x8e, 0x00, 0x79, 0x00,
+    0x65, 0x00, 0x52, 0x00, 0x40, 0x00, 0x2f, 0x00, 0x2a, 0x01, 0x25, 0x02,
+    0x20, 0x03, 0x1c, 0x04, 0xde, 0x00, 0xdc, 0x00, 0xd6, 0x00, 0xcc, 0x00,
+    0xc0, 0x00, 0xb2, 0x00, 0xa4, 0x00, 0x95, 0x00, 0x86, 0x00, 0x78, 0x00,
+    0x6b, 0x00, 0x5f, 0x00, 0x54, 0x00, 0x4a, 0x00, 0x41, 0x00, 0x39, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19, 0x00, 0x16,
+    0x00, 0x13, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02,
+    0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc9, 0x00,
+    0xbb, 0x00, 0xaa, 0x00, 0x98, 0x00, 0x85, 0x00, 0x72, 0x00, 0x60, 0x00,
+    0x4f, 0x00, 0x3e, 0x00, 0x2f, 0x00, 0x2a, 0x01, 0x26, 0x02, 0x21, 0x03,
+    0xde, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xcf, 0x00, 0xc4, 0x00, 0xb8, 0x00,
+    0xab, 0x00, 0x9e, 0x00, 0x90, 0x00, 0x83, 0x00, 0x76, 0x00, 0x6a, 0x00,
+    0x5f, 0x00, 0x55, 0x00, 0x4c, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x1e, 0x00, 0x1c, 0x00, 0x1a, 0x00, 0x17, 0x00, 0x14, 0x00, 0x11,
+    0x00, 0x0e, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00,
+    0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xde, 0x00, 0xdc, 0x00, 0xd6, 0x00, 0xcc, 0x00, 0xc0, 0x00, 0xb1, 0x00,
+    0xa0, 0x00, 0x8f, 0x00, 0x7e, 0x00, 0x6d, 0x00, 0x5c, 0x00, 0x4c, 0x00,
+    0x3d, 0x00, 0x2f, 0x00, 0x2b, 0x01, 0x26, 0x02, 0xde, 0x00, 0xdc, 0x00,
+    0xd8, 0x00, 0xd1, 0x00, 0xc8, 0x00, 0xbd, 0x00, 0xb1, 0x00, 0xa5, 0x00,
+    0x98, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5f, 0x00,
+    0x56, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c,
+    0x00, 0x1a, 0x00, 0x18, 0x00, 0x15, 0x00, 0x13, 0x00, 0x10, 0x00, 0x0d,
+    0x00, 0x0a, 0x00, 0x07, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00,
+    0xd7, 0x00, 0xce, 0x00, 0xc3, 0x00, 0xb6, 0x00, 0xa8, 0x00, 0x98, 0x00,
+    0x88, 0x00, 0x78, 0x00, 0x68, 0x00, 0x59, 0x00, 0x4a, 0x00, 0x3c, 0x00,
+    0x2f, 0x00, 0x2b, 0x01, 0xde, 0x00, 0xdd, 0x00, 0xd9, 0x00, 0xd3, 0x00,
+    0xcb, 0x00, 0xc1, 0x00, 0xb7, 0x00, 0xab, 0x00, 0xa0, 0x00, 0x94, 0x00,
+    0x88, 0x00, 0x7d, 0x00, 0x73, 0x00, 0x69, 0x00, 0x5f, 0x00, 0x56, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19,
+    0x00, 0x16, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x09,
+    0x00, 0x06, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xd0, 0x00,
+    0xc7, 0x00, 0xbb, 0x00, 0xae, 0x00, 0xa0, 0x00, 0x91, 0x00, 0x82, 0x00,
+    0x73, 0x00, 0x64, 0x00, 0x56, 0x00, 0x48, 0x00, 0x3b, 0x00, 0x2f, 0x00,
+    0xde, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd4, 0x00, 0xcd, 0x00, 0xc5, 0x00,
+    0xbb, 0x00, 0xb1, 0x00, 0xa6, 0x00, 0x9b, 0x00, 0x90, 0x00, 0x85, 0x00,
+    0x7b, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x6f, 0x00,
+    0xb2, 0x00, 0xc8, 0x00, 0xd2, 0x00, 0xd6, 0x00, 0xd9, 0x00, 0xda, 0x00,
+    0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xde, 0x00, 0x4c, 0x04, 0x87, 0x00, 0xbc, 0x00, 0xcd, 0x00,
+    0xd4, 0x00, 0xd8, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x76, 0x00,
+    0x9b, 0x00, 0xac, 0x00, 0xbc, 0x00, 0xcd, 0x00, 0xd9, 0x00, 0xda, 0x00,
+    0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xde, 0x00, 0x61, 0x01, 0x9f, 0x00, 0xc5, 0x00, 0xd2, 0x00,
+    0xd7, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00,
+    0xdd, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x6f, 0x00, 0xa2, 0x00,
+    0xb9, 0x00, 0xc6, 0x00, 0xcd, 0x00, 0xd2, 0x00, 0xd4, 0x00, 0xd7, 0x00,
+    0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdc, 0x00,
+    0x11, 0x09, 0x39, 0x01, 0x87, 0x00, 0xaf, 0x00, 0xc1, 0x00, 0xcb, 0x00,
+    0xd1, 0x00, 0xd4, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00,
+    0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x5b, 0x00, 0x75, 0x00, 0x96, 0x00,
+    0xab, 0x00, 0xc0, 0x00, 0xcd, 0x00, 0xd2, 0x00, 0xd4, 0x00, 0xd7, 0x00,
+    0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdc, 0x00,
+    0x23, 0x03, 0x5f, 0x00, 0x9f, 0x00, 0xbc, 0x00, 0xc9, 0x00, 0xd0, 0x00,
+    0xd5, 0x00, 0xd7, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00,
+    0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x4f, 0x00, 0x7f, 0x00, 0x9c, 0x00,
+    0xae, 0x00, 0xb9, 0x00, 0xc2, 0x00, 0xc7, 0x00, 0xcc, 0x00, 0xcf, 0x00,
+    0xd1, 0x00, 0xd3, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0x01, 0x11, 0x0f, 0x07,
+    0x32, 0x00, 0x6e, 0x00, 0x93, 0x00, 0xaa, 0x00, 0xb8, 0x00, 0xc1, 0x00,
+    0xc8, 0x00, 0xcc, 0x00, 0xd0, 0x00, 0xd2, 0x00, 0xd4, 0x00, 0xd6, 0x00,
+    0xd7, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9b, 0x00, 0x75, 0x00, 0x2b, 0x00, 0x5b, 0x00, 0x7f, 0x00, 0x9b, 0x00,
+    0xae, 0x00, 0xb9, 0x00, 0xc2, 0x00, 0xc7, 0x00, 0xcc, 0x00, 0xcf, 0x00,
+    0xd1, 0x00, 0xd3, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0x03, 0x09, 0x1f, 0x00,
+    0x5f, 0x00, 0x8d, 0x00, 0xa8, 0x00, 0xb8, 0x00, 0xc3, 0x00, 0xc9, 0x00,
+    0xce, 0x00, 0xd1, 0x00, 0xd4, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00,
+    0xd9, 0x00, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x02, 0x00, 0x3c, 0x00, 0x66, 0x00, 0x82, 0x00, 0x97, 0x00,
+    0xa5, 0x00, 0xb0, 0x00, 0xb8, 0x00, 0xbe, 0x00, 0xc3, 0x00, 0xc7, 0x00,
+    0xca, 0x00, 0xcd, 0x00, 0x00, 0x17, 0x02, 0x0c, 0x19, 0x05, 0x31, 0x00,
+    0x5f, 0x00, 0x7f, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb2, 0x00, 0xba, 0x00,
+    0xc0, 0x00, 0xc5, 0x00, 0xc9, 0x00, 0xcc, 0x00, 0xce, 0x00, 0xd0, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x96, 0x00,
+    0x5b, 0x00, 0x13, 0x00, 0x41, 0x00, 0x66, 0x00, 0x82, 0x00, 0x97, 0x00,
+    0xa5, 0x00, 0xb0, 0x00, 0xb8, 0x00, 0xbe, 0x00, 0xc3, 0x00, 0xc7, 0x00,
+    0xca, 0x00, 0xcd, 0x00, 0x00, 0x13, 0x04, 0x01, 0x32, 0x00, 0x5f, 0x00,
+    0x81, 0x00, 0x99, 0x00, 0xaa, 0x00, 0xb6, 0x00, 0xbe, 0x00, 0xc4, 0x00,
+    0xc9, 0x00, 0xcc, 0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x01, 0x00, 0x2f, 0x00, 0x54, 0x00, 0x6f, 0x00, 0x84, 0x00, 0x93, 0x00,
+    0xa0, 0x00, 0xa9, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc0, 0x00,
+    0x00, 0x1b, 0x00, 0x12, 0x0b, 0x09, 0x1e, 0x04, 0x30, 0x00, 0x55, 0x00,
+    0x71, 0x00, 0x87, 0x00, 0x97, 0x00, 0xa4, 0x00, 0xad, 0x00, 0xb5, 0x00,
+    0xbb, 0x00, 0xc0, 0x00, 0xc3, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0xab, 0x00, 0x7f, 0x00, 0x41, 0x00,
+    0x03, 0x00, 0x2f, 0x00, 0x54, 0x00, 0x6f, 0x00, 0x84, 0x00, 0x93, 0x00,
+    0xa0, 0x00, 0xa9, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc0, 0x00,
+    0x00, 0x18, 0x00, 0x0a, 0x16, 0x00, 0x3d, 0x00, 0x5f, 0x00, 0x7a, 0x00,
+    0x8f, 0x00, 0x9f, 0x00, 0xab, 0x00, 0xb4, 0x00, 0xbb, 0x00, 0xc0, 0x00,
+    0xc4, 0x00, 0xc8, 0x00, 0xcb, 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+    0x27, 0x00, 0x47, 0x00, 0x60, 0x00, 0x74, 0x00, 0x84, 0x00, 0x91, 0x00,
+    0x9c, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1, 0x00, 0x00, 0x1c, 0x00, 0x17,
+    0x03, 0x0b, 0x12, 0x07, 0x22, 0x03, 0x30, 0x00, 0x4e, 0x00, 0x67, 0x00,
+    0x7b, 0x00, 0x8b, 0x00, 0x98, 0x00, 0xa2, 0x00, 0xaa, 0x00, 0xb1, 0x00,
+    0xb6, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xcd, 0x00, 0xc0, 0x00, 0x9b, 0x00, 0x66, 0x00, 0x2f, 0x00, 0x02, 0x00,
+    0x27, 0x00, 0x47, 0x00, 0x60, 0x00, 0x74, 0x00, 0x84, 0x00, 0x91, 0x00,
+    0x9c, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1, 0x00, 0x00, 0x1a, 0x00, 0x11,
+    0x06, 0x00, 0x25, 0x00, 0x44, 0x00, 0x5f, 0x00, 0x76, 0x00, 0x88, 0x00,
+    0x96, 0x00, 0xa2, 0x00, 0xab, 0x00, 0xb2, 0x00, 0xb8, 0x00, 0xbd, 0x00,
+    0xc1, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00,
+    0x3d, 0x00, 0x55, 0x00, 0x68, 0x00, 0x78, 0x00, 0x85, 0x00, 0x90, 0x00,
+    0x99, 0x00, 0xa0, 0x00, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x0e, 0x0a, 0x09,
+    0x17, 0x06, 0x24, 0x02, 0x30, 0x00, 0x4a, 0x00, 0x60, 0x00, 0x72, 0x00,
+    0x81, 0x00, 0x8e, 0x00, 0x98, 0x00, 0xa0, 0x00, 0xa8, 0x00, 0xae, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0x00, 0xcd, 0x00,
+    0xae, 0x00, 0x82, 0x00, 0x54, 0x00, 0x27, 0x00, 0x01, 0x00, 0x21, 0x00,
+    0x3d, 0x00, 0x55, 0x00, 0x68, 0x00, 0x78, 0x00, 0x85, 0x00, 0x90, 0x00,
+    0x99, 0x00, 0xa0, 0x00, 0x00, 0x1c, 0x00, 0x15, 0x00, 0x03, 0x14, 0x00,
+    0x2f, 0x00, 0x49, 0x00, 0x5f, 0x00, 0x72, 0x00, 0x82, 0x00, 0x90, 0x00,
+    0x9b, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbb, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x36, 0x00,
+    0x4b, 0x00, 0x5d, 0x00, 0x6d, 0x00, 0x7a, 0x00, 0x85, 0x00, 0x8e, 0x00,
+    0x00, 0x1e, 0x00, 0x1b, 0x00, 0x12, 0x04, 0x0a, 0x0f, 0x07, 0x1b, 0x05,
+    0x26, 0x02, 0x30, 0x00, 0x46, 0x00, 0x5a, 0x00, 0x6b, 0x00, 0x79, 0x00,
+    0x85, 0x00, 0x8f, 0x00, 0x98, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x97, 0x00,
+    0x6f, 0x00, 0x47, 0x00, 0x21, 0x00, 0x01, 0x00, 0x1d, 0x00, 0x36, 0x00,
+    0x4b, 0x00, 0x5d, 0x00, 0x6d, 0x00, 0x7a, 0x00, 0x85, 0x00, 0x8e, 0x00,
+    0x00, 0x1d, 0x00, 0x18, 0x00, 0x0a, 0x09, 0x00, 0x1f, 0x00, 0x36, 0x00,
+    0x4c, 0x00, 0x5f, 0x00, 0x70, 0x00, 0x7e, 0x00, 0x8a, 0x00, 0x95, 0x00,
+    0x9e, 0x00, 0xa5, 0x00, 0xab, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x30, 0x00, 0x44, 0x00,
+    0x55, 0x00, 0x64, 0x00, 0x70, 0x00, 0x7b, 0x00, 0x00, 0x1e, 0x00, 0x1c,
+    0x00, 0x15, 0x00, 0x0b, 0x0a, 0x09, 0x14, 0x06, 0x1e, 0x04, 0x27, 0x02,
+    0x30, 0x00, 0x44, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x7e, 0x00,
+    0x88, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdb, 0x00, 0xd4, 0x00, 0xc2, 0x00, 0xa5, 0x00, 0x84, 0x00, 0x60, 0x00,
+    0x3d, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x30, 0x00, 0x44, 0x00,
+    0x55, 0x00, 0x64, 0x00, 0x70, 0x00, 0x7b, 0x00, 0x00, 0x1d, 0x00, 0x1a,
+    0x00, 0x0f, 0x00, 0x00, 0x14, 0x00, 0x28, 0x00, 0x3c, 0x00, 0x4e, 0x00,
+    0x5f, 0x00, 0x6e, 0x00, 0x7b, 0x00, 0x86, 0x00, 0x90, 0x00, 0x98, 0x00,
+    0xa0, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x2b, 0x00, 0x3e, 0x00, 0x4e, 0x00,
+    0x5c, 0x00, 0x68, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x17, 0x00, 0x0f,
+    0x05, 0x0a, 0x0e, 0x08, 0x17, 0x06, 0x20, 0x03, 0x28, 0x01, 0x2f, 0x00,
+    0x42, 0x00, 0x52, 0x00, 0x60, 0x00, 0x6d, 0x00, 0x78, 0x00, 0x82, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd7, 0x00,
+    0xc7, 0x00, 0xb0, 0x00, 0x93, 0x00, 0x74, 0x00, 0x55, 0x00, 0x36, 0x00,
+    0x19, 0x00, 0x00, 0x00, 0x17, 0x00, 0x2b, 0x00, 0x3e, 0x00, 0x4e, 0x00,
+    0x5c, 0x00, 0x68, 0x00, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x05,
+    0x0b, 0x00, 0x1c, 0x00, 0x2f, 0x00, 0x40, 0x00, 0x50, 0x00, 0x5f, 0x00,
+    0x6c, 0x00, 0x78, 0x00, 0x83, 0x00, 0x8c, 0x00, 0x94, 0x00, 0x9b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x15, 0x00, 0x28, 0x00, 0x39, 0x00, 0x48, 0x00, 0x55, 0x00,
+    0x00, 0x1f, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x12, 0x02, 0x0b, 0x09, 0x09,
+    0x12, 0x07, 0x1a, 0x05, 0x21, 0x03, 0x29, 0x01, 0x2f, 0x00, 0x40, 0x00,
+    0x4f, 0x00, 0x5c, 0x00, 0x68, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0xb8, 0x00,
+    0xa0, 0x00, 0x84, 0x00, 0x68, 0x00, 0x4b, 0x00, 0x30, 0x00, 0x17, 0x00,
+    0x00, 0x00, 0x15, 0x00, 0x28, 0x00, 0x39, 0x00, 0x48, 0x00, 0x55, 0x00,
+    0x00, 0x1e, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x09, 0x04, 0x00, 0x13, 0x00,
+    0x24, 0x00, 0x34, 0x00, 0x43, 0x00, 0x52, 0x00, 0x5f, 0x00, 0x6b, 0x00,
+    0x76, 0x00, 0x80, 0x00, 0x88, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x13, 0x00, 0x24, 0x00, 0x34, 0x00, 0x42, 0x00, 0x00, 0x1f, 0x00, 0x1d,
+    0x00, 0x1a, 0x00, 0x14, 0x00, 0x0c, 0x06, 0x0a, 0x0d, 0x08, 0x14, 0x06,
+    0x1c, 0x04, 0x23, 0x03, 0x29, 0x01, 0x2f, 0x00, 0x3e, 0x00, 0x4c, 0x00,
+    0x59, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xd9, 0x00, 0xcf, 0x00, 0xbe, 0x00, 0xa9, 0x00, 0x91, 0x00,
+    0x78, 0x00, 0x5d, 0x00, 0x44, 0x00, 0x2b, 0x00, 0x15, 0x00, 0x00, 0x00,
+    0x13, 0x00, 0x24, 0x00, 0x34, 0x00, 0x42, 0x00, 0x00, 0x1e, 0x00, 0x1c,
+    0x00, 0x16, 0x00, 0x0d, 0x00, 0x01, 0x0c, 0x00, 0x1b, 0x00, 0x29, 0x00,
+    0x38, 0x00, 0x46, 0x00, 0x53, 0x00, 0x5f, 0x00, 0x6a, 0x00, 0x74, 0x00,
+    0x7d, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x16,
+    0x00, 0x0f, 0x03, 0x0b, 0x09, 0x09, 0x10, 0x07, 0x17, 0x06, 0x1e, 0x04,
+    0x24, 0x02, 0x2a, 0x01, 0x2f, 0x00, 0x3d, 0x00, 0x4a, 0x00, 0x56, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda, 0x00,
+    0xd1, 0x00, 0xc3, 0x00, 0xb1, 0x00, 0x9c, 0x00, 0x85, 0x00, 0x6d, 0x00,
+    0x55, 0x00, 0x3e, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x00,
+    0x22, 0x00, 0x30, 0x00, 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x10,
+    0x00, 0x05, 0x06, 0x00, 0x13, 0x00, 0x21, 0x00, 0x2e, 0x00, 0x3c, 0x00,
+    0x48, 0x00, 0x54, 0x00, 0x5f, 0x00, 0x69, 0x00, 0x73, 0x00, 0x7b, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17, 0x00, 0x11, 0x00, 0x0b,
+    0x06, 0x0a, 0x0c, 0x08, 0x13, 0x07, 0x19, 0x05, 0x1f, 0x04, 0x25, 0x02,
+    0x2a, 0x01, 0x2f, 0x00, 0x3c, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd3, 0x00, 0xc7, 0x00,
+    0xb7, 0x00, 0xa4, 0x00, 0x90, 0x00, 0x7a, 0x00, 0x64, 0x00, 0x4e, 0x00,
+    0x39, 0x00, 0x24, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00,
+    0x00, 0x1f, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x12, 0x00, 0x09, 0x01, 0x00,
+    0x0d, 0x00, 0x19, 0x00, 0x26, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4a, 0x00,
+    0x55, 0x00, 0x5f, 0x00, 0x69, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x1e,
+    0x00, 0x1c, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0d, 0x04, 0x0a, 0x09, 0x09,
+    0x0f, 0x08, 0x15, 0x06, 0x1b, 0x05, 0x20, 0x03, 0x26, 0x02, 0x2b, 0x01,
+    0x2f, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xdb, 0x00, 0xd5, 0x00, 0xca, 0x00, 0xbc, 0x00, 0xab, 0x00,
+    0x99, 0x00, 0x85, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x48, 0x00, 0x34, 0x00,
+    0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1f, 0x00, 0x1d,
+    0x00, 0x1a, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x02, 0x08, 0x00, 0x13, 0x00,
+    0x1f, 0x00, 0x2a, 0x00, 0x36, 0x00, 0x41, 0x00, 0x4c, 0x00, 0x56, 0x00,
+    0x5f, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x19,
+    0x00, 0x15, 0x00, 0x0f, 0x01, 0x0b, 0x07, 0x0a, 0x0c, 0x08, 0x11, 0x07,
+    0x17, 0x06, 0x1c, 0x04, 0x21, 0x03, 0x26, 0x02, 0x2b, 0x01, 0x2f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00,
+    0xd6, 0x00, 0xcd, 0x00, 0xc0, 0x00, 0xb1, 0x00, 0xa0, 0x00, 0x8e, 0x00,
+    0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1a, 0x00, 0x15,
+    0x00, 0x0e, 0x00, 0x05, 0x03, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x23, 0x00,
+    0x2e, 0x00, 0x39, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x56, 0x00, 0x5f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x61, 0x01, 0x9f, 0x00, 0xc5, 0x00, 0xd2, 0x00, 0xd7, 0x00, 0xda, 0x00,
+    0xdb, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xde, 0x00,
+    0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x61, 0x01, 0x23, 0x03, 0x03, 0x09, 0x00, 0x13,
+    0x00, 0x18, 0x00, 0x1a, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e,
+    0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x03, 0x5f, 0x00,
+    0x9f, 0x00, 0xbc, 0x00, 0xc9, 0x00, 0xd0, 0x00, 0xd5, 0x00, 0xd7, 0x00,
+    0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdc, 0x00,
+    0xdd, 0x00, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x9f, 0x00, 0x5f, 0x00, 0x1f, 0x00, 0x04, 0x01, 0x00, 0x0a, 0x00, 0x11,
+    0x00, 0x15, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c,
+    0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x1f, 0x00, 0x5f, 0x00, 0x8d, 0x00,
+    0xa8, 0x00, 0xb8, 0x00, 0xc3, 0x00, 0xc9, 0x00, 0xce, 0x00, 0xd1, 0x00,
+    0xd4, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x9f, 0x00,
+    0x5f, 0x00, 0x32, 0x00, 0x16, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x0a,
+    0x00, 0x0f, 0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19,
+    0x00, 0x1a, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x13, 0x04, 0x01, 0x32, 0x00, 0x5f, 0x00, 0x81, 0x00, 0x99, 0x00,
+    0xaa, 0x00, 0xb6, 0x00, 0xbe, 0x00, 0xc4, 0x00, 0xc9, 0x00, 0xcc, 0x00,
+    0xcf, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0xbc, 0x00, 0x8d, 0x00, 0x5f, 0x00,
+    0x3d, 0x00, 0x25, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x05,
+    0x00, 0x09, 0x00, 0x0d, 0x00, 0x10, 0x00, 0x12, 0x00, 0x14, 0x00, 0x15,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x0a,
+    0x16, 0x00, 0x3d, 0x00, 0x5f, 0x00, 0x7a, 0x00, 0x8f, 0x00, 0x9f, 0x00,
+    0xab, 0x00, 0xb4, 0x00, 0xbb, 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc8, 0x00,
+    0xcb, 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xd7, 0x00, 0xc9, 0x00, 0xa8, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x44, 0x00,
+    0x2f, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x01,
+    0x00, 0x05, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x11, 0x06, 0x00, 0x25, 0x00,
+    0x44, 0x00, 0x5f, 0x00, 0x76, 0x00, 0x88, 0x00, 0x96, 0x00, 0xa2, 0x00,
+    0xab, 0x00, 0xb2, 0x00, 0xb8, 0x00, 0xbd, 0x00, 0xc1, 0x00, 0xc5, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd0, 0x00,
+    0xb8, 0x00, 0x99, 0x00, 0x7a, 0x00, 0x5f, 0x00, 0x49, 0x00, 0x36, 0x00,
+    0x28, 0x00, 0x1c, 0x00, 0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x01, 0x00,
+    0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1c, 0x00, 0x15, 0x00, 0x03, 0x14, 0x00, 0x2f, 0x00, 0x49, 0x00,
+    0x5f, 0x00, 0x72, 0x00, 0x82, 0x00, 0x90, 0x00, 0x9b, 0x00, 0xa4, 0x00,
+    0xab, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0xd5, 0x00, 0xc3, 0x00, 0xaa, 0x00,
+    0x8f, 0x00, 0x76, 0x00, 0x5f, 0x00, 0x4c, 0x00, 0x3c, 0x00, 0x2f, 0x00,
+    0x24, 0x00, 0x1b, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x03, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x18,
+    0x00, 0x0a, 0x09, 0x00, 0x1f, 0x00, 0x36, 0x00, 0x4c, 0x00, 0x5f, 0x00,
+    0x70, 0x00, 0x7e, 0x00, 0x8a, 0x00, 0x95, 0x00, 0x9e, 0x00, 0xa5, 0x00,
+    0xab, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdc, 0x00, 0xd7, 0x00, 0xc9, 0x00, 0xb6, 0x00, 0x9f, 0x00, 0x88, 0x00,
+    0x72, 0x00, 0x5f, 0x00, 0x4e, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29, 0x00,
+    0x21, 0x00, 0x19, 0x00, 0x13, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x00,
+    0x14, 0x00, 0x28, 0x00, 0x3c, 0x00, 0x4e, 0x00, 0x5f, 0x00, 0x6e, 0x00,
+    0x7b, 0x00, 0x86, 0x00, 0x90, 0x00, 0x98, 0x00, 0xa0, 0x00, 0xa6, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xd9, 0x00,
+    0xce, 0x00, 0xbe, 0x00, 0xab, 0x00, 0x96, 0x00, 0x82, 0x00, 0x70, 0x00,
+    0x5f, 0x00, 0x50, 0x00, 0x43, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x26, 0x00,
+    0x1f, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1e, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x05, 0x0b, 0x00, 0x1c, 0x00,
+    0x2f, 0x00, 0x40, 0x00, 0x50, 0x00, 0x5f, 0x00, 0x6c, 0x00, 0x78, 0x00,
+    0x83, 0x00, 0x8c, 0x00, 0x94, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd1, 0x00, 0xc4, 0x00,
+    0xb4, 0x00, 0xa2, 0x00, 0x90, 0x00, 0x7e, 0x00, 0x6e, 0x00, 0x5f, 0x00,
+    0x52, 0x00, 0x46, 0x00, 0x3c, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x23, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c,
+    0x00, 0x14, 0x00, 0x09, 0x04, 0x00, 0x13, 0x00, 0x24, 0x00, 0x34, 0x00,
+    0x43, 0x00, 0x52, 0x00, 0x5f, 0x00, 0x6b, 0x00, 0x76, 0x00, 0x80, 0x00,
+    0x88, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xdd, 0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc9, 0x00, 0xbb, 0x00, 0xab, 0x00,
+    0x9b, 0x00, 0x8a, 0x00, 0x7b, 0x00, 0x6c, 0x00, 0x5f, 0x00, 0x53, 0x00,
+    0x48, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x0d,
+    0x00, 0x01, 0x0c, 0x00, 0x1b, 0x00, 0x29, 0x00, 0x38, 0x00, 0x46, 0x00,
+    0x53, 0x00, 0x5f, 0x00, 0x6a, 0x00, 0x74, 0x00, 0x7d, 0x00, 0x85, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00,
+    0xd6, 0x00, 0xcc, 0x00, 0xc0, 0x00, 0xb2, 0x00, 0xa4, 0x00, 0x95, 0x00,
+    0x86, 0x00, 0x78, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x54, 0x00, 0x4a, 0x00,
+    0x41, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1e, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x10, 0x00, 0x05, 0x06, 0x00,
+    0x13, 0x00, 0x21, 0x00, 0x2e, 0x00, 0x3c, 0x00, 0x48, 0x00, 0x54, 0x00,
+    0x5f, 0x00, 0x69, 0x00, 0x73, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xcf, 0x00,
+    0xc4, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x9e, 0x00, 0x90, 0x00, 0x83, 0x00,
+    0x76, 0x00, 0x6a, 0x00, 0x5f, 0x00, 0x55, 0x00, 0x4c, 0x00, 0x43, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1d,
+    0x00, 0x19, 0x00, 0x12, 0x00, 0x09, 0x01, 0x00, 0x0d, 0x00, 0x19, 0x00,
+    0x26, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4a, 0x00, 0x55, 0x00, 0x5f, 0x00,
+    0x69, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xde, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xd1, 0x00, 0xc8, 0x00, 0xbd, 0x00,
+    0xb1, 0x00, 0xa5, 0x00, 0x98, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x74, 0x00,
+    0x69, 0x00, 0x5f, 0x00, 0x56, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x14,
+    0x00, 0x0c, 0x00, 0x02, 0x08, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00,
+    0x36, 0x00, 0x41, 0x00, 0x4c, 0x00, 0x56, 0x00, 0x5f, 0x00, 0x68, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdd, 0x00,
+    0xd9, 0x00, 0xd3, 0x00, 0xcb, 0x00, 0xc1, 0x00, 0xb7, 0x00, 0xab, 0x00,
+    0xa0, 0x00, 0x94, 0x00, 0x88, 0x00, 0x7d, 0x00, 0x73, 0x00, 0x69, 0x00,
+    0x5f, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1a, 0x00, 0x15, 0x00, 0x0e, 0x00, 0x05,
+    0x03, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x23, 0x00, 0x2e, 0x00, 0x39, 0x00,
+    0x43, 0x00, 0x4d, 0x00, 0x56, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd4, 0x00,
+    0xcd, 0x00, 0xc5, 0x00, 0xbb, 0x00, 0xb1, 0x00, 0xa6, 0x00, 0x9b, 0x00,
+    0x90, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x02, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xb2, 0x00, 0x6f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0xa2,
+    0x00, 0x4f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1c, 0x00, 0x17, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x7f, 0x00, 0x3c,
+    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1a, 0x00,
+    0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xd6, 0x00, 0xc6, 0x00, 0x9c, 0x00, 0x66, 0x00, 0x2f, 0x00, 0x01,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x0e, 0x00,
+    0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0x00, 0xcd,
+    0x00, 0xae, 0x00, 0x82, 0x00, 0x54, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x12, 0x00, 0x0c, 0x00, 0x05, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x97,
+    0x00, 0x6f, 0x00, 0x47, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1a, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc2, 0x00, 0xa5, 0x00, 0x84, 0x00, 0x60,
+    0x00, 0x3d, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17, 0x00,
+    0x12, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd7,
+    0x00, 0xc7, 0x00, 0xb0, 0x00, 0x93, 0x00, 0x74, 0x00, 0x55, 0x00, 0x36,
+    0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x19, 0x00, 0x15, 0x00, 0x10, 0x00,
+    0x0c, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0xb8,
+    0x00, 0xa0, 0x00, 0x84, 0x00, 0x68, 0x00, 0x4b, 0x00, 0x30, 0x00, 0x17,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1d, 0x00, 0x1a, 0x00, 0x16, 0x00, 0x12, 0x00, 0x0e, 0x00, 0x0a, 0x00,
+    0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xdd, 0x00, 0xd9, 0x00, 0xcf, 0x00, 0xbe, 0x00, 0xa9, 0x00, 0x91,
+    0x00, 0x78, 0x00, 0x5d, 0x00, 0x44, 0x00, 0x2b, 0x00, 0x15, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b, 0x00,
+    0x18, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0d, 0x00, 0x09, 0x00, 0x06, 0x00,
+    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda,
+    0x00, 0xd1, 0x00, 0xc3, 0x00, 0xb1, 0x00, 0x9c, 0x00, 0x85, 0x00, 0x6d,
+    0x00, 0x55, 0x00, 0x3e, 0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19, 0x00, 0x16, 0x00,
+    0x13, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd3, 0x00, 0xc7,
+    0x00, 0xb7, 0x00, 0xa4, 0x00, 0x90, 0x00, 0x7a, 0x00, 0x64, 0x00, 0x4e,
+    0x00, 0x39, 0x00, 0x24, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1e, 0x00, 0x1c, 0x00, 0x1a, 0x00, 0x17, 0x00, 0x14, 0x00, 0x11, 0x00,
+    0x0e, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd5, 0x00, 0xca, 0x00, 0xbc, 0x00, 0xab,
+    0x00, 0x99, 0x00, 0x85, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x48, 0x00, 0x34,
+    0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00,
+    0x1a, 0x00, 0x18, 0x00, 0x15, 0x00, 0x13, 0x00, 0x10, 0x00, 0x0d, 0x00,
+    0x0a, 0x00, 0x07, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc,
+    0x00, 0xd6, 0x00, 0xcd, 0x00, 0xc0, 0x00, 0xb1, 0x00, 0xa0, 0x00, 0x8e,
+    0x00, 0x7b, 0x00, 0x68, 0x00, 0x55, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f,
+    0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19, 0x00,
+    0x16, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x09, 0x00,
+    0x06, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x6f,
+    0x00, 0xb2, 0x00, 0xc8, 0x00, 0xd2, 0x00, 0xd6, 0x00, 0xd9, 0x00, 0xda,
+    0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xde, 0x00, 0xa6, 0x00, 0x76, 0x00, 0x9b, 0x00, 0xac,
+    0x00, 0xbc, 0x00, 0xcd, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc,
+    0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xde,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4c, 0x00, 0x87,
+    0x00, 0xbc, 0x00, 0xcd, 0x00, 0xd4, 0x00, 0xd8, 0x00, 0xda, 0x00, 0xdb,
+    0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xde,
+    0x00, 0xde, 0x00, 0xde, 0x01, 0x61, 0x00, 0x9f, 0x00, 0xc5, 0x00, 0xd2,
+    0x00, 0xd7, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0xdd, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x6f, 0x00, 0xa2,
+    0x00, 0xb9, 0x00, 0xc6, 0x00, 0xcd, 0x00, 0xd2, 0x00, 0xd4, 0x00, 0xd7,
+    0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdc,
+    0x00, 0x76, 0x00, 0x5b, 0x00, 0x75, 0x00, 0x96, 0x00, 0xab, 0x00, 0xc0,
+    0x00, 0xcd, 0x00, 0xd2, 0x00, 0xd4, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9,
+    0x00, 0xda, 0x00, 0xdb, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x09, 0x11, 0x01, 0x39, 0x00, 0x87, 0x00, 0xaf,
+    0x00, 0xc1, 0x00, 0xcb, 0x00, 0xd1, 0x00, 0xd4, 0x00, 0xd7, 0x00, 0xd8,
+    0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdc,
+    0x03, 0x23, 0x00, 0x5f, 0x00, 0x9f, 0x00, 0xbc, 0x00, 0xc9, 0x00, 0xd0,
+    0x00, 0xd5, 0x00, 0xd7, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc,
+    0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x4f, 0x00, 0x7f, 0x00, 0x9c,
+    0x00, 0xae, 0x00, 0xb9, 0x00, 0xc2, 0x00, 0xc7, 0x00, 0xcc, 0x00, 0xcf,
+    0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0x9b, 0x00, 0x75,
+    0x00, 0x2b, 0x00, 0x5b, 0x00, 0x7f, 0x00, 0x9b, 0x00, 0xae, 0x00, 0xb9,
+    0x00, 0xc2, 0x00, 0xc7, 0x00, 0xcc, 0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd3,
+    0x00, 0xd5, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x11, 0x01, 0x07, 0x0f, 0x00, 0x32, 0x00, 0x6e, 0x00, 0x93, 0x00, 0xaa,
+    0x00, 0xb8, 0x00, 0xc1, 0x00, 0xc8, 0x00, 0xcc, 0x00, 0xd0, 0x00, 0xd2,
+    0x00, 0xd4, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x09, 0x03, 0x00, 0x1f,
+    0x00, 0x5f, 0x00, 0x8d, 0x00, 0xa8, 0x00, 0xb8, 0x00, 0xc3, 0x00, 0xc9,
+    0x00, 0xce, 0x00, 0xd1, 0x00, 0xd4, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8,
+    0x00, 0xd9, 0x00, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x02, 0x00, 0x3c, 0x00, 0x66, 0x00, 0x82, 0x00, 0x97,
+    0x00, 0xa5, 0x00, 0xb0, 0x00, 0xb8, 0x00, 0xbe, 0x00, 0xc3, 0x00, 0xc7,
+    0x00, 0xca, 0x00, 0xcd, 0x00, 0xac, 0x00, 0x96, 0x00, 0x5b, 0x00, 0x13,
+    0x00, 0x41, 0x00, 0x66, 0x00, 0x82, 0x00, 0x97, 0x00, 0xa5, 0x00, 0xb0,
+    0x00, 0xb8, 0x00, 0xbe, 0x00, 0xc3, 0x00, 0xc7, 0x00, 0xca, 0x00, 0xcd,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x0c, 0x02,
+    0x05, 0x19, 0x00, 0x31, 0x00, 0x5f, 0x00, 0x7f, 0x00, 0x96, 0x00, 0xa6,
+    0x00, 0xb2, 0x00, 0xba, 0x00, 0xc0, 0x00, 0xc5, 0x00, 0xc9, 0x00, 0xcc,
+    0x00, 0xce, 0x00, 0xd0, 0x13, 0x00, 0x01, 0x04, 0x00, 0x32, 0x00, 0x5f,
+    0x00, 0x81, 0x00, 0x99, 0x00, 0xaa, 0x00, 0xb6, 0x00, 0xbe, 0x00, 0xc4,
+    0x00, 0xc9, 0x00, 0xcc, 0x00, 0xcf, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x01, 0x00, 0x2f, 0x00, 0x54, 0x00, 0x6f, 0x00, 0x84, 0x00, 0x93,
+    0x00, 0xa0, 0x00, 0xa9, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc0,
+    0x00, 0xbc, 0x00, 0xab, 0x00, 0x7f, 0x00, 0x41, 0x00, 0x03, 0x00, 0x2f,
+    0x00, 0x54, 0x00, 0x6f, 0x00, 0x84, 0x00, 0x93, 0x00, 0xa0, 0x00, 0xa9,
+    0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x09, 0x0b, 0x04, 0x1e,
+    0x00, 0x30, 0x00, 0x55, 0x00, 0x71, 0x00, 0x87, 0x00, 0x97, 0x00, 0xa4,
+    0x00, 0xad, 0x00, 0xb5, 0x00, 0xbb, 0x00, 0xc0, 0x00, 0xc3, 0x00, 0xc7,
+    0x18, 0x00, 0x0a, 0x00, 0x00, 0x16, 0x00, 0x3d, 0x00, 0x5f, 0x00, 0x7a,
+    0x00, 0x8f, 0x00, 0x9f, 0x00, 0xab, 0x00, 0xb4, 0x00, 0xbb, 0x00, 0xc0,
+    0x00, 0xc4, 0x00, 0xc8, 0x00, 0xcb, 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+    0x00, 0x27, 0x00, 0x47, 0x00, 0x60, 0x00, 0x74, 0x00, 0x84, 0x00, 0x91,
+    0x00, 0x9c, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1, 0x00, 0xcd, 0x00, 0xc0,
+    0x00, 0x9b, 0x00, 0x66, 0x00, 0x2f, 0x00, 0x02, 0x00, 0x27, 0x00, 0x47,
+    0x00, 0x60, 0x00, 0x74, 0x00, 0x84, 0x00, 0x91, 0x00, 0x9c, 0x00, 0xa4,
+    0x00, 0xab, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1c, 0x00, 0x17, 0x00, 0x0b, 0x03, 0x07, 0x12, 0x03, 0x22, 0x00, 0x30,
+    0x00, 0x4e, 0x00, 0x67, 0x00, 0x7b, 0x00, 0x8b, 0x00, 0x98, 0x00, 0xa2,
+    0x00, 0xaa, 0x00, 0xb1, 0x00, 0xb6, 0x00, 0xbb, 0x1a, 0x00, 0x11, 0x00,
+    0x00, 0x06, 0x00, 0x25, 0x00, 0x44, 0x00, 0x5f, 0x00, 0x76, 0x00, 0x88,
+    0x00, 0x96, 0x00, 0xa2, 0x00, 0xab, 0x00, 0xb2, 0x00, 0xb8, 0x00, 0xbd,
+    0x00, 0xc1, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
+    0x00, 0x3d, 0x00, 0x55, 0x00, 0x68, 0x00, 0x78, 0x00, 0x85, 0x00, 0x90,
+    0x00, 0x99, 0x00, 0xa0, 0x00, 0xd9, 0x00, 0xcd, 0x00, 0xae, 0x00, 0x82,
+    0x00, 0x54, 0x00, 0x27, 0x00, 0x01, 0x00, 0x21, 0x00, 0x3d, 0x00, 0x55,
+    0x00, 0x68, 0x00, 0x78, 0x00, 0x85, 0x00, 0x90, 0x00, 0x99, 0x00, 0xa0,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x19, 0x00,
+    0x0e, 0x00, 0x09, 0x0a, 0x06, 0x17, 0x02, 0x24, 0x00, 0x30, 0x00, 0x4a,
+    0x00, 0x60, 0x00, 0x72, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x98, 0x00, 0xa0,
+    0x00, 0xa8, 0x00, 0xae, 0x1c, 0x00, 0x15, 0x00, 0x03, 0x00, 0x00, 0x14,
+    0x00, 0x2f, 0x00, 0x49, 0x00, 0x5f, 0x00, 0x72, 0x00, 0x82, 0x00, 0x90,
+    0x00, 0x9b, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1, 0x00, 0xb7, 0x00, 0xbb,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x36,
+    0x00, 0x4b, 0x00, 0x5d, 0x00, 0x6d, 0x00, 0x7a, 0x00, 0x85, 0x00, 0x8e,
+    0x00, 0xda, 0x00, 0xd2, 0x00, 0xb9, 0x00, 0x97, 0x00, 0x6f, 0x00, 0x47,
+    0x00, 0x21, 0x00, 0x01, 0x00, 0x1d, 0x00, 0x36, 0x00, 0x4b, 0x00, 0x5d,
+    0x00, 0x6d, 0x00, 0x7a, 0x00, 0x85, 0x00, 0x8e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x0a, 0x04,
+    0x07, 0x0f, 0x05, 0x1b, 0x02, 0x26, 0x00, 0x30, 0x00, 0x46, 0x00, 0x5a,
+    0x00, 0x6b, 0x00, 0x79, 0x00, 0x85, 0x00, 0x8f, 0x00, 0x98, 0x00, 0xa0,
+    0x1d, 0x00, 0x18, 0x00, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x1f, 0x00, 0x36,
+    0x00, 0x4c, 0x00, 0x5f, 0x00, 0x70, 0x00, 0x7e, 0x00, 0x8a, 0x00, 0x95,
+    0x00, 0x9e, 0x00, 0xa5, 0x00, 0xab, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x30, 0x00, 0x44,
+    0x00, 0x55, 0x00, 0x64, 0x00, 0x70, 0x00, 0x7b, 0x00, 0xdb, 0x00, 0xd4,
+    0x00, 0xc2, 0x00, 0xa5, 0x00, 0x84, 0x00, 0x60, 0x00, 0x3d, 0x00, 0x1d,
+    0x00, 0x00, 0x00, 0x19, 0x00, 0x30, 0x00, 0x44, 0x00, 0x55, 0x00, 0x64,
+    0x00, 0x70, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1e, 0x00, 0x1c, 0x00, 0x15, 0x00, 0x0b, 0x00, 0x09, 0x0a, 0x06, 0x14,
+    0x04, 0x1e, 0x02, 0x27, 0x00, 0x30, 0x00, 0x44, 0x00, 0x56, 0x00, 0x65,
+    0x00, 0x72, 0x00, 0x7e, 0x00, 0x88, 0x00, 0x91, 0x1d, 0x00, 0x1a, 0x00,
+    0x0f, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x28, 0x00, 0x3c, 0x00, 0x4e,
+    0x00, 0x5f, 0x00, 0x6e, 0x00, 0x7b, 0x00, 0x86, 0x00, 0x90, 0x00, 0x98,
+    0x00, 0xa0, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x2b, 0x00, 0x3e, 0x00, 0x4e,
+    0x00, 0x5c, 0x00, 0x68, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xc7, 0x00, 0xb0,
+    0x00, 0x93, 0x00, 0x74, 0x00, 0x55, 0x00, 0x36, 0x00, 0x19, 0x00, 0x00,
+    0x00, 0x17, 0x00, 0x2b, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5c, 0x00, 0x68,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00,
+    0x17, 0x00, 0x0f, 0x00, 0x0a, 0x05, 0x08, 0x0e, 0x06, 0x17, 0x03, 0x20,
+    0x01, 0x28, 0x00, 0x2f, 0x00, 0x42, 0x00, 0x52, 0x00, 0x60, 0x00, 0x6d,
+    0x00, 0x78, 0x00, 0x82, 0x1e, 0x00, 0x1b, 0x00, 0x12, 0x00, 0x05, 0x00,
+    0x00, 0x0b, 0x00, 0x1c, 0x00, 0x2f, 0x00, 0x40, 0x00, 0x50, 0x00, 0x5f,
+    0x00, 0x6c, 0x00, 0x78, 0x00, 0x83, 0x00, 0x8c, 0x00, 0x94, 0x00, 0x9b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x15, 0x00, 0x28, 0x00, 0x39, 0x00, 0x48, 0x00, 0x55,
+    0x00, 0xdc, 0x00, 0xd8, 0x00, 0xcc, 0x00, 0xb8, 0x00, 0xa0, 0x00, 0x84,
+    0x00, 0x68, 0x00, 0x4b, 0x00, 0x30, 0x00, 0x17, 0x00, 0x00, 0x00, 0x15,
+    0x00, 0x28, 0x00, 0x39, 0x00, 0x48, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x12, 0x00,
+    0x0b, 0x02, 0x09, 0x09, 0x07, 0x12, 0x05, 0x1a, 0x03, 0x21, 0x01, 0x29,
+    0x00, 0x2f, 0x00, 0x40, 0x00, 0x4f, 0x00, 0x5c, 0x00, 0x68, 0x00, 0x73,
+    0x1e, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x13,
+    0x00, 0x24, 0x00, 0x34, 0x00, 0x43, 0x00, 0x52, 0x00, 0x5f, 0x00, 0x6b,
+    0x00, 0x76, 0x00, 0x80, 0x00, 0x88, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x13, 0x00, 0x24, 0x00, 0x34, 0x00, 0x42, 0x00, 0xdd, 0x00, 0xd9,
+    0x00, 0xcf, 0x00, 0xbe, 0x00, 0xa9, 0x00, 0x91, 0x00, 0x78, 0x00, 0x5d,
+    0x00, 0x44, 0x00, 0x2b, 0x00, 0x15, 0x00, 0x00, 0x00, 0x13, 0x00, 0x24,
+    0x00, 0x34, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x0a, 0x06,
+    0x08, 0x0d, 0x06, 0x14, 0x04, 0x1c, 0x03, 0x23, 0x01, 0x29, 0x00, 0x2f,
+    0x00, 0x3e, 0x00, 0x4c, 0x00, 0x59, 0x00, 0x64, 0x1e, 0x00, 0x1c, 0x00,
+    0x16, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x1b, 0x00, 0x29,
+    0x00, 0x38, 0x00, 0x46, 0x00, 0x53, 0x00, 0x5f, 0x00, 0x6a, 0x00, 0x74,
+    0x00, 0x7d, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,
+    0x00, 0x22, 0x00, 0x30, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd1, 0x00, 0xc3,
+    0x00, 0xb1, 0x00, 0x9c, 0x00, 0x85, 0x00, 0x6d, 0x00, 0x55, 0x00, 0x3e,
+    0x00, 0x28, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x00, 0x22, 0x00, 0x30,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1b, 0x00, 0x16, 0x00, 0x0f, 0x00, 0x0b, 0x03, 0x09, 0x09, 0x07, 0x10,
+    0x06, 0x17, 0x04, 0x1e, 0x02, 0x24, 0x01, 0x2a, 0x00, 0x2f, 0x00, 0x3d,
+    0x00, 0x4a, 0x00, 0x56, 0x1e, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x10, 0x00,
+    0x05, 0x00, 0x00, 0x06, 0x00, 0x13, 0x00, 0x21, 0x00, 0x2e, 0x00, 0x3c,
+    0x00, 0x48, 0x00, 0x54, 0x00, 0x5f, 0x00, 0x69, 0x00, 0x73, 0x00, 0x7b,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f,
+    0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd3, 0x00, 0xc7, 0x00, 0xb7, 0x00, 0xa4,
+    0x00, 0x90, 0x00, 0x7a, 0x00, 0x64, 0x00, 0x4e, 0x00, 0x39, 0x00, 0x24,
+    0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17, 0x00,
+    0x11, 0x00, 0x0b, 0x00, 0x0a, 0x06, 0x08, 0x0c, 0x07, 0x13, 0x05, 0x19,
+    0x04, 0x1f, 0x02, 0x25, 0x01, 0x2a, 0x00, 0x2f, 0x00, 0x3c, 0x00, 0x48,
+    0x1f, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x12, 0x00, 0x09, 0x00, 0x00, 0x01,
+    0x00, 0x0d, 0x00, 0x19, 0x00, 0x26, 0x00, 0x32, 0x00, 0x3f, 0x00, 0x4a,
+    0x00, 0x55, 0x00, 0x5f, 0x00, 0x69, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xdd, 0x00, 0xdb,
+    0x00, 0xd5, 0x00, 0xca, 0x00, 0xbc, 0x00, 0xab, 0x00, 0x99, 0x00, 0x85,
+    0x00, 0x70, 0x00, 0x5c, 0x00, 0x48, 0x00, 0x34, 0x00, 0x22, 0x00, 0x10,
+    0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x13, 0x00, 0x0d, 0x00,
+    0x0a, 0x04, 0x09, 0x09, 0x08, 0x0f, 0x06, 0x15, 0x05, 0x1b, 0x03, 0x20,
+    0x02, 0x26, 0x01, 0x2b, 0x00, 0x2f, 0x00, 0x3b, 0x1f, 0x00, 0x1d, 0x00,
+    0x1a, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x13,
+    0x00, 0x1f, 0x00, 0x2a, 0x00, 0x36, 0x00, 0x41, 0x00, 0x4c, 0x00, 0x56,
+    0x00, 0x5f, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd6, 0x00, 0xcd,
+    0x00, 0xc0, 0x00, 0xb1, 0x00, 0xa0, 0x00, 0x8e, 0x00, 0x7b, 0x00, 0x68,
+    0x00, 0x55, 0x00, 0x42, 0x00, 0x30, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1c, 0x00, 0x19, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x0b, 0x01, 0x0a, 0x07,
+    0x08, 0x0c, 0x07, 0x11, 0x06, 0x17, 0x04, 0x1c, 0x03, 0x21, 0x02, 0x26,
+    0x01, 0x2b, 0x00, 0x2f, 0x1f, 0x00, 0x1e, 0x00, 0x1a, 0x00, 0x15, 0x00,
+    0x0e, 0x00, 0x05, 0x00, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x23,
+    0x00, 0x2e, 0x00, 0x39, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x56, 0x00, 0x5f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x07, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x1e, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x04, 0x4c, 0x09, 0x11,
+    0x11, 0x01, 0x17, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00,
+    0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x3e, 0x00, 0x2b, 0x00, 0x34, 0x00, 0x32, 0x00, 0x2c, 0x00, 0x24, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x01, 0x61, 0x03, 0x23,
+    0x09, 0x03, 0x13, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1c, 0x00, 0x1d, 0x00,
+    0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+    0x0f, 0x00, 0x17, 0x00, 0x1a, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00,
+    0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x00, 0x87, 0x01, 0x39, 0x07, 0x0f, 0x0c, 0x02,
+    0x12, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00,
+    0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x21, 0x00,
+    0x27, 0x00, 0x2b, 0x00, 0x28, 0x00, 0x21, 0x00, 0x1d, 0x00, 0x1e, 0x00,
+    0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x00, 0x9f, 0x00, 0x5f, 0x00, 0x1f, 0x01, 0x04,
+    0x0a, 0x00, 0x11, 0x00, 0x15, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00,
+    0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,
+    0x12, 0x00, 0x16, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00,
+    0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00,
+    0x00, 0xbc, 0x00, 0x87, 0x00, 0x32, 0x05, 0x19, 0x09, 0x0b, 0x0b, 0x03,
+    0x0e, 0x00, 0x12, 0x00, 0x15, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1a, 0x00,
+    0x1b, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x27, 0x00, 0x0f, 0x00, 0x1a, 0x00,
+    0x1c, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00,
+    0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00,
+    0x00, 0xc5, 0x00, 0x9f, 0x00, 0x5f, 0x00, 0x32, 0x00, 0x16, 0x00, 0x06,
+    0x03, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00,
+    0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0e, 0x00,
+    0x12, 0x00, 0x15, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00,
+    0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x00, 0xcd, 0x00, 0xaf,
+    0x00, 0x6e, 0x00, 0x31, 0x04, 0x1e, 0x07, 0x12, 0x09, 0x0a, 0x0a, 0x04,
+    0x0b, 0x00, 0x0f, 0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17, 0x00,
+    0x18, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x32, 0x00, 0x2b, 0x00, 0x1a, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x0e, 0x00,
+    0x12, 0x00, 0x15, 0x00, 0x17, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00,
+    0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x00, 0xd2, 0x00, 0xbc,
+    0x00, 0x8d, 0x00, 0x5f, 0x00, 0x3d, 0x00, 0x25, 0x00, 0x14, 0x00, 0x09,
+    0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x10, 0x00, 0x12, 0x00,
+    0x14, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x0f, 0x00,
+    0x12, 0x00, 0x15, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00,
+    0x1a, 0x00, 0x1b, 0x00, 0x00, 0xd4, 0x00, 0xc1, 0x00, 0x93, 0x00, 0x5f,
+    0x00, 0x30, 0x03, 0x22, 0x06, 0x17, 0x07, 0x0f, 0x09, 0x0a, 0x0a, 0x05,
+    0x0b, 0x02, 0x0c, 0x00, 0x0f, 0x00, 0x11, 0x00, 0x13, 0x00, 0x15, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x28, 0x00,
+    0x1c, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x0f, 0x00,
+    0x12, 0x00, 0x15, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00,
+    0x1a, 0x00, 0x1b, 0x00, 0x00, 0xd7, 0x00, 0xc9, 0x00, 0xa8, 0x00, 0x81,
+    0x00, 0x5f, 0x00, 0x44, 0x00, 0x2f, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x0b,
+    0x00, 0x04, 0x01, 0x00, 0x05, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x10, 0x00,
+    0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00,
+    0x00, 0xd8, 0x00, 0xcb, 0x00, 0xaa, 0x00, 0x7f, 0x00, 0x55, 0x00, 0x30,
+    0x02, 0x24, 0x05, 0x1b, 0x06, 0x14, 0x08, 0x0e, 0x09, 0x09, 0x0a, 0x06,
+    0x0b, 0x03, 0x0b, 0x00, 0x0d, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x21, 0x00, 0x18, 0x00, 0x0e, 0x00,
+    0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x10, 0x00,
+    0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00,
+    0x00, 0xda, 0x00, 0xd0, 0x00, 0xb8, 0x00, 0x99, 0x00, 0x7a, 0x00, 0x5f,
+    0x00, 0x49, 0x00, 0x36, 0x00, 0x28, 0x00, 0x1c, 0x00, 0x13, 0x00, 0x0c,
+    0x00, 0x06, 0x00, 0x01, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x11, 0x00,
+    0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x00, 0xda, 0x00, 0xd1,
+    0x00, 0xb8, 0x00, 0x96, 0x00, 0x71, 0x00, 0x4e, 0x00, 0x30, 0x02, 0x26,
+    0x04, 0x1e, 0x06, 0x17, 0x07, 0x12, 0x08, 0x0d, 0x09, 0x09, 0x0a, 0x06,
+    0x0a, 0x04, 0x0b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x12, 0x00, 0x0c, 0x00, 0x05, 0x00,
+    0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x11, 0x00,
+    0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x00, 0xdb, 0x00, 0xd5,
+    0x00, 0xc3, 0x00, 0xaa, 0x00, 0x8f, 0x00, 0x76, 0x00, 0x5f, 0x00, 0x4c,
+    0x00, 0x3c, 0x00, 0x2f, 0x00, 0x24, 0x00, 0x1b, 0x00, 0x13, 0x00, 0x0d,
+    0x00, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x04, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x0f, 0x00, 0x11, 0x00,
+    0x13, 0x00, 0x14, 0x00, 0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc1, 0x00, 0xa6,
+    0x00, 0x87, 0x00, 0x67, 0x00, 0x4a, 0x00, 0x30, 0x02, 0x27, 0x03, 0x20,
+    0x05, 0x1a, 0x06, 0x14, 0x07, 0x10, 0x08, 0x0c, 0x09, 0x09, 0x0a, 0x07,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1a, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00,
+    0x04, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x0f, 0x00, 0x11, 0x00,
+    0x13, 0x00, 0x14, 0x00, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xc9, 0x00, 0xb6,
+    0x00, 0x9f, 0x00, 0x88, 0x00, 0x72, 0x00, 0x5f, 0x00, 0x4e, 0x00, 0x40,
+    0x00, 0x34, 0x00, 0x29, 0x00, 0x21, 0x00, 0x19, 0x00, 0x13, 0x00, 0x0e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
+    0x06, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x11, 0x00,
+    0x00, 0xdc, 0x00, 0xd7, 0x00, 0xc8, 0x00, 0xb2, 0x00, 0x97, 0x00, 0x7b,
+    0x00, 0x60, 0x00, 0x46, 0x00, 0x30, 0x01, 0x28, 0x03, 0x21, 0x04, 0x1c,
+    0x06, 0x17, 0x07, 0x13, 0x08, 0x0f, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1b, 0x00, 0x17, 0x00,
+    0x12, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00,
+    0x06, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x11, 0x00,
+    0x00, 0xdd, 0x00, 0xd9, 0x00, 0xce, 0x00, 0xbe, 0x00, 0xab, 0x00, 0x96,
+    0x00, 0x82, 0x00, 0x70, 0x00, 0x5f, 0x00, 0x50, 0x00, 0x43, 0x00, 0x38,
+    0x00, 0x2e, 0x00, 0x26, 0x00, 0x1f, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00,
+    0x08, 0x00, 0x0b, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x00, 0xdc, 0x00, 0xd8,
+    0x00, 0xcc, 0x00, 0xba, 0x00, 0xa4, 0x00, 0x8b, 0x00, 0x72, 0x00, 0x5a,
+    0x00, 0x44, 0x00, 0x2f, 0x01, 0x29, 0x03, 0x23, 0x04, 0x1e, 0x05, 0x19,
+    0x06, 0x15, 0x07, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x19, 0x00, 0x15, 0x00, 0x10, 0x00,
+    0x0c, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00,
+    0x08, 0x00, 0x0b, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x00, 0xdd, 0x00, 0xda,
+    0x00, 0xd1, 0x00, 0xc4, 0x00, 0xb4, 0x00, 0xa2, 0x00, 0x90, 0x00, 0x7e,
+    0x00, 0x6e, 0x00, 0x5f, 0x00, 0x52, 0x00, 0x46, 0x00, 0x3c, 0x00, 0x32,
+    0x00, 0x2a, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x08, 0x00,
+    0x0a, 0x00, 0x0c, 0x00, 0x00, 0xdd, 0x00, 0xd9, 0x00, 0xd0, 0x00, 0xc0,
+    0x00, 0xad, 0x00, 0x98, 0x00, 0x81, 0x00, 0x6b, 0x00, 0x56, 0x00, 0x42,
+    0x00, 0x2f, 0x01, 0x29, 0x02, 0x24, 0x04, 0x1f, 0x05, 0x1b, 0x06, 0x17,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1d, 0x00, 0x1a, 0x00, 0x16, 0x00, 0x12, 0x00, 0x0e, 0x00, 0x0a, 0x00,
+    0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x08, 0x00,
+    0x0a, 0x00, 0x0c, 0x00, 0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc9,
+    0x00, 0xbb, 0x00, 0xab, 0x00, 0x9b, 0x00, 0x8a, 0x00, 0x7b, 0x00, 0x6c,
+    0x00, 0x5f, 0x00, 0x53, 0x00, 0x48, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x2e,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x07, 0x00, 0x09, 0x00,
+    0x00, 0xdd, 0x00, 0xda, 0x00, 0xd2, 0x00, 0xc5, 0x00, 0xb5, 0x00, 0xa2,
+    0x00, 0x8e, 0x00, 0x79, 0x00, 0x65, 0x00, 0x52, 0x00, 0x40, 0x00, 0x2f,
+    0x01, 0x2a, 0x02, 0x25, 0x03, 0x20, 0x04, 0x1c, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b, 0x00,
+    0x18, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0d, 0x00, 0x09, 0x00, 0x06, 0x00,
+    0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 0x00, 0x07, 0x00, 0x09, 0x00,
+    0x00, 0xde, 0x00, 0xdc, 0x00, 0xd6, 0x00, 0xcc, 0x00, 0xc0, 0x00, 0xb2,
+    0x00, 0xa4, 0x00, 0x95, 0x00, 0x86, 0x00, 0x78, 0x00, 0x6b, 0x00, 0x5f,
+    0x00, 0x54, 0x00, 0x4a, 0x00, 0x41, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0xdd, 0x00, 0xdb,
+    0x00, 0xd4, 0x00, 0xc9, 0x00, 0xbb, 0x00, 0xaa, 0x00, 0x98, 0x00, 0x85,
+    0x00, 0x72, 0x00, 0x60, 0x00, 0x4f, 0x00, 0x3e, 0x00, 0x2f, 0x01, 0x2a,
+    0x02, 0x26, 0x03, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19, 0x00, 0x16, 0x00,
+    0x13, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02, 0x00,
+    0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0xde, 0x00, 0xdc,
+    0x00, 0xd7, 0x00, 0xcf, 0x00, 0xc4, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x9e,
+    0x00, 0x90, 0x00, 0x83, 0x00, 0x76, 0x00, 0x6a, 0x00, 0x5f, 0x00, 0x55,
+    0x00, 0x4c, 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x02, 0x00, 0x04, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd6, 0x00, 0xcc,
+    0x00, 0xc0, 0x00, 0xb1, 0x00, 0xa0, 0x00, 0x8f, 0x00, 0x7e, 0x00, 0x6d,
+    0x00, 0x5c, 0x00, 0x4c, 0x00, 0x3d, 0x00, 0x2f, 0x01, 0x2b, 0x02, 0x26,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x1e, 0x00, 0x1c, 0x00, 0x1a, 0x00, 0x17, 0x00, 0x14, 0x00, 0x11, 0x00,
+    0x0e, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00,
+    0x02, 0x00, 0x04, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xd1,
+    0x00, 0xc8, 0x00, 0xbd, 0x00, 0xb1, 0x00, 0xa5, 0x00, 0x98, 0x00, 0x8c,
+    0x00, 0x80, 0x00, 0x74, 0x00, 0x69, 0x00, 0x5f, 0x00, 0x56, 0x00, 0x4d,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+    0x00, 0xde, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xce, 0x00, 0xc3, 0x00, 0xb6,
+    0x00, 0xa8, 0x00, 0x98, 0x00, 0x88, 0x00, 0x78, 0x00, 0x68, 0x00, 0x59,
+    0x00, 0x4a, 0x00, 0x3c, 0x00, 0x2f, 0x01, 0x2b, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1c, 0x00,
+    0x1a, 0x00, 0x18, 0x00, 0x15, 0x00, 0x13, 0x00, 0x10, 0x00, 0x0d, 0x00,
+    0x0a, 0x00, 0x07, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
+    0x00, 0xde, 0x00, 0xdd, 0x00, 0xd9, 0x00, 0xd3, 0x00, 0xcb, 0x00, 0xc1,
+    0x00, 0xb7, 0x00, 0xab, 0x00, 0xa0, 0x00, 0x94, 0x00, 0x88, 0x00, 0x7d,
+    0x00, 0x73, 0x00, 0x69, 0x00, 0x5f, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc,
+    0x00, 0xd8, 0x00, 0xd0, 0x00, 0xc7, 0x00, 0xbb, 0x00, 0xae, 0x00, 0xa0,
+    0x00, 0x91, 0x00, 0x82, 0x00, 0x73, 0x00, 0x64, 0x00, 0x56, 0x00, 0x48,
+    0x00, 0x3b, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x1b, 0x00, 0x19, 0x00,
+    0x16, 0x00, 0x14, 0x00, 0x11, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x09, 0x00,
+    0x06, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdd,
+    0x00, 0xda, 0x00, 0xd4, 0x00, 0xcd, 0x00, 0xc5, 0x00, 0xbb, 0x00, 0xb1,
+    0x00, 0xa6, 0x00, 0x9b, 0x00, 0x90, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71,
+    0x00, 0x68, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x01, 0x61, 0x03, 0x23, 0x09, 0x03, 0x13, 0x00,
+    0x18, 0x00, 0x1a, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00,
+    0x1e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x9f,
+    0x00, 0xc5, 0x00, 0xd2, 0x00, 0xd7, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc,
+    0x00, 0xdd, 0x00, 0xdd, 0x00, 0xdd, 0x00, 0xde, 0x00, 0xde, 0x00, 0xde,
+    0x00, 0xde, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x9f, 0x00, 0x5f, 0x00, 0x1f, 0x01, 0x04, 0x0a, 0x00, 0x11, 0x00,
+    0x15, 0x00, 0x18, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1c, 0x00,
+    0x1d, 0x00, 0x1d, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x03, 0x23, 0x00, 0x5f, 0x00, 0x9f, 0x00, 0xbc,
+    0x00, 0xc9, 0x00, 0xd0, 0x00, 0xd5, 0x00, 0xd7, 0x00, 0xd9, 0x00, 0xda,
+    0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xdd,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x9f,
+    0x00, 0x5f, 0x00, 0x32, 0x00, 0x16, 0x00, 0x06, 0x03, 0x00, 0x0a, 0x00,
+    0x0f, 0x00, 0x12, 0x00, 0x14, 0x00, 0x16, 0x00, 0x18, 0x00, 0x19, 0x00,
+    0x1a, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x09, 0x03, 0x00, 0x1f, 0x00, 0x5f, 0x00, 0x8d, 0x00, 0xa8, 0x00, 0xb8,
+    0x00, 0xc3, 0x00, 0xc9, 0x00, 0xce, 0x00, 0xd1, 0x00, 0xd4, 0x00, 0xd6,
+    0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0xbc, 0x00, 0x8d, 0x00, 0x5f,
+    0x00, 0x3d, 0x00, 0x25, 0x00, 0x14, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00,
+    0x09, 0x00, 0x0d, 0x00, 0x10, 0x00, 0x12, 0x00, 0x14, 0x00, 0x15, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x01, 0x04,
+    0x00, 0x32, 0x00, 0x5f, 0x00, 0x81, 0x00, 0x99, 0x00, 0xaa, 0x00, 0xb6,
+    0x00, 0xbe, 0x00, 0xc4, 0x00, 0xc9, 0x00, 0xcc, 0x00, 0xcf, 0x00, 0xd1,
+    0x00, 0xd3, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xd7, 0x00, 0xc9, 0x00, 0xa8, 0x00, 0x81, 0x00, 0x5f, 0x00, 0x44,
+    0x00, 0x2f, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x0b, 0x00, 0x04, 0x01, 0x00,
+    0x05, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x0a, 0x00, 0x00, 0x16, 0x00, 0x3d,
+    0x00, 0x5f, 0x00, 0x7a, 0x00, 0x8f, 0x00, 0x9f, 0x00, 0xab, 0x00, 0xb4,
+    0x00, 0xbb, 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc8, 0x00, 0xcb, 0x00, 0xcd,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0xd0,
+    0x00, 0xb8, 0x00, 0x99, 0x00, 0x7a, 0x00, 0x5f, 0x00, 0x49, 0x00, 0x36,
+    0x00, 0x28, 0x00, 0x1c, 0x00, 0x13, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x01,
+    0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1a, 0x00, 0x11, 0x00, 0x00, 0x06, 0x00, 0x25, 0x00, 0x44, 0x00, 0x5f,
+    0x00, 0x76, 0x00, 0x88, 0x00, 0x96, 0x00, 0xa2, 0x00, 0xab, 0x00, 0xb2,
+    0x00, 0xb8, 0x00, 0xbd, 0x00, 0xc1, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0xd5, 0x00, 0xc3, 0x00, 0xaa,
+    0x00, 0x8f, 0x00, 0x76, 0x00, 0x5f, 0x00, 0x4c, 0x00, 0x3c, 0x00, 0x2f,
+    0x00, 0x24, 0x00, 0x1b, 0x00, 0x13, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x03,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x15, 0x00,
+    0x03, 0x00, 0x00, 0x14, 0x00, 0x2f, 0x00, 0x49, 0x00, 0x5f, 0x00, 0x72,
+    0x00, 0x82, 0x00, 0x90, 0x00, 0x9b, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xb1,
+    0x00, 0xb7, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xdc, 0x00, 0xd7, 0x00, 0xc9, 0x00, 0xb6, 0x00, 0x9f, 0x00, 0x88,
+    0x00, 0x72, 0x00, 0x5f, 0x00, 0x4e, 0x00, 0x40, 0x00, 0x34, 0x00, 0x29,
+    0x00, 0x21, 0x00, 0x19, 0x00, 0x13, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x18, 0x00, 0x0a, 0x00, 0x00, 0x09,
+    0x00, 0x1f, 0x00, 0x36, 0x00, 0x4c, 0x00, 0x5f, 0x00, 0x70, 0x00, 0x7e,
+    0x00, 0x8a, 0x00, 0x95, 0x00, 0x9e, 0x00, 0xa5, 0x00, 0xab, 0x00, 0xb1,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xd9,
+    0x00, 0xce, 0x00, 0xbe, 0x00, 0xab, 0x00, 0x96, 0x00, 0x82, 0x00, 0x70,
+    0x00, 0x5f, 0x00, 0x50, 0x00, 0x43, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x26,
+    0x00, 0x1f, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1d, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x28,
+    0x00, 0x3c, 0x00, 0x4e, 0x00, 0x5f, 0x00, 0x6e, 0x00, 0x7b, 0x00, 0x86,
+    0x00, 0x90, 0x00, 0x98, 0x00, 0xa0, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd1, 0x00, 0xc4,
+    0x00, 0xb4, 0x00, 0xa2, 0x00, 0x90, 0x00, 0x7e, 0x00, 0x6e, 0x00, 0x5f,
+    0x00, 0x52, 0x00, 0x46, 0x00, 0x3c, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x23,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1b, 0x00,
+    0x12, 0x00, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x1c, 0x00, 0x2f, 0x00, 0x40,
+    0x00, 0x50, 0x00, 0x5f, 0x00, 0x6c, 0x00, 0x78, 0x00, 0x83, 0x00, 0x8c,
+    0x00, 0x94, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xdd, 0x00, 0xdb, 0x00, 0xd4, 0x00, 0xc9, 0x00, 0xbb, 0x00, 0xab,
+    0x00, 0x9b, 0x00, 0x8a, 0x00, 0x7b, 0x00, 0x6c, 0x00, 0x5f, 0x00, 0x53,
+    0x00, 0x48, 0x00, 0x3f, 0x00, 0x36, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x09, 0x00,
+    0x00, 0x04, 0x00, 0x13, 0x00, 0x24, 0x00, 0x34, 0x00, 0x43, 0x00, 0x52,
+    0x00, 0x5f, 0x00, 0x6b, 0x00, 0x76, 0x00, 0x80, 0x00, 0x88, 0x00, 0x90,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc,
+    0x00, 0xd6, 0x00, 0xcc, 0x00, 0xc0, 0x00, 0xb2, 0x00, 0xa4, 0x00, 0x95,
+    0x00, 0x86, 0x00, 0x78, 0x00, 0x6b, 0x00, 0x5f, 0x00, 0x54, 0x00, 0x4a,
+    0x00, 0x41, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1e, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x00, 0x0c,
+    0x00, 0x1b, 0x00, 0x29, 0x00, 0x38, 0x00, 0x46, 0x00, 0x53, 0x00, 0x5f,
+    0x00, 0x6a, 0x00, 0x74, 0x00, 0x7d, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdc, 0x00, 0xd7, 0x00, 0xcf,
+    0x00, 0xc4, 0x00, 0xb8, 0x00, 0xab, 0x00, 0x9e, 0x00, 0x90, 0x00, 0x83,
+    0x00, 0x76, 0x00, 0x6a, 0x00, 0x5f, 0x00, 0x55, 0x00, 0x4c, 0x00, 0x43,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1d, 0x00,
+    0x18, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0x06, 0x00, 0x13, 0x00, 0x21,
+    0x00, 0x2e, 0x00, 0x3c, 0x00, 0x48, 0x00, 0x54, 0x00, 0x5f, 0x00, 0x69,
+    0x00, 0x73, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0xde, 0x00, 0xdc, 0x00, 0xd8, 0x00, 0xd1, 0x00, 0xc8, 0x00, 0xbd,
+    0x00, 0xb1, 0x00, 0xa5, 0x00, 0x98, 0x00, 0x8c, 0x00, 0x80, 0x00, 0x74,
+    0x00, 0x69, 0x00, 0x5f, 0x00, 0x56, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x19, 0x00, 0x12, 0x00,
+    0x09, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x26, 0x00, 0x32,
+    0x00, 0x3f, 0x00, 0x4a, 0x00, 0x55, 0x00, 0x5f, 0x00, 0x69, 0x00, 0x71,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdd,
+    0x00, 0xd9, 0x00, 0xd3, 0x00, 0xcb, 0x00, 0xc1, 0x00, 0xb7, 0x00, 0xab,
+    0x00, 0xa0, 0x00, 0x94, 0x00, 0x88, 0x00, 0x7d, 0x00, 0x73, 0x00, 0x69,
+    0x00, 0x5f, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x1f, 0x00, 0x1d, 0x00, 0x1a, 0x00, 0x14, 0x00, 0x0c, 0x00, 0x02, 0x00,
+    0x00, 0x08, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x36, 0x00, 0x41,
+    0x00, 0x4c, 0x00, 0x56, 0x00, 0x5f, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xdd, 0x00, 0xda, 0x00, 0xd4,
+    0x00, 0xcd, 0x00, 0xc5, 0x00, 0xbb, 0x00, 0xb1, 0x00, 0xa6, 0x00, 0x9b,
+    0x00, 0x90, 0x00, 0x85, 0x00, 0x7b, 0x00, 0x71, 0x00, 0x68, 0x00, 0x5f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x1e, 0x00,
+    0x1a, 0x00, 0x15, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x00, 0x03, 0x00, 0x0e,
+    0x00, 0x18, 0x00, 0x23, 0x00, 0x2e, 0x00, 0x39, 0x00, 0x43, 0x00, 0x4d,
+    0x00, 0x56, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00
+};
+
+#endif
diff --git a/indra/newview/SMAASearchTex.h b/indra/newview/SMAASearchTex.h
new file mode 100644
index 0000000000..d1a8c0885b
--- /dev/null
+++ b/indra/newview/SMAASearchTex.h
@@ -0,0 +1,157 @@
+/**
+ * @file SMAASearchTex.h
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/**
+ * Copyright (C) 2013 Jorge Jimenez (jorge@iryoku.com)
+ * Copyright (C) 2013 Jose I. Echevarria (joseignacioechevarria@gmail.com)
+ * Copyright (C) 2013 Belen Masia (bmasia@unizar.es)
+ * Copyright (C) 2013 Fernando Navarro (fernandn@microsoft.com)
+ * Copyright (C) 2013 Diego Gutierrez (diegog@unizar.es)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to
+ * do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software. As clarification, there
+ * is no requirement that the copyright notice and permission be included in
+ * binary distributions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+
+#ifndef SEARCHTEX_H
+#define SEARCHTEX_H
+
+#define SEARCHTEX_WIDTH 64
+#define SEARCHTEX_HEIGHT 16
+#define SEARCHTEX_PITCH SEARCHTEX_WIDTH
+#define SEARCHTEX_SIZE (SEARCHTEX_HEIGHT * SEARCHTEX_PITCH)
+
+/**
+ * Stored in R8 format. Load it in the following format:
+ *  - DX9:  D3DFMT_L8
+ *  - DX10: DXGI_FORMAT_R8_UNORM
+ */
+static const unsigned char searchTexBytes[] = {
+    0xfe, 0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x7f, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00,
+    0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0xfe, 0x7f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0xfe,
+    0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0xfe, 0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x7f, 0x7f,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00,
+    0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0xfe, 0x7f, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0xfe,
+    0xfe, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f,
+    0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f,
+    0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f,
+    0x7f, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x00, 0x00,
+    0x7f, 0x7f, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+};
+
+#endif
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ec06582d90..356462bdf5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7300,7 +7300,7 @@
   <key>RenderBufferVisualization</key>
   <map>
     <key>Comment</key>
-    <string>Outputs a selected buffer to the screen.  -1 = final render buffer.  0 = Albedo, 1 = Specular/ORM, 2 = Normal, 3 = Emissive, 4 = Eye luminance</string>
+    <string>Outputs a selected buffer to the screen.  -1 = final render buffer.  0 = Albedo, 1 = Specular/ORM, 2 = Normal, 3 = Emissive, 4 = Eye luminance, 5 = FXAA Luminance/SMAA Edge Tex, 6 = SMAA Blend Weights</string>
     <key>Persist</key>
     <integer>0</integer>
     <key>Type</key>
@@ -7684,17 +7684,6 @@
     <key>Value</key>
     <integer>0</integer>
   </map>
-  <key>RenderPostProcessingHDR</key>
-  <map>
-    <key>Comment</key>
-    <string>Enable HDR for post processing buffer</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
   <key>RenderHDRIExposure</key>
   <map>
     <key>Comment</key>
@@ -8399,7 +8388,18 @@
     <key>RenderFSAASamples</key>
     <map>
       <key>Comment</key>
-      <string>Number of samples to use for FSAA (0 = no AA).</string>
+      <string>Quality of antialiasing: 0 = Low, 1 = Medium, 2 = High, 3 = Ultra</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>RenderFSAAType</key>
+    <map>
+      <key>Comment</key>
+      <string>Type of Antialiasing to use: 0 = None, 1 = FXAA, 2 = SMAA</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
index 96d08058cf..e80c59b39f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
@@ -2067,9 +2067,6 @@ A_STATIC void CasSetup(
  AF3 CasLoad(ASU2 p) { return texelFetch(diffuseRect, p, 0).rgb; }
  void CasInput(inout AF1 r,inout AF1 g,inout AF1 b)
  {
-    r = AFromSrgbF1(r);
-    g = AFromSrgbF1(g);
-    b = AFromSrgbF1(b);
  }
 
 //------------------------------------------------------------------------------------------------------------------------------
@@ -2553,6 +2550,7 @@ void main()
     vec4 diff = vec4(0.f);
     uvec2 point = uvec2(vary_fragcoord * out_screen_res.xy);
     CasFilter(diff.r, diff.g, diff.b, point, cas_param_0, cas_param_1, true);
-    frag_color = vec4(linear_to_srgb(diff.rgb), 1.0);
+    diff.a = texture(diffuseRect, vary_fragcoord).a;
+    frag_color = diff;
 }
 #endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
new file mode 100644
index 0000000000..fdb77cce6e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
@@ -0,0 +1,1463 @@
+/**
+ * @file SMAA.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_shader_texture_lod : enable
+#extension GL_EXT_gpu_shader4 : enable
+
+/*[EXTRA_CODE_HERE]*/
+
+#ifdef VERTEX_SHADER
+    #define SMAA_INCLUDE_VS 1
+    #define SMAA_INCLUDE_PS 0
+#else
+    #define SMAA_INCLUDE_VS 0
+    #define SMAA_INCLUDE_PS 1
+#endif
+
+uniform vec4 SMAA_RT_METRICS;
+
+/**
+ * Copyright (C) 2013 Jorge Jimenez (jorge@iryoku.com)
+ * Copyright (C) 2013 Jose I. Echevarria (joseignacioechevarria@gmail.com)
+ * Copyright (C) 2013 Belen Masia (bmasia@unizar.es)
+ * Copyright (C) 2013 Fernando Navarro (fernandn@microsoft.com)
+ * Copyright (C) 2013 Diego Gutierrez (diegog@unizar.es)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to
+ * do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software. As clarification, there
+ * is no requirement that the copyright notice and permission be included in
+ * binary distributions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+
+/**
+ *                  _______  ___  ___       ___           ___
+ *                 /       ||   \/   |     /   \         /   \
+ *                |   (---- |  \  /  |    /  ^  \       /  ^  \
+ *                 \   \    |  |\/|  |   /  /_\  \     /  /_\  \
+ *              ----)   |   |  |  |  |  /  _____  \   /  _____  \
+ *             |_______/    |__|  |__| /__/     \__\ /__/     \__\
+ *
+ *                               E N H A N C E D
+ *       S U B P I X E L   M O R P H O L O G I C A L   A N T I A L I A S I N G
+ *
+ *                         http://www.iryoku.com/smaa/
+ *
+ * Hi, welcome aboard!
+ *
+ * Here you'll find instructions to get the shader up and running as fast as
+ * possible.
+ *
+ * IMPORTANTE NOTICE: when updating, remember to update both this file and the
+ * precomputed textures! They may change from version to version.
+ *
+ * The shader has three passes, chained together as follows:
+ *
+ *                           |input|------------------�
+ *                              v                     |
+ *                    [ SMAA*EdgeDetection ]          |
+ *                              v                     |
+ *                          |edgesTex|                |
+ *                              v                     |
+ *              [ SMAABlendingWeightCalculation ]     |
+ *                              v                     |
+ *                          |blendTex|                |
+ *                              v                     |
+ *                [ SMAANeighborhoodBlending ] <------�
+ *                              v
+ *                           |output|
+ *
+ * Note that each [pass] has its own vertex and pixel shader. Remember to use
+ * oversized triangles instead of quads to avoid overshading along the
+ * diagonal.
+ *
+ * You've three edge detection methods to choose from: luma, color or depth.
+ * They represent different quality/performance and anti-aliasing/sharpness
+ * tradeoffs, so our recommendation is for you to choose the one that best
+ * suits your particular scenario:
+ *
+ * - Depth edge detection is usually the fastest but it may miss some edges.
+ *
+ * - Luma edge detection is usually more expensive than depth edge detection,
+ *   but catches visible edges that depth edge detection can miss.
+ *
+ * - Color edge detection is usually the most expensive one but catches
+ *   chroma-only edges.
+ *
+ * For quickstarters: just use luma edge detection.
+ *
+ * The general advice is to not rush the integration process and ensure each
+ * step is done correctly (don't try to integrate SMAA T2x with predicated edge
+ * detection from the start!). Ok then, let's go!
+ *
+ *  1. The first step is to create two RGBA temporal render targets for holding
+ *     |edgesTex| and |blendTex|.
+ *
+ *     In DX10 or DX11, you can use a RG render target for the edges texture.
+ *     In the case of NVIDIA GPUs, using RG render targets seems to actually be
+ *     slower.
+ *
+ *     On the Xbox 360, you can use the same render target for resolving both
+ *     |edgesTex| and |blendTex|, as they aren't needed simultaneously.
+ *
+ *  2. Both temporal render targets |edgesTex| and |blendTex| must be cleared
+ *     each frame. Do not forget to clear the alpha channel!
+ *
+ *  3. The next step is loading the two supporting precalculated textures,
+ *     'areaTex' and 'searchTex'. You'll find them in the 'Textures' folder as
+ *     C++ headers, and also as regular DDS files. They'll be needed for the
+ *     'SMAABlendingWeightCalculation' pass.
+ *
+ *     If you use the C++ headers, be sure to load them in the format specified
+ *     inside of them.
+ *
+ *     You can also compress 'areaTex' and 'searchTex' using BC5 and BC4
+ *     respectively, if you have that option in your content processor pipeline.
+ *     When compressing then, you get a non-perceptible quality decrease, and a
+ *     marginal performance increase.
+ *
+ *  4. All samplers must be set to linear filtering and clamp.
+ *
+ *     After you get the technique working, remember that 64-bit inputs have
+ *     half-rate linear filtering on GCN.
+ *
+ *     If SMAA is applied to 64-bit color buffers, switching to point filtering
+ *     when accesing them will increase the performance. Search for
+ *     'SMAASamplePoint' to see which textures may benefit from point
+ *     filtering, and where (which is basically the color input in the edge
+ *     detection and resolve passes).
+ *
+ *  5. All texture reads and buffer writes must be non-sRGB, with the exception
+ *     of the input read and the output write in
+ *     'SMAANeighborhoodBlending' (and only in this pass!). If sRGB reads in
+ *     this last pass are not possible, the technique will work anyway, but
+ *     will perform antialiasing in gamma space.
+ *
+ *     IMPORTANT: for best results the input read for the color/luma edge
+ *     detection should *NOT* be sRGB.
+ *
+ *  6. Before including SMAA.h you'll have to setup the render target metrics,
+ *     the target and any optional configuration defines. Optionally you can
+ *     use a preset.
+ *
+ *     You have the following targets available:
+ *         SMAA_HLSL_3
+ *         SMAA_HLSL_4
+ *         SMAA_HLSL_4_1
+ *         SMAA_GLSL_2 *
+ *         SMAA_GLSL_3 *
+ *         SMAA_GLSL_4 *
+ *
+ *         * (See SMAA_INCLUDE_VS and SMAA_INCLUDE_PS below).
+ *
+ *     And four presets:
+ *         SMAA_PRESET_LOW          (%60 of the quality)
+ *         SMAA_PRESET_MEDIUM       (%80 of the quality)
+ *         SMAA_PRESET_HIGH         (%95 of the quality)
+ *         SMAA_PRESET_ULTRA        (%99 of the quality)
+ *
+ *     For example:
+ *         #define SMAA_RT_METRICS float4(1.0 / 1280.0, 1.0 / 720.0, 1280.0, 720.0)
+ *         #define SMAA_HLSL_4
+ *         #define SMAA_PRESET_HIGH
+ *         #include "SMAA.h"
+ *
+ *     Note that SMAA_RT_METRICS doesn't need to be a macro, it can be a
+ *     uniform variable. The code is designed to minimize the impact of not
+ *     using a constant value, but it is still better to hardcode it.
+ *
+ *     Depending on how you encoded 'areaTex' and 'searchTex', you may have to
+ *     add (and customize) the following defines before including SMAA.h:
+ *          #define SMAA_AREATEX_SELECT(sample) sample.rg
+ *          #define SMAA_SEARCHTEX_SELECT(sample) sample.r
+ *
+ *     If your engine is already using porting macros, you can define
+ *     SMAA_CUSTOM_SL, and define the porting functions by yourself.
+ *
+ *  7. Then, you'll have to setup the passes as indicated in the scheme above.
+ *     You can take a look into SMAA.fx, to see how we did it for our demo.
+ *     Checkout the function wrappers, you may want to copy-paste them!
+ *
+ *  8. It's recommended to validate the produced |edgesTex| and |blendTex|.
+ *     You can use a screenshot from your engine to compare the |edgesTex|
+ *     and |blendTex| produced inside of the engine with the results obtained
+ *     with the reference demo.
+ *
+ *  9. After you get the last pass to work, it's time to optimize. You'll have
+ *     to initialize a stencil buffer in the first pass (discard is already in
+ *     the code), then mask execution by using it the second pass. The last
+ *     pass should be executed in all pixels.
+ *
+ *
+ * After this point you can choose to enable predicated thresholding,
+ * temporal supersampling and motion blur integration:
+ *
+ * a) If you want to use predicated thresholding, take a look into
+ *    SMAA_PREDICATION; you'll need to pass an extra texture in the edge
+ *    detection pass.
+ *
+ * b) If you want to enable temporal supersampling (SMAA T2x):
+ *
+ * 1. The first step is to render using subpixel jitters. I won't go into
+ *    detail, but it's as simple as moving each vertex position in the
+ *    vertex shader, you can check how we do it in our DX10 demo.
+ *
+ * 2. Then, you must setup the temporal resolve. You may want to take a look
+ *    into SMAAResolve for resolving 2x modes. After you get it working, you'll
+ *    probably see ghosting everywhere. But fear not, you can enable the
+ *    CryENGINE temporal reprojection by setting the SMAA_REPROJECTION macro.
+ *    Check out SMAA_DECODE_VELOCITY if your velocity buffer is encoded.
+ *
+ * 3. The next step is to apply SMAA to each subpixel jittered frame, just as
+ *    done for 1x.
+ *
+ * 4. At this point you should already have something usable, but for best
+ *    results the proper area textures must be set depending on current jitter.
+ *    For this, the parameter 'subsampleIndices' of
+ *    'SMAABlendingWeightCalculationPS' must be set as follows, for our T2x
+ *    mode:
+ *
+ *    @SUBSAMPLE_INDICES
+ *
+ *    | S# |  Camera Jitter   |  subsampleIndices    |
+ *    +----+------------------+---------------------+
+ *    |  0 |  ( 0.25, -0.25)  |  float4(1, 1, 1, 0)  |
+ *    |  1 |  (-0.25,  0.25)  |  float4(2, 2, 2, 0)  |
+ *
+ *    These jitter positions assume a bottom-to-top y axis. S# stands for the
+ *    sample number.
+ *
+ * More information about temporal supersampling here:
+ *    http://iryoku.com/aacourse/downloads/13-Anti-Aliasing-Methods-in-CryENGINE-3.pdf
+ *
+ * c) If you want to enable spatial multisampling (SMAA S2x):
+ *
+ * 1. The scene must be rendered using MSAA 2x. The MSAA 2x buffer must be
+ *    created with:
+ *      - DX10:     see below (*)
+ *      - DX10.1:   D3D10_STANDARD_MULTISAMPLE_PATTERN or
+ *      - DX11:     D3D11_STANDARD_MULTISAMPLE_PATTERN
+ *
+ *    This allows to ensure that the subsample order matches the table in
+ *    @SUBSAMPLE_INDICES.
+ *
+ *    (*) In the case of DX10, we refer the reader to:
+ *      - SMAA::detectMSAAOrder and
+ *      - SMAA::msaaReorder
+ *
+ *    These functions allow to match the standard multisample patterns by
+ *    detecting the subsample order for a specific GPU, and reordering
+ *    them appropriately.
+ *
+ * 2. A shader must be run to output each subsample into a separate buffer
+ *    (DX10 is required). You can use SMAASeparate for this purpose, or just do
+ *    it in an existing pass (for example, in the tone mapping pass, which has
+ *    the advantage of feeding tone mapped subsamples to SMAA, which will yield
+ *    better results).
+ *
+ * 3. The full SMAA 1x pipeline must be run for each separated buffer, storing
+ *    the results in the final buffer. The second run should alpha blend with
+ *    the existing final buffer using a blending factor of 0.5.
+ *    'subsampleIndices' must be adjusted as in the SMAA T2x case (see point
+ *    b).
+ *
+ * d) If you want to enable temporal supersampling on top of SMAA S2x
+ *    (which actually is SMAA 4x):
+ *
+ * 1. SMAA 4x consists on temporally jittering SMAA S2x, so the first step is
+ *    to calculate SMAA S2x for current frame. In this case, 'subsampleIndices'
+ *    must be set as follows:
+ *
+ *    | F# | S# |   Camera Jitter    |    Net Jitter     |   subsampleIndices   |
+ *    +----+----+--------------------+-------------------+----------------------+
+ *    |  0 |  0 |  ( 0.125,  0.125)  |  ( 0.375, -0.125) |  float4(5, 3, 1, 3)  |
+ *    |  0 |  1 |  ( 0.125,  0.125)  |  (-0.125,  0.375) |  float4(4, 6, 2, 3)  |
+ *    +----+----+--------------------+-------------------+----------------------+
+ *    |  1 |  2 |  (-0.125, -0.125)  |  ( 0.125, -0.375) |  float4(3, 5, 1, 4)  |
+ *    |  1 |  3 |  (-0.125, -0.125)  |  (-0.375,  0.125) |  float4(6, 4, 2, 4)  |
+ *
+ *    These jitter positions assume a bottom-to-top y axis. F# stands for the
+ *    frame number. S# stands for the sample number.
+ *
+ * 2. After calculating SMAA S2x for current frame (with the new subsample
+ *    indices), previous frame must be reprojected as in SMAA T2x mode (see
+ *    point b).
+ *
+ * e) If motion blur is used, you may want to do the edge detection pass
+ *    together with motion blur. This has two advantages:
+ *
+ * 1. Pixels under heavy motion can be omitted from the edge detection process.
+ *    For these pixels we can just store "no edge", as motion blur will take
+ *    care of them.
+ * 2. The center pixel tap is reused.
+ *
+ * Note that in this case depth testing should be used instead of stenciling,
+ * as we have to write all the pixels in the motion blur pass.
+ *
+ * That's it!
+ */
+
+//-----------------------------------------------------------------------------
+// SMAA Presets
+
+/**
+ * Note that if you use one of these presets, the following configuration
+ * macros will be ignored if set in the "Configurable Defines" section.
+ */
+
+#if defined(SMAA_PRESET_LOW)
+#define SMAA_THRESHOLD 0.15
+#define SMAA_MAX_SEARCH_STEPS 4
+#define SMAA_DISABLE_DIAG_DETECTION
+#define SMAA_DISABLE_CORNER_DETECTION
+#elif defined(SMAA_PRESET_MEDIUM)
+#define SMAA_THRESHOLD 0.1
+#define SMAA_MAX_SEARCH_STEPS 8
+#define SMAA_DISABLE_DIAG_DETECTION
+#define SMAA_DISABLE_CORNER_DETECTION
+#elif defined(SMAA_PRESET_HIGH)
+#define SMAA_THRESHOLD 0.1
+#define SMAA_MAX_SEARCH_STEPS 16
+#define SMAA_MAX_SEARCH_STEPS_DIAG 8
+#define SMAA_CORNER_ROUNDING 25
+#elif defined(SMAA_PRESET_ULTRA)
+#define SMAA_THRESHOLD 0.05
+#define SMAA_MAX_SEARCH_STEPS 32
+#define SMAA_MAX_SEARCH_STEPS_DIAG 16
+#define SMAA_CORNER_ROUNDING 25
+#endif
+
+//-----------------------------------------------------------------------------
+// Configurable Defines
+
+/**
+ * SMAA_THRESHOLD specifies the threshold or sensitivity to edges.
+ * Lowering this value you will be able to detect more edges at the expense of
+ * performance.
+ *
+ * Range: [0, 0.5]
+ *   0.1 is a reasonable value, and allows to catch most visible edges.
+ *   0.05 is a rather overkill value, that allows to catch 'em all.
+ *
+ *   If temporal supersampling is used, 0.2 could be a reasonable value, as low
+ *   contrast edges are properly filtered by just 2x.
+ */
+#ifndef SMAA_THRESHOLD
+#define SMAA_THRESHOLD 0.1
+#endif
+
+/**
+ * SMAA_DEPTH_THRESHOLD specifies the threshold for depth edge detection.
+ *
+ * Range: depends on the depth range of the scene.
+ */
+#ifndef SMAA_DEPTH_THRESHOLD
+#define SMAA_DEPTH_THRESHOLD (0.1 * SMAA_THRESHOLD)
+#endif
+
+/**
+ * SMAA_MAX_SEARCH_STEPS specifies the maximum steps performed in the
+ * horizontal/vertical pattern searches, at each side of the pixel.
+ *
+ * In number of pixels, it's actually the double. So the maximum line length
+ * perfectly handled by, for example 16, is 64 (by perfectly, we meant that
+ * longer lines won't look as good, but still antialiased).
+ *
+ * Range: [0, 112]
+ */
+#ifndef SMAA_MAX_SEARCH_STEPS
+#define SMAA_MAX_SEARCH_STEPS 16
+#endif
+
+/**
+ * SMAA_MAX_SEARCH_STEPS_DIAG specifies the maximum steps performed in the
+ * diagonal pattern searches, at each side of the pixel. In this case we jump
+ * one pixel at time, instead of two.
+ *
+ * Range: [0, 20]
+ *
+ * On high-end machines it is cheap (between a 0.8x and 0.9x slower for 16
+ * steps), but it can have a significant impact on older machines.
+ *
+ * Define SMAA_DISABLE_DIAG_DETECTION to disable diagonal processing.
+ */
+#ifndef SMAA_MAX_SEARCH_STEPS_DIAG
+#define SMAA_MAX_SEARCH_STEPS_DIAG 8
+#endif
+
+/**
+ * SMAA_CORNER_ROUNDING specifies how much sharp corners will be rounded.
+ *
+ * Range: [0, 100]
+ *
+ * Define SMAA_DISABLE_CORNER_DETECTION to disable corner processing.
+ */
+#ifndef SMAA_CORNER_ROUNDING
+#define SMAA_CORNER_ROUNDING 25
+#endif
+
+/**
+ * If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times
+ * bigger contrast than current edge, current edge will be discarded.
+ *
+ * This allows to eliminate spurious crossing edges, and is based on the fact
+ * that, if there is too much contrast in a direction, that will hide
+ * perceptually contrast in the other neighbors.
+ */
+#ifndef SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR
+#define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2.0
+#endif
+
+/**
+ * Predicated thresholding allows to better preserve texture details and to
+ * improve performance, by decreasing the number of detected edges using an
+ * additional buffer like the light accumulation buffer, object ids or even the
+ * depth buffer (the depth buffer usage may be limited to indoor or short range
+ * scenes).
+ *
+ * It locally decreases the luma or color threshold if an edge is found in an
+ * additional buffer (so the global threshold can be higher).
+ *
+ * This method was developed by Playstation EDGE MLAA team, and used in
+ * Killzone 3, by using the light accumulation buffer. More information here:
+ *     http://iryoku.com/aacourse/downloads/06-MLAA-on-PS3.pptx
+ */
+#ifndef SMAA_PREDICATION
+#define SMAA_PREDICATION 0
+#endif
+
+/**
+ * Threshold to be used in the additional predication buffer.
+ *
+ * Range: depends on the input, so you'll have to find the magic number that
+ * works for you.
+ */
+#ifndef SMAA_PREDICATION_THRESHOLD
+#define SMAA_PREDICATION_THRESHOLD 0.01
+#endif
+
+/**
+ * How much to scale the global threshold used for luma or color edge
+ * detection when using predication.
+ *
+ * Range: [1, 5]
+ */
+#ifndef SMAA_PREDICATION_SCALE
+#define SMAA_PREDICATION_SCALE 2.0
+#endif
+
+/**
+ * How much to locally decrease the threshold.
+ *
+ * Range: [0, 1]
+ */
+#ifndef SMAA_PREDICATION_STRENGTH
+#define SMAA_PREDICATION_STRENGTH 0.4
+#endif
+
+/**
+ * Temporal reprojection allows to remove ghosting artifacts when using
+ * temporal supersampling. We use the CryEngine 3 method which also introduces
+ * velocity weighting. This feature is of extreme importance for totally
+ * removing ghosting. More information here:
+ *    http://iryoku.com/aacourse/downloads/13-Anti-Aliasing-Methods-in-CryENGINE-3.pdf
+ *
+ * Note that you'll need to setup a velocity buffer for enabling reprojection.
+ * For static geometry, saving the previous depth buffer is a viable
+ * alternative.
+ */
+#ifndef SMAA_REPROJECTION
+#define SMAA_REPROJECTION 0
+#endif
+
+/**
+ * SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows to
+ * remove ghosting trails behind the moving object, which are not removed by
+ * just using reprojection. Using low values will exhibit ghosting, while using
+ * high values will disable temporal supersampling under motion.
+ *
+ * Behind the scenes, velocity weighting removes temporal supersampling when
+ * the velocity of the subsamples differs (meaning they are different objects).
+ *
+ * Range: [0, 80]
+ */
+#ifndef SMAA_REPROJECTION_WEIGHT_SCALE
+#define SMAA_REPROJECTION_WEIGHT_SCALE 30.0
+#endif
+
+/**
+ * On some compilers, discard and texture cannot be used in vertex shaders. Thus, they need
+ * to be compiled separately.
+ */
+#ifndef SMAA_INCLUDE_VS
+#define SMAA_INCLUDE_VS 1
+#endif
+#ifndef SMAA_INCLUDE_PS
+#define SMAA_INCLUDE_PS 1
+#endif
+
+//-----------------------------------------------------------------------------
+// Texture Access Defines
+
+#ifndef SMAA_AREATEX_SELECT
+#if defined(SMAA_HLSL_3)
+#define SMAA_AREATEX_SELECT(sample) sample.ra
+#else
+#define SMAA_AREATEX_SELECT(sample) sample.rg
+#endif
+#endif
+
+#ifndef SMAA_SEARCHTEX_SELECT
+#define SMAA_SEARCHTEX_SELECT(sample) sample.r
+#endif
+
+#ifndef SMAA_DECODE_VELOCITY
+#define SMAA_DECODE_VELOCITY(sample) sample.rg
+#endif
+
+//-----------------------------------------------------------------------------
+// Non-Configurable Defines
+
+#define SMAA_AREATEX_MAX_DISTANCE 16
+#define SMAA_AREATEX_MAX_DISTANCE_DIAG 20
+#define SMAA_AREATEX_PIXEL_SIZE (1.0 / float2(160.0, 560.0))
+#define SMAA_AREATEX_SUBTEX_SIZE (1.0 / 7.0)
+#define SMAA_SEARCHTEX_SIZE float2(66.0, 33.0)
+#define SMAA_SEARCHTEX_PACKED_SIZE float2(64.0, 16.0)
+#define SMAA_CORNER_ROUNDING_NORM (float(SMAA_CORNER_ROUNDING) / 100.0)
+
+//-----------------------------------------------------------------------------
+// Porting Functions
+
+#if defined(SMAA_HLSL_3)
+#ifndef SMAA_FLIP_Y
+#define SMAA_FLIP_Y 0
+#endif  // SMAA_FLIP_Y
+#define SMAATexture2D(tex) sampler2D tex
+#define SMAATexturePass2D(tex) tex
+#define SMAASampleLevelZero(tex, coord) tex2Dlod(tex, float4(coord, 0.0, 0.0))
+#define SMAASampleLevelZeroPoint(tex, coord) tex2Dlod(tex, float4(coord, 0.0, 0.0))
+#define SMAASampleLevelZeroOffset(tex, coord, offset) tex2Dlod(tex, float4(coord + offset * SMAA_RT_METRICS.xy, 0.0, 0.0))
+#define SMAASample(tex, coord) tex2D(tex, coord)
+#define SMAASamplePoint(tex, coord) tex2D(tex, coord)
+#define SMAASampleOffset(tex, coord, offset) tex2D(tex, coord + offset * SMAA_RT_METRICS.xy)
+#define SMAA_FLATTEN [flatten]
+#define SMAA_BRANCH [branch]
+#endif
+#if defined(SMAA_HLSL_4) || defined(SMAA_HLSL_4_1)
+#ifndef SMAA_FLIP_Y
+#define SMAA_FLIP_Y 0
+#endif  // SMAA_FLIP_Y
+SamplerState LinearSampler { Filter = MIN_MAG_LINEAR_MIP_POINT; AddressU = Clamp; AddressV = Clamp; };
+SamplerState PointSampler { Filter = MIN_MAG_MIP_POINT; AddressU = Clamp; AddressV = Clamp; };
+#define SMAATexture2D(tex) Texture2D tex
+#define SMAATexturePass2D(tex) tex
+#define SMAASampleLevelZero(tex, coord) tex.SampleLevel(LinearSampler, coord, 0)
+#define SMAASampleLevelZeroPoint(tex, coord) tex.SampleLevel(PointSampler, coord, 0)
+#define SMAASampleLevelZeroOffset(tex, coord, offset) tex.SampleLevel(LinearSampler, coord, 0, offset)
+#define SMAASample(tex, coord) tex.Sample(LinearSampler, coord)
+#define SMAASamplePoint(tex, coord) tex.Sample(PointSampler, coord)
+#define SMAASampleOffset(tex, coord, offset) tex.Sample(LinearSampler, coord, offset)
+#define SMAA_FLATTEN [flatten]
+#define SMAA_BRANCH [branch]
+#define SMAATexture2DMS2(tex) Texture2DMS<float4, 2> tex
+#define SMAALoad(tex, pos, sample) tex.Load(pos, sample)
+#if defined(SMAA_HLSL_4_1)
+#define SMAAGather(tex, coord) tex.Gather(LinearSampler, coord, 0)
+#endif
+#endif
+
+#if defined(SMAA_GLSL_2) || defined(SMAA_GLSL_3) || defined(SMAA_GLSL_4)
+#ifndef SMAA_FLIP_Y
+#define SMAA_FLIP_Y 1
+#endif  // SMAA_FLIP_Y
+
+#define SMAATexture2D(tex) sampler2D tex
+#define SMAATexturePass2D(tex) tex
+#if defined(SMAA_GLSL_2)
+#define SMAASampleLevelZero(tex, coord) texture2DLod(tex, coord, 0.0)
+#define SMAASampleLevelZeroPoint(tex, coord) texture2DLod(tex, coord, 0.0)
+#define SMAASampleLevelZeroOffset(tex, coord, offset) texture2DLodOffset(tex, coord, 0.0, offset)
+#define SMAASample(tex, coord) texture2D(tex, coord)
+#define SMAASamplePoint(tex, coord) texture2D(tex, coord)
+#define SMAASampleOffset(tex, coord, offset) texture2D(tex, coord, offset)
+#else
+#define SMAASampleLevelZero(tex, coord) textureLod(tex, coord, 0.0)
+#define SMAASampleLevelZeroPoint(tex, coord) textureLod(tex, coord, 0.0)
+#define SMAASampleLevelZeroOffset(tex, coord, offset) textureLodOffset(tex, coord, 0.0, offset)
+#define SMAASample(tex, coord) texture(tex, coord)
+#define SMAASamplePoint(tex, coord) texture(tex, coord)
+#define SMAASampleOffset(tex, coord, offset) textureOffset(tex, coord, offset)
+#endif
+#define SMAA_FLATTEN
+#define SMAA_BRANCH
+#define lerp(a, b, t) mix(a, b, t)
+#define saturate(a) clamp(a, 0.0, 1.0)
+#if defined(SMAA_GLSL_4)
+#define mad(a, b, c) fma(a, b, c)
+#define SMAAGather(tex, coord) textureGather(tex, coord)
+#else
+#define mad(a, b, c) (a * b + c)
+#endif
+#if defined(SMAA_GLSL_3) || defined(SMAA_GLSL_4)
+#define SMAATexture2DMS2(tex) sampler2DMS tex
+#define SMAALoad(tex, pos, sample) texelFetch(tex, pos, sample)
+#endif
+#define float2 vec2
+#define float3 vec3
+#define float4 vec4
+#define int2 ivec2
+#define int3 ivec3
+#define int4 ivec4
+#define bool2 bvec2
+#define bool3 bvec3
+#define bool4 bvec4
+#endif
+
+#if !defined(SMAA_HLSL_3) && !defined(SMAA_HLSL_4) && !defined(SMAA_HLSL_4_1) && !defined(SMAA_GLSL_2) && !defined(SMAA_GLSL_3) && !defined(SMAA_GLSL_4) && !defined(SMAA_CUSTOM_SL)
+#error you must define the shading language: SMAA_HLSL_*, SMAA_GLSL_* or SMAA_CUSTOM_SL
+#endif
+
+
+#if SMAA_FLIP_Y
+
+#define API_V_DIR(v) -(v)
+#define API_V_COORD(v) (1.0 - v)
+#define API_V_BELOW(v1, v2) v1 < v2
+#define API_V_ABOVE(v1, v2) v1 > v2
+
+#else  // VULKAN_FLIP
+
+#define API_V_DIR(v) v
+#define API_V_COORD(v) v
+#define API_V_BELOW(v1, v2) v1 > v2
+#define API_V_ABOVE(v1, v2) v1 < v2
+
+#endif  // VULKAN_FLIP
+
+
+//-----------------------------------------------------------------------------
+// Misc functions
+
+#if SMAA_INCLUDE_PS
+/**
+ * Gathers current pixel, and the top-left neighbors.
+ */
+float3 SMAAGatherNeighbours(float2 texcoord,
+                            float4 offset[3],
+                            SMAATexture2D(tex)) {
+    #ifdef SMAAGather
+
+    #if SMAA_FLIP_Y
+    return SMAAGather(tex, texcoord + SMAA_RT_METRICS.xy * float2(-0.5,  0.5)).zwy;
+    #else  // SMAA_FLIP_Y
+    return SMAAGather(tex, texcoord + SMAA_RT_METRICS.xy * float2(-0.5, -0.5)).grb;
+    #endif  // SMAA_FLIP_Y
+
+    #else  // SMAAGather
+    float P = SMAASamplePoint(tex, texcoord).r;
+    float Pleft = SMAASamplePoint(tex, offset[0].xy).r;
+    float Ptop  = SMAASamplePoint(tex, offset[0].zw).r;
+    return float3(P, Pleft, Ptop);
+    #endif
+}
+
+/**
+ * Adjusts the threshold by means of predication.
+ */
+float2 SMAACalculatePredicatedThreshold(float2 texcoord,
+                                        float4 offset[3],
+                                        SMAATexture2D(predicationTex)) {
+    float3 neighbours = SMAAGatherNeighbours(texcoord, offset, SMAATexturePass2D(predicationTex));
+    float2 delta = abs(neighbours.xx - neighbours.yz);
+    float2 edges = step(SMAA_PREDICATION_THRESHOLD, delta);
+    return SMAA_PREDICATION_SCALE * SMAA_THRESHOLD * (1.0 - SMAA_PREDICATION_STRENGTH * edges);
+}
+
+#endif  // SMAA_INCLUDE_PS
+
+/**
+ * Conditional move:
+ */
+void SMAAMovc(bool2 cond, inout float2 variable, float2 value) {
+    SMAA_FLATTEN if (cond.x) variable.x = value.x;
+    SMAA_FLATTEN if (cond.y) variable.y = value.y;
+}
+
+void SMAAMovc(bool4 cond, inout float4 variable, float4 value) {
+    SMAAMovc(cond.xy, variable.xy, value.xy);
+    SMAAMovc(cond.zw, variable.zw, value.zw);
+}
+
+
+#if SMAA_INCLUDE_VS
+//-----------------------------------------------------------------------------
+// Vertex Shaders
+
+/**
+ * Edge Detection Vertex Shader
+ */
+void SMAAEdgeDetectionVS(float2 texcoord,
+                         out float4 offset[3]) {
+    offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, API_V_DIR(-1.0)), texcoord.xyxy);
+    offset[1] = mad(SMAA_RT_METRICS.xyxy, float4( 1.0, 0.0, 0.0, API_V_DIR(1.0)), texcoord.xyxy);
+    offset[2] = mad(SMAA_RT_METRICS.xyxy, float4(-2.0, 0.0, 0.0, API_V_DIR(-2.0)), texcoord.xyxy);
+}
+
+/**
+ * Blend Weight Calculation Vertex Shader
+ */
+void SMAABlendingWeightCalculationVS(float2 texcoord,
+                                     out float2 pixcoord,
+                                     out float4 offset[3]) {
+    pixcoord = texcoord * SMAA_RT_METRICS.zw;
+
+    // We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
+    offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-0.25, API_V_DIR(-0.125),  1.25, API_V_DIR(-0.125)), texcoord.xyxy);
+    offset[1] = mad(SMAA_RT_METRICS.xyxy, float4(-0.125, API_V_DIR(-0.25), -0.125,  API_V_DIR(1.25)), texcoord.xyxy);
+
+    // And these for the searches, they indicate the ends of the loops:
+    offset[2] = mad(SMAA_RT_METRICS.xxyy,
+                    float4(-2.0, 2.0, API_V_DIR(-2.0), API_V_DIR(2.0)) * float(SMAA_MAX_SEARCH_STEPS),
+                    float4(offset[0].xz, offset[1].yw));
+}
+
+/**
+ * Neighborhood Blending Vertex Shader
+ */
+void SMAANeighborhoodBlendingVS(float2 texcoord,
+                                out float4 offset) {
+    offset = mad(SMAA_RT_METRICS.xyxy, float4( 1.0, 0.0, 0.0, API_V_DIR(1.0)), texcoord.xyxy);
+}
+#endif // SMAA_INCLUDE_VS
+
+#if SMAA_INCLUDE_PS
+//-----------------------------------------------------------------------------
+// Edge Detection Pixel Shaders (First Pass)
+
+/**
+ * Luma Edge Detection
+ *
+ * IMPORTANT NOTICE: luma edge detection requires gamma-corrected colors, and
+ * thus 'colorTex' should be a non-sRGB texture.
+ */
+float2 SMAALumaEdgeDetectionPS(float2 texcoord,
+                               float4 offset[3],
+                               SMAATexture2D(colorTex)
+                               #if SMAA_PREDICATION
+                               , SMAATexture2D(predicationTex)
+                               #endif
+                               ) {
+    // Calculate the threshold:
+    #if SMAA_PREDICATION
+    float2 threshold = SMAACalculatePredicatedThreshold(texcoord, offset, SMAATexturePass2D(predicationTex));
+    #else
+    float2 threshold = float2(SMAA_THRESHOLD, SMAA_THRESHOLD);
+    #endif
+
+    // Calculate lumas:
+    float3 weights = float3(0.2126, 0.7152, 0.0722);
+    float L = dot(SMAASamplePoint(colorTex, texcoord).rgb, weights);
+
+    float Lleft = dot(SMAASamplePoint(colorTex, offset[0].xy).rgb, weights);
+    float Ltop  = dot(SMAASamplePoint(colorTex, offset[0].zw).rgb, weights);
+
+    // We do the usual threshold:
+    float4 delta;
+    delta.xy = abs(L - float2(Lleft, Ltop));
+    float2 edges = step(threshold, delta.xy);
+
+    // Then discard if there is no edge:
+    if (dot(edges, float2(1.0, 1.0)) == 0.0)
+        discard;
+
+    // Calculate right and bottom deltas:
+    float Lright = dot(SMAASamplePoint(colorTex, offset[1].xy).rgb, weights);
+    float Lbottom  = dot(SMAASamplePoint(colorTex, offset[1].zw).rgb, weights);
+    delta.zw = abs(L - float2(Lright, Lbottom));
+
+    // Calculate the maximum delta in the direct neighborhood:
+    float2 maxDelta = max(delta.xy, delta.zw);
+
+    // Calculate left-left and top-top deltas:
+    float Lleftleft = dot(SMAASamplePoint(colorTex, offset[2].xy).rgb, weights);
+    float Ltoptop = dot(SMAASamplePoint(colorTex, offset[2].zw).rgb, weights);
+    delta.zw = abs(float2(Lleft, Ltop) - float2(Lleftleft, Ltoptop));
+
+    // Calculate the final maximum delta:
+    maxDelta = max(maxDelta.xy, delta.zw);
+    float finalDelta = max(maxDelta.x, maxDelta.y);
+
+    // Local contrast adaptation:
+    edges.xy *= step(finalDelta, SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR * delta.xy);
+
+    return edges;
+}
+
+/**
+ * Color Edge Detection
+ *
+ * IMPORTANT NOTICE: color edge detection requires gamma-corrected colors, and
+ * thus 'colorTex' should be a non-sRGB texture.
+ */
+float2 SMAAColorEdgeDetectionPS(float2 texcoord,
+                                float4 offset[3],
+                                SMAATexture2D(colorTex)
+                                #if SMAA_PREDICATION
+                                , SMAATexture2D(predicationTex)
+                                #endif
+                                ) {
+    // Calculate the threshold:
+    #if SMAA_PREDICATION
+    float2 threshold = SMAACalculatePredicatedThreshold(texcoord, offset, predicationTex);
+    #else
+    float2 threshold = float2(SMAA_THRESHOLD, SMAA_THRESHOLD);
+    #endif
+
+    // Calculate color deltas:
+    float4 delta;
+    float3 C = SMAASamplePoint(colorTex, texcoord).rgb;
+
+    float3 Cleft = SMAASamplePoint(colorTex, offset[0].xy).rgb;
+    float3 t = abs(C - Cleft);
+    delta.x = max(max(t.r, t.g), t.b);
+
+    float3 Ctop  = SMAASamplePoint(colorTex, offset[0].zw).rgb;
+    t = abs(C - Ctop);
+    delta.y = max(max(t.r, t.g), t.b);
+
+    // We do the usual threshold:
+    float2 edges = step(threshold, delta.xy);
+
+    // Then discard if there is no edge:
+    if (dot(edges, float2(1.0, 1.0)) == 0.0)
+        discard;
+
+    // Calculate right and bottom deltas:
+    float3 Cright = SMAASamplePoint(colorTex, offset[1].xy).rgb;
+    t = abs(C - Cright);
+    delta.z = max(max(t.r, t.g), t.b);
+
+    float3 Cbottom  = SMAASamplePoint(colorTex, offset[1].zw).rgb;
+    t = abs(C - Cbottom);
+    delta.w = max(max(t.r, t.g), t.b);
+
+    // Calculate the maximum delta in the direct neighborhood:
+    float2 maxDelta = max(delta.xy, delta.zw);
+
+    // Calculate left-left and top-top deltas:
+    float3 Cleftleft  = SMAASamplePoint(colorTex, offset[2].xy).rgb;
+    t = abs(C - Cleftleft);
+    delta.z = max(max(t.r, t.g), t.b);
+
+    float3 Ctoptop = SMAASamplePoint(colorTex, offset[2].zw).rgb;
+    t = abs(C - Ctoptop);
+    delta.w = max(max(t.r, t.g), t.b);
+
+    // Calculate the final maximum delta:
+    maxDelta = max(maxDelta.xy, delta.zw);
+    float finalDelta = max(maxDelta.x, maxDelta.y);
+
+    // Local contrast adaptation:
+    edges.xy *= step(finalDelta, SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR * delta.xy);
+
+    return edges;
+}
+
+/**
+ * Depth Edge Detection
+ */
+float2 SMAADepthEdgeDetectionPS(float2 texcoord,
+                                float4 offset[3],
+                                SMAATexture2D(depthTex)) {
+    float3 neighbours = SMAAGatherNeighbours(texcoord, offset, SMAATexturePass2D(depthTex));
+    float2 delta = abs(neighbours.xx - float2(neighbours.y, neighbours.z));
+    float2 edges = step(SMAA_DEPTH_THRESHOLD, delta);
+
+    if (dot(edges, float2(1.0, 1.0)) == 0.0)
+        discard;
+
+    return edges;
+}
+
+//-----------------------------------------------------------------------------
+// Diagonal Search Functions
+
+#if !defined(SMAA_DISABLE_DIAG_DETECTION)
+
+/**
+ * Allows to decode two binary values from a bilinear-filtered access.
+ */
+float2 SMAADecodeDiagBilinearAccess(float2 e) {
+    // Bilinear access for fetching 'e' have a 0.25 offset, and we are
+    // interested in the R and G edges:
+    //
+    // +---G---+-------+
+    // |   x o R   x   |
+    // +-------+-------+
+    //
+    // Then, if one of these edge is enabled:
+    //   Red:   (0.75 * X + 0.25 * 1) => 0.25 or 1.0
+    //   Green: (0.75 * 1 + 0.25 * X) => 0.75 or 1.0
+    //
+    // This function will unpack the values (mad + mul + round):
+    // wolframalpha.com: round(x * abs(5 * x - 5 * 0.75)) plot 0 to 1
+    e.r = e.r * abs(5.0 * e.r - 5.0 * 0.75);
+    return round(e);
+}
+
+float4 SMAADecodeDiagBilinearAccess(float4 e) {
+    e.rb = e.rb * abs(5.0 * e.rb - 5.0 * 0.75);
+    return round(e);
+}
+
+/**
+ * These functions allows to perform diagonal pattern searches.
+ */
+float2 SMAASearchDiag1(SMAATexture2D(edgesTex), float2 texcoord, float2 dir, out float2 e) {
+    dir.y = API_V_DIR(dir.y);
+    float4 coord = float4(texcoord, -1.0, 1.0);
+    float3 t = float3(SMAA_RT_METRICS.xy, 1.0);
+    while (coord.z < float(SMAA_MAX_SEARCH_STEPS_DIAG - 1) &&
+           coord.w > 0.9) {
+        coord.xyz = mad(t, float3(dir, 1.0), coord.xyz);
+        e = SMAASampleLevelZero(edgesTex, coord.xy).rg;
+        coord.w = dot(e, float2(0.5, 0.5));
+    }
+    return coord.zw;
+}
+
+float2 SMAASearchDiag2(SMAATexture2D(edgesTex), float2 texcoord, float2 dir, out float2 e) {
+    dir.y = API_V_DIR(dir.y);
+    float4 coord = float4(texcoord, -1.0, 1.0);
+    coord.x += 0.25 * SMAA_RT_METRICS.x; // See @SearchDiag2Optimization
+    float3 t = float3(SMAA_RT_METRICS.xy, 1.0);
+    while (coord.z < float(SMAA_MAX_SEARCH_STEPS_DIAG - 1) &&
+           coord.w > 0.9) {
+        coord.xyz = mad(t, float3(dir, 1.0), coord.xyz);
+
+        // @SearchDiag2Optimization
+        // Fetch both edges at once using bilinear filtering:
+        e = SMAASampleLevelZero(edgesTex, coord.xy).rg;
+        e = SMAADecodeDiagBilinearAccess(e);
+
+        // Non-optimized version:
+        // e.g = SMAASampleLevelZero(edgesTex, coord.xy).g;
+        // e.r = SMAASampleLevelZeroOffset(edgesTex, coord.xy, int2(1, 0)).r;
+
+        coord.w = dot(e, float2(0.5, 0.5));
+    }
+    return coord.zw;
+}
+
+/**
+ * Similar to SMAAArea, this calculates the area corresponding to a certain
+ * diagonal distance and crossing edges 'e'.
+ */
+float2 SMAAAreaDiag(SMAATexture2D(areaTex), float2 dist, float2 e, float offset) {
+    float2 texcoord = mad(float2(SMAA_AREATEX_MAX_DISTANCE_DIAG, SMAA_AREATEX_MAX_DISTANCE_DIAG), e, dist);
+
+    // We do a scale and bias for mapping to texel space:
+    texcoord = mad(SMAA_AREATEX_PIXEL_SIZE, texcoord, 0.5 * SMAA_AREATEX_PIXEL_SIZE);
+
+    // Diagonal areas are on the second half of the texture:
+    texcoord.x += 0.5;
+
+    // Move to proper place, according to the subpixel offset:
+    texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;
+
+    texcoord.y = API_V_COORD(texcoord.y);
+
+    // Do it!
+    return SMAA_AREATEX_SELECT(SMAASampleLevelZero(areaTex, texcoord));
+}
+
+/**
+ * This searches for diagonal patterns and returns the corresponding weights.
+ */
+float2 SMAACalculateDiagWeights(SMAATexture2D(edgesTex), SMAATexture2D(areaTex), float2 texcoord, float2 e, float4 subsampleIndices) {
+    float2 weights = float2(0.0, 0.0);
+
+    // Search for the line ends:
+    float4 d;
+    float2 end;
+    if (e.r > 0.0) {
+        d.xz = SMAASearchDiag1(SMAATexturePass2D(edgesTex), texcoord, float2(-1.0,  1.0), end);
+        d.x += float(end.y > 0.9);
+    } else
+        d.xz = float2(0.0, 0.0);
+    d.yw = SMAASearchDiag1(SMAATexturePass2D(edgesTex), texcoord, float2(1.0, -1.0), end);
+
+    SMAA_BRANCH
+    if (d.x + d.y > 2.0) { // d.x + d.y + 1 > 3
+        // Fetch the crossing edges:
+        float4 coords = mad(float4(-d.x + 0.25, API_V_DIR(d.x), d.y, API_V_DIR(-d.y - 0.25)), SMAA_RT_METRICS.xyxy, texcoord.xyxy);
+        float4 c;
+        c.xy = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-1,  0)).rg;
+        c.zw = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1,  0)).rg;
+        c.yxwz = SMAADecodeDiagBilinearAccess(c.xyzw);
+
+        // Non-optimized version:
+        // float4 coords = mad(float4(-d.x, d.x, d.y, -d.y), SMAA_RT_METRICS.xyxy, texcoord.xyxy);
+        // float4 c;
+        // c.x = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-1,  0)).g;
+        // c.y = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2( 0,  0)).r;
+        // c.z = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1,  0)).g;
+        // c.w = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1, -1)).r;
+
+        // Merge crossing edges at each side into a single value:
+        float2 cc = mad(float2(2.0, 2.0), c.xz, c.yw);
+
+        // Remove the crossing edge if we didn't found the end of the line:
+        SMAAMovc(bool2(step(0.9, d.zw)), cc, float2(0.0, 0.0));
+
+        // Fetch the areas for this line:
+        weights += SMAAAreaDiag(SMAATexturePass2D(areaTex), d.xy, cc, subsampleIndices.z);
+    }
+
+    // Search for the line ends:
+    d.xz = SMAASearchDiag2(SMAATexturePass2D(edgesTex), texcoord, float2(-1.0, -1.0), end);
+    if (SMAASampleLevelZeroOffset(edgesTex, texcoord, int2(1, 0)).r > 0.0) {
+        d.yw = SMAASearchDiag2(SMAATexturePass2D(edgesTex), texcoord, float2(1.0, 1.0), end);
+        d.y += float(end.y > 0.9);
+    } else
+        d.yw = float2(0.0, 0.0);
+
+    SMAA_BRANCH
+    if (d.x + d.y > 2.0) { // d.x + d.y + 1 > 3
+        // Fetch the crossing edges:
+        float4 coords = mad(float4(-d.x, API_V_DIR(-d.x), d.y, API_V_DIR(d.y)), SMAA_RT_METRICS.xyxy, texcoord.xyxy);
+        float4 c;
+        c.x  = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2(-1,  0)).g;
+        c.y  = SMAASampleLevelZeroOffset(edgesTex, coords.xy, int2( 0, API_V_DIR(-1))).r;
+        c.zw = SMAASampleLevelZeroOffset(edgesTex, coords.zw, int2( 1,  0)).gr;
+        float2 cc = mad(float2(2.0, 2.0), c.xz, c.yw);
+
+        // Remove the crossing edge if we didn't found the end of the line:
+        SMAAMovc(bool2(step(0.9, d.zw)), cc, float2(0.0, 0.0));
+
+        // Fetch the areas for this line:
+        weights += SMAAAreaDiag(SMAATexturePass2D(areaTex), d.xy, cc, subsampleIndices.w).gr;
+    }
+
+    return weights;
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// Horizontal/Vertical Search Functions
+
+/**
+ * This allows to determine how much length should we add in the last step
+ * of the searches. It takes the bilinearly interpolated edge (see
+ * @PSEUDO_GATHER4), and adds 0, 1 or 2, depending on which edges and
+ * crossing edges are active.
+ */
+float SMAASearchLength(SMAATexture2D(searchTex), float2 e, float offset) {
+    // The texture is flipped vertically, with left and right cases taking half
+    // of the space horizontally:
+    float2 scale = SMAA_SEARCHTEX_SIZE * float2(0.5, -1.0);
+    float2 bias = SMAA_SEARCHTEX_SIZE * float2(offset, 1.0);
+
+    // Scale and bias to access texel centers:
+    scale += float2(-1.0,  1.0);
+    bias  += float2( 0.5, -0.5);
+
+    // Convert from pixel coordinates to texcoords:
+    // (We use SMAA_SEARCHTEX_PACKED_SIZE because the texture is cropped)
+    scale *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE;
+    bias *= 1.0 / SMAA_SEARCHTEX_PACKED_SIZE;
+
+    float2 coord = mad(scale, e, bias);
+    coord.y = API_V_COORD(coord.y);
+
+    // Lookup the search texture:
+    return SMAA_SEARCHTEX_SELECT(SMAASampleLevelZero(searchTex, coord));
+}
+
+/**
+ * Horizontal/vertical search functions for the 2nd pass.
+ */
+float SMAASearchXLeft(SMAATexture2D(edgesTex), SMAATexture2D(searchTex), float2 texcoord, float end) {
+    /**
+     * @PSEUDO_GATHER4
+     * This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
+     * sample between edge, thus fetching four edges in a row.
+     * Sampling with different offsets in each direction allows to disambiguate
+     * which edges are active from the four fetched ones.
+     */
+    float2 e = float2(0.0, 1.0);
+    while (texcoord.x > end &&
+           e.g > 0.8281 && // Is there some edge not activated?
+           e.r == 0.0) { // Or is there a crossing edge that breaks the line?
+        e = SMAASampleLevelZero(edgesTex, texcoord).rg;
+        texcoord = mad(-float2(2.0, 0.0), SMAA_RT_METRICS.xy, texcoord);
+    }
+
+    float offset = mad(-(255.0 / 127.0), SMAASearchLength(SMAATexturePass2D(searchTex), e, 0.0), 3.25);
+    return mad(SMAA_RT_METRICS.x, offset, texcoord.x);
+
+    // Non-optimized version:
+    // We correct the previous (-0.25, -0.125) offset we applied:
+    // texcoord.x += 0.25 * SMAA_RT_METRICS.x;
+
+    // The searches are bias by 1, so adjust the coords accordingly:
+    // texcoord.x += SMAA_RT_METRICS.x;
+
+    // Disambiguate the length added by the last step:
+    // texcoord.x += 2.0 * SMAA_RT_METRICS.x; // Undo last step
+    // texcoord.x -= SMAA_RT_METRICS.x * (255.0 / 127.0) * SMAASearchLength(SMAATexturePass2D(searchTex), e, 0.0);
+    // return mad(SMAA_RT_METRICS.x, offset, texcoord.x);
+}
+
+float SMAASearchXRight(SMAATexture2D(edgesTex), SMAATexture2D(searchTex), float2 texcoord, float end) {
+    float2 e = float2(0.0, 1.0);
+    while (texcoord.x < end &&
+           e.g > 0.8281 && // Is there some edge not activated?
+           e.r == 0.0) { // Or is there a crossing edge that breaks the line?
+        e = SMAASampleLevelZero(edgesTex, texcoord).rg;
+        texcoord = mad(float2(2.0, 0.0), SMAA_RT_METRICS.xy, texcoord);
+    }
+    float offset = mad(-(255.0 / 127.0), SMAASearchLength(SMAATexturePass2D(searchTex), e, 0.5), 3.25);
+    return mad(-SMAA_RT_METRICS.x, offset, texcoord.x);
+}
+
+float SMAASearchYUp(SMAATexture2D(edgesTex), SMAATexture2D(searchTex), float2 texcoord, float end) {
+    float2 e = float2(1.0, 0.0);
+    while (API_V_BELOW(texcoord.y, end) &&
+           e.r > 0.8281 && // Is there some edge not activated?
+           e.g == 0.0) { // Or is there a crossing edge that breaks the line?
+        e = SMAASampleLevelZero(edgesTex, texcoord).rg;
+        texcoord = mad(-float2(0.0, API_V_DIR(2.0)), SMAA_RT_METRICS.xy, texcoord);
+    }
+    float offset = mad(-(255.0 / 127.0), SMAASearchLength(SMAATexturePass2D(searchTex), e.gr, 0.0), 3.25);
+    return mad(SMAA_RT_METRICS.y, API_V_DIR(offset), texcoord.y);
+}
+
+float SMAASearchYDown(SMAATexture2D(edgesTex), SMAATexture2D(searchTex), float2 texcoord, float end) {
+    float2 e = float2(1.0, 0.0);
+    while (API_V_ABOVE(texcoord.y, end) &&
+           e.r > 0.8281 && // Is there some edge not activated?
+           e.g == 0.0) { // Or is there a crossing edge that breaks the line?
+        e = SMAASampleLevelZero(edgesTex, texcoord).rg;
+        texcoord = mad(float2(0.0, API_V_DIR(2.0)), SMAA_RT_METRICS.xy, texcoord);
+    }
+    float offset = mad(-(255.0 / 127.0), SMAASearchLength(SMAATexturePass2D(searchTex), e.gr, 0.5), 3.25);
+    return mad(-SMAA_RT_METRICS.y, API_V_DIR(offset), texcoord.y);
+}
+
+/**
+ * Ok, we have the distance and both crossing edges. So, what are the areas
+ * at each side of current edge?
+ */
+float2 SMAAArea(SMAATexture2D(areaTex), float2 dist, float e1, float e2, float offset) {
+    // Rounding prevents precision errors of bilinear filtering:
+    float2 texcoord = mad(float2(SMAA_AREATEX_MAX_DISTANCE, SMAA_AREATEX_MAX_DISTANCE), round(4.0 * float2(e1, e2)), dist);
+
+    // We do a scale and bias for mapping to texel space:
+    texcoord = mad(SMAA_AREATEX_PIXEL_SIZE, texcoord, 0.5 * SMAA_AREATEX_PIXEL_SIZE);
+
+    // Move to proper place, according to the subpixel offset:
+    texcoord.y = mad(SMAA_AREATEX_SUBTEX_SIZE, offset, texcoord.y);
+
+    texcoord.y = API_V_COORD(texcoord.y);
+
+    // Do it!
+    return SMAA_AREATEX_SELECT(SMAASampleLevelZero(areaTex, texcoord));
+}
+
+//-----------------------------------------------------------------------------
+// Corner Detection Functions
+
+void SMAADetectHorizontalCornerPattern(SMAATexture2D(edgesTex), inout float2 weights, float4 texcoord, float2 d) {
+    #if !defined(SMAA_DISABLE_CORNER_DETECTION)
+    float2 leftRight = step(d.xy, d.yx);
+    float2 rounding = (1.0 - SMAA_CORNER_ROUNDING_NORM) * leftRight;
+
+    rounding /= leftRight.x + leftRight.y; // Reduce blending for pixels in the center of a line.
+
+    float2 factor = float2(1.0, 1.0);
+    factor.x -= rounding.x * SMAASampleLevelZeroOffset(edgesTex, texcoord.xy, int2(0,  API_V_DIR(1))).r;
+    factor.x -= rounding.y * SMAASampleLevelZeroOffset(edgesTex, texcoord.zw, int2(1,  API_V_DIR(1))).r;
+    factor.y -= rounding.x * SMAASampleLevelZeroOffset(edgesTex, texcoord.xy, int2(0, API_V_DIR(-2))).r;
+    factor.y -= rounding.y * SMAASampleLevelZeroOffset(edgesTex, texcoord.zw, int2(1, API_V_DIR(-2))).r;
+
+    weights *= saturate(factor);
+    #endif
+}
+
+void SMAADetectVerticalCornerPattern(SMAATexture2D(edgesTex), inout float2 weights, float4 texcoord, float2 d) {
+    #if !defined(SMAA_DISABLE_CORNER_DETECTION)
+    float2 leftRight = step(d.xy, d.yx);
+    float2 rounding = (1.0 - SMAA_CORNER_ROUNDING_NORM) * leftRight;
+
+    rounding /= leftRight.x + leftRight.y;
+
+    float2 factor = float2(1.0, 1.0);
+    factor.x -= rounding.x * SMAASampleLevelZeroOffset(edgesTex, texcoord.xy, int2( 1, 0)).g;
+    factor.x -= rounding.y * SMAASampleLevelZeroOffset(edgesTex, texcoord.zw, int2( 1, API_V_DIR(1))).g;
+    factor.y -= rounding.x * SMAASampleLevelZeroOffset(edgesTex, texcoord.xy, int2(-2, 0)).g;
+    factor.y -= rounding.y * SMAASampleLevelZeroOffset(edgesTex, texcoord.zw, int2(-2, API_V_DIR(1))).g;
+
+    weights *= saturate(factor);
+    #endif
+}
+
+//-----------------------------------------------------------------------------
+// Blending Weight Calculation Pixel Shader (Second Pass)
+
+float4 SMAABlendingWeightCalculationPS(float2 texcoord,
+                                       float2 pixcoord,
+                                       float4 offset[3],
+                                       SMAATexture2D(edgesTex),
+                                       SMAATexture2D(areaTex),
+                                       SMAATexture2D(searchTex),
+                                       float4 subsampleIndices) { // Just pass zero for SMAA 1x, see @SUBSAMPLE_INDICES.
+    float4 weights = float4(0.0, 0.0, 0.0, 0.0);
+
+    float2 e = SMAASample(edgesTex, texcoord).rg;
+
+    SMAA_BRANCH
+    if (e.g > 0.0) { // Edge at north
+        #if !defined(SMAA_DISABLE_DIAG_DETECTION)
+        // Diagonals have both north and west edges, so searching for them in
+        // one of the boundaries is enough.
+        weights.rg = SMAACalculateDiagWeights(SMAATexturePass2D(edgesTex), SMAATexturePass2D(areaTex), texcoord, e, subsampleIndices);
+
+        // We give priority to diagonals, so if we find a diagonal we skip
+        // horizontal/vertical processing.
+        SMAA_BRANCH
+        if (weights.r == -weights.g) { // weights.r + weights.g == 0.0
+        #endif
+
+        float2 d;
+
+        // Find the distance to the left:
+        float3 coords;
+        coords.x = SMAASearchXLeft(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[0].xy, offset[2].x);
+        coords.y = offset[1].y; // offset[1].y = texcoord.y - 0.25 * SMAA_RT_METRICS.y (@CROSSING_OFFSET)
+        d.x = coords.x;
+
+        // Now fetch the left crossing edges, two at a time using bilinear
+        // filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
+        // discern what value each edge has:
+        float e1 = SMAASampleLevelZero(edgesTex, coords.xy).r;
+
+        // Find the distance to the right:
+        coords.z = SMAASearchXRight(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[0].zw, offset[2].y);
+        d.y = coords.z;
+
+        // We want the distances to be in pixel units (doing this here allow to
+        // better interleave arithmetic and memory accesses):
+        d = abs(round(mad(SMAA_RT_METRICS.zz, d, -pixcoord.xx)));
+
+        // SMAAArea below needs a sqrt, as the areas texture is compressed
+        // quadratically:
+        float2 sqrt_d = sqrt(d);
+
+        // Fetch the right crossing edges:
+        float e2 = SMAASampleLevelZeroOffset(edgesTex, coords.zy, int2(1, 0)).r;
+
+        // Ok, we know how this pattern looks like, now it is time for getting
+        // the actual area:
+        weights.rg = SMAAArea(SMAATexturePass2D(areaTex), sqrt_d, e1, e2, subsampleIndices.y);
+
+        // Fix corners:
+        coords.y = texcoord.y;
+        SMAADetectHorizontalCornerPattern(SMAATexturePass2D(edgesTex), weights.rg, coords.xyzy, d);
+
+        #if !defined(SMAA_DISABLE_DIAG_DETECTION)
+        } else
+            e.r = 0.0; // Skip vertical processing.
+        #endif
+    }
+
+    SMAA_BRANCH
+    if (e.r > 0.0) { // Edge at west
+        float2 d;
+
+        // Find the distance to the top:
+        float3 coords;
+        coords.y = SMAASearchYUp(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[1].xy, offset[2].z);
+        coords.x = offset[0].x; // offset[1].x = texcoord.x - 0.25 * SMAA_RT_METRICS.x;
+        d.x = coords.y;
+
+        // Fetch the top crossing edges:
+        float e1 = SMAASampleLevelZero(edgesTex, coords.xy).g;
+
+        // Find the distance to the bottom:
+        coords.z = SMAASearchYDown(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[1].zw, offset[2].w);
+        d.y = coords.z;
+
+        // We want the distances to be in pixel units:
+        d = abs(round(mad(SMAA_RT_METRICS.ww, d, -pixcoord.yy)));
+
+        // SMAAArea below needs a sqrt, as the areas texture is compressed
+        // quadratically:
+        float2 sqrt_d = sqrt(d);
+
+        // Fetch the bottom crossing edges:
+        float e2 = SMAASampleLevelZeroOffset(edgesTex, coords.xz, int2(0, API_V_DIR(1))).g;
+
+        // Get the area for this direction:
+        weights.ba = SMAAArea(SMAATexturePass2D(areaTex), sqrt_d, e1, e2, subsampleIndices.x);
+
+        // Fix corners:
+        coords.x = texcoord.x;
+        SMAADetectVerticalCornerPattern(SMAATexturePass2D(edgesTex), weights.ba, coords.xyxz, d);
+    }
+
+    return weights;
+}
+
+//-----------------------------------------------------------------------------
+// Neighborhood Blending Pixel Shader (Third Pass)
+
+float4 SMAANeighborhoodBlendingPS(float2 texcoord,
+                                  float4 offset,
+                                  SMAATexture2D(colorTex),
+                                  SMAATexture2D(blendTex)
+                                  #if SMAA_REPROJECTION
+                                  , SMAATexture2D(velocityTex)
+                                  #endif
+                                  ) {
+    // Fetch the blending weights for current pixel:
+    float4 a;
+    a.x = SMAASample(blendTex, offset.xy).a; // Right
+    a.y = SMAASample(blendTex, offset.zw).g; // Top
+    a.wz = SMAASample(blendTex, texcoord).xz; // Bottom / Left
+
+    // Is there any blending weight with a value greater than 0.0?
+    SMAA_BRANCH
+    if (dot(a, float4(1.0, 1.0, 1.0, 1.0)) < 1e-5) {
+        float4 color = SMAASampleLevelZero(colorTex, texcoord);
+
+        #if SMAA_REPROJECTION
+        float2 velocity = SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, texcoord));
+
+        // Pack velocity into the alpha channel:
+        color.a = sqrt(5.0 * length(velocity));
+        #endif
+
+        return color;
+    } else {
+        bool h = max(a.x, a.z) > max(a.y, a.w); // max(horizontal) > max(vertical)
+
+        // Calculate the blending offsets:
+        float4 blendingOffset = float4(0.0, API_V_DIR(a.y), 0.0, API_V_DIR(a.w));
+        float2 blendingWeight = a.yw;
+        SMAAMovc(bool4(h, h, h, h), blendingOffset, float4(a.x, 0.0, a.z, 0.0));
+        SMAAMovc(bool2(h, h), blendingWeight, a.xz);
+        blendingWeight /= dot(blendingWeight, float2(1.0, 1.0));
+
+        // Calculate the texture coordinates:
+        float4 blendingCoord = mad(blendingOffset, float4(SMAA_RT_METRICS.xy, -SMAA_RT_METRICS.xy), texcoord.xyxy);
+
+        // We exploit bilinear filtering to mix current pixel with the chosen
+        // neighbor:
+        float4 color = blendingWeight.x * SMAASampleLevelZero(colorTex, blendingCoord.xy);
+        color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw);
+
+        #if SMAA_REPROJECTION
+        // Antialias velocity for proper reprojection in a later stage:
+        float2 velocity = blendingWeight.x * SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.xy));
+        velocity += blendingWeight.y * SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.zw));
+
+        // Pack velocity into the alpha channel:
+        color.a = sqrt(5.0 * length(velocity));
+        #endif
+
+        return color;
+    }
+}
+
+//-----------------------------------------------------------------------------
+// Temporal Resolve Pixel Shader (Optional Pass)
+
+float4 SMAAResolvePS(float2 texcoord,
+                     SMAATexture2D(currentColorTex),
+                     SMAATexture2D(previousColorTex)
+                     #if SMAA_REPROJECTION
+                     , SMAATexture2D(velocityTex)
+                     #endif
+                     ) {
+    #if SMAA_REPROJECTION
+    // Velocity is assumed to be calculated for motion blur, so we need to
+    // inverse it for reprojection:
+    float2 velocity = -SMAA_DECODE_VELOCITY(SMAASamplePoint(velocityTex, texcoord).rg);
+
+    // Fetch current pixel:
+    float4 current = SMAASamplePoint(currentColorTex, texcoord);
+
+    // Reproject current coordinates and fetch previous pixel:
+    float4 previous = SMAASamplePoint(previousColorTex, texcoord + velocity);
+
+    // Attenuate the previous pixel if the velocity is different:
+    float delta = abs(current.a * current.a - previous.a * previous.a) / 5.0;
+    float weight = 0.5 * saturate(1.0 - sqrt(delta) * SMAA_REPROJECTION_WEIGHT_SCALE);
+
+    // Blend the pixels according to the calculated weight:
+    return lerp(current, previous, weight);
+    #else
+    // Just blend the pixels:
+    float4 current = SMAASamplePoint(currentColorTex, texcoord);
+    float4 previous = SMAASamplePoint(previousColorTex, texcoord);
+    return lerp(current, previous, 0.5);
+    #endif
+}
+
+//-----------------------------------------------------------------------------
+// Separate Multisamples Pixel Shader (Optional Pass)
+
+#ifdef SMAALoad
+void SMAASeparatePS(float4 position,
+                    float2 texcoord,
+                    out float4 target0,
+                    out float4 target1,
+                    SMAATexture2DMS2(colorTexMS)) {
+    int2 pos = int2(position.xy);
+    target0 = SMAALoad(colorTexMS, pos, 0);
+    target1 = SMAALoad(colorTexMS, pos, 1);
+}
+#endif
+
+//-----------------------------------------------------------------------------
+#endif // SMAA_INCLUDE_PS
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsF.glsl
new file mode 100644
index 0000000000..3332c5f58f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsF.glsl
@@ -0,0 +1,57 @@
+/**
+ * @file SMAABlendWeightsF.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+out vec4 frag_color;
+
+in vec2 vary_texcoord0;
+in vec2 vary_pixcoord;
+in vec4 vary_offset[3];
+
+uniform sampler2D edgesTex;
+uniform sampler2D areaTex;
+uniform sampler2D searchTex;
+
+vec4 SMAABlendingWeightCalculationPS(vec2 texcoord,
+                                       vec2 pixcoord,
+                                       vec4 offset[3],
+                                       sampler2D edgesTex,
+                                       sampler2D areaTex,
+                                       sampler2D searchTex,
+                                       vec4 subsampleIndices);
+
+void main()
+{
+    frag_color = SMAABlendingWeightCalculationPS(vary_texcoord0,
+                                                 vary_pixcoord,
+                                                 vary_offset,
+                                                 edgesTex,
+                                                 areaTex,
+                                                 searchTex,
+                                                 vec4(0.0)
+                                                 );
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsV.glsl
new file mode 100644
index 0000000000..52f85ef30c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAABlendWeightsV.glsl
@@ -0,0 +1,51 @@
+/**
+ * @file SMAABlendWeightsV.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+uniform mat4 modelview_projection_matrix;
+
+in vec3 position;
+
+out vec2 vary_texcoord0;
+out vec2 vary_pixcoord;
+out vec4 vary_offset[3];
+
+#define float4 vec4
+#define float2 vec2
+void SMAABlendingWeightCalculationVS(float2 texcoord,
+                                     out float2 pixcoord,
+                                     out float4 offset[3]);
+
+void main()
+{
+    gl_Position = vec4(position.xyz, 1.0);
+    vary_texcoord0 = (gl_Position.xy*0.5+0.5);
+
+    SMAABlendingWeightCalculationVS(vary_texcoord0,
+                                    vary_pixcoord,
+                                    vary_offset);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectF.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectF.glsl
new file mode 100644
index 0000000000..0a8cd4a4ea
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectF.glsl
@@ -0,0 +1,59 @@
+/**
+ * @file SMAAEdgeDetectF.glsl
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+out vec4 frag_color;
+
+in vec2 vary_texcoord0;
+in vec4 vary_offset[3];
+
+uniform sampler2D diffuseRect;
+#if SMAA_PREDICATION
+uniform sampler2D predicationTex;
+#endif
+
+#define float4 vec4
+#define float2 vec2
+#define SMAATexture2D(tex) sampler2D tex
+
+float2 SMAAColorEdgeDetectionPS(float2 texcoord,
+                                float4 offset[3],
+                                SMAATexture2D(colorTex)
+                                #if SMAA_PREDICATION
+                                , SMAATexture2D(predicationTex)
+                                #endif
+                                );
+
+void main()
+{
+    vec2 val = SMAAColorEdgeDetectionPS(vary_texcoord0,
+                                          vary_offset,
+                                          diffuseRect
+                                          #if SMAA_PREDICATION
+                                          , predicationTex
+                                          #endif
+                                          );
+    frag_color = float4(val,0.0,0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectV.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectV.glsl
new file mode 100644
index 0000000000..7c0184bfc4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAAEdgeDetectV.glsl
@@ -0,0 +1,45 @@
+/**
+ * @file SMAAEdgeDetectV.glsl
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+uniform mat4 modelview_projection_matrix;
+
+in vec3 position;
+
+out vec2 vary_texcoord0;
+out vec4 vary_offset[3];
+
+#define float4 vec4
+#define float2 vec2
+void SMAAEdgeDetectionVS(float2 texcoord,
+                         out float4 offset[3]);
+
+void main()
+{
+    gl_Position = vec4(position.xyz, 1.0);
+    vary_texcoord0 = (gl_Position.xy*0.5+0.5);
+
+    SMAAEdgeDetectionVS(vary_texcoord0, vary_offset);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendF.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendF.glsl
new file mode 100644
index 0000000000..3276405447
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendF.glsl
@@ -0,0 +1,63 @@
+/**
+ * @file SMAANeighborhoodBlendF.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+out vec4 frag_color;
+
+in vec2 vary_texcoord0;
+in vec4 vary_offset;
+
+uniform sampler2D diffuseRect;
+uniform sampler2D blendTex;
+#if SMAA_REPROJECTION
+uniform sampler2D velocityTex;
+#endif
+
+#define float4 vec4
+#define float2 vec2
+#define SMAATexture2D(tex) sampler2D tex
+
+float4 SMAANeighborhoodBlendingPS(float2 texcoord,
+                                  float4 offset,
+                                  SMAATexture2D(colorTex),
+                                  SMAATexture2D(blendTex)
+                                  #if SMAA_REPROJECTION
+                                  , SMAATexture2D(velocityTex)
+                                  #endif
+                                  );
+
+void main()
+{
+    frag_color = SMAANeighborhoodBlendingPS(vary_texcoord0,
+                                            vary_offset,
+                                            diffuseRect,
+                                            blendTex
+                                            #if SMAA_REPROJECTION
+                                            , velocityTex
+                                            #endif
+                                            );
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendV.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendV.glsl
new file mode 100644
index 0000000000..7ea1ac61e3
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAANeighborhoodBlendV.glsl
@@ -0,0 +1,47 @@
+/**
+ * @file SMAANeighborhoodBlendV.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+uniform mat4 modelview_projection_matrix;
+
+in vec3 position;
+
+out vec2 vary_texcoord0;
+out vec4 vary_offset;
+
+#define float4 vec4
+#define float2 vec2
+void SMAANeighborhoodBlendingVS(float2 texcoord,
+                                out float4 offset);
+
+void main()
+{
+    gl_Position = vec4(position.xyz, 1.0);
+    vary_texcoord0 = (gl_Position.xy*0.5+0.5);
+
+    SMAANeighborhoodBlendingVS(vary_texcoord0, vary_offset);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
index 16e23a3da7..655cb1ea97 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -32,7 +32,7 @@ out vec4 frag_color;
 
 #define FXAA_PC 1
 //#define FXAA_GLSL_130 1
-#define FXAA_QUALITY__PRESET 12
+//#define FXAA_QUALITY__PRESET 12
 
 /*============================================================================
 
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index a0eb6cfbb8..0673159ab7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -28,140 +28,14 @@
 out vec4 frag_color;
 
 uniform sampler2D diffuseRect;
-uniform sampler2D exposureMap;
-
-uniform vec2 screen_res;
-in vec2 vary_fragcoord;
-
-vec3 linear_to_srgb(vec3 cl);
-
-//===============================================================
-// tone mapping taken from Khronos sample implementation
-//===============================================================
-
-// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
-const mat3 ACESInputMat = mat3
-(
-    0.59719, 0.07600, 0.02840,
-    0.35458, 0.90834, 0.13383,
-    0.04823, 0.01566, 0.83777
-);
-
-
-// ODT_SAT => XYZ => D60_2_D65 => sRGB
-const mat3 ACESOutputMat = mat3
-(
-    1.60475, -0.10208, -0.00327,
-    -0.53108,  1.10813, -0.07276,
-    -0.07367, -0.00605,  1.07602
-);
-
-// ACES tone map (faster approximation)
-// see: https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
-vec3 toneMapACES_Narkowicz(vec3 color)
-{
-    const float A = 2.51;
-    const float B = 0.03;
-    const float C = 2.43;
-    const float D = 0.59;
-    const float E = 0.14;
-    return clamp((color * (A * color + B)) / (color * (C * color + D) + E), 0.0, 1.0);
-}
-
-
-// ACES filmic tone map approximation
-// see https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl
-vec3 RRTAndODTFit(vec3 color)
-{
-    vec3 a = color * (color + 0.0245786) - 0.000090537;
-    vec3 b = color * (0.983729 * color + 0.4329510) + 0.238081;
-    return a / b;
-}
-
-
-// tone mapping
-vec3 toneMapACES_Hill(vec3 color)
-{
-    color = ACESInputMat * color;
-
-    // Apply RRT and ODT
-    color = RRTAndODTFit(color);
-
-    color = ACESOutputMat * color;
-
-    // Clamp to [0, 1]
-    color = clamp(color, 0.0, 1.0);
-
-    return color;
-}
 
 uniform float exposure;
 uniform float gamma;
 uniform float aces_mix;
+uniform vec2 screen_res;
+in vec2 vary_fragcoord;
 
-vec3 toneMap(vec3 color)
-{
-#ifndef NO_POST
-    float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r;
-
-    color *= exposure * exp_scale;
-
-    // mix ACES and Linear here as a compromise to avoid over-darkening legacy content
-    color = mix(toneMapACES_Hill(color), color, aces_mix);
-#endif
-
-    return color;
-}
-
-//===============================================================
-
-//=================================
-// borrowed noise from:
-//  <https://www.shadertoy.com/view/4dS3Wd>
-//  By Morgan McGuire @morgan3d, http://graphicscodex.com
-//
-float hash(float n) { return fract(sin(n) * 1e4); }
-float hash(vec2 p) { return fract(1e4 * sin(17.0 * p.x + p.y * 0.1) * (0.1 + abs(sin(p.y * 13.0 + p.x)))); }
-
-float noise(float x) {
-    float i = floor(x);
-    float f = fract(x);
-    float u = f * f * (3.0 - 2.0 * f);
-    return mix(hash(i), hash(i + 1.0), u);
-}
-
-float noise(vec2 x) {
-    vec2 i = floor(x);
-    vec2 f = fract(x);
-
-    // Four corners in 2D of a tile
-    float a = hash(i);
-    float b = hash(i + vec2(1.0, 0.0));
-    float c = hash(i + vec2(0.0, 1.0));
-    float d = hash(i + vec2(1.0, 1.0));
-
-    // Simple 2D lerp using smoothstep envelope between the values.
-    // return vec3(mix(mix(a, b, smoothstep(0.0, 1.0, f.x)),
-    //          mix(c, d, smoothstep(0.0, 1.0, f.x)),
-    //          smoothstep(0.0, 1.0, f.y)));
-
-    // Same code, with the clamps in smoothstep and common subexpressions
-    // optimized away.
-    vec2 u = f * f * (3.0 - 2.0 * f);
-    return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
-}
-
-//=============================
-
-void debugExposure(inout vec3 color)
-{
-    float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r;
-    exp_scale *= 0.5;
-    if (abs(vary_fragcoord.y-exp_scale) < 0.01 && vary_fragcoord.x < 0.1)
-    {
-        color = vec3(1,0,0);
-    }
-}
+vec3 linear_to_srgb(vec3 cl);
 
 vec3 legacyGamma(vec3 color)
 {
@@ -175,23 +49,12 @@ void main()
 {
     //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB)
     vec4 diff = texture(diffuseRect, vary_fragcoord);
+    diff.rgb = linear_to_srgb(diff.rgb);
 
 #ifdef LEGACY_GAMMA
-    diff.rgb = linear_to_srgb(diff.rgb);
     diff.rgb = legacyGamma(diff.rgb);
-#else
-#ifndef NO_POST
-    diff.rgb = toneMap(diff.rgb);
 #endif
-    diff.rgb = linear_to_srgb(diff.rgb);
-#endif
-
-    vec2 tc = vary_fragcoord.xy*screen_res*4.0;
-    vec3 seed = (diff.rgb+vec3(1.0))*vec3(tc.xy, tc.x+tc.y);
-    vec3 nz = vec3(noise(seed.rg), noise(seed.gb), noise(seed.rb));
-    diff.rgb += nz*0.003;
 
-    //debugExposure(diff.rgb);
     frag_color = max(diff, vec4(0));
 }
 
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
index 07384ebe9b..32b0a1ac8e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
@@ -33,10 +33,57 @@ uniform sampler2D depthMap;
 uniform vec2 screen_res;
 in vec2 vary_fragcoord;
 
+//=================================
+// borrowed noise from:
+//  <https://www.shadertoy.com/view/4dS3Wd>
+//  By Morgan McGuire @morgan3d, http://graphicscodex.com
+//
+float hash(float n) { return fract(sin(n) * 1e4); }
+float hash(vec2 p) { return fract(1e4 * sin(17.0 * p.x + p.y * 0.1) * (0.1 + abs(sin(p.y * 13.0 + p.x)))); }
+
+float noise(float x) {
+    float i = floor(x);
+    float f = fract(x);
+    float u = f * f * (3.0 - 2.0 * f);
+    return mix(hash(i), hash(i + 1.0), u);
+}
+
+float noise(vec2 x) {
+    vec2 i = floor(x);
+    vec2 f = fract(x);
+
+    // Four corners in 2D of a tile
+    float a = hash(i);
+    float b = hash(i + vec2(1.0, 0.0));
+    float c = hash(i + vec2(0.0, 1.0));
+    float d = hash(i + vec2(1.0, 1.0));
+
+    // Simple 2D lerp using smoothstep envelope between the values.
+    // return vec3(mix(mix(a, b, smoothstep(0.0, 1.0, f.x)),
+    //          mix(c, d, smoothstep(0.0, 1.0, f.x)),
+    //          smoothstep(0.0, 1.0, f.y)));
+
+    // Same code, with the clamps in smoothstep and common subexpressions
+    // optimized away.
+    vec2 u = f * f * (3.0 - 2.0 * f);
+    return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
+}
+
+//=============================
+
+
+
 void main()
 {
     vec4 diff = texture(diffuseRect, vary_fragcoord.xy);
 
+#ifdef HAS_NOISE
+    vec2 tc = vary_fragcoord.xy*screen_res*4.0;
+    vec3 seed = (diff.rgb+vec3(1.0))*vec3(tc.xy, tc.x+tc.y);
+    vec3 nz = vec3(noise(seed.rg), noise(seed.gb), noise(seed.rb));
+    diff.rgb += nz*0.003;
+#endif
+
     frag_color = diff;
 
     gl_FragDepth = texture(depthMap, vary_fragcoord.xy).r;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl
new file mode 100644
index 0000000000..c16ab2f9c4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl
@@ -0,0 +1,150 @@
+/**
+ * @file postDeferredTonemap.glsl
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+/*[EXTRA_CODE_HERE]*/
+
+out vec4 frag_color;
+
+uniform sampler2D diffuseRect;
+uniform sampler2D exposureMap;
+
+uniform vec2 screen_res;
+in vec2 vary_fragcoord;
+
+vec3 linear_to_srgb(vec3 cl);
+
+//===============================================================
+// tone mapping taken from Khronos sample implementation
+//===============================================================
+
+// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
+const mat3 ACESInputMat = mat3
+(
+    0.59719, 0.07600, 0.02840,
+    0.35458, 0.90834, 0.13383,
+    0.04823, 0.01566, 0.83777
+);
+
+
+// ODT_SAT => XYZ => D60_2_D65 => sRGB
+const mat3 ACESOutputMat = mat3
+(
+    1.60475, -0.10208, -0.00327,
+    -0.53108,  1.10813, -0.07276,
+    -0.07367, -0.00605,  1.07602
+);
+
+// ACES tone map (faster approximation)
+// see: https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
+vec3 toneMapACES_Narkowicz(vec3 color)
+{
+    const float A = 2.51;
+    const float B = 0.03;
+    const float C = 2.43;
+    const float D = 0.59;
+    const float E = 0.14;
+    return clamp((color * (A * color + B)) / (color * (C * color + D) + E), 0.0, 1.0);
+}
+
+
+// ACES filmic tone map approximation
+// see https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl
+vec3 RRTAndODTFit(vec3 color)
+{
+    vec3 a = color * (color + 0.0245786) - 0.000090537;
+    vec3 b = color * (0.983729 * color + 0.4329510) + 0.238081;
+    return a / b;
+}
+
+
+// tone mapping
+vec3 toneMapACES_Hill(vec3 color)
+{
+    color = ACESInputMat * color;
+
+    // Apply RRT and ODT
+    color = RRTAndODTFit(color);
+
+    color = ACESOutputMat * color;
+
+    // Clamp to [0, 1]
+    color = clamp(color, 0.0, 1.0);
+
+    return color;
+}
+
+uniform float exposure;
+uniform float gamma;
+uniform float aces_mix;
+
+vec3 toneMap(vec3 color)
+{
+#ifndef NO_POST
+    float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r;
+
+    color *= exposure * exp_scale;
+
+    // mix ACES and Linear here as a compromise to avoid over-darkening legacy content
+    color = mix(toneMapACES_Hill(color), color, aces_mix);
+#endif
+
+    return color;
+}
+
+//===============================================================
+
+void debugExposure(inout vec3 color)
+{
+    float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r;
+    exp_scale *= 0.5;
+    if (abs(vary_fragcoord.y-exp_scale) < 0.01 && vary_fragcoord.x < 0.1)
+    {
+        color = vec3(1,0,0);
+    }
+}
+
+vec3 legacyGamma(vec3 color)
+{
+    vec3 c = 1. - clamp(color, vec3(0.), vec3(1.));
+    c = 1. - pow(c, vec3(gamma)); // s/b inverted already CPU-side
+
+    return c;
+}
+
+void main()
+{
+    //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB)
+    vec4 diff = texture(diffuseRect, vary_fragcoord);
+
+#ifndef NO_POST
+    diff.rgb = toneMap(diff.rgb);
+#else
+    diff.rgb = clamp(diff.rgb, vec3(0.0), vec3(1.0));
+#endif
+
+    //debugExposure(diff.rgb);
+    frag_color = max(diff, vec4(0));
+}
+
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 9be7254a7a..9c585f1ef8 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 62
+version 63
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -66,7 +66,8 @@ RenderDeferred				1	1
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
 RenderUseStreamVBO			1	1
-RenderFSAASamples			1	16
+RenderFSAAType			    1	2
+RenderFSAASamples			1	3
 RenderMaxTextureIndex		1	16
 RenderGLContextCoreProfile         1   1
 RenderGLMultiThreadedTextures      1   0
@@ -108,6 +109,7 @@ RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
+RenderFSAAType  			1	0
 RenderFSAASamples			1	0
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   0
@@ -144,6 +146,7 @@ RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
+RenderFSAAType  			1	0
 RenderFSAASamples			1	0
 RenderScreenSpaceReflections 1  0
 RenderReflectionProbeLevel  1   0
@@ -178,7 +181,8 @@ RenderVolumeLODFactor		1	1.25
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
-RenderFSAASamples			1	2
+RenderFSAAType  			1	1
+RenderFSAASamples			1	1
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	0
 RenderScreenSpaceReflections 1  0
@@ -214,7 +218,8 @@ RenderVolumeLODFactor		1	1.375
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
-RenderFSAASamples			1	2
+RenderFSAAType  			1	1
+RenderFSAASamples			1	1
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
@@ -250,6 +255,7 @@ RenderVolumeLODFactor		1	1.5
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	1
 WLSkyDetail					1	96
+RenderFSAAType  			1	2
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
@@ -286,6 +292,7 @@ RenderVolumeLODFactor		1	1.75
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
 WLSkyDetail					1	96
+RenderFSAAType  			1	2
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
@@ -322,7 +329,8 @@ WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
-RenderFSAASamples			1	2
+RenderFSAAType  			1	2
+RenderFSAASamples			1	3
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
@@ -366,6 +374,7 @@ RenderMirrors				0	0
 
 list Intel
 RenderAnisotropic			1	0
+RenderFSAAType  			1	0
 RenderFSAASamples			1	0
 RenderGLContextCoreProfile  1   0
 RenderGLMultiThreadedMedia  1   0
@@ -375,6 +384,7 @@ list AMD
 RenderGLMultiThreadedTextures       1   1
 
 list GL3
+RenderFSAAType  			0	0
 RenderFSAASamples           0   0
 RenderReflectionsEnabled    0   0
 RenderReflectionProbeDetail	0	0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 8eaf5894ab..d66717e2c7 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 59
+version 60
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -63,7 +63,8 @@ RenderDeferred				1	1
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
 RenderUseStreamVBO			1	1
-RenderFSAASamples			1	16
+RenderFSAAType			    1	2
+RenderFSAASamples			1	3
 RenderMaxTextureIndex		1	16
 RenderGLContextCoreProfile         1   1
 RenderGLMultiThreadedTextures      1   0
@@ -103,6 +104,7 @@ RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
+RenderFSAAType			    1	0
 RenderFSAASamples			1	0
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	0
@@ -139,6 +141,7 @@ RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
+RenderFSAAType			    1	0
 RenderFSAASamples			1	0
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	0
@@ -175,7 +178,8 @@ RenderVolumeLODFactor		1	1.25
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
-RenderFSAASamples			1	2
+RenderFSAAType			    1	1
+RenderFSAASamples			1	0
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	0
 RenderScreenSpaceReflections 1  0
@@ -211,7 +215,8 @@ RenderVolumeLODFactor		1	1.375
 RenderDeferredSSAO			1	0
 RenderShadowDetail			1	0
 WLSkyDetail					1	96
-RenderFSAASamples			1	2
+RenderFSAAType			    1	1
+RenderFSAASamples			1	1
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	0
 RenderScreenSpaceReflections 1  0
@@ -247,6 +252,7 @@ RenderVolumeLODFactor		1	1.5
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	1
 WLSkyDetail					1	96
+RenderFSAAType			    1	1
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
@@ -283,6 +289,7 @@ RenderVolumeLODFactor		1	1.75
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
 WLSkyDetail					1	96
+RenderFSAAType			    1	2
 RenderFSAASamples			1	2
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
@@ -319,7 +326,8 @@ WindLightUseAtmosShaders	1	1
 WLSkyDetail					1	128
 RenderDeferredSSAO			1	1
 RenderShadowDetail			1	2
-RenderFSAASamples			1	2
+RenderFSAAType			    1	2
+RenderFSAASamples			1	3
 RenderReflectionsEnabled    1   1
 RenderReflectionProbeDetail	1	1
 RenderScreenSpaceReflections 1  0
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 55293aa7f0..1d48fe70f2 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -140,8 +140,6 @@ void LLFloaterPreferenceGraphicsAdvanced::onAdvancedAtmosphericsEnable()
 
 void LLFloaterPreferenceGraphicsAdvanced::refresh()
 {
-    getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer)  gSavedSettings.getU32("RenderFSAASamples"));
-
     // sliders and their text boxes
     //  mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow");
     // slider text boxes
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index 06920734fe..e38ba8762a 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -434,7 +434,7 @@ bool LLGLTFPreviewTexture::render()
     SetTemporarily<bool> no_dof(&LLPipeline::RenderDepthOfField, false);
     SetTemporarily<bool> no_glow(&LLPipeline::sRenderGlow, false);
     SetTemporarily<bool> no_ssr(&LLPipeline::RenderScreenSpaceReflections, false);
-    SetTemporarily<U32> no_fxaa(&LLPipeline::RenderFSAASamples, U32(0));
+    SetTemporarily<U32> no_aa(&LLPipeline::RenderFSAAType, U32(0));
     SetTemporarily<LLPipeline::RenderTargetPack*> use_auxiliary_render_target(&gPipeline.mRT, &gPipeline.mAuxillaryRT);
 
     LLVector3 light_dir3(1.0f, 1.0f, 1.0f);
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index c1bf31ff9a..98b46795a3 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -770,7 +770,7 @@ void settings_setup_listeners()
     setting_setup_signal_listener(gSavedSettings, "RenderMaxTextureIndex", handleSetShaderChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderUIBuffer", handleWindowResized);
     setting_setup_signal_listener(gSavedSettings, "RenderDepthOfField", handleReleaseGLBufferChanged);
-    setting_setup_signal_listener(gSavedSettings, "RenderFSAASamples", handleReleaseGLBufferChanged);
+    setting_setup_signal_listener(gSavedSettings, "RenderFSAAType", handleReleaseGLBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderPostProcessingHDR", handleReleaseGLBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index d1dea16bc0..873a59e6f6 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -194,15 +194,20 @@ LLGLSLShader            gDeferredSkinnedEmissiveProgram;
 LLGLSLShader            gDeferredPostProgram;
 LLGLSLShader            gDeferredCoFProgram;
 LLGLSLShader            gDeferredDoFCombineProgram;
+LLGLSLShader            gDeferredPostTonemapProgram;
+LLGLSLShader            gNoPostTonemapProgram;
 LLGLSLShader            gDeferredPostGammaCorrectProgram;
-LLGLSLShader            gNoPostGammaCorrectProgram;
 LLGLSLShader            gLegacyPostGammaCorrectProgram;
 LLGLSLShader            gExposureProgram;
 LLGLSLShader            gExposureProgramNoFade;
 LLGLSLShader            gLuminanceProgram;
-LLGLSLShader            gFXAAProgram;
+LLGLSLShader            gFXAAProgram[4];
+LLGLSLShader            gSMAAEdgeDetectProgram[4];
+LLGLSLShader            gSMAABlendWeightsProgram[4];
+LLGLSLShader            gSMAANeighborhoodBlendProgram[4];
 LLGLSLShader            gCASProgram;
 LLGLSLShader            gDeferredPostNoDoFProgram;
+LLGLSLShader            gDeferredPostNoDoFNoiseProgram;
 LLGLSLShader            gDeferredWLSkyProgram;
 LLGLSLShader            gEnvironmentMapProgram;
 LLGLSLShader            gDeferredWLCloudProgram;
@@ -427,8 +432,9 @@ void LLViewerShaderMgr::finalizeShaderList()
     mShaderList.push_back(&gDeferredWLSunProgram);
     mShaderList.push_back(&gDeferredPBRAlphaProgram);
     mShaderList.push_back(&gHUDPBRAlphaProgram);
+    mShaderList.push_back(&gDeferredPostTonemapProgram);
+    mShaderList.push_back(&gNoPostTonemapProgram);
     mShaderList.push_back(&gDeferredPostGammaCorrectProgram); // for gamma
-    mShaderList.push_back(&gNoPostGammaCorrectProgram);
     mShaderList.push_back(&gLegacyPostGammaCorrectProgram);
     mShaderList.push_back(&gDeferredDiffuseProgram);
     mShaderList.push_back(&gDeferredBumpProgram);
@@ -1102,9 +1108,17 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         gExposureProgramNoFade.unload();
         gLuminanceProgram.unload();
         gDeferredPostGammaCorrectProgram.unload();
-        gNoPostGammaCorrectProgram.unload();
         gLegacyPostGammaCorrectProgram.unload();
-        gFXAAProgram.unload();
+        gDeferredPostTonemapProgram.unload();
+        gNoPostTonemapProgram.unload();
+        for (auto i = 0; i < 4; ++i)
+        {
+            gFXAAProgram[i].unload();
+            gSMAAEdgeDetectProgram[i].unload();
+            gSMAABlendWeightsProgram[i].unload();
+            gSMAANeighborhoodBlendProgram[i].unload();
+        }
+        gCASProgram.unload();
         gEnvironmentMapProgram.unload();
         gDeferredWLSkyProgram.unload();
         gDeferredWLCloudProgram.unload();
@@ -2307,21 +2321,6 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         llassert(success);
     }
 
-    if (success)
-    {
-        gNoPostGammaCorrectProgram.mName = "No Post Gamma Correction Post Process";
-        gNoPostGammaCorrectProgram.mFeatures.hasSrgb = true;
-        gNoPostGammaCorrectProgram.mFeatures.isDeferred = true;
-        gNoPostGammaCorrectProgram.mShaderFiles.clear();
-        gNoPostGammaCorrectProgram.clearPermutations();
-        gNoPostGammaCorrectProgram.addPermutation("NO_POST", "1");
-        gNoPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
-        gNoPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredGammaCorrect.glsl", GL_FRAGMENT_SHADER));
-        gNoPostGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
-        success = gNoPostGammaCorrectProgram.createShader();
-        llassert(success);
-    }
-
     if (success)
     {
         gLegacyPostGammaCorrectProgram.mName = "Legacy Gamma Correction Post Process";
@@ -2337,27 +2336,143 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         llassert(success);
     }
 
+    if (success)
+    {
+        gDeferredPostTonemapProgram.mName = "Deferred Tonemap Post Process";
+        gDeferredPostTonemapProgram.mFeatures.hasSrgb = true;
+        gDeferredPostTonemapProgram.mFeatures.isDeferred = true;
+        gDeferredPostTonemapProgram.mShaderFiles.clear();
+        gDeferredPostTonemapProgram.clearPermutations();
+        gDeferredPostTonemapProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
+        gDeferredPostTonemapProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER));
+        gDeferredPostTonemapProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+        success = gDeferredPostTonemapProgram.createShader();
+        llassert(success);
+    }
+
+    if (success)
+    {
+        gNoPostTonemapProgram.mName = "No Post Tonemap Post Process";
+        gNoPostTonemapProgram.mFeatures.hasSrgb = true;
+        gNoPostTonemapProgram.mFeatures.isDeferred = true;
+        gNoPostTonemapProgram.mShaderFiles.clear();
+        gNoPostTonemapProgram.clearPermutations();
+        gNoPostTonemapProgram.addPermutation("NO_POST", "1");
+        gNoPostTonemapProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
+        gNoPostTonemapProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER));
+        gNoPostTonemapProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+        success = gNoPostTonemapProgram.createShader();
+        llassert(success);
+    }
 
     if (success && gGLManager.mGLVersion > 3.9f)
     {
-        gFXAAProgram.mName = "FXAA Shader";
-        gFXAAProgram.mFeatures.isDeferred = true;
-        gFXAAProgram.mShaderFiles.clear();
-        gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER));
-        gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER));
-
-        if (gGLManager.mGLVersion > 3.9)
+        std::vector<std::pair<std::string, std::string>> quality_levels = { {"12", "Low"},
+                                                                             {"23", "Medium"},
+                                                                             {"28", "High"},
+                                                                             {"39", "Ultra"} };
+        int i = 0;
+        for (const auto& quality_pair : quality_levels)
         {
-            gFXAAProgram.addPermutation("FXAA_GLSL_400", "1");
+            if (success)
+            {
+                gFXAAProgram[i].mName = llformat("FXAA Shader (%s)", quality_pair.second.c_str());
+                gFXAAProgram[i].mFeatures.isDeferred = true;
+                gFXAAProgram[i].mShaderFiles.clear();
+                gFXAAProgram[i].mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER));
+                gFXAAProgram[i].mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER));
+
+                gFXAAProgram[i].clearPermutations();
+                gFXAAProgram[i].addPermutation("FXAA_QUALITY__PRESET", quality_pair.first);
+                if (gGLManager.mGLVersion > 3.9)
+                {
+                    gFXAAProgram[i].addPermutation("FXAA_GLSL_400", "1");
+                }
+                else
+                {
+                    gFXAAProgram[i].addPermutation("FXAA_GLSL_130", "1");
+                }
+
+                gFXAAProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+                success = gFXAAProgram[i].createShader();
+                llassert(success);
+            }
+            ++i;
         }
-        else
+    }
+
+    if (success)
+    {
+        std::vector<std::pair<std::string, std::string>> quality_levels = { {"SMAA_PRESET_LOW", "Low"},
+                                                                             {"SMAA_PRESET_MEDIUM", "Medium"},
+                                                                             {"SMAA_PRESET_HIGH", "High"},
+                                                                             {"SMAA_PRESET_ULTRA", "Ultra"} };
+        int i = 0;
+        for (const auto& smaa_pair : quality_levels)
         {
-            gFXAAProgram.addPermutation("FXAA_GLSL_130", "1");
-        }
+            std::map<std::string, std::string> defines;
+            if (gGLManager.mGLVersion >= 4.f)
+                defines.emplace("SMAA_GLSL_4", "1");
+            else if (gGLManager.mGLVersion >= 3.1f)
+                defines.emplace("SMAA_GLSL_3", "1");
+            else
+                defines.emplace("SMAA_GLSL_2", "1");
+            defines.emplace("SMAA_PREDICATION", "0");
+            defines.emplace("SMAA_REPROJECTION", "0");
+            defines.emplace(smaa_pair.first, "1");
 
-        gFXAAProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
-        success = gFXAAProgram.createShader();
-        llassert(success);
+            if (success)
+            {
+                gSMAAEdgeDetectProgram[i].mName = llformat("SMAA Edge Detection (%s)", smaa_pair.second.c_str());
+                gSMAAEdgeDetectProgram[i].mFeatures.isDeferred = true;
+
+                gSMAAEdgeDetectProgram[i].clearPermutations();
+                gSMAAEdgeDetectProgram[i].addPermutations(defines);
+
+                gSMAAEdgeDetectProgram[i].mShaderFiles.clear();
+                gSMAAEdgeDetectProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAAEdgeDetectF.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAAEdgeDetectProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAAEdgeDetectV.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAAEdgeDetectProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAAEdgeDetectProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAAEdgeDetectProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+                success = gSMAAEdgeDetectProgram[i].createShader();
+            }
+
+            if (success)
+            {
+                gSMAABlendWeightsProgram[i].mName = llformat("SMAA Blending Weights (%s)", smaa_pair.second.c_str());
+                gSMAABlendWeightsProgram[i].mFeatures.isDeferred = true;
+
+                gSMAABlendWeightsProgram[i].clearPermutations();
+                gSMAABlendWeightsProgram[i].addPermutations(defines);
+
+                gSMAABlendWeightsProgram[i].mShaderFiles.clear();
+                gSMAABlendWeightsProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAABlendWeightsF.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAABlendWeightsProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAABlendWeightsV.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAABlendWeightsProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAABlendWeightsProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAABlendWeightsProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+                success = gSMAABlendWeightsProgram[i].createShader();
+            }
+
+            if (success)
+            {
+                gSMAANeighborhoodBlendProgram[i].mName = llformat("SMAA Neighborhood Blending (%s)", smaa_pair.second.c_str());
+                gSMAANeighborhoodBlendProgram[i].mFeatures.isDeferred = true;
+
+                gSMAANeighborhoodBlendProgram[i].clearPermutations();
+                gSMAANeighborhoodBlendProgram[i].addPermutations(defines);
+
+                gSMAANeighborhoodBlendProgram[i].mShaderFiles.clear();
+                gSMAANeighborhoodBlendProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAANeighborhoodBlendF.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAANeighborhoodBlendProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAANeighborhoodBlendV.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAANeighborhoodBlendProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_FRAGMENT_SHADER_ARB));
+                gSMAANeighborhoodBlendProgram[i].mShaderFiles.push_back(make_pair("deferred/SMAA.glsl", GL_VERTEX_SHADER_ARB));
+                gSMAANeighborhoodBlendProgram[i].mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+                success = gSMAANeighborhoodBlendProgram[i].createShader();
+            }
+            ++i;
+        }
     }
 
     if (success)
@@ -2419,6 +2534,22 @@ bool LLViewerShaderMgr::loadShadersDeferred()
         llassert(success);
     }
 
+    if (success)
+    {
+        gDeferredPostNoDoFNoiseProgram.mName = "Deferred Post NoDoF Noise Shader";
+        gDeferredPostNoDoFNoiseProgram.mFeatures.isDeferred = true;
+        gDeferredPostNoDoFNoiseProgram.mShaderFiles.clear();
+        gDeferredPostNoDoFNoiseProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
+        gDeferredPostNoDoFNoiseProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoDoFF.glsl", GL_FRAGMENT_SHADER));
+
+        gDeferredPostNoDoFNoiseProgram.clearPermutations();
+        gDeferredPostNoDoFNoiseProgram.addPermutation("HAS_NOISE", "1");
+
+        gDeferredPostNoDoFNoiseProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+        success = gDeferredPostNoDoFNoiseProgram.createShader();
+        llassert(success);
+    }
+
     if (success)
     {
         gEnvironmentMapProgram.mName = "Environment Map Program";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index b858530c3e..b08796025a 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -245,12 +245,17 @@ extern LLGLSLShader         gDeferredShadowFullbrightAlphaMaskProgram;
 extern LLGLSLShader         gDeferredPostProgram;
 extern LLGLSLShader         gDeferredCoFProgram;
 extern LLGLSLShader         gDeferredDoFCombineProgram;
-extern LLGLSLShader         gFXAAProgram;
+extern LLGLSLShader         gFXAAProgram[4];
+extern LLGLSLShader         gSMAAEdgeDetectProgram[4];
+extern LLGLSLShader         gSMAABlendWeightsProgram[4];
+extern LLGLSLShader         gSMAANeighborhoodBlendProgram[4];
 extern LLGLSLShader         gCASProgram;
 extern LLGLSLShader         gDeferredPostNoDoFProgram;
+extern LLGLSLShader         gDeferredPostNoDoFNoiseProgram;
 extern LLGLSLShader         gDeferredPostGammaCorrectProgram;
-extern LLGLSLShader         gNoPostGammaCorrectProgram;
 extern LLGLSLShader         gLegacyPostGammaCorrectProgram;
+extern LLGLSLShader         gDeferredPostTonemapProgram;
+extern LLGLSLShader         gNoPostTonemapProgram;
 extern LLGLSLShader         gExposureProgram;
 extern LLGLSLShader         gExposureProgramNoFade;
 extern LLGLSLShader         gLuminanceProgram;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index cda9fcad9e..91ade0eef1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -29,6 +29,7 @@
 #include "pipeline.h"
 
 // library includes
+#include "llimagepng.h"
 #include "llaudioengine.h" // For debugging.
 #include "llerror.h"
 #include "llviewercontrol.h"
@@ -117,6 +118,9 @@
 #include "llenvironment.h"
 #include "llsettingsvo.h"
 
+#include "SMAAAreaTex.h"
+#include "SMAASearchTex.h"
+
 #ifndef LL_WINDOWS
 #define A_GCC 1
 #pragma GCC diagnostic ignored "-Wunused-function"
@@ -135,7 +139,7 @@ bool gShiftFrame = false;
 bool LLPipeline::WindLightUseAtmosShaders;
 bool LLPipeline::RenderDeferred;
 F32 LLPipeline::RenderDeferredSunWash;
-U32 LLPipeline::RenderFSAASamples;
+U32 LLPipeline::RenderFSAAType;
 U32 LLPipeline::RenderResolutionDivisor;
 bool LLPipeline::RenderUIBuffer;
 S32 LLPipeline::RenderShadowDetail;
@@ -280,6 +284,7 @@ static LLStaticHashedString sDelta("delta");
 static LLStaticHashedString sDistFactor("dist_factor");
 static LLStaticHashedString sKern("kern");
 static LLStaticHashedString sKernScale("kern_scale");
+static LLStaticHashedString sSmaaRTMetrics("SMAA_RT_METRICS");
 
 //----------------------------------------
 
@@ -498,7 +503,7 @@ void LLPipeline::init()
     // DEPRECATED -- connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders");
     // DEPRECATED -- connectRefreshCachedSettingsSafe("RenderDeferred");
     connectRefreshCachedSettingsSafe("RenderDeferredSunWash");
-    connectRefreshCachedSettingsSafe("RenderFSAASamples");
+    connectRefreshCachedSettingsSafe("RenderFSAAType");
     connectRefreshCachedSettingsSafe("RenderResolutionDivisor");
     connectRefreshCachedSettingsSafe("RenderUIBuffer");
     connectRefreshCachedSettingsSafe("RenderShadowDetail");
@@ -736,40 +741,26 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
     // refresh cached settings here to protect against inconsistent event handling order
     refreshCachedSettings();
 
-    U32 samples = RenderFSAASamples;
-
     eFBOStatus ret = FBO_SUCCESS_FULLRES;
-    if (!allocateScreenBuffer(resX, resY, samples))
+    if (!allocateScreenBufferInternal(resX, resY))
     {
         //failed to allocate at requested specification, return false
         ret = FBO_FAILURE;
 
         releaseScreenBuffers();
-        //reduce number of samples
-        while (samples > 0)
-        {
-            samples /= 2;
-            if (allocateScreenBuffer(resX, resY, samples))
-            { //success
-                return FBO_SUCCESS_LOWRES;
-            }
-            releaseScreenBuffers();
-        }
-
-        samples = 0;
 
         //reduce resolution
         while (resY > 0 && resX > 0)
         {
             resY /= 2;
-            if (allocateScreenBuffer(resX, resY, samples))
+            if (allocateScreenBufferInternal(resX, resY))
             {
                 return FBO_SUCCESS_LOWRES;
             }
             releaseScreenBuffers();
 
             resX /= 2;
-            if (allocateScreenBuffer(resX, resY, samples))
+            if (allocateScreenBufferInternal(resX, resY))
             {
                 return FBO_SUCCESS_LOWRES;
             }
@@ -782,7 +773,7 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
     return ret;
 }
 
-bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
+bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
     if (mRT == &mMainRT)
@@ -797,14 +788,14 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
         mRT = &mAuxillaryRT;
         U32 res = mReflectionMapManager.mProbeResolution * 4;  //multiply by 4 because probes will be 16x super sampled
-        allocateScreenBuffer(res, res, samples);
+        allocateScreenBufferInternal(res, res);
 
         if (RenderMirrors)
         {
             mHeroProbeManager.initReflectionMaps();
             res = mHeroProbeManager.mProbeResolution;  // We also scale the hero probe RT to the probe res since we don't super sample it.
             mRT = &mHeroProbeRT;
-            allocateScreenBuffer(res, res, samples);
+            allocateScreenBufferInternal(res, res);
         }
 
         mRT = &mMainRT;
@@ -836,8 +827,8 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
 
     mRT->deferredScreen.shareDepthBuffer(mRT->screen);
 
-    if (shadow_detail > 0 || ssao || RenderDepthOfField || samples > 0)
-    { //only need mRT->deferredLight for shadows OR ssao OR dof OR fxaa
+    if (shadow_detail > 0 || ssao || RenderDepthOfField)
+    { //only need mRT->deferredLight for shadows OR ssao OR dof
         if (!mRT->deferredLight.allocate(resX, resY, GL_RGBA16F)) return false;
     }
     else
@@ -857,13 +848,18 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
             }
         }
 
-        if (samples > 0)
+        if (RenderFSAAType > 0)
         {
             if (!mFXAAMap.allocate(resX, resY, GL_RGBA)) return false;
+            if (RenderFSAAType == 2)
+            {
+                if (!mSMAABlendBuffer.allocate(resX, resY, GL_RGBA, false)) return false;
+            }
         }
         else
         {
             mFXAAMap.release();
+            mSMAABlendBuffer.release();
         }
 
         //water reflection texture (always needed as scratch space whether or not transparent water is enabled)
@@ -878,9 +874,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
             mSceneMap.release();
         }
 
-        const bool post_hdr = gSavedSettings.getBOOL("RenderPostProcessingHDR");
-        const U32 post_color_fmt = post_hdr ? GL_RGBA16F : GL_RGBA;
-        mPostMap.allocate(resX, resY, post_color_fmt);
+        mPostMap.allocate(resX, resY, GL_RGBA16F);
 
         // used to scale down textures
         // See LLViwerTextureList::updateImagesCreateTextures and LLImageGL::scaleDown
@@ -1015,7 +1009,7 @@ void LLPipeline::refreshCachedSettings()
     WindLightUseAtmosShaders = true; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders");
     RenderDeferred = true; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred");
     RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
-    RenderFSAASamples = LLFeatureManager::getInstance()->isFeatureAvailable("RenderFSAASamples") ? gSavedSettings.getU32("RenderFSAASamples") : 0;
+    RenderFSAAType = gSavedSettings.getU32("RenderFSAAType");
     RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
     RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer");
     RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail");
@@ -1119,6 +1113,18 @@ void LLPipeline::releaseGLBuffers()
         mTrueNoiseMap = 0;
     }
 
+    if (mSMAAAreaMap)
+    {
+        LLImageGL::deleteTextures(1, &mSMAAAreaMap);
+        mSMAAAreaMap = 0;
+    }
+
+    if (mSMAASearchMap)
+    {
+        LLImageGL::deleteTextures(1, &mSMAASearchMap);
+        mSMAASearchMap = 0;
+    }
+
     releaseLUTBuffers();
 
     mWaterDis.release();
@@ -1268,6 +1274,77 @@ void LLPipeline::createGLBuffers()
         gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
     }
 
+    if (!mSMAAAreaMap)
+    {
+        std::vector<U8> tempBuffer(AREATEX_SIZE);
+        for (U32 y = 0; y < AREATEX_HEIGHT; y++)
+        {
+            U32 srcY = AREATEX_HEIGHT - 1 - y;
+            // unsigned int srcY = y;
+            memcpy(&tempBuffer[y * AREATEX_PITCH], areaTexBytes + srcY * AREATEX_PITCH, AREATEX_PITCH);
+        }
+
+        LLImageGL::generateTextures(1, &mSMAAAreaMap);
+        gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mSMAAAreaMap);
+        LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RG8, AREATEX_WIDTH, AREATEX_HEIGHT, GL_RG,
+            GL_UNSIGNED_BYTE, tempBuffer.data(), false);
+        gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+        gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+    }
+
+    if (!mSMAASearchMap)
+    {
+        std::vector<U8> tempBuffer(SEARCHTEX_SIZE);
+        for (U32 y = 0; y < SEARCHTEX_HEIGHT; y++)
+        {
+            U32 srcY = SEARCHTEX_HEIGHT - 1 - y;
+            // unsigned int srcY = y;
+            memcpy(&tempBuffer[y * SEARCHTEX_PITCH], searchTexBytes + srcY * SEARCHTEX_PITCH, SEARCHTEX_PITCH);
+        }
+
+        LLImageGL::generateTextures(1, &mSMAASearchMap);
+        gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mSMAASearchMap);
+        LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT,
+            GL_RED, GL_UNSIGNED_BYTE, tempBuffer.data(), false);
+        gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+        gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+    }
+
+    if (!mSMAASampleMap)
+    {
+        LLPointer<LLImageRaw>               raw_image = new LLImageRaw;
+        LLPointer<LLImagePNG>               png_image = new LLImagePNG;
+        static LLCachedControl<std::string> sample_path(gSavedSettings, "SamplePath", "");
+        if (gDirUtilp->fileExists(sample_path()) && png_image->load(sample_path()) && png_image->decode(raw_image, 0.0f))
+        {
+            U32 format = 0;
+            switch (raw_image->getComponents())
+            {
+            case 1:
+                format = GL_RED;
+                break;
+            case 2:
+                format = GL_RG;
+                break;
+            case 3:
+                format = GL_RGB;
+                break;
+            case 4:
+                format = GL_RGBA;
+                break;
+            default:
+                return;
+            };
+            LLImageGL::generateTextures(1, &mSMAASampleMap);
+            gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mSMAASampleMap);
+            LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB, raw_image->getWidth(),
+                raw_image->getHeight(), format, GL_UNSIGNED_BYTE, raw_image->getData(), false);
+            stop_glerror();
+            gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+            gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+        }
+    }
+
     createLUTBuffers();
 
     gBumpImageList.restoreGL();
@@ -6975,11 +7052,12 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool
 
 extern LLPointer<LLImageGL> gEXRImage;
 
-void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
+void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst)
+{
     dst->bindTarget();
     // gamma correct lighting
     {
-        LL_PROFILE_GPU_ZONE("gamma correct");
+        LL_PROFILE_GPU_ZONE("tonemap");
 
         static LLCachedControl<bool> buildNoPost(gSavedSettings, "RenderDisablePostProcessing", false);
 
@@ -6992,9 +7070,7 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
         LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
 
         bool no_post = gSnapshotNoPost || (buildNoPost && gFloaterTools->isAvailable());
-        LLGLSLShader& shader = no_post ? gNoPostGammaCorrectProgram : // no post (no gamma, no exposure, no tonemapping)
-            psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f ? gLegacyPostGammaCorrectProgram :
-            gDeferredPostGammaCorrectProgram;
+        LLGLSLShader& shader = no_post ? gNoPostTonemapProgram : gDeferredPostTonemapProgram;
 
         shader.bind();
 
@@ -7025,6 +7101,34 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) {
     dst->flush();
 }
 
+void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst)
+{
+    dst->bindTarget();
+    // gamma correct lighting
+    {
+        LL_PROFILE_GPU_ZONE("gamma correct");
+
+        LLGLDepthTest depth(GL_FALSE, GL_FALSE);
+
+        static LLCachedControl<bool> buildNoPost(gSavedSettings, "RenderDisablePostProcessing", false);
+        static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
+
+        LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
+        LLGLSLShader& shader = psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f ? gLegacyPostGammaCorrectProgram :
+            gDeferredPostGammaCorrectProgram;
+
+        shader.bind();
+        shader.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT);
+        shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight());
+
+        mScreenTriangleVB->setBuffer();
+        mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+        shader.unbind();
+    }
+    dst->flush();
+}
+
 void LLPipeline::copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst)
 {
 
@@ -7211,18 +7315,19 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
 {
     {
         llassert(!gCubeSnapshot);
-        bool multisample = RenderFSAASamples > 1 && mFXAAMap.isComplete();
+        bool multisample = RenderFSAAType == 1 && mFXAAMap.isComplete();
         LLGLSLShader* shader = &gGlowCombineProgram;
 
-        S32 width = dst->getWidth();
-        S32 height = dst->getHeight();
-
         // Present everything.
         if (multisample)
         {
             LL_PROFILE_GPU_ZONE("aa");
+            S32 width = dst->getWidth();
+            S32 height = dst->getHeight();
+
             // bake out texture2D with RGBL for FXAA shader
             mFXAAMap.bindTarget();
+            mFXAAMap.clear(GL_COLOR_BUFFER_BIT);
 
             shader = &gGlowCombineFXAAProgram;
             shader->bind();
@@ -7245,7 +7350,11 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
             mFXAAMap.flush();
 
             dst->bindTarget();
-            shader = &gFXAAProgram;
+
+            static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
+            U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
+
+            shader = &gFXAAProgram[fsaa_quality];
             shader->bind();
 
             channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAAMap.getUsage());
@@ -7288,6 +7397,187 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
     }
 }
 
+void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
+{
+    llassert(!gCubeSnapshot);
+    bool multisample = RenderFSAAType == 2 && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+
+    // Present everything.
+    if (multisample)
+    {
+        LL_PROFILE_GPU_ZONE("aa");
+        static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
+        U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
+
+        S32 width = src->getWidth();
+        S32 height = src->getHeight();
+
+        float rt_metrics[] = { 1.f / width, 1.f / height, (float)width, (float)height };
+
+        LLGLDepthTest    depth(GL_FALSE, GL_FALSE);
+
+        static LLCachedControl<bool> use_sample(gSavedSettings, "RenderSMAAUseSample", false);
+        //static LLCachedControl<bool> use_stencil(gSavedSettings, "RenderSMAAUseStencil", true);
+        {
+            //LLGLState stencil(GL_STENCIL_TEST, use_stencil);
+
+            // Bind setup:
+            LLRenderTarget& dest = mFXAAMap;
+            LLGLSLShader& edge_shader = gSMAAEdgeDetectProgram[fsaa_quality];
+
+            dest.bindTarget();
+            dest.clear(GL_COLOR_BUFFER_BIT);
+
+            edge_shader.bind();
+            edge_shader.uniform4fv(sSmaaRTMetrics, 1, rt_metrics);
+
+            S32 channel = edge_shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, src->getUsage());
+            if (channel > -1)
+            {
+                if (!use_sample)
+                {
+                    src->bindTexture(0, channel, LLTexUnit::TFO_POINT);
+                    gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+                }
+                else
+                {
+                    gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mSMAASampleMap);
+                    gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+                }
+            }
+
+            //if (use_stencil)
+            //{
+            //    glStencilFunc(GL_ALWAYS, 1, 0xFF);
+            //    glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
+            //    glStencilMask(0xFF);
+            //}
+            mScreenTriangleVB->setBuffer();
+            mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+            edge_shader.unbind();
+            dest.flush();
+
+            gGL.getTexUnit(channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+        }
+
+        {
+            //LLGLState stencil(GL_STENCIL_TEST, use_stencil);
+
+            // Bind setup:
+            LLRenderTarget& dest = mSMAABlendBuffer;
+            LLGLSLShader& blend_weights_shader = gSMAABlendWeightsProgram[fsaa_quality];
+
+            dest.bindTarget();
+            dest.clear(GL_COLOR_BUFFER_BIT);
+
+            blend_weights_shader.bind();
+            blend_weights_shader.uniform4fv(sSmaaRTMetrics, 1, rt_metrics);
+
+            S32 edge_tex_channel = blend_weights_shader.enableTexture(LLShaderMgr::SMAA_EDGE_TEX, mFXAAMap.getUsage());
+            if (edge_tex_channel > -1)
+            {
+                mFXAAMap.bindTexture(0, edge_tex_channel, LLTexUnit::TFO_BILINEAR);
+                gGL.getTexUnit(edge_tex_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+            }
+            S32 area_tex_channel = blend_weights_shader.enableTexture(LLShaderMgr::SMAA_AREA_TEX, LLTexUnit::TT_TEXTURE);
+            if (area_tex_channel > -1)
+            {
+                gGL.getTexUnit(area_tex_channel)->bindManual(LLTexUnit::TT_TEXTURE, mSMAAAreaMap);
+                gGL.getTexUnit(area_tex_channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+                gGL.getTexUnit(area_tex_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+            }
+            S32 search_tex_channel = blend_weights_shader.enableTexture(LLShaderMgr::SMAA_SEARCH_TEX, LLTexUnit::TT_TEXTURE);
+            if (search_tex_channel > -1)
+            {
+                gGL.getTexUnit(search_tex_channel)->bindManual(LLTexUnit::TT_TEXTURE, mSMAASearchMap);
+                gGL.getTexUnit(search_tex_channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+                gGL.getTexUnit(search_tex_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+            }
+
+            //if (use_stencil)
+            //{
+            //    glStencilFunc(GL_EQUAL, 1, 0xFF);
+            //    glStencilMask(0x00);
+            //}
+            mScreenTriangleVB->setBuffer();
+            mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+            //if (use_stencil)
+            //{
+            //    glStencilFunc(GL_ALWAYS, 0, 0xFF);
+            //}
+            blend_weights_shader.unbind();
+            dest.flush();
+            gGL.getTexUnit(edge_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+            gGL.getTexUnit(area_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+            gGL.getTexUnit(search_tex_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+        }
+    }
+}
+
+void LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst)
+{
+    llassert(!gCubeSnapshot);
+    bool multisample = RenderFSAAType == 2 && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+
+    // Present everything.
+    if (multisample)
+    {
+        LL_PROFILE_GPU_ZONE("aa");
+        static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U);
+        U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U);
+
+        S32 width = src->getWidth();
+        S32 height = src->getHeight();
+
+        float rt_metrics[] = { 1.f / width, 1.f / height, (float)width, (float)height };
+
+        LLGLDepthTest    depth(GL_FALSE, GL_FALSE);
+
+        static LLCachedControl<bool> use_sample(gSavedSettings, "RenderSMAAUseSample", false);
+        //static LLCachedControl<bool> use_stencil(gSavedSettings, "RenderSMAAUseStencil", true);
+
+        {
+            //LLGLDisable stencil(GL_STENCIL_TEST);
+
+            // Bind setup:
+            LLRenderTarget* bound_target = dst;
+            LLGLSLShader& blend_shader = gSMAANeighborhoodBlendProgram[fsaa_quality];
+
+            bound_target->bindTarget();
+            bound_target->clear(GL_COLOR_BUFFER_BIT);
+
+            blend_shader.bind();
+            blend_shader.uniform4fv(sSmaaRTMetrics, 1, rt_metrics);
+
+            S32 diffuse_channel = blend_shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE);
+            if(diffuse_channel > -1)
+            {
+                src->bindTexture(0, diffuse_channel, LLTexUnit::TFO_BILINEAR);
+                gGL.getTexUnit(diffuse_channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+            }
+
+            S32 blend_channel = blend_shader.enableTexture(LLShaderMgr::SMAA_BLEND_TEX);
+            if (blend_channel > -1)
+            {
+                mSMAABlendBuffer.bindTexture(0, blend_channel, LLTexUnit::TFO_BILINEAR);
+            }
+
+            mScreenTriangleVB->setBuffer();
+            mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+            bound_target->flush();
+            blend_shader.unbind();
+            gGL.getTexUnit(diffuse_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+            gGL.getTexUnit(blend_channel)->unbindFast(LLTexUnit::TT_TEXTURE);
+        }
+    }
+    else
+    {
+        copyRenderTarget(src, dst);
+    }
+}
+
 void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst)
 {
 
@@ -7496,18 +7786,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst)
             { // combine result based on alpha
 
                 dst->bindTarget();
-                if (RenderFSAASamples > 1 && mFXAAMap.isComplete())
-                {
-                    glViewport(0, 0, dst->getWidth(), dst->getHeight());
-                }
-                else
-                {
-                    gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
-                    gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
-                    gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
-                    gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
-                    glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
-                }
+                glViewport(0, 0, dst->getWidth(), dst->getHeight());
 
                 gDeferredDoFCombineProgram.bind();
                 gDeferredDoFCombineProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, LLTexUnit::TFO_POINT);
@@ -7555,20 +7834,27 @@ void LLPipeline::renderFinalize()
     gGL.setColorMask(true, true);
     glClearColor(0, 0, 0, 0);
 
-
     copyScreenSpaceReflections(&mRT->screen, &mSceneMap);
 
     generateLuminance(&mRT->screen, &mLuminanceMap);
 
     generateExposure(&mLuminanceMap, &mExposureMap);
 
+    tonemap(&mRT->screen, &mPostMap);
+
+    applyCAS(&mPostMap, &mRT->screen);
+
+    generateSMAABuffers(&mRT->screen);
+
     gammaCorrect(&mRT->screen, &mPostMap);
 
     LLVertexBuffer::unbind();
 
-    generateGlow(&mPostMap);
+    applySMAA(&mPostMap, &mRT->screen);
 
-    combineGlow(&mPostMap, &mRT->screen);
+    generateGlow(&mRT->screen);
+
+    combineGlow(&mRT->screen, &mPostMap);
 
     gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
     gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
@@ -7576,15 +7862,19 @@ void LLPipeline::renderFinalize()
     gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
     glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
 
-    applyCAS(&mRT->screen, &mPostMap);
-
     renderDoF(&mPostMap, &mRT->screen);
 
-    applyFXAA(&mRT->screen, &mPostMap);
-    LLRenderTarget* finalBuffer = &mPostMap;
+    LLRenderTarget* finalBuffer = &mRT->screen;
+    static LLCachedControl<U32> aa_type(gSavedSettings, "RenderFSAAType", 2U);
+    if (RenderFSAAType == 1)
+    {
+        applyFXAA(&mRT->screen, &mPostMap);
+        finalBuffer = &mPostMap;
+    }
+
     if (RenderBufferVisualization > -1)
     {
-        finalBuffer = &mRT->screen;
+        finalBuffer = &mPostMap;
         switch (RenderBufferVisualization)
         {
         case 0:
@@ -7595,6 +7885,22 @@ void LLPipeline::renderFinalize()
             break;
         case 4:
             visualizeBuffers(&mLuminanceMap, finalBuffer, 0);
+        case 5:
+        {
+            if (RenderFSAAType > 0)
+            {
+                visualizeBuffers(&mFXAAMap, finalBuffer, 0);
+            }
+            break;
+        }
+        case 6:
+        {
+            if (RenderFSAAType == 2)
+            {
+                visualizeBuffers(&mSMAABlendBuffer, finalBuffer, 0);
+            }
+            break;
+        }
         default:
             break;
         }
@@ -7602,11 +7908,11 @@ void LLPipeline::renderFinalize()
 
     // Present the screen target.
 
-    gDeferredPostNoDoFProgram.bind();
+    gDeferredPostNoDoFNoiseProgram.bind(); // Add noise as part of final render to screen pass to avoid damaging other post effects
 
     // Whatever is last in the above post processing chain should _always_ be rendered directly here.  If not, expect problems.
-    gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, finalBuffer);
-    gDeferredPostNoDoFProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true);
+    gDeferredPostNoDoFNoiseProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, finalBuffer);
+    gDeferredPostNoDoFNoiseProgram.bindTexture(LLShaderMgr::DEFERRED_DEPTH, &mRT->deferredScreen, true);
 
     {
         LLGLDepthTest depth_test(GL_TRUE, GL_TRUE, GL_ALWAYS);
@@ -7614,7 +7920,7 @@ void LLPipeline::renderFinalize()
         mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
     }
 
-    gDeferredPostNoDoFProgram.unbind();
+    gDeferredPostNoDoFNoiseProgram.unbind();
 
     gGL.setSceneBlendType(LLRender::BT_ALPHA);
 
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 1c87b71d06..3687ab32fa 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -129,7 +129,7 @@ public:
 
     //attempt to allocate screen buffers at resX, resY
     //returns true if allocation successful, false otherwise
-    bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
+    bool allocateScreenBufferInternal(U32 resX, U32 resY);
     bool allocateShadowBuffer(U32 resX, U32 resY);
 
     // rebuild all LLVOVolume render batches
@@ -155,10 +155,13 @@ public:
     void copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst);
     void generateLuminance(LLRenderTarget* src, LLRenderTarget* dst);
     void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true);
+    void tonemap(LLRenderTarget* src, LLRenderTarget* dst);
     void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst);
     void generateGlow(LLRenderTarget* src);
     void applyCAS(LLRenderTarget* src, LLRenderTarget* dst);
     void applyFXAA(LLRenderTarget* src, LLRenderTarget* dst);
+    void generateSMAABuffers(LLRenderTarget* src);
+    void applySMAA(LLRenderTarget* src, LLRenderTarget* dst);
     void renderDoF(LLRenderTarget* src, LLRenderTarget* dst);
     void copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst);
     void combineGlow(LLRenderTarget* src, LLRenderTarget* dst);
@@ -726,6 +729,7 @@ public:
 
     // FXAA helper target
     LLRenderTarget          mFXAAMap;
+    LLRenderTarget          mSMAABlendBuffer;
 
     // render ui to buffer target
     LLRenderTarget          mUIScreen;
@@ -782,6 +786,11 @@ public:
     U32                 mTrueNoiseMap;
     U32                 mLightFunc;
 
+    //smaa
+    U32                 mSMAAAreaMap = 0;
+    U32                 mSMAASearchMap = 0;
+    U32                 mSMAASampleMap = 0;
+
     LLColor4            mSunDiffuse;
     LLColor4            mMoonDiffuse;
     LLVector4           mSunDir;
@@ -989,7 +998,7 @@ public:
     static bool WindLightUseAtmosShaders;
     static bool RenderDeferred;
     static F32 RenderDeferredSunWash;
-    static U32 RenderFSAASamples;
+    static U32 RenderFSAAType;
     static U32 RenderResolutionDivisor;
     static bool RenderUIBuffer;
     static S32 RenderShadowDetail;
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index 3e578e94f4..1deb81175e 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
-  height="411"
+  height="430"
   layout="topleft"
   name="prefs_graphics_advanced"
   help_topic="Preferences_Graphics_Advanced"
@@ -359,7 +359,41 @@
     name="use HiDPI"
     tool_tip="Enable OpenGL for High-Resolution Drawing."
     width="315" />
-
+    <text
+      type="string"
+      length="1"
+      follows="left|top"
+      height="20"
+      layout="topleft"
+      left="30"
+      name="antialiasing label"
+      top_delta="20"
+      width="120">
+        Antialiasing:
+    </text>
+    <combo_box
+      control_name="RenderFSAAType"
+      height="20"
+      initial_value="false"
+      label="Antialiasing"
+      layout="topleft"
+      left_pad="40"
+      name="fsaa"
+      top_delta="0"
+      width="90">
+        <combo_box.item
+          label="Disabled"
+          name="FSAADisabled"
+          value="0" />
+        <combo_box.item
+          label="FXAA"
+          name="FXAA"
+          value="1" />
+        <combo_box.item
+          label="SMAA"
+          name="SMAA"
+          value="2" />
+    </combo_box>
   <text
     type="string"
     length="1"
@@ -367,10 +401,10 @@
     height="20"
     layout="topleft"
     left="30"
-    name="antialiasing label"
+    name="antialiasing quality label"
     top_delta="20"
-    width="100">
-      Antialiasing:
+    width="120">
+      Antialiasing Quality:
   </text>
   <combo_box
     control_name="RenderFSAASamples"
@@ -379,17 +413,25 @@
     label="Antialiasing"
     layout="topleft"
     left_pad="40"
-    name="fsaa"
+    name="fsaa quality"
     top_delta="0"
     width="90">
     <combo_box.item
-      label="Disabled"
-      name="FSAADisabled"
+      label="Low"
+      name="Low"
       value="0" />
     <combo_box.item
-      label="FXAA"
-      name="FXAA"
+      label="Medium"
+      name="Medium"
+      value="1" />
+    <combo_box.item
+      label="High"
+      name="High"
       value="2" />
+    <combo_box.item
+      label="Ultra"
+      name="Ultra"
+      value="3" />
   </combo_box>
   <text
     type="string"
@@ -545,7 +587,7 @@
   </text>
    <view_border
       bevel_style="in"
-      height="357"
+      height="377"
       layout="topleft"
       left="385"
       name="vert_border"
@@ -908,7 +950,7 @@
       layout="topleft"
       left="13"
       name="horiz_border"
-      top="373"
+      top="393"
       top_delta="5"
       width="774"/>
   <button
-- 
cgit v1.2.3


From 9c6988cf2282a02c5dae31dcada147240ead4e64 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 29 Aug 2024 18:03:46 -0400
Subject: Fix startup crash from removed setting

---
 indra/newview/llviewercontrol.cpp | 1 -
 1 file changed, 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 98b46795a3..865d7fd442 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -771,7 +771,6 @@ void settings_setup_listeners()
     setting_setup_signal_listener(gSavedSettings, "RenderUIBuffer", handleWindowResized);
     setting_setup_signal_listener(gSavedSettings, "RenderDepthOfField", handleReleaseGLBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderFSAAType", handleReleaseGLBufferChanged);
-    setting_setup_signal_listener(gSavedSettings, "RenderPostProcessingHDR", handleReleaseGLBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderSpecularResX", handleLUTBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderSpecularResY", handleLUTBufferChanged);
     setting_setup_signal_listener(gSavedSettings, "RenderSpecularExponent", handleLUTBufferChanged);
-- 
cgit v1.2.3


From 17fed3985f56033f6c433436935cfde32ea1e7c6 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Thu, 29 Aug 2024 15:43:01 +0200
Subject: #2360 Incorrect Day Cycle name in Edit Day Cycle floater (remove
 unused key CANMOD)

---
 indra/llinventory/llsettingsbase.cpp       |   7 +-
 indra/newview/llenvironment.cpp            | 149 ++++++++++++++++-------------
 indra/newview/llfloatereditextdaycycle.cpp |  19 ++--
 indra/newview/llfloatereditextdaycycle.h   |   1 -
 indra/newview/llfloaterregioninfo.cpp      |   2 +-
 indra/newview/llpanelenvironment.cpp       |  94 ++++++++++--------
 indra/newview/llpanelenvironment.h         |   2 +-
 indra/newview/llsettingspicker.cpp         |  26 ++---
 indra/newview/llsettingspicker.h           |   1 +
 indra/newview/llsettingsvo.cpp             |   7 +-
 10 files changed, 167 insertions(+), 141 deletions(-)

(limited to 'indra')

diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 7b55fbc9e8..4aab3dee3b 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -355,10 +355,11 @@ LLSD LLSettingsBase::getSettings() const
 
 LLSD LLSettingsBase::cloneSettings() const
 {
-    U32 flags = getFlags();
-    LLSD settings (combineSDMaps(getSettings(), LLSD()));
-    if (flags)
+    LLSD settings(combineSDMaps(getSettings(), LLSD()));
+    if (U32 flags = getFlags())
+    {
         settings[SETTING_FLAGS] = LLSD::Integer(flags);
+    }
     return settings;
 }
 
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 6e31760e9e..0b4630dfc3 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1051,8 +1051,8 @@ bool LLEnvironment::isExtendedEnvironmentEnabled() const
 
 bool LLEnvironment::isInventoryEnabled() const
 {
-    return (!gAgent.getRegionCapability("UpdateSettingsAgentInventory").empty() &&
-        !gAgent.getRegionCapability("UpdateSettingsTaskInventory").empty());
+    return !gAgent.getRegionCapability("UpdateSettingsAgentInventory").empty() &&
+           !gAgent.getRegionCapability("UpdateSettingsTaskInventory").empty();
 }
 
 void LLEnvironment::onRegionChange()
@@ -1079,9 +1079,8 @@ void LLEnvironment::onRegionChange()
 void LLEnvironment::onParcelChange()
 {
     S32 parcel_id(INVALID_PARCEL_ID);
-    LLParcel* parcel = LLViewerParcelMgr::instance().getAgentParcel();
 
-    if (parcel)
+    if (LLParcel* parcel = LLViewerParcelMgr::instance().getAgentParcel())
     {
         parcel_id = parcel->getLocalID();
     }
@@ -1092,7 +1091,8 @@ void LLEnvironment::onParcelChange()
 //-------------------------------------------------------------------------
 F32 LLEnvironment::getCamHeight() const
 {
-    return (mCurrentEnvironment->getSky()->getDomeOffset() * mCurrentEnvironment->getSky()->getDomeRadius());
+    auto sky = mCurrentEnvironment ? mCurrentEnvironment->getSky() : nullptr;
+    return sky ? sky->getDomeOffset() * sky->getDomeRadius() : 0;
 }
 
 F32 LLEnvironment::getWaterHeight() const
@@ -1103,16 +1103,14 @@ F32 LLEnvironment::getWaterHeight() const
 
 bool LLEnvironment::getIsSunUp() const
 {
-    if (!mCurrentEnvironment || !mCurrentEnvironment->getSky())
-        return false;
-    return mCurrentEnvironment->getSky()->getIsSunUp();
+    auto sky = mCurrentEnvironment ? mCurrentEnvironment->getSky() : nullptr;
+    return sky && sky->getIsSunUp();
 }
 
 bool LLEnvironment::getIsMoonUp() const
 {
-    if (!mCurrentEnvironment || !mCurrentEnvironment->getSky())
-        return false;
-    return mCurrentEnvironment->getSky()->getIsMoonUp();
+    auto sky = mCurrentEnvironment ? mCurrentEnvironment->getSky() : nullptr;
+    return sky && sky->getIsMoonUp();
 }
 
 //-------------------------------------------------------------------------
@@ -1139,13 +1137,19 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getEnvironmentInstance(LLEnviro
     if (create)
     {
         if (environment)
+        {
             environment = environment->clone();
+        }
         else
         {
             if (env == ENV_PUSH)
+            {
                 environment = std::make_shared<DayInjection>(env);
+            }
             else
+            {
                 environment = std::make_shared<DayInstance>(env);
+            }
         }
         mEnvironments[env] = environment;
     }
@@ -1172,7 +1176,9 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
     environment->animate();
 
     if (!mSignalEnvChanged.empty())
+    {
         mSignalEnvChanged(env, env_version);
+    }
 }
 
 void LLEnvironment::setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env)
@@ -1282,7 +1288,9 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
     }
 
     if (!mSignalEnvChanged.empty())
+    {
         mSignalEnvChanged(env, env_version);
+    }
 }
 
 void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSettingsBase::ptr_t &settings, S32 env_version)
@@ -1375,7 +1383,9 @@ void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
     mEnvironments[env].reset();
 
     if (!mSignalEnvChanged.empty())
+    {
         mSignalEnvChanged(env, VERSION_CLEANUP);
+    }
 }
 
 void LLEnvironment::logEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &settings, S32 env_version)
@@ -1415,10 +1425,10 @@ LLSettingsDay::ptr_t LLEnvironment::getEnvironmentDay(LLEnvironment::EnvSelectio
         return LLSettingsDay::ptr_t();
     }
 
-    DayInstance::ptr_t environment = getEnvironmentInstance(env);
-
-    if (environment)
+    if (DayInstance::ptr_t environment = getEnvironmentInstance(env))
+    {
         return environment->getDayCycle();
+    }
 
     return LLSettingsDay::ptr_t();
 }
@@ -1431,10 +1441,10 @@ LLSettingsDay::Seconds LLEnvironment::getEnvironmentDayLength(EnvSelection_t env
         return LLSettingsDay::Seconds(0);
     }
 
-    DayInstance::ptr_t environment = getEnvironmentInstance(env);
-
-    if (environment)
+    if (DayInstance::ptr_t environment = getEnvironmentInstance(env))
+    {
         return environment->getDayLength();
+    }
 
     return LLSettingsDay::Seconds(0);
 }
@@ -1447,9 +1457,10 @@ LLSettingsDay::Seconds LLEnvironment::getEnvironmentDayOffset(EnvSelection_t env
         return LLSettingsDay::Seconds(0);
     }
 
-    DayInstance::ptr_t environment = getEnvironmentInstance(env);
-    if (environment)
+    if (DayInstance::ptr_t environment = getEnvironmentInstance(env))
+    {
         return environment->getDayOffset();
+    }
 
     return LLSettingsDay::Seconds(0);
 }
@@ -1479,7 +1490,9 @@ LLEnvironment::fixedEnvironment_t LLEnvironment::getEnvironmentFixed(LLEnvironme
         }
 
         if (!fixed.first || !fixed.second)
+        {
             LL_WARNS("ENVIRONMENT") << "Can not construct complete fixed environment.  Missing Sky and/or Water." << LL_ENDL;
+        }
 
         return fixed;
     }
@@ -1490,10 +1503,10 @@ LLEnvironment::fixedEnvironment_t LLEnvironment::getEnvironmentFixed(LLEnvironme
         return fixedEnvironment_t();
     }
 
-    DayInstance::ptr_t environment = getEnvironmentInstance(env);
-
-    if (environment)
+    if (DayInstance::ptr_t environment = getEnvironmentInstance(env))
+    {
         return fixedEnvironment_t(environment->getSky(), environment->getWater());
+    }
 
     return fixedEnvironment_t();
 }
@@ -1503,7 +1516,9 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getSelectedEnvironmentInstance(
     for (S32 idx = mSelectedEnvironment; idx < ENV_DEFAULT; ++idx)
     {
         if (mEnvironments[idx])
+        {
             return mEnvironments[idx];
+        }
     }
 
     return mEnvironments[ENV_DEFAULT];
@@ -1514,7 +1529,9 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::getSharedEnvironmentInstance()
     for (S32 idx = ENV_PARCEL; idx < ENV_DEFAULT; ++idx)
     {
         if (mEnvironments[idx])
+        {
             return mEnvironments[idx];
+        }
     }
 
     return mEnvironments[ENV_DEFAULT];
@@ -1673,21 +1690,19 @@ void LLEnvironment::update(const LLViewerCamera * cam)
 
     updateSettingsUniforms();
 
+    LLViewerShaderMgr::shader_iter shaders_iter, end_shaders;
+    end_shaders = LLViewerShaderMgr::instance()->endShaders();
+    for (shaders_iter = LLViewerShaderMgr::instance()->beginShaders(); shaders_iter != end_shaders; ++shaders_iter)
     {
-        LLViewerShaderMgr::shader_iter shaders_iter, end_shaders;
-        end_shaders = LLViewerShaderMgr::instance()->endShaders();
-        for (shaders_iter = LLViewerShaderMgr::instance()->beginShaders(); shaders_iter != end_shaders; ++shaders_iter)
+        shaders_iter->mUniformsDirty = true;
+        if (shaders_iter->mRiggedVariant)
         {
-            shaders_iter->mUniformsDirty = true;
-            if (shaders_iter->mRiggedVariant)
-            {
-                shaders_iter->mRiggedVariant->mUniformsDirty = true;
-            }
+            shaders_iter->mRiggedVariant->mUniformsDirty = true;
+        }
 
-            for (auto& variant : shaders_iter->mGLTFVariants)
-            {
-                variant.mUniformsDirty = true;
-            }
+        for (auto& variant : shaders_iter->mGLTFVariants)
+        {
+            variant.mUniformsDirty = true;
         }
     }
 }
@@ -1971,7 +1986,6 @@ void LLEnvironment::updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_l
     updateParcel(INVALID_PARCEL_ID, pwater, day_length, day_offset, altitudes, cb);
 }
 
-
 void LLEnvironment::resetRegion(environment_apply_fn cb)
 {
     resetParcel(INVALID_PARCEL_ID, cb);
@@ -1996,7 +2010,10 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
             LLEnvironmentRequest::initiate(cb);
         }
         else if (cb)
+        {
             cb(parcel_id, EnvironmentInfo::ptr_t());
+        }
+
         return;
     }
 
@@ -2006,16 +2023,14 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
         cb = [this, transition](S32 pid, EnvironmentInfo::ptr_t envinfo) { recordEnvironment(pid, envinfo, transition); };
     }
 
-    std::string coroname =
-        LLCoros::instance().launch("LLEnvironment::coroRequestEnvironment",
+    LLCoros::instance().launch("LLEnvironment::coroRequestEnvironment",
         [this, parcel_id, cb]() { coroRequestEnvironment(parcel_id, cb); });
 }
 
 void LLEnvironment::updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb)
 {
     UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(asset_id, display_name, day_length, day_offset, altitudes, flags));
-    std::string coroname =
-        LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment",
+    LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment",
         [this, parcel_id, track_num, updates, cb]() { coroUpdateEnvironment(parcel_id, track_num, updates, cb); });
 }
 
@@ -2031,7 +2046,9 @@ void LLEnvironment::onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::p
     LLSettingsDay::ptr_t pday;
 
     if (settings->getSettingsType() == "daycycle")
+    {
         pday = std::static_pointer_cast<LLSettingsDay>(settings);
+    }
     else
     {
         pday = createDayCycleFromEnvironment( (parcel_id == INVALID_PARCEL_ID) ? ENV_REGION : ENV_PARCEL, settings);
@@ -2065,8 +2082,7 @@ void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday
 {
     UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(pday, day_length, day_offset, altitudes));
 
-    std::string coroname =
-        LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment",
+    LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment",
         [this, parcel_id, track_num, updates, cb]() { coroUpdateEnvironment(parcel_id, track_num, updates, cb); });
 }
 
@@ -2075,12 +2091,9 @@ void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday
     updateParcel(parcel_id, pday, NO_TRACK, day_length, day_offset, altitudes, cb);
 }
 
-
-
 void LLEnvironment::resetParcel(S32 parcel_id, environment_apply_fn cb)
 {
-    std::string coroname =
-        LLCoros::instance().launch("LLEnvironment::coroResetEnvironment",
+    LLCoros::instance().launch("LLEnvironment::coroResetEnvironment",
         [this, parcel_id, cb]() { coroResetEnvironment(parcel_id, NO_TRACK, cb); });
 }
 
@@ -2130,7 +2143,6 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
                 });
         }
     }
-
 }
 
 void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply)
@@ -2150,9 +2162,14 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
     if (track_no == NO_TRACK)
     {   // day length and offset are only applicable if we are addressing the entire day cycle.
         if (updates->mDayLength > 0)
+        {
             body[KEY_ENVIRONMENT][KEY_DAYLENGTH] = updates->mDayLength;
+        }
+
         if (updates->mDayOffset > 0)
+        {
             body[KEY_ENVIRONMENT][KEY_DAYOFFSET] = updates->mDayOffset;
+        }
 
         if ((parcel_id == INVALID_PARCEL_ID) && (updates->mAltitudes.size() == 3))
         {   // only test for altitude changes if we are changing the region.
@@ -2165,12 +2182,16 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
     }
 
     if (updates->mDayp)
+    {
         body[KEY_ENVIRONMENT][KEY_DAYCYCLE] = updates->mDayp->getSettings();
+    }
     else if (!updates->mSettingsAsset.isNull())
     {
         body[KEY_ENVIRONMENT][KEY_DAYASSET] = updates->mSettingsAsset;
         if (!updates->mDayName.empty())
+        {
             body[KEY_ENVIRONMENT][KEY_DAYNAME] = updates->mDayName;
+        }
     }
 
     body[KEY_ENVIRONMENT][KEY_FLAGS] = LLSD::Integer(updates->mFlags);
@@ -2188,22 +2209,27 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
             if (track_no != NO_TRACK)
                 query << "&";
         }
+
         if (track_no != NO_TRACK)
         {
             query << "trackno=" << track_no;
         }
+
         url += query.str();
     }
 
     LLSD result = httpAdapter->putAndSuspend(httpRequest, url, body);
     // results that come back may contain the new settings
 
+    if (LLApp::isExiting())
+        return;
+
     LLSD notify;
 
     LLSD httpResults = result["http_result"];
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
 
-    if ((!status) || !result["success"].asBoolean())
+    if (!status || !result["success"].asBoolean())
     {
         LL_WARNS("ENVIRONMENT") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
 
@@ -2218,10 +2244,6 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
             notify["FAIL_REASON"] = reason;
         }
     }
-    else if (LLApp::isExiting())
-    {
-        return;
-    }
     else
     {
         LLSD environment = result[KEY_ENVIRONMENT];
@@ -2272,34 +2294,26 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
     LLSD result = httpAdapter->deleteAndSuspend(httpRequest, url);
     // results that come back may contain the new settings
 
+    if (LLApp::isExiting())
+        return;
+
     LLSD notify;
 
     LLSD httpResults = result["http_result"];
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
 
-    if ((!status) || !result["success"].asBoolean())
+    if (!status || !result["success"].asBoolean())
     {
         LL_WARNS("ENVIRONMENT") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
 
         notify = LLSD::emptyMap();
         std::string reason = result["message"].asString();
-        if (reason.empty())
-        {
-            notify["FAIL_REASON"] = status.toString();
-        }
-        else
-        {
-            notify["FAIL_REASON"] = reason;
-        }
-    }
-    else if (LLApp::isExiting())
-    {
-        return;
+        notify["FAIL_REASON"] = reason.empty() ? status.toString() : reason;
     }
-    else
+    else if (apply)
     {
-       LLSD environment = result[KEY_ENVIRONMENT];
-        if (environment.isDefined() && apply)
+        LLSD environment = result[KEY_ENVIRONMENT];
+        if (environment.isDefined())
         {
             EnvironmentInfo::ptr_t envinfo = LLEnvironment::EnvironmentInfo::extract(environment);
             apply(parcel_id, envinfo);
@@ -2311,7 +2325,6 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
         LLNotificationsUtil::add("WLRegionApplyFail", notify);
         //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false);
     }
-
 }
 
 
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index d6e7cd97f3..fd58cd8aaf 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -132,7 +132,6 @@ namespace {
 //=========================================================================
 const std::string LLFloaterEditExtDayCycle::KEY_EDIT_CONTEXT("edit_context");
 const std::string LLFloaterEditExtDayCycle::KEY_DAY_LENGTH("day_length");
-const std::string LLFloaterEditExtDayCycle::KEY_CANMOD("canmod");
 
 const std::string LLFloaterEditExtDayCycle::VALUE_CONTEXT_INVENTORY("inventory");
 const std::string LLFloaterEditExtDayCycle::VALUE_CONTEXT_PARCEL("parcel");
@@ -286,11 +285,6 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
             mEditContext = CONTEXT_REGION;
     }
 
-    if (key.has(KEY_CANMOD))
-    {
-        mCanMod = key[KEY_CANMOD].asBoolean();
-    }
-
     if (mEditContext == CONTEXT_UNKNOWN)
     {
         LL_WARNS("ENVDAYEDIT") << "Unknown editing context!" << LL_ENDL;
@@ -298,6 +292,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
 
     if (key.has(KEY_INVENTORY_ID))
     {
+        // mCanMod is initialized inside this call
         loadInventoryItem(key[KEY_INVENTORY_ID].asUUID());
     }
     else
@@ -519,14 +514,20 @@ void LLFloaterEditExtDayCycle::setEditDefaultDayCycle()
 std::string LLFloaterEditExtDayCycle::getEditName() const
 {
     if (mEditDay)
+    {
         return mEditDay->getName();
+    }
+
     return "new";
 }
 
 void LLFloaterEditExtDayCycle::setEditName(const std::string &name)
 {
     if (mEditDay)
+    {
         mEditDay->setName(name);
+    }
+
     getChild<LLLineEditor>(TXT_DAY_NAME)->setText(name);
 }
 
@@ -548,13 +549,13 @@ bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_
             keymap_t::iterator it = mSliderKeyMap.find(curslider);
             if (it != mSliderKeyMap.end())
             {
-                if (mEditDay->moveTrackKeyframe(mCurrentTrack, (*it).second.mFrame, sliderpos))
+                if (mEditDay->moveTrackKeyframe(mCurrentTrack, it->second.mFrame, sliderpos))
                 {
-                    (*it).second.mFrame = sliderpos;
+                    it->second.mFrame = sliderpos;
                 }
                 else
                 {
-                    mFramesSlider->setCurSliderValue((*it).second.mFrame);
+                    mFramesSlider->setCurSliderValue(it->second.mFrame);
                 }
             }
             else
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 926a24f8a4..992b532967 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -60,7 +60,6 @@ class LLFloaterEditExtDayCycle : public LLFloaterEditEnvironmentBase
 public:
     static const std::string    KEY_EDIT_CONTEXT;
     static const std::string    KEY_DAY_LENGTH;
-    static const std::string    KEY_CANMOD;
 
     static const std::string    VALUE_CONTEXT_INVENTORY;
     static const std::string    VALUE_CONTEXT_PARCEL;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 7869abf66d..66e88e8841 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -4291,7 +4291,7 @@ void LLPanelRegionEnvironment::refreshFromSource()
     }
 
     LLEnvironment::instance().requestRegion(
-        [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+        [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { onEnvironmentReceived(that_h, parcel_id, envifo); });
 
     setControlsEnabled(false);
 }
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index c1d8ce50ff..423ca376d1 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -392,8 +392,10 @@ std::string LLPanelEnvironmentInfo::getNameForTrackIndex(U32 index)
     if (invname.empty())
     {
         invname = getNameForTrackIndex(index - 1);
-        if (invname[0] != '(')
+        if (!invname.empty() && invname.front() != '(')
+        {
             invname = "(" + invname + ")";
+        }
     }
 
     return invname;
@@ -764,7 +766,7 @@ void LLPanelEnvironmentInfo::commitDayLenOffsetChanges(bool need_callback)
                                                    (S32)mCurrentEnvironment->mDayLength.value(),
                                                    (S32)mCurrentEnvironment->mDayOffset.value(),
                                                    LLEnvironment::altitudes_vect_t(),
-                                                   [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+                                                   [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { onEnvironmentReceived(that_h, parcel_id, envifo); });
         }
         else
         {
@@ -852,7 +854,7 @@ void LLPanelEnvironmentInfo::onBtnDefault()
         if (opt == 0)
         {
             LLEnvironment::instance().resetParcel(parcel_id,
-                [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+                [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { onEnvironmentReceived(that_h, parcel_id, envifo); });
         }
     });
 }
@@ -864,8 +866,7 @@ void LLPanelEnvironmentInfo::onBtnEdit()
     LLFloaterEditExtDayCycle *dayeditor = getEditFloater();
 
     LLSD params(LLSDMap(LLFloaterEditExtDayCycle::KEY_EDIT_CONTEXT, isRegion() ? LLFloaterEditExtDayCycle::VALUE_CONTEXT_REGION : LLFloaterEditExtDayCycle::VALUE_CONTEXT_PARCEL)
-            (LLFloaterEditExtDayCycle::KEY_DAY_LENGTH,  mCurrentEnvironment ? (S32)(mCurrentEnvironment->mDayLength.value()) : FOURHOURS)
-            (LLFloaterEditExtDayCycle::KEY_CANMOD,      LLSD::Boolean(true)));
+            (LLFloaterEditExtDayCycle::KEY_DAY_LENGTH, mCurrentEnvironment ? (S32)(mCurrentEnvironment->mDayLength.value()) : FOURHOURS));
 
     dayeditor->openFloater(params);
 
@@ -882,13 +883,13 @@ void LLPanelEnvironmentInfo::onBtnEdit()
 
 void LLPanelEnvironmentInfo::onBtnSelect()
 {
-    LLFloaterSettingsPicker *picker = getSettingsPicker();
-    if (picker)
+    if (LLFloaterSettingsPicker* picker = getSettingsPicker())
     {
         LLUUID item_id;
         if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle)
         {
-            item_id = LLFloaterSettingsPicker::findItemID(mCurrentEnvironment->mDayCycle->getAssetId(), false, false);
+            LLUUID asset_id = mCurrentEnvironment->mDayCycle->getAssetId();
+            item_id = LLFloaterSettingsPicker::findItemID(asset_id, false);
         }
         picker->setSettingsFilter(LLSettingsType::ST_NONE);
         picker->setSettingsItemId(item_id);
@@ -919,7 +920,7 @@ void LLPanelEnvironmentInfo::onBtnRstAltitudes()
                                                mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
                                                mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                alts,
-            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { onEnvironmentReceived(that_h, parcel_id, envifo); });
     }
 }
 
@@ -985,32 +986,41 @@ void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, std::string sourc
 
 void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, S32 track_num)
 {
-    LLInventoryItem *itemp = gInventory.getItem(item_id);
-    if (itemp)
+    if (LLInventoryItem* itemp = gInventory.getItem(item_id))
     {
+        LL_INFOS("ENVPANEL") << "item '" << item_id << "' : '" << itemp->getDescription() << "'" << LL_ENDL;
+
         LLHandle<LLPanel> that_h = getHandle();
         clearDirtyFlag(DIRTY_FLAG_DAYLENGTH);
         clearDirtyFlag(DIRTY_FLAG_DAYOFFSET);
 
         U32 flags(0);
 
-        if (itemp)
+        if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
         {
-            if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
-                flags |= LLSettingsBase::FLAG_NOMOD;
-            if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
-                flags |= LLSettingsBase::FLAG_NOTRANS;
+            flags |= LLSettingsBase::FLAG_NOMOD;
         }
 
-        LLEnvironment::instance().updateParcel(getParcelId(),
-                                               itemp->getAssetUUID(),
-                                               itemp->getName(),
-                                               track_num,
-                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
-                                               mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
-                                               flags,
-                                               LLEnvironment::altitudes_vect_t(),
-            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+        if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+        {
+            flags |= LLSettingsBase::FLAG_NOTRANS;
+        }
+
+        LLEnvironment::instance().updateParcel
+        (
+            getParcelId(),
+            itemp->getAssetUUID(),
+            itemp->getName(),
+            track_num,
+            mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
+            mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
+            flags,
+            LLEnvironment::altitudes_vect_t(),
+            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo)
+            {
+                onEnvironmentReceived(that_h, parcel_id, envifo);
+            }
+        );
     }
 }
 
@@ -1018,17 +1028,20 @@ void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday)
 {
     LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
     LLEnvironment::instance().updateEnvironment();
+
     if (!newday)
     {
         LL_WARNS("ENVPANEL") << "Editor committed an empty day. Do nothing." << LL_ENDL;
         return;
     }
+
     if (!mCurrentEnvironment)
     {
         // Attempting to save mid update?
         LL_WARNS("ENVPANEL") << "Failed to apply changes from editor! Dirty state: " << mDirtyFlag << " env version: " << mCurEnvVersion << LL_ENDL;
         return;
     }
+
     size_t newhash(newday->getHash());
     size_t oldhash((mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getHash() : 0);
 
@@ -1043,7 +1056,7 @@ void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday)
                                                mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayLength.value() : -1,
                                                mCurrentEnvironment ? (S32)mCurrentEnvironment->mDayOffset.value() : -1,
                                                LLEnvironment::altitudes_vect_t(),
-            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });
+            [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { onEnvironmentReceived(that_h, parcel_id, envifo); });
     }
 }
 
@@ -1080,8 +1093,7 @@ void LLPanelEnvironmentInfo::onEnvironmentChanged(LLEnvironment::EnvSelection_t
     else if ((env == LLEnvironment::ENV_PARCEL)
              && (getParcelId() == LLViewerParcelMgr::instance().getAgentParcelId()))
     {
-        LLParcel *parcel = getParcel();
-        if (parcel)
+        if (LLParcel* parcel = getParcel())
         {
             // first for parcel own settings, second is for case when parcel uses region settings
             if (mCurEnvVersion < new_version
@@ -1143,17 +1155,21 @@ void LLPanelEnvironmentInfo::onEnvironmentReceived(S32 parcel_id, LLEnvironment:
     // todo: we have envifo and parcel env version, should we just setEnvironment() and parcel's property to prevent dupplicate requests?
 }
 
-void LLPanelEnvironmentInfo::_onEnvironmentReceived(LLHandle<LLPanel> that_h, S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo)
+// static
+void LLPanelEnvironmentInfo::onEnvironmentReceived(LLHandle<LLPanel> that_h, S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo)
 {
-    LLPanelEnvironmentInfo *that = (LLPanelEnvironmentInfo *)that_h.get();
-    if (!that)
-        return;
-    that->onEnvironmentReceived(parcel_id, envifo);
+    if (LLPanelEnvironmentInfo* that = (LLPanelEnvironmentInfo*)that_h.get())
+    {
+        that->onEnvironmentReceived(parcel_id, envifo);
+    }
 }
 
 LLSettingsDropTarget::LLSettingsDropTarget(const LLSettingsDropTarget::Params& p)
-    : LLView(p), mEnvironmentInfoPanel(NULL), mDndEnabled(false)
-{}
+    : LLView(p)
+    , mEnvironmentInfoPanel(NULL)
+    , mDndEnabled(false)
+{
+}
 
 bool LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
     EDragAndDropType cargo_type,
@@ -1170,11 +1186,9 @@ bool LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
         switch (cargo_type)
         {
         case DAD_SETTINGS:
-        {
-            LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
-            if (inv_item && mEnvironmentInfoPanel)
+            if (cargo_data && mEnvironmentInfoPanel)
             {
-                LLUUID item_id = inv_item->getUUID();
+                LLUUID item_id = ((LLViewerInventoryItem*)cargo_data)->getUUID();
                 if (gInventory.getItem(item_id))
                 {
                     *accept = ACCEPT_YES_COPY_SINGLE;
@@ -1190,11 +1204,11 @@ bool LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
                 *accept = ACCEPT_NO;
             }
             break;
-        }
         default:
             *accept = ACCEPT_NO;
             break;
         }
     }
+
     return handled;
 }
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index c9b95cc348..e9a42c8962 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -137,7 +137,7 @@ protected:
 
     void                        onPickerAssetDownloaded(LLSettingsBase::ptr_t settings);
     void                        onEnvironmentReceived(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo);
-    static void                 _onEnvironmentReceived(LLHandle<LLPanel> that_h, S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo);
+    static void                 onEnvironmentReceived(LLHandle<LLPanel> that_h, S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo);
 
     virtual bool                isLargeEnough() = 0;
     virtual void                refreshFromSource() = 0;
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index 85f0678c4c..24cf543864 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -348,6 +348,11 @@ void LLFloaterSettingsPicker::onButtonCancel()
 }
 
 void LLFloaterSettingsPicker::onButtonSelect()
+{
+    applySelectedItemAndCloseFloater();
+}
+
+void LLFloaterSettingsPicker::applySelectedItemAndCloseFloater()
 {
     if (mCommitSignal)
     {
@@ -378,14 +383,7 @@ bool LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
                 if (target_rect.pointInRect(x, y))
                 {
                     // Quick-apply
-                    if (mCommitSignal)
-                    {
-                        LLSD res;
-                        res["ItemId"] = mSettingItemID;
-                        res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
-                        (*mCommitSignal)(this, res);
-                    }
-                    closeFloater();
+                    applySelectedItemAndCloseFloater();
                     // hit inside panel on selected item, double click should do nothing
                     result = true;
                 }
@@ -408,14 +406,7 @@ bool LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
         if (item_viewp && item_viewp->getIsCurSelection() && item_viewp->getVisible())
         {
             // Quick-apply
-            if (mCommitSignal)
-            {
-                LLSD res;
-                res["ItemId"] = mSettingItemID;
-                res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
-                (*mCommitSignal)(this, res);
-            }
-            closeFloater();
+            applySelectedItemAndCloseFloater();
             return true;
         }
     }
@@ -466,6 +457,9 @@ void LLFloaterSettingsPicker::setSettingsItemId(const LLUUID &settings_id, bool
 
 LLInventoryItem* LLFloaterSettingsPicker::findItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library)
 {
+    if (asset_id.isNull())
+        return nullptr;
+
     LLViewerInventoryCategory::cat_array_t cats;
     LLViewerInventoryItem::item_array_t items;
     LLAssetIDMatches asset_id_matches(asset_id);
diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h
index 29827dfb94..e5b1e15899 100644
--- a/indra/newview/llsettingspicker.h
+++ b/indra/newview/llsettingspicker.h
@@ -111,6 +111,7 @@ private:
     bool                    handleKeyHere(KEY key, MASK mask) override;
     void                    onFocusLost() override;
 
+    void applySelectedItemAndCloseFloater();
 
     LLHandle<LLView>        mOwnerHandle;
     LLUUID                  mSettingItemID;
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 5152570786..e05b6f3736 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -1387,9 +1387,12 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone() const
 
     LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(settings);
 
-    U32 flags = getFlags();
-    if (flags)
+    dayp->setName(getName());
+
+    if (U32 flags = getFlags())
+    {
         dayp->setFlags(flags);
+    }
 
     dayp->initialize();
     return dayp;
-- 
cgit v1.2.3


From 400c21213acb050b653247f295975b9ab35b62ad Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Fri, 30 Aug 2024 00:48:02 +0200
Subject: #2454 Scrolling by the mouse wheel does not scroll up on the unopened
 Destination field

---
 indra/llui/llcombobox.cpp       | 90 ++++++++++++++++++++++++++++++++++++-----
 indra/llui/llcombobox.h         |  5 ++-
 indra/llui/llscrolllistctrl.cpp | 22 +++++-----
 3 files changed, 93 insertions(+), 24 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index ee1700e009..6e2af4c853 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -498,9 +498,9 @@ void LLComboBox::setButtonVisible(bool visible)
     }
 }
 
-bool LLComboBox::setCurrentByIndex( S32 index )
+bool LLComboBox::setCurrentByIndex(S32 index)
 {
-    bool found = mList->selectNthItem( index );
+    bool found = mList->selectNthItem(index);
     if (found)
     {
         setLabel(getSelectedItemLabel());
@@ -511,14 +511,53 @@ bool LLComboBox::setCurrentByIndex( S32 index )
 
 S32 LLComboBox::getCurrentIndex() const
 {
-    LLScrollListItem* item = mList->getFirstSelected();
-    if( item )
+    if (LLScrollListItem* item = mList->getFirstSelected())
     {
-        return mList->getItemIndex( item );
+        return mList->getItemIndex(item);
     }
     return -1;
 }
 
+bool LLComboBox::selectNextItem()
+{
+    S32 last_index = getItemCount() - 1;
+    if (last_index < 0)
+        return false;
+
+    S32 current_index = getCurrentIndex();
+    if (current_index >= last_index)
+        return false;
+
+    S32 new_index = llmax(current_index, -1);
+    while (++new_index <= last_index)
+    {
+        if (setCurrentByIndex(new_index))
+            return true;
+    }
+
+    return false;
+}
+
+bool LLComboBox::selectPrevItem()
+{
+    S32 last_index = getItemCount() - 1;
+    if (last_index < 0)
+        return false;
+
+    S32 current_index = getCurrentIndex();
+    if (!current_index)
+        return false;
+
+    S32 new_index = current_index > 0 ? current_index : last_index + 1;
+    while (--new_index >= 0)
+    {
+        if (setCurrentByIndex(new_index))
+            return true;
+    }
+
+    return false;
+}
+
 void LLComboBox::setEnabledByValue(const LLSD& value, bool enabled)
 {
     LLScrollListItem *found = mList->getItem(value);
@@ -878,15 +917,46 @@ bool LLComboBox::handleUnicodeCharHere(llwchar uni_char)
 // virtual
 bool LLComboBox::handleScrollWheel(S32 x, S32 y, S32 clicks)
 {
-    if (mList->getVisible()) return mList->handleScrollWheel(x, y, clicks);
+    if (mList->getVisible())
+    {
+        return mList->handleScrollWheel(x, y, clicks);
+    }
+
     if (mAllowTextEntry) // We might be editable
+    {
         if (!mList->getFirstSelected()) // We aren't in the list, don't kill their text
+        {
             return false;
+        }
+    }
 
-    setCurrentByIndex(llclamp(getCurrentIndex() + clicks, 0, getItemCount() - 1));
-    prearrangeList();
-    onCommit();
-    return true;
+    S32 current_index = getCurrentIndex();
+    if (clicks > 0)
+    {
+        for (S32 i = 0; i < clicks; ++i)
+        {
+            if (!selectNextItem())
+                break;
+        }
+    }
+    else
+    {
+        for (S32 i = 0; i < -clicks; ++i)
+        {
+            if (!selectPrevItem())
+                break;
+        }
+    }
+    S32 new_index = getCurrentIndex();
+
+    if (new_index != current_index)
+    {
+        prearrangeList();
+        onCommit();
+        return true;
+    }
+
+    return false;
 }
 
 void LLComboBox::setTextEntry(const LLStringExplicit& text)
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 9dc6fa9257..8be3eb57e4 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -163,9 +163,12 @@ public:
 
     bool            remove(const std::string& name);    // remove item "name", return true if found and removed
 
-    bool            setCurrentByIndex( S32 index );
+    bool            setCurrentByIndex(S32 index);
     S32             getCurrentIndex() const;
 
+    bool            selectNextItem();
+    bool            selectPrevItem();
+
     void            setEnabledByValue(const LLSD& value, bool enabled);
 
     void            createLineEditor(const Params&);
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index e711a6ed1b..5ae133a075 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -889,13 +889,13 @@ bool LLScrollListCtrl::selectFirstItem()
 
 // Deselects all other items
 // virtual
-bool LLScrollListCtrl::selectNthItem( S32 target_index )
+bool LLScrollListCtrl::selectNthItem(S32 target_index)
 {
     return selectItemRange(target_index, target_index);
 }
 
 // virtual
-bool LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
+bool LLScrollListCtrl::selectItemRange(S32 first_index, S32 last_index)
 {
     if (mItemList.empty())
     {
@@ -905,28 +905,24 @@ bool LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index )
     // make sure sort is up to date
     updateSort();
 
-    S32 listlen = (S32)mItemList.size();
-    first_index = llclamp(first_index, 0, listlen-1);
-
-    if (last_index < 0)
-        last_index = listlen-1;
-    else
-        last_index = llclamp(last_index, first_index, listlen-1);
+    S32 bottom = (S32)mItemList.size() - 1;
+    first_index = llclamp(first_index, 0, bottom);
+    last_index = last_index < 0 ? bottom : llclamp(last_index, first_index, bottom);
 
     bool success = false;
     S32 index = 0;
     for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); )
     {
         LLScrollListItem *itemp = *iter;
-        if(!itemp)
+        if (!itemp)
         {
             iter = mItemList.erase(iter);
-            continue ;
+            continue;
         }
 
-        if( index >= first_index && index <= last_index )
+        if (index >= first_index && index <= last_index)
         {
-            if( itemp->getEnabled() )
+            if (itemp->getEnabled())
             {
                 // TODO: support range selection for cells
                 selectItem(itemp, -1, false);
-- 
cgit v1.2.3


From 89a45ef1cba9969b844d82da6ff2a751a5c35ef1 Mon Sep 17 00:00:00 2001
From: Ansariel Hiller <Ansariel@users.noreply.github.com>
Date: Fri, 30 Aug 2024 19:17:36 +0200
Subject: Fix background folder fetch pushing requests to wrong queue (#2436)

---
 indra/newview/llinventorymodelbackgroundfetch.cpp | 78 +++++++++++------------
 1 file changed, 39 insertions(+), 39 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 9cb94b313e..8a0dd2c0a9 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -201,7 +201,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch():
 
 LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()
 {
-    gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+    gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
 }
 
 bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const
@@ -241,7 +241,7 @@ bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() const
 
 bool LLInventoryModelBackgroundFetch::inventoryFetchInProgress() const
 {
-    return inventoryFetchStarted() && ! inventoryFetchCompleted();
+    return inventoryFetchStarted() && !inventoryFetchCompleted();
 }
 
 bool LLInventoryModelBackgroundFetch::isEverythingFetched() const
@@ -254,35 +254,35 @@ bool LLInventoryModelBackgroundFetch::folderFetchActive() const
     return mFolderFetchActive;
 }
 
-void LLInventoryModelBackgroundFetch::addRequestAtFront(const LLUUID & id, bool recursive, bool is_category)
+void LLInventoryModelBackgroundFetch::addRequestAtFront(const LLUUID& id, bool recursive, bool is_category)
 {
     EFetchType recursion_type = recursive ? FT_RECURSIVE : FT_DEFAULT;
     if (is_category)
     {
-        mFetchFolderQueue.push_front(FetchQueueInfo(id, recursion_type, is_category));
+        mFetchFolderQueue.emplace_front(id, recursion_type, is_category);
     }
     else
     {
-        mFetchItemQueue.push_front(FetchQueueInfo(id, recursion_type, is_category));
+        mFetchItemQueue.emplace_front(id, recursion_type, is_category);
     }
 }
 
-void LLInventoryModelBackgroundFetch::addRequestAtBack(const LLUUID & id, bool recursive, bool is_category)
+void LLInventoryModelBackgroundFetch::addRequestAtBack(const LLUUID& id, bool recursive, bool is_category)
 {
     EFetchType recursion_type = recursive ? FT_RECURSIVE : FT_DEFAULT;
     if (is_category)
     {
-        mFetchFolderQueue.push_back(FetchQueueInfo(id, recursion_type, is_category));
+        mFetchFolderQueue.emplace_back(id, recursion_type, is_category);
     }
     else
     {
-        mFetchItemQueue.push_back(FetchQueueInfo(id, recursion_type, is_category));
+        mFetchItemQueue.emplace_back(id, recursion_type, is_category);
     }
 }
 
 void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
 {
-    LLViewerInventoryCategory * cat(gInventory.getCategory(id));
+    LLViewerInventoryCategory* cat(gInventory.getCategory(id));
 
     if (cat || (id.isNull() && ! isEverythingFetched()))
     {
@@ -294,7 +294,7 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
         EFetchType recursion_type = recursive ? FT_RECURSIVE : FT_DEFAULT;
         if (id.isNull())
         {
-            if (! mRecursiveInventoryFetchStarted)
+            if (!mRecursiveInventoryFetchStarted)
             {
                 mRecursiveInventoryFetchStarted |= recursive;
                 if (recursive && AISAPI::isAvailable())
@@ -302,19 +302,19 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
                     // Not only root folder can be massive, but
                     // most system folders will be requested independently
                     // so request root folder and content separately
-                    mFetchFolderQueue.push_front(FetchQueueInfo(gInventory.getRootFolderID(), FT_FOLDER_AND_CONTENT));
+                    mFetchFolderQueue.emplace_front(gInventory.getRootFolderID(), FT_FOLDER_AND_CONTENT);
                 }
                 else
                 {
-                    mFetchFolderQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursion_type));
+                    mFetchFolderQueue.emplace_back(gInventory.getRootFolderID(), recursion_type);
                 }
-                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
             }
-            if (! mRecursiveLibraryFetchStarted)
+            if (!mRecursiveLibraryFetchStarted)
             {
                 mRecursiveLibraryFetchStarted |= recursive;
-                mFetchFolderQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursion_type));
-                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                mFetchFolderQueue.emplace_back(gInventory.getLibraryRootFolderID(), recursion_type);
+                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
             }
         }
         else if (recursive && cat && cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
@@ -324,13 +324,13 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
                 if (recursive && AISAPI::isAvailable())
                 {
                     // Request marketplace folder and content separately
-                    mFetchFolderQueue.push_front(FetchQueueInfo(id, FT_FOLDER_AND_CONTENT));
+                    mFetchFolderQueue.emplace_front(id, FT_FOLDER_AND_CONTENT);
                 }
                 else
                 {
-                    mFetchFolderQueue.push_front(FetchQueueInfo(id, recursion_type));
+                    mFetchFolderQueue.emplace_front(id, recursion_type);
                 }
-                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
                 mRecursiveMarketplaceFetchStarted = true;
             }
         }
@@ -342,15 +342,15 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
                 {
                     // On AIS make sure root goes to the top and follow up recursive
                     // fetches, not individual requests
-                    mFetchFolderQueue.push_back(FetchQueueInfo(id, recursion_type));
-                    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                    mFetchFolderQueue.emplace_back(id, recursion_type);
+                    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
                 }
             }
             else if (mFetchFolderQueue.empty() || mFetchFolderQueue.front().mUUID != id)
             {
-                    // Specific folder requests go to front of queue.
-                    mFetchFolderQueue.push_front(FetchQueueInfo(id, recursion_type));
-                    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                // Specific folder requests go to front of queue.
+                mFetchFolderQueue.emplace_front(id, recursion_type);
+                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
             }
 
             if (id == gInventory.getLibraryRootFolderID())
@@ -363,9 +363,9 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
             }
         }
     }
-    else if (LLViewerInventoryItem * itemp = gInventory.getItem(id))
+    else if (LLViewerInventoryItem* itemp = gInventory.getItem(id))
     {
-        if (! itemp->mIsComplete)
+        if (!itemp->mIsComplete)
         {
             scheduleItemFetch(id);
         }
@@ -384,18 +384,18 @@ void LLInventoryModelBackgroundFetch::scheduleFolderFetch(const LLUUID& cat_id,
             // check if already requested
             if (mForceFetchSet.find(cat_id) == mForceFetchSet.end())
             {
-                mForceFetchSet.insert(cat_id);
-                mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_FORCED));
+                mForceFetchSet.emplace(cat_id);
+                mFetchFolderQueue.emplace_front(cat_id, FT_FORCED);
             }
         }
         else
         {
             // Specific folder requests go to front of queue.
             // version presence acts as dupplicate prevention for normal fetches
-            mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_DEFAULT));
+            mFetchFolderQueue.emplace_front(cat_id, FT_DEFAULT);
         }
 
-        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
     }
 }
 
@@ -409,17 +409,17 @@ void LLInventoryModelBackgroundFetch::scheduleItemFetch(const LLUUID& item_id, b
             // check if already requested
             if (mForceFetchSet.find(item_id) == mForceFetchSet.end())
             {
-                mForceFetchSet.insert(item_id);
-                mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_FORCED, false));
+                mForceFetchSet.emplace(item_id);
+                mFetchItemQueue.emplace_front(item_id, FT_FORCED, false);
             }
         }
         else
         {
             // 'isFinished' being set acts as dupplicate prevention for normal fetches
-            mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_DEFAULT, false));
+            mFetchItemQueue.emplace_front(item_id, FT_DEFAULT, false);
         }
 
-        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
     }
 }
 
@@ -432,7 +432,7 @@ void LLInventoryModelBackgroundFetch::fetchFolderAndLinks(const LLUUID& cat_id,
         cat->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE);
     }
     incrFetchFolderCount(1);
-    mExpectedFolderIds.push_back(cat_id);
+    mExpectedFolderIds.emplace_back(cat_id);
 
     // Assume that we have no relevant cache. Fetch folder, and items folder's links point to.
     AISAPI::FetchCategoryLinks(cat_id,
@@ -462,7 +462,7 @@ void LLInventoryModelBackgroundFetch::fetchCOF(nullary_func_t callback)
         cat->setFetching(LLViewerInventoryCategory::FETCH_RECURSIVE);
     }
     incrFetchFolderCount(1);
-    mExpectedFolderIds.push_back(cat_id);
+    mExpectedFolderIds.emplace_back(cat_id);
     // For reliability assume that we have no relevant cache, so
     // fetch cof along with items cof's links point to.
     AISAPI::FetchCOF([callback](const LLUUID& id)
@@ -475,15 +475,15 @@ void LLInventoryModelBackgroundFetch::fetchCOF(nullary_func_t callback)
     // start idle loop to track completion
     mBackgroundFetchActive = true;
     mFolderFetchActive = true;
-    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
 }
 
 void LLInventoryModelBackgroundFetch::findLostItems()
 {
     mBackgroundFetchActive = true;
     mFolderFetchActive = true;
-    mFetchFolderQueue.push_back(FetchQueueInfo(LLUUID::null, FT_RECURSIVE));
-    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+    mFetchFolderQueue.emplace_back(LLUUID::null, FT_RECURSIVE);
+    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
 }
 
 void LLInventoryModelBackgroundFetch::setAllFoldersFetched()
-- 
cgit v1.2.3


From 9004cf64bf5066a778eea39a4ab48623b04c6d42 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Fri, 30 Aug 2024 10:57:44 -0700
Subject: secondlife/viewer#2448: Fix crash rendering rigged PBR prims

---
 indra/newview/lldrawpoolpbropaque.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp
index 4ea23412e6..07f8ccb549 100644
--- a/indra/newview/lldrawpoolpbropaque.cpp
+++ b/indra/newview/lldrawpoolpbropaque.cpp
@@ -62,8 +62,9 @@ void LLDrawPoolGLTFPBR::renderDeferred(S32 pass)
     gDeferredPBROpaqueProgram.bind();
     pushGLTFBatches(mRenderType);
 
-    gDeferredPBROpaqueProgram.bind(true);
     LL::GLTFSceneManager::instance().render(true, true);
+
+    gDeferredPBROpaqueProgram.bind(true);
     pushRiggedGLTFBatches(mRenderType + 1);
 }
 
-- 
cgit v1.2.3


From 5b832291a8ea1f100e2caaffef3d162dd96bee50 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@lindenlab.com>
Date: Fri, 30 Aug 2024 12:49:05 -0700
Subject: Introduce Khronos Neutral tonemapper as new default along with debug
 options to control tonemap mix (#2464) (#2468)

---
 indra/newview/app_settings/settings.xml            | 22 +++++++++
 .../class1/deferred/postDeferredGammaCorrect.glsl  |  2 -
 .../class1/deferred/postDeferredTonemap.glsl       | 52 +++++++++++++++++-----
 indra/newview/pipeline.cpp                         | 10 ++++-
 4 files changed, 70 insertions(+), 16 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d2c3c96317..a52d21edb5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9832,6 +9832,28 @@
         <key>Value</key>
         <real>0.4</real>
     </map>
+    <key>RenderTonemapMix</key>
+    <map>
+        <key>Comment</key>
+        <string>Mix between linear and tonemapped colors (0.0(Linear) - 1.0(Tonemapped)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>F32</string>
+        <key>Value</key>
+        <real>1.0</real>
+    </map>
+    <key>RenderTonemapType</key>
+    <map>
+        <key>Comment</key>
+        <string>What tonemapper to use: 0 = Khronos Neutral, 1 = ACES</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>U32</string>
+        <key>Value</key>
+        <integer>0</integer>
+    </map>
     <key>ReplaySession</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index 0673159ab7..befd2ae6da 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -29,9 +29,7 @@ out vec4 frag_color;
 
 uniform sampler2D diffuseRect;
 
-uniform float exposure;
 uniform float gamma;
-uniform float aces_mix;
 uniform vec2 screen_res;
 in vec2 vary_fragcoord;
 
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl
index c16ab2f9c4..fc6d4d7727 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl
@@ -95,9 +95,33 @@ vec3 toneMapACES_Hill(vec3 color)
     return color;
 }
 
+// Khronos Neutral tonemapping
+// https://github.com/KhronosGroup/ToneMapping/tree/main
+// Input color is non-negative and resides in the Linear Rec. 709 color space.
+// Output color is also Linear Rec. 709, but in the [0, 1] range.
+vec3 PBRNeutralToneMapping( vec3 color )
+{
+  const float startCompression = 0.8 - 0.04;
+  const float desaturation = 0.15;
+
+  float x = min(color.r, min(color.g, color.b));
+  float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
+  color -= offset;
+
+  float peak = max(color.r, max(color.g, color.b));
+  if (peak < startCompression) return color;
+
+  const float d = 1. - startCompression;
+  float newPeak = 1. - d * d / (peak + d - startCompression);
+  color *= newPeak / peak;
+
+  float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);
+  return mix(color, newPeak * vec3(1, 1, 1), g);
+}
+
 uniform float exposure;
-uniform float gamma;
-uniform float aces_mix;
+uniform float tonemap_mix;
+uniform int tonemap_type;
 
 vec3 toneMap(vec3 color)
 {
@@ -106,8 +130,20 @@ vec3 toneMap(vec3 color)
 
     color *= exposure * exp_scale;
 
-    // mix ACES and Linear here as a compromise to avoid over-darkening legacy content
-    color = mix(toneMapACES_Hill(color), color, aces_mix);
+    vec3 clamped_color = clamp(color.rgb, vec3(0.0), vec3(1.0));
+
+    switch(tonemap_type)
+    {
+    case 0:
+        color = PBRNeutralToneMapping(color);
+        break;
+    case 1:
+        color = toneMapACES_Hill(color);
+        break;
+    }
+
+    // mix tonemapped and linear here to provide adjustment
+    color = mix(clamped_color, color, tonemap_mix);
 #endif
 
     return color;
@@ -125,14 +161,6 @@ void debugExposure(inout vec3 color)
     }
 }
 
-vec3 legacyGamma(vec3 color)
-{
-    vec3 c = 1. - clamp(color, vec3(0.), vec3(1.));
-    c = 1. - pow(c, vec3(gamma)); // s/b inverted already CPU-side
-
-    return c;
-}
-
 void main()
 {
     //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 91ade0eef1..3b1da8668b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7087,10 +7087,16 @@ void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst)
         F32 e = llclamp(exposure(), 0.5f, 4.f);
 
         static LLStaticHashedString s_exposure("exposure");
-        static LLStaticHashedString aces_mix("aces_mix");
+        static LLStaticHashedString tonemap_mix("tonemap_mix");
+        static LLStaticHashedString tonemap_type("tonemap_type");
 
         shader.uniform1f(s_exposure, e);
-        shader.uniform1f(aces_mix, gEXRImage.notNull() ? 0.f : 0.3f);
+
+        static LLCachedControl<U32> tonemap_type_setting(gSavedSettings, "RenderTonemapType", 0U);
+        shader.uniform1i(tonemap_type, tonemap_type_setting);
+
+        static LLCachedControl<F32> tonemap_mix_setting(gSavedSettings, "RenderTonemapMix", 1.f);
+        shader.uniform1f(tonemap_mix, tonemap_mix_setting);
 
         mScreenTriangleVB->setBuffer();
         mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);
-- 
cgit v1.2.3


From 7c9c142a55f46351e9bc3dace9c2753fee6ed3c9 Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Sun, 1 Sep 2024 11:05:48 -0700
Subject: Restore old error handling early out logic in LLAppViewer::init()
 (#2475)

fixes secondlife/viewer#2474
---
 indra/newview/llappviewer.cpp | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index afa701c5f2..4eb4f5ae20 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -747,7 +747,9 @@ bool LLAppViewer::init()
     // inits from settings.xml and from strings.xml
     if (!initConfiguration())
     {
-        LL_ERRS("InitInfo") << "initConfiguration() failed." << LL_ENDL;
+        LL_WARNS("InitInfo") << "initConfiguration() failed." << LL_ENDL;
+        // quit immediately
+        return false;
     }
 
     LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
@@ -914,7 +916,9 @@ bool LLAppViewer::init()
     if (!initHardwareTest())
     {
         // Early out from user choice.
-        LL_ERRS("InitInfo") << "initHardwareTest() failed." << LL_ENDL;
+        LL_WARNS("InitInfo") << "initHardwareTest() failed." << LL_ENDL;
+        // quit immediately
+        return false;
     }
     LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ;
 
@@ -930,7 +934,9 @@ bool LLAppViewer::init()
     {
         std::string msg = LLTrans::getString("MBUnableToAccessFile");
         OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK);
-        LL_ERRS("InitInfo") << "Failed to init cache" << LL_ENDL;
+        LL_WARNS("InitInfo") << "Failed to init cache" << LL_ENDL;
+        // quit immediately
+        return false;
     }
     LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ;
 
@@ -963,7 +969,9 @@ bool LLAppViewer::init()
     if (!gGLManager.mHasRequirements)
     {
         // Already handled with a MBVideoDrvErr
-        LL_ERRS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL;
+        LL_WARNS("InitInfo") << "gGLManager.mHasRequirements is false." << LL_ENDL;
+        // quit immediately
+        return false;
     }
 
     // Without SSE2 support we will crash almost immediately, warn here.
@@ -973,7 +981,9 @@ bool LLAppViewer::init()
         // all hell breaks lose.
         std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
         OSMessageBox(msg.c_str(), LLStringUtil::null, OSMB_OK);
-        LL_ERRS("InitInfo") << "SSE2 is not supported" << LL_ENDL;
+        LL_WARNS("InitInfo") << "SSE2 is not supported" << LL_ENDL;
+        // quit immediately
+        return false;
     }
 
     // alert the user if they are using unsupported hardware
@@ -3969,7 +3979,6 @@ void LLAppViewer::forceQuit()
     LLApp::setQuitting();
 }
 
-//TODO: remove
 void LLAppViewer::fastQuit(S32 error_code)
 {
     // finish pending transfers
-- 
cgit v1.2.3


From 12d60b3d9b15adc1d6a04eaacd65c71829b73c38 Mon Sep 17 00:00:00 2001
From: TJ <tj8@live.com.au>
Date: Tue, 3 Sep 2024 05:51:58 +1000
Subject: More styling fixes and other minor inconsistency fixes in
 inventorymodelbackgroundfetch code. (#2476)

---
 indra/newview/llinventorymodelbackgroundfetch.cpp | 162 +++++++++++-----------
 indra/newview/llinventorymodelbackgroundfetch.h   |  10 +-
 2 files changed, 86 insertions(+), 86 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 8a0dd2c0a9..d8e6bf380e 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -113,7 +113,7 @@ class BGItemHttpHandler : public LLInventoryModel::FetchItemHttpHandler
     LOG_CLASS(BGItemHttpHandler);
 
 public:
-    BGItemHttpHandler(const LLSD & request_sd)
+    BGItemHttpHandler(const LLSD& request_sd)
         : LLInventoryModel::FetchItemHttpHandler(request_sd)
         {
             LLInventoryModelBackgroundFetch::instance().incrFetchCount(1);
@@ -125,8 +125,8 @@ public:
         }
 
 protected:
-    BGItemHttpHandler(const BGItemHttpHandler &);               // Not defined
-    void operator=(const BGItemHttpHandler &);                  // Not defined
+    BGItemHttpHandler(const BGItemHttpHandler&);               // Not defined
+    void operator=(const BGItemHttpHandler&);                  // Not defined
 };
 
 
@@ -144,7 +144,7 @@ class BGFolderHttpHandler : public LLCore::HttpHandler
     LOG_CLASS(BGFolderHttpHandler);
 
 public:
-    BGFolderHttpHandler(const LLSD & request_sd, const uuid_vec_t & recursive_cats)
+    BGFolderHttpHandler(const LLSD& request_sd, const uuid_vec_t& recursive_cats)
         : LLCore::HttpHandler(),
           mRequestSD(request_sd),
           mRecursiveCatUUIDs(recursive_cats)
@@ -158,18 +158,18 @@ public:
         }
 
 protected:
-    BGFolderHttpHandler(const BGFolderHttpHandler &);           // Not defined
-    void operator=(const BGFolderHttpHandler &);                // Not defined
+    BGFolderHttpHandler(const BGFolderHttpHandler&);           // Not defined
+    void operator=(const BGFolderHttpHandler&);                // Not defined
 
 public:
-    virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
+    virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response);
 
-    bool getIsRecursive(const LLUUID & cat_id) const;
+    bool getIsRecursive(const LLUUID& cat_id) const;
 
 private:
-    void processData(LLSD & body, LLCore::HttpResponse * response);
-    void processFailure(LLCore::HttpStatus status, LLCore::HttpResponse * response);
-    void processFailure(const char * const reason, LLCore::HttpResponse * response);
+    void processData(LLSD& body, LLCore::HttpResponse* response);
+    void processFailure(LLCore::HttpStatus status, LLCore::HttpResponse* response);
+    void processFailure(const char* const reason, LLCore::HttpResponse* response);
 
 private:
     LLSD mRequestSD;
@@ -177,7 +177,7 @@ private:
 };
 
 
-const char * const LOG_INV("Inventory");
+const char* const LOG_INV("Inventory");
 
 } // end of namespace anonymous
 
@@ -391,7 +391,7 @@ void LLInventoryModelBackgroundFetch::scheduleFolderFetch(const LLUUID& cat_id,
         else
         {
             // Specific folder requests go to front of queue.
-            // version presence acts as dupplicate prevention for normal fetches
+            // version presence acts as duplicate prevention for normal fetches
             mFetchFolderQueue.emplace_front(cat_id, FT_DEFAULT);
         }
 
@@ -415,7 +415,7 @@ void LLInventoryModelBackgroundFetch::scheduleItemFetch(const LLUUID& item_id, b
         }
         else
         {
-            // 'isFinished' being set acts as dupplicate prevention for normal fetches
+            // 'isFinished' being set acts as duplicate prevention for normal fetches
             mFetchItemQueue.emplace_front(item_id, FT_DEFAULT, false);
         }
 
@@ -449,7 +449,7 @@ void LLInventoryModelBackgroundFetch::fetchFolderAndLinks(const LLUUID& cat_id,
     // start idle loop to track completion
     mBackgroundFetchActive = true;
     mFolderFetchActive = true;
-    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+    gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
 }
 
 void LLInventoryModelBackgroundFetch::fetchCOF(nullary_func_t callback)
@@ -513,7 +513,7 @@ boost::signals2::connection LLInventoryModelBackgroundFetch::setFetchCompletionC
     return mFoldersFetchedSignal.connect(cb);
 }
 
-void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *)
+void LLInventoryModelBackgroundFetch::backgroundFetchCB(void*)
 {
     LLInventoryModelBackgroundFetch::instance().backgroundFetch();
 }
@@ -566,7 +566,7 @@ void LLInventoryModelBackgroundFetch::onAISContentCalback(
     const LLUUID& response_id,
     EFetchType fetch_type)
 {
-    // Don't push_front on failure - there is a chance it was fired from inside bulkFetchViaAis
+    // Don't emplace_front on failure - there is a chance it was fired from inside bulkFetchViaAis
     incrFetchFolderCount(-1);
 
     uuid_vec_t::const_iterator folder_iter = content_ids.begin();
@@ -587,7 +587,7 @@ void LLInventoryModelBackgroundFetch::onAISContentCalback(
         if (response_id.isNull())
         {
             // Failed to fetch, get it individually
-            mFetchFolderQueue.push_back(FetchQueueInfo(*folder_iter, FT_RECURSIVE));
+            mFetchFolderQueue.emplace_back(*folder_iter, FT_RECURSIVE);
         }
         else
         {
@@ -601,7 +601,7 @@ void LLInventoryModelBackgroundFetch::onAISContentCalback(
                      it != categories->end();
                      ++it)
                 {
-                    mFetchFolderQueue.push_back(FetchQueueInfo((*it)->getUUID(), FT_RECURSIVE));
+                    mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE);
                 }
             }
         }
@@ -613,12 +613,12 @@ void LLInventoryModelBackgroundFetch::onAISContentCalback(
     {
         mBackgroundFetchActive = true;
         mFolderFetchActive = true;
-        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
     }
 }
-void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_id, const LLUUID &response_id, EFetchType fetch_type)
+void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID& request_id, const LLUUID& response_id, EFetchType fetch_type)
 {
-    // Don't push_front on failure - there is a chance it was fired from inside bulkFetchViaAis
+    // Don't emplace_front on failure - there is a chance it was fired from inside bulkFetchViaAis
     incrFetchFolderCount(-1);
     std::list<LLUUID>::const_iterator found = std::find(mExpectedFolderIds.begin(), mExpectedFolderIds.end(), request_id);
     if (found != mExpectedFolderIds.end())
@@ -634,7 +634,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
 
     if (request_id.isNull())
     {
-        // orhans, no other actions needed
+        // orphans, no other actions needed
         return;
     }
 
@@ -647,12 +647,12 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
         {
             // A full recursive request failed.
             // Try requesting folder and nested content separately
-            mFetchFolderQueue.push_back(FetchQueueInfo(request_id, FT_FOLDER_AND_CONTENT));
+            mFetchFolderQueue.emplace_back(request_id, FT_FOLDER_AND_CONTENT);
         }
         else if (fetch_type == FT_FOLDER_AND_CONTENT)
         {
             LL_WARNS() << "Failed to download folder: " << request_id << " Requesting known content separately" << LL_ENDL;
-            mFetchFolderQueue.push_back(FetchQueueInfo(request_id, FT_CONTENT_RECURSIVE));
+            mFetchFolderQueue.emplace_back(request_id, FT_CONTENT_RECURSIVE);
 
             // set folder's version to prevent viewer from trying to request folder indefinetely
             LLViewerInventoryCategory* cat(gInventory.getCategory(request_id));
@@ -670,15 +670,15 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
         {
             // Got the folder and content, now verify content
             // Request content even for FT_RECURSIVE in case of changes, failures
-            // or if depth limit gets imlemented.
+            // or if depth limit gets implemented.
             // This shouldn't redownload folders if they already have version
             request_descendants = true;
             LL_DEBUGS(LOG_INV, "AIS3") << "Got folder " << request_id << ". Requesting content" << LL_ENDL;
         }
         else if (fetch_type == FT_FOLDER_AND_CONTENT)
         {
-            // readd folder for content request
-            mFetchFolderQueue.push_front(FetchQueueInfo(request_id, FT_CONTENT_RECURSIVE));
+            // read folder for content request
+            mFetchFolderQueue.emplace_front(request_id, FT_CONTENT_RECURSIVE);
         }
         else
         {
@@ -698,7 +698,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
                  it != categories->end();
                  ++it)
             {
-                mFetchFolderQueue.push_back(FetchQueueInfo((*it)->getUUID(), FT_RECURSIVE));
+                mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE);
             }
         }
     }
@@ -707,11 +707,11 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
     {
         mBackgroundFetchActive = true;
         mFolderFetchActive = true;
-        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+        gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, nullptr);
     }
 
     // done
-    LLViewerInventoryCategory * cat(gInventory.getCategory(request_id));
+    LLViewerInventoryCategory* cat(gInventory.getCategory(request_id));
     if (cat)
     {
         cat->setFetching(new_state);
@@ -749,7 +749,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
 
     while (!mFetchFolderQueue.empty() && (U32)mFetchCount < max_concurrent_fetches && curent_time < end_time)
     {
-        const FetchQueueInfo & fetch_info(mFetchFolderQueue.front());
+        const FetchQueueInfo& fetch_info(mFetchFolderQueue.front());
         bulkFetchViaAis(fetch_info);
         mFetchFolderQueue.pop_front();
         curent_time = LLTimer::getTotalSeconds();
@@ -757,7 +757,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
 
     // Ideally we shouldn't fetch items if recursive fetch isn't done,
     // but there is a chance some request will start timeouting and recursive
-    // fetch will get stuck on a signle folder, don't block item fetch in such case
+    // fetch will get stuck on a single folder, don't block item fetch in such case
     while (!mFetchItemQueue.empty() && (U32)mFetchCount < max_concurrent_fetches && curent_time < end_time)
     {
         const FetchQueueInfo& fetch_info(mFetchItemQueue.front());
@@ -815,7 +815,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
             const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
             if (marketplacelistings_id.notNull())
             {
-                mFetchFolderQueue.push_front(FetchQueueInfo(marketplacelistings_id, FT_FOLDER_AND_CONTENT));
+                mFetchFolderQueue.emplace_front(marketplacelistings_id, FT_FOLDER_AND_CONTENT);
             }
             else
             {
@@ -835,11 +835,11 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
 {
     if (fetch_info.mIsCategory)
     {
-        const LLUUID & cat_id(fetch_info.mUUID);
+        const LLUUID& cat_id(fetch_info.mUUID);
         if (cat_id.isNull())
         {
             incrFetchFolderCount(1);
-            mExpectedFolderIds.push_back(cat_id);
+            mExpectedFolderIds.emplace_back(cat_id);
             // Lost and found
             // Should it actually be recursive?
             AISAPI::FetchOrphans([](const LLUUID& response_id)
@@ -851,7 +851,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
         }
         else
         {
-            LLViewerInventoryCategory * cat(gInventory.getCategory(cat_id));
+            LLViewerInventoryCategory* cat(gInventory.getCategory(cat_id));
             if (cat)
             {
                 if (fetch_info.mFetchType == FT_CONTENT_RECURSIVE)
@@ -886,8 +886,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                             continue;
                         }
 
-                        children.push_back(child_cat->getUUID());
-                        mExpectedFolderIds.push_back(child_cat->getUUID());
+                        children.emplace_back(child_cat->getUUID());
+                        mExpectedFolderIds.emplace_back(child_cat->getUUID());
                         child_cat->setFetching(target_state);
 
                         if (children.size() >= batch_limit)
@@ -921,7 +921,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                     if (content_done)
                     {
                         // This will have a bit of overlap with onAISContentCalback,
-                        // but something else might have dowloaded folders, so verify
+                        // but something else might have downloaded folders, so verify
                         // every child that is complete has it's children done as well
                         for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
                              it != categories->end();
@@ -930,14 +930,14 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                             LLViewerInventoryCategory* child_cat = (*it);
                             if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion())
                             {
-                                mFetchFolderQueue.push_back(FetchQueueInfo(child_cat->getUUID(), FT_RECURSIVE));
+                                mFetchFolderQueue.emplace_back(child_cat->getUUID(), FT_RECURSIVE);
                             }
                         }
                     }
                     else
                     {
                         // send it back to get the rest
-                        mFetchFolderQueue.push_back(FetchQueueInfo(cat_id, FT_CONTENT_RECURSIVE));
+                        mFetchFolderQueue.emplace_back(cat_id, FT_CONTENT_RECURSIVE);
                     }
                 }
                 else if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()
@@ -954,7 +954,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                         // increment before call in case of immediate callback
                         incrFetchFolderCount(1);
                         cat->setFetching(target_state);
-                        mExpectedFolderIds.push_back(cat_id);
+                        mExpectedFolderIds.emplace_back(cat_id);
 
                         EFetchType type = fetch_info.mFetchType;
                         LLUUID cat_cb_id = cat_id;
@@ -978,15 +978,15 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                     if (fetch_info.mFetchType == FT_RECURSIVE
                         || fetch_info.mFetchType == FT_FOLDER_AND_CONTENT)
                     {
-                        LLInventoryModel::cat_array_t * categories(NULL);
-                        LLInventoryModel::item_array_t * items(NULL);
+                        LLInventoryModel::cat_array_t* categories(NULL);
+                        LLInventoryModel::item_array_t* items(NULL);
                         gInventory.getDirectDescendentsOf(cat_id, categories, items);
                         for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
                             it != categories->end();
                             ++it)
                         {
-                            // not push_front to not cause an infinite loop
-                            mFetchFolderQueue.push_back(FetchQueueInfo((*it)->getUUID(), FT_RECURSIVE));
+                            // not emplace_front to not cause an infinite loop
+                            mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE);
                         }
                     }
                 }
@@ -995,7 +995,7 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
     }
     else
     {
-        LLViewerInventoryItem * itemp(gInventory.getItem(fetch_info.mUUID));
+        LLViewerInventoryItem* itemp(gInventory.getItem(fetch_info.mUUID));
 
         if (itemp)
         {
@@ -1033,7 +1033,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
     //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped.
     //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was
     //sent.  If it exceeds our retry time, go ahead and fire off another batch.
-    LLViewerRegion * region(gAgent.getRegion());
+    LLViewerRegion* region(gAgent.getRegion());
     if (! region || gDisconnected || LLApp::isExiting())
     {
         return;
@@ -1053,7 +1053,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
         // Just processed a bunch of items.
         // Note: do we really need notifyObservers() here?
         // OnIdle it will be called anyway due to Add flag for processed item.
-        // It seems like in some cases we are updaiting on fail (no flag),
+        // It seems like in some cases we are updating on fail (no flag),
         // but is there anything to update?
         gInventory.notifyObservers();
     }
@@ -1071,7 +1071,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
     // *TODO:  Think I'd like to get a shared pointer to this and share it
     // among all the folder requests.
     uuid_vec_t recursive_cats;
-    uuid_vec_t all_cats; // dupplicate avoidance
+    uuid_vec_t all_cats; // duplicate avoidance
 
     LLSD folder_request_body;
     LLSD folder_request_body_lib;
@@ -1081,10 +1081,10 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
     while (! mFetchFolderQueue.empty()
             && (item_count + folder_count) < max_batch_size)
     {
-        const FetchQueueInfo & fetch_info(mFetchFolderQueue.front());
+        const FetchQueueInfo& fetch_info(mFetchFolderQueue.front());
         if (fetch_info.mIsCategory)
         {
-            const LLUUID & cat_id(fetch_info.mUUID);
+            const LLUUID& cat_id(fetch_info.mUUID);
             if (cat_id.isNull()) //DEV-17797 Lost and found
             {
                 LLSD folder_sd;
@@ -1098,7 +1098,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
             }
             else
             {
-                const LLViewerInventoryCategory * cat(gInventory.getCategory(cat_id));
+                const LLViewerInventoryCategory* cat(gInventory.getCategory(cat_id));
                 if (cat)
                 {
                     if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
@@ -1128,14 +1128,14 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
                         // May already have this folder, but append child folders to list.
                         if (fetch_info.mFetchType >= FT_CONTENT_RECURSIVE)
                         {
-                            LLInventoryModel::cat_array_t * categories(NULL);
-                            LLInventoryModel::item_array_t * items(NULL);
+                            LLInventoryModel::cat_array_t* categories(NULL);
+                            LLInventoryModel::item_array_t* items(NULL);
                             gInventory.getDirectDescendentsOf(cat_id, categories, items);
                             for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
                                 it != categories->end();
                                 ++it)
                             {
-                                mFetchFolderQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mFetchType));
+                                mFetchFolderQueue.emplace_back((*it)->getUUID(), fetch_info.mFetchType);
                             }
                         }
                     }
@@ -1143,9 +1143,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
             }
             if (fetch_info.mFetchType >= FT_CONTENT_RECURSIVE)
             {
-                recursive_cats.push_back(cat_id);
+                recursive_cats.emplace_back(cat_id);
             }
-            all_cats.push_back(cat_id);
+            all_cats.emplace_back(cat_id);
         }
 
         mFetchFolderQueue.pop_front();
@@ -1155,9 +1155,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
     while (!mFetchItemQueue.empty()
         && (item_count + folder_count) < max_batch_size)
     {
-        const FetchQueueInfo & fetch_info(mFetchItemQueue.front());
+        const FetchQueueInfo& fetch_info(mFetchItemQueue.front());
 
-        LLViewerInventoryItem * itemp(gInventory.getItem(fetch_info.mUUID));
+        LLViewerInventoryItem* itemp(gInventory.getItem(fetch_info.mUUID));
 
         if (itemp)
         {
@@ -1245,13 +1245,13 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
     }
 }
 
-bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LLUUID & cat_id) const
+bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const
 {
     for (fetch_queue_t::const_iterator it = mFetchFolderQueue.begin();
          it != mFetchFolderQueue.end();
          ++it)
     {
-        const LLUUID & fetch_id = (*it).mUUID;
+        const LLUUID& fetch_id = (*it).mUUID;
         if (gInventory.isObjectDescendentOf(fetch_id, cat_id))
             return false;
     }
@@ -1259,7 +1259,7 @@ bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LL
         it != mFetchItemQueue.end();
         ++it)
     {
-        const LLUUID & fetch_id = (*it).mUUID;
+        const LLUUID& fetch_id = (*it).mUUID;
         if (gInventory.isObjectDescendentOf(fetch_id, cat_id))
             return false;
     }
@@ -1274,7 +1274,7 @@ namespace
 /// Class <anonymous>::BGFolderHttpHandler
 ///----------------------------------------------------------------------------
 
-void BGFolderHttpHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response)
+void BGFolderHttpHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response)
 {
     do      // Single-pass do-while used for common exit handling
     {
@@ -1287,7 +1287,7 @@ void BGFolderHttpHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRes
         }
 
         // Response body should be present.
-        LLCore::BufferArray * body(response->getBody());
+        LLCore::BufferArray* body(response->getBody());
         // body = NULL;                                 // Dev tool to force error handling
         if (! body || ! body->size())
         {
@@ -1336,9 +1336,9 @@ void BGFolderHttpHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRes
 }
 
 
-void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * response)
+void BGFolderHttpHandler::processData(LLSD& content, LLCore::HttpResponse* response)
 {
-    LLInventoryModelBackgroundFetch * fetcher(LLInventoryModelBackgroundFetch::getInstance());
+    LLInventoryModelBackgroundFetch* fetcher(LLInventoryModelBackgroundFetch::getInstance());
 
     // API V2 and earlier should probably be testing for "error" map
     // in response as an application-level error.
@@ -1356,7 +1356,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
 
             //LLUUID agent_id = folder_sd["agent_id"];
 
-            //if(agent_id != gAgent.getID())    //This should never happen.
+            //if (agent_id != gAgent.getID())    //This should never happen.
             //{
             //  LL_WARNS(LOG_INV) << "Got a UpdateInventoryItem for the wrong agent."
             //          << LL_ENDL;
@@ -1388,7 +1388,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
 
                         LLInventoryModel::update_list_t update;
                         LLInventoryModel::LLCategoryUpdate new_folder(lost_uuid, 1);
-                        update.push_back(new_folder);
+                        update.emplace_back(new_folder);
                         gInventory.accountForUpdate(update);
 
                         titem->setParent(lost_uuid);
@@ -1398,7 +1398,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
                 }
             }
 
-            LLViewerInventoryCategory * pcat(gInventory.getCategory(parent_id));
+            LLViewerInventoryCategory* pcat(gInventory.getCategory(parent_id));
             if (! pcat)
             {
                 continue;
@@ -1436,7 +1436,7 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
             }
 
             // Set version and descendentcount according to message.
-            LLViewerInventoryCategory * cat(gInventory.getCategory(parent_id));
+            LLViewerInventoryCategory* cat(gInventory.getCategory(parent_id));
             if (cat)
             {
                 cat->setVersion(version);
@@ -1469,9 +1469,9 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
 }
 
 
-void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::HttpResponse * response)
+void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::HttpResponse* response)
 {
-    const std::string & ct(response->getContentType());
+    const std::string& ct(response->getContentType());
     LL_WARNS(LOG_INV) << "Inventory folder fetch failure\n"
                       << "[Status: " << status.toTerseString() << "]\n"
                       << "[Reason: " << status.toString() << "]\n"
@@ -1481,7 +1481,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
 
     // Could use a 404 test here to try to detect revoked caps...
 
-    if(status == LLCore::HttpStatus(HTTP_FORBIDDEN))
+    if (status == LLCore::HttpStatus(HTTP_FORBIDDEN))
     {
         // Too large, split into two if possible
         if (gDisconnected || LLApp::isExiting())
@@ -1511,7 +1511,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
                 LLUUID folder_id = iter->get("folder_id").asUUID();
                 if (std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), folder_id) != mRecursiveCatUUIDs.end())
                 {
-                    recursive_cats.push_back(folder_id);
+                    recursive_cats.emplace_back(folder_id);
                 }
                 if (folders.size() == (size / 2))
                 {
@@ -1542,9 +1542,9 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
     // request which tested on HTTP_INTERNAL_ERROR status.  This
     // retry logic was unbounded and lacked discrimination as to the
     // cause of the retry.  The new http library should be doing
-    // adquately on retries but I want to keep the structure of a
+    // adequately on retries but I want to keep the structure of a
     // retry for reference.
-    LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
+    LLInventoryModelBackgroundFetch* fetcher = LLInventoryModelBackgroundFetch::getInstance();
     if (false)
     {
         // timed out or curl failure
@@ -1568,7 +1568,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
 }
 
 
-void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::HttpResponse * response)
+void BGFolderHttpHandler::processFailure(const char* const reason, LLCore::HttpResponse* response)
 {
     LL_WARNS(LOG_INV) << "Inventory folder fetch failure\n"
                       << "[Status: internal error]\n"
@@ -1582,7 +1582,7 @@ void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::Http
     // the same but be aware that this may be a source of problems.
     // Philosophy is that inventory folders are so essential to
     // operation that this is a reasonable action.
-    LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
+    LLInventoryModelBackgroundFetch* fetcher = LLInventoryModelBackgroundFetch::getInstance();
     if (true)
     {
         for (LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
@@ -1605,7 +1605,7 @@ void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::Http
 }
 
 
-bool BGFolderHttpHandler::getIsRecursive(const LLUUID & cat_id) const
+bool BGFolderHttpHandler::getIsRecursive(const LLUUID& cat_id) const
 {
     return std::find(mRecursiveCatUUIDs.begin(), mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end();
 }
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index b3fbe66c69..2e9f69ee29 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -54,7 +54,7 @@ public:
     void scheduleItemFetch(const LLUUID& item_id, bool forced = false);
 
     typedef boost::function<void()> nullary_func_t;
-    // AIS3 only, Fetches folder and everithing links inside the folder point to
+    // AIS3 only, Fetches folder and everything links inside the folder point to
     // Intended for outfits
     void fetchFolderAndLinks(const LLUUID& cat_id, nullary_func_t callback);
     // AIS3 only
@@ -81,8 +81,8 @@ public:
     typedef boost::function<void()> folders_fetched_callback_t;
     boost::signals2::connection setFetchCompletionCallback(folders_fetched_callback_t cb);
 
-    void addRequestAtFront(const LLUUID & id, bool recursive, bool is_category);
-    void addRequestAtBack(const LLUUID & id, bool recursive, bool is_category);
+    void addRequestAtFront(const LLUUID& id, bool recursive, bool is_category);
+    void addRequestAtBack(const LLUUID& id, bool recursive, bool is_category);
 
 protected:
     bool isFolderFetchProcessingComplete() const;
@@ -108,8 +108,8 @@ protected:
     };
     typedef std::deque<FetchQueueInfo> fetch_queue_t;
 
-    void onAISContentCalback(const LLUUID& request_id, const uuid_vec_t &content_ids, const LLUUID& response_id, EFetchType fetch_type);
-    void onAISFolderCalback(const LLUUID &request_id, const LLUUID &response_id, EFetchType fetch_type);
+    void onAISContentCalback(const LLUUID& request_id, const uuid_vec_t& content_ids, const LLUUID& response_id, EFetchType fetch_type);
+    void onAISFolderCalback(const LLUUID& request_id, const LLUUID& response_id, EFetchType fetch_type);
     void bulkFetchViaAis();
     void bulkFetchViaAis(const FetchQueueInfo& fetch_info);
     void bulkFetch();
-- 
cgit v1.2.3


From 470f35b10937ff649b50fcacff4fe40a9c0e52de Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Mon, 2 Sep 2024 18:22:54 +0200
Subject: #2471 The Destinations ComboBox on Login Screen changes the selected
 item to the similar one

---
 indra/llui/llcombobox.cpp       |  76 ++++++++++++++++--------
 indra/llui/llscrolllistctrl.cpp | 126 ++++++++++++++++++----------------------
 indra/llui/llscrolllistctrl.h   |   9 ++-
 3 files changed, 113 insertions(+), 98 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 6e2af4c853..b64794a244 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -107,7 +107,7 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p)
     button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
     button_params.rect(p.rect);
 
-    if(mAllowTextEntry)
+    if (mAllowTextEntry)
     {
         button_params.pad_right(2);
     }
@@ -121,7 +121,7 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p)
     mButton = LLUICtrlFactory::create<LLButton>(button_params);
 
 
-    if(mAllowTextEntry)
+    if (mAllowTextEntry)
     {
         //redo to compensate for button hack that leaves space for a character
         //unless it is a "minimal combobox"(drop down)
@@ -207,14 +207,27 @@ void LLComboBox::clear()
 
 void LLComboBox::onCommit()
 {
-    if (mAllowTextEntry && getCurrentIndex() != -1)
+    if (LLScrollListItem* item = mList->getFirstSelected())
     {
-        // we have selected an existing item, blitz the manual text entry with
-        // the properly capitalized item
-        mTextEntry->setValue(getSimple());
-        mTextEntry->setTentative(false);
+        if (mAllowTextEntry && mTextEntry)
+        {
+            // we have selected an existing item, blitz the manual text entry with
+            // the properly capitalized item
+            LLSD label = item->getColumn(0)->getValue();
+            mTextEntry->setValue(label);
+            mTextEntry->setTentative(false);
+        }
+        setControlValue(item->getValue());
+    }
+    else if (mAllowTextEntry)
+    {
+        setControlValue(mTextEntry->getValue());
     }
-    setControlValue(getValue());
+    else
+    {
+        setControlValue(LLSD());
+    }
+
     LLUICtrl::onCommit();
 }
 
@@ -349,6 +362,13 @@ bool LLComboBox::setSimple(const LLStringExplicit& name)
 // virtual
 void LLComboBox::setValue(const LLSD& value)
 {
+    if (LLScrollListItem* item = mList->getFirstSelected())
+    {
+        LLSD item_value = item->getValue();
+        if (item_value.asStringRef() == value.asStringRef())
+            return;
+    }
+
     bool found = mList->selectByValue(value);
     if (found)
     {
@@ -372,10 +392,8 @@ const std::string LLComboBox::getSimple() const
     {
         return mTextEntry->getText();
     }
-    else
-    {
-        return res;
-    }
+
+    return res;
 }
 
 const std::string LLComboBox::getSelectedItemLabel(S32 column) const
@@ -386,24 +404,22 @@ const std::string LLComboBox::getSelectedItemLabel(S32 column) const
 // virtual
 LLSD LLComboBox::getValue() const
 {
-    LLScrollListItem* item = mList->getFirstSelected();
-    if( item )
+    if (LLScrollListItem* item = mList->getFirstSelected())
     {
         return item->getValue();
     }
-    else if (mAllowTextEntry)
+
+    if (mAllowTextEntry)
     {
         return mTextEntry->getValue();
     }
-    else
-    {
-        return LLSD();
-    }
+
+    return LLSD();
 }
 
 void LLComboBox::setLabel(const LLStringExplicit& name)
 {
-    if ( mTextEntry )
+    if (mTextEntry)
     {
         mTextEntry->setText(name);
         if (mList->selectItemByLabel(name, false))
@@ -500,13 +516,23 @@ void LLComboBox::setButtonVisible(bool visible)
 
 bool LLComboBox::setCurrentByIndex(S32 index)
 {
-    bool found = mList->selectNthItem(index);
-    if (found)
+    if (LLScrollListItem* item = mList->getItemByIndex(index))
     {
-        setLabel(getSelectedItemLabel());
-        mLastSelectedIndex = index;
+        if (item->getEnabled())
+        {
+            mList->selectItem(item, -1, true);
+            if (mTextEntry)
+            {
+                LLSD::String label = item->getColumn(0)->getValue().asString();
+                mTextEntry->setText(label);
+                mTextEntry->setTentative(false);
+            }
+            mLastSelectedIndex = index;
+            return true;
+        }
     }
-    return found;
+
+    return false;
 }
 
 S32 LLComboBox::getCurrentIndex() const
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 5ae133a075..445377d3a2 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -410,10 +410,8 @@ void LLScrollListCtrl::clearRows()
 
 LLScrollListItem* LLScrollListCtrl::getFirstSelected() const
 {
-    item_list::const_iterator iter;
-    for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         if (item->getSelected())
         {
             return item;
@@ -425,10 +423,8 @@ LLScrollListItem* LLScrollListCtrl::getFirstSelected() const
 std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
 {
     std::vector<LLScrollListItem*> ret;
-    item_list::const_iterator iter;
-    for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         if (item->getSelected())
         {
             ret.push_back(item);
@@ -441,9 +437,8 @@ S32 LLScrollListCtrl::getNumSelected() const
 {
     S32 numSelected = 0;
 
-    for(item_list::const_iterator iter = mItemList.begin(); iter != mItemList.end(); ++iter)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         if (item->getSelected())
         {
             ++numSelected;
@@ -460,10 +455,8 @@ S32 LLScrollListCtrl::getFirstSelectedIndex() const
     // make sure sort is up to date before returning an index
     updateSort();
 
-    item_list::const_iterator iter;
-    for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         if (item->getSelected())
         {
             return CurSelectedIndex;
@@ -476,29 +469,19 @@ S32 LLScrollListCtrl::getFirstSelectedIndex() const
 
 LLScrollListItem* LLScrollListCtrl::getFirstData() const
 {
-    if (mItemList.size() == 0)
-    {
-        return NULL;
-    }
-    return mItemList[0];
+    return mItemList.empty() ? NULL : mItemList.front();
 }
 
 LLScrollListItem* LLScrollListCtrl::getLastData() const
 {
-    if (mItemList.size() == 0)
-    {
-        return NULL;
-    }
-    return mItemList[mItemList.size() - 1];
+    return mItemList.empty() ? NULL : mItemList.back();
 }
 
 std::vector<LLScrollListItem*> LLScrollListCtrl::getAllData() const
 {
     std::vector<LLScrollListItem*> ret;
-    item_list::const_iterator iter;
-    for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         ret.push_back(item);
     }
     return ret;
@@ -507,22 +490,20 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllData() const
 // returns first matching item
 LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const
 {
-    std::string string_val = sd.asString();
+    const std::string& string_val = sd.asStringRef();
 
-    item_list::const_iterator iter;
-    for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item  = *iter;
         // assumes string representation is good enough for comparison
-        if (item->getValue().asString() == string_val)
+        if (item->getValue().asStringRef() == string_val)
         {
             return item;
         }
     }
+
     return NULL;
 }
 
-
 void LLScrollListCtrl::reshape( S32 width, S32 height, bool called_from_parent )
 {
     LLUICtrl::reshape( width, height, called_from_parent );
@@ -567,15 +548,16 @@ void LLScrollListCtrl::updateLayout()
 void LLScrollListCtrl::fitContents(S32 max_width, S32 max_height)
 {
     S32 height = llmin( getRequiredRect().getHeight(), max_height );
-    if(mPageLines)
-        height = llmin( mPageLines * mLineHeight + 2*mBorderThickness + (mDisplayColumnHeaders ? mHeadingHeight : 0), height );
+    if (mPageLines)
+    {
+        height = llmin(mPageLines * mLineHeight + 2 * mBorderThickness + (mDisplayColumnHeaders ? mHeadingHeight : 0), height);
+    }
 
     S32 width = getRect().getWidth();
 
     reshape( width, height );
 }
 
-
 LLRect LLScrollListCtrl::getRequiredRect()
 {
     S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0);
@@ -627,7 +609,8 @@ bool LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, bool r
         S32 i = 0;
         for (LLScrollListCell* cell = item->getColumn(i); i < num_cols; cell = item->getColumn(++i))
         {
-            if (i >= (S32)mColumnsIndexed.size()) break;
+            if (i >= (S32)mColumnsIndexed.size())
+                break;
 
             cell->setWidth(mColumnsIndexed[i]->getWidth());
         }
@@ -650,23 +633,21 @@ S32 LLScrollListCtrl::calcMaxContentWidth()
 
     S32 max_item_width = 0;
 
-    ordered_columns_t::iterator column_itor;
-    for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor)
+    for (LLScrollListColumn* column : mColumnsIndexed)
     {
-        LLScrollListColumn* column = *column_itor;
-        if (!column) continue;
+        if (!column)
+            continue;
 
         if (mColumnWidthsDirty)
         {
             // update max content width for this column, by looking at all items
             column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel.getWString().c_str()) + mColumnPadding + HEADING_TEXT_PADDING : 0;
-            item_list::iterator iter;
-            for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
+            for (LLScrollListItem* item : mItemList)
             {
-                LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex);
-                if (!cellp) continue;
-
-                column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth);
+                if (LLScrollListCell* cellp = item->getColumn(column->mIndex))
+                {
+                    column->mMaxContentWidth = llmax(LLFontGL::getFontSansSerifSmall()->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth);
+                }
             }
         }
         max_item_width += column->mMaxContentWidth;
@@ -683,7 +664,8 @@ bool LLScrollListCtrl::updateColumnWidths()
     for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor)
     {
         LLScrollListColumn* column = *column_itor;
-        if (!column) continue;
+        if (!column)
+            continue;
 
         // update column width
         S32 new_width = 0;
@@ -737,7 +719,6 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp)
     }
 }
 
-
 void LLScrollListCtrl::updateColumns(bool force_update)
 {
     if (!mColumnsDirty && !force_update)
@@ -810,7 +791,8 @@ void LLScrollListCtrl::updateColumns(bool force_update)
             S32 i = 0;
             for (LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
             {
-                if (i >= (S32)mColumnsIndexed.size()) break;
+                if (i >= (S32)mColumnsIndexed.size())
+                    break;
 
                 cell->setWidth(mColumnsIndexed[i]->getWidth());
             }
@@ -837,8 +819,8 @@ void LLScrollListCtrl::setHeadingHeight(S32 heading_height)
     mHeadingHeight = heading_height;
 
     updateLayout();
-
 }
+
 void LLScrollListCtrl::setPageLines(S32 new_page_lines)
 {
     mPageLines  = new_page_lines;
@@ -880,6 +862,7 @@ bool LLScrollListCtrl::selectFirstItem()
         }
         first_item = false;
     }
+
     if (mCommitOnSelectionChange)
     {
         commitIfChanged();
@@ -1169,7 +1152,6 @@ void LLScrollListCtrl::selectPrevItem( bool extend_selection)
     mSearchString.clear();
 }
 
-
 void LLScrollListCtrl::selectNextItem( bool extend_selection)
 {
     LLScrollListItem* next_item = NULL;
@@ -1213,8 +1195,6 @@ void LLScrollListCtrl::selectNextItem( bool extend_selection)
     mSearchString.clear();
 }
 
-
-
 void LLScrollListCtrl::deselectAllItems(bool no_commit_on_change)
 {
     item_list::iterator iter;
@@ -1286,16 +1266,14 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, boo
         LLStringUtil::toLower(target_text);
     }
 
-    item_list::iterator iter;
-    for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
+    for (LLScrollListItem* item : mItemList)
     {
-        LLScrollListItem* item = *iter;
         std::string item_text = item->getColumn(column)->getValue().asString(); // Only select enabled items with matching names
         if (!case_sensitive)
         {
             LLStringUtil::toLower(item_text);
         }
-        if(item_text == target_text)
+        if (item_text == target_text)
         {
             return item;
         }
@@ -1303,6 +1281,15 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, boo
     return NULL;
 }
 
+LLScrollListItem* LLScrollListCtrl::getItemByIndex(S32 index)
+{
+    if (index >= 0 && index < (S32)mItemList.size())
+    {
+        return mItemList[index];
+    }
+
+    return NULL;
+}
 
 bool LLScrollListCtrl::selectItemByPrefix(const std::string& target, bool case_sensitive, S32 column)
 {
@@ -1463,7 +1450,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
     return found;
 }
 
-const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
+std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
 {
     LLScrollListItem* item;
 
@@ -1507,7 +1494,10 @@ bool LLScrollListCtrl::setSelectedByValue(const LLSD& value, bool selected)
 {
     bool found = false;
 
-    if (selected && !mAllowMultipleSelection) deselectAllItems(true);
+    if (selected && !mAllowMultipleSelection)
+    {
+        deselectAllItems(true);
+    }
 
     item_list::iterator iter;
     for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
@@ -2634,9 +2624,7 @@ bool LLScrollListCtrl::isRepeatedChars(const LLWString& string) const
 
 void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, bool select_single_item)
 {
-    if (!itemp) return;
-
-    if (!itemp->getSelected())
+    if (itemp && !itemp->getSelected())
     {
         if (mLastSelected)
         {
@@ -2670,9 +2658,7 @@ void LLScrollListCtrl::selectItem(LLScrollListItem* itemp, S32 cell, bool select
 
 void LLScrollListCtrl::deselectItem(LLScrollListItem* itemp)
 {
-    if (!itemp) return;
-
-    if (itemp->getSelected())
+    if (itemp && itemp->getSelected())
     {
         if (mLastSelected == itemp)
         {
@@ -2878,7 +2864,7 @@ void LLScrollListCtrl::updateStaticColumnWidth(LLScrollListColumn* col, S32 new_
 // LLEditMenuHandler functions
 
 // virtual
-void    LLScrollListCtrl::copy()
+void LLScrollListCtrl::copy()
 {
     std::string buffer;
 
@@ -2892,26 +2878,26 @@ void    LLScrollListCtrl::copy()
 }
 
 // virtual
-bool    LLScrollListCtrl::canCopy() const
+bool LLScrollListCtrl::canCopy() const
 {
     return (getFirstSelected() != NULL);
 }
 
 // virtual
-void    LLScrollListCtrl::cut()
+void LLScrollListCtrl::cut()
 {
     copy();
     doDelete();
 }
 
 // virtual
-bool    LLScrollListCtrl::canCut() const
+bool LLScrollListCtrl::canCut() const
 {
     return canCopy() && canDoDelete();
 }
 
 // virtual
-void    LLScrollListCtrl::selectAll()
+void LLScrollListCtrl::selectAll()
 {
     // Deselects all other items
     item_list::iterator iter;
@@ -2931,13 +2917,13 @@ void    LLScrollListCtrl::selectAll()
 }
 
 // virtual
-bool    LLScrollListCtrl::canSelectAll() const
+bool LLScrollListCtrl::canSelectAll() const
 {
     return getCanSelect() && mAllowMultipleSelection && !(mMaxSelectable > 0 && mItemList.size() > mMaxSelectable);
 }
 
 // virtual
-void    LLScrollListCtrl::deselect()
+void LLScrollListCtrl::deselect()
 {
     deselectAllItems();
 }
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 1f9f26e08b..c24784338a 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -260,11 +260,12 @@ public:
     // one of which can be selected at a time.
     virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
 
-    bool            selectItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 );       // false if item not found
+    bool            selectItemByLabel(const std::string& item, bool case_sensitive = true, S32 column = 0);       // false if item not found
     bool            selectItemByPrefix(const std::string& target, bool case_sensitive = true, S32 column = -1);
     bool            selectItemByPrefix(const LLWString& target, bool case_sensitive = true, S32 column = -1);
-    LLScrollListItem*   getItemByLabel( const std::string& item, bool case_sensitive = true, S32 column = 0 );
-    const std::string   getSelectedItemLabel(S32 column = 0) const;
+    LLScrollListItem* getItemByLabel(const std::string& item, bool case_sensitive = true, S32 column = 0);
+    LLScrollListItem* getItemByIndex(S32 index);
+    std::string     getSelectedItemLabel(S32 column = 0) const;
     LLSD            getSelectedValue();
 
     // If multi select is on, select all element that include substring,
@@ -559,6 +560,8 @@ private:
     sort_signal_t*  mSortCallback;
 
     is_friend_signal_t* mIsFriendSignal;
+
+    friend class LLComboBox;
 }; // end class LLScrollListCtrl
 
 #endif  // LL_SCROLLLISTCTRL_H
-- 
cgit v1.2.3


From ee9f7ec670c4c94f871f7abed68a573b844a69a6 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Tue, 3 Sep 2024 00:55:55 +0200
Subject: #2403 Reset Skeleton issues

---
 indra/newview/llviewermenu.cpp                     | 40 +++++++++++++---------
 indra/newview/skins/default/xui/en/menu_viewer.xml |  2 +-
 2 files changed, 24 insertions(+), 18 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e1664752e7..a32e5d23e3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6748,17 +6748,11 @@ class LLAvatarToggleSearch : public view_listener_t
     }
 };
 
-class LLAvatarResetSkeleton: public view_listener_t
+class LLAvatarResetSkeleton : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
     {
-        LLVOAvatar* avatar = NULL;
-        LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
-        if (obj)
-        {
-            avatar = obj->getAvatar();
-        }
-        if(avatar)
+        if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
         {
             avatar->resetSkeleton(false);
         }
@@ -6766,12 +6760,11 @@ class LLAvatarResetSkeleton: public view_listener_t
     }
 };
 
-class LLAvatarEnableResetSkeleton: public view_listener_t
+class LLAvatarEnableResetSkeleton : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
     {
-        LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
-        if (obj && obj->getAvatar())
+        if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
         {
             return true;
         }
@@ -6779,13 +6772,11 @@ class LLAvatarEnableResetSkeleton: public view_listener_t
     }
 };
 
-
 class LLAvatarResetSkeletonAndAnimations : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
     {
-        LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
-        if (avatar)
+        if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
         {
             avatar->resetSkeleton(true);
         }
@@ -6793,12 +6784,27 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
     }
 };
 
+class LLAvatarResetSelfSkeleton : public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
+        {
+            avatar->resetSkeleton(false);
+        }
+        else
+        {
+            gAgentAvatarp->resetSkeleton(false);
+        }
+        return true;
+    }
+};
+
 class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
     {
-        LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
-        if (avatar)
+        if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
         {
             avatar->resetSkeleton(true);
         }
@@ -6810,7 +6816,6 @@ class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t
     }
 };
 
-
 class LLAvatarAddContact : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
@@ -10106,6 +10111,7 @@ void initialize_menus()
     view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
     view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton");
     view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
+    view_listener_t::addMenu(new LLAvatarResetSelfSkeleton(), "Avatar.ResetSelfSkeleton");
     view_listener_t::addMenu(new LLAvatarResetSelfSkeletonAndAnimations(), "Avatar.ResetSelfSkeletonAndAnimations");
     enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
     enable.add("Avatar.IsPicksTabOpen", boost::bind(&picks_tab_visible));
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 40f3e51fca..82d2277dfa 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -483,7 +483,7 @@
        layout="topleft"
        name="Reset Skeleton">
         <menu_item_call.on_click
-         function="Avatar.ResetSkeleton" />
+         function="Avatar.ResetSelfSkeleton" />
       </menu_item_call>
       <menu_item_call 
        label="Reset skeleton and animations"
-- 
cgit v1.2.3


From fc46e6147ee3d0304793188e3fbf4c2a7854ecfa Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 3 Sep 2024 08:16:22 +0300
Subject: viewer#2310 Fix snapshot's size string dropping color during upload

---
 indra/newview/llfloatersnapshot.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index f7c82621fb..1f52f1d180 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -324,7 +324,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
     bool got_bytes = previewp && previewp->getDataSize() > 0;
     bool got_snap = previewp && previewp->getSnapshotUpToDate();
 
-    // *TODO: Separate maximum size for Web images from postcards
     LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
 
     LLLocale locale(LLLocale::USER_LOCALE);
@@ -343,7 +342,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
         image_res_tb->setTextArg("[HEIGHT]", llformat("%d", previewp->getEncodedImageHeight()));
     }
 
-    floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
+    LLTextBox* file_size_label = floater->getChild<LLTextBox>("file_size_label");
+    file_size_label->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
 
     LLUIColor color = LLUIColorTable::instance().getColor( "LabelTextColor" );
     if (shot_type == LLSnapshotModel::SNAPSHOT_POSTCARD
@@ -359,7 +359,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
         color = LLUIColor(LLColor4::red);
     }
 
-    floater->getChild<LLUICtrl>("file_size_label")->setColor(color);
+    file_size_label->setColor(color);
+    file_size_label->setReadOnlyColor(color); // field gets disabled during upload
 
     // Update the width and height spinners based on the corresponding resolution combos. (?)
     switch(shot_type)
-- 
cgit v1.2.3


From 821a7314b13127d0896fe0ba59ac3567b58245cc Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 3 Sep 2024 12:55:59 +0300
Subject: viewer#2311 Message about oversized snapshots wasn't shown in some
 cases

---
 indra/newview/llwebprofile.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index feb5ecb1fb..4528ad012d 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -133,12 +133,12 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
 
     if (!status)
     {
+        LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL;
+        LLWebProfile::reportImageUploadStatus(false);
         if (image->getDataSize() > MAX_WEB_DATASIZE)
         {
             LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig");
         }
-        LL_WARNS("Snapshots") << "Failed to get image upload config" << LL_ENDL;
-        LLWebProfile::reportImageUploadStatus(false);
         return;
     }
 
@@ -166,6 +166,10 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
     {
         LL_WARNS("Snapshots") << "Failed to upload image data." << LL_ENDL;
         LLWebProfile::reportImageUploadStatus(false);
+        if (image->getDataSize() > MAX_WEB_DATASIZE)
+        {
+            LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig");
+        }
         return;
     }
 
@@ -193,6 +197,10 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
     {
         LL_WARNS("Snapshots") << "Failed to upload image." << LL_ENDL;
         LLWebProfile::reportImageUploadStatus(false);
+        if (image->getDataSize() > MAX_WEB_DATASIZE)
+        {
+            LLNotificationsUtil::add("CannotUploadSnapshotWebTooBig");
+        }
         return;
     }
 
@@ -201,8 +209,6 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
     LL_INFOS("Snapshots") << "Image uploaded." << LL_ENDL;
     //LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << raw.asString() << "]" << LL_ENDL;
     LLWebProfile::reportImageUploadStatus(true);
-
-
 }
 
 /*static*/
-- 
cgit v1.2.3


From e42e95d87896fa3be0b48108dc3b79af2e1caf66 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Tue, 3 Sep 2024 10:05:44 -0700
Subject: secondlife/viewer#2483: Fix label typo in PBR terrain texture
 transforms tab

---
 indra/newview/skins/default/xui/en/panel_settings_terrain_transform.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/panel_settings_terrain_transform.xml b/indra/newview/skins/default/xui/en/panel_settings_terrain_transform.xml
index 0bf0d8cffc..350e405732 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_terrain_transform.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_terrain_transform.xml
@@ -288,7 +288,7 @@
    left="10"
    top_pad="0"
    width="170">
-      Offset y
+      Offset u
   </text>
   <spinner
    follows="left|top"
-- 
cgit v1.2.3


From dfae0d9d782d172d892d1823584178d7a26b0624 Mon Sep 17 00:00:00 2001
From: Rye Cogtail <rye@lindenlab.com>
Date: Tue, 3 Sep 2024 17:55:17 -0400
Subject: Fix visualizing luminance buffer and small cleanup

---
 indra/newview/pipeline.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3b1da8668b..7b8739c7df 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7871,7 +7871,6 @@ void LLPipeline::renderFinalize()
     renderDoF(&mPostMap, &mRT->screen);
 
     LLRenderTarget* finalBuffer = &mRT->screen;
-    static LLCachedControl<U32> aa_type(gSavedSettings, "RenderFSAAType", 2U);
     if (RenderFSAAType == 1)
     {
         applyFXAA(&mRT->screen, &mPostMap);
@@ -7880,7 +7879,6 @@ void LLPipeline::renderFinalize()
 
     if (RenderBufferVisualization > -1)
     {
-        finalBuffer = &mPostMap;
         switch (RenderBufferVisualization)
         {
         case 0:
@@ -7891,6 +7889,7 @@ void LLPipeline::renderFinalize()
             break;
         case 4:
             visualizeBuffers(&mLuminanceMap, finalBuffer, 0);
+            break;
         case 5:
         {
             if (RenderFSAAType > 0)
-- 
cgit v1.2.3


From 891219dcef44583070e7487d0b6a4e57ad954667 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 3 Sep 2024 19:47:32 -0500
Subject: #1852 Fix for some visual corruption caused by divide by zero in
 lighting functions (#2488)

---
 .../app_settings/shaders/class1/deferred/deferredUtil.glsl    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index ab0e4fd4d8..3319e32cdf 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -99,10 +99,13 @@ void calcHalfVectors(vec3 lv, vec3 n, vec3 v,
 {
     l  = normalize(lv);
     h  = normalize(l + v);
-    nh = clamp(dot(n, h), 0.0, 1.0);
-    nl = clamp(dot(n, l), 0.0, 1.0);
-    nv = clamp(dot(n, v), 0.0, 1.0);
-    vh = clamp(dot(v, h), 0.0, 1.0);
+
+    // lower bound to avoid divide by zero
+    float eps = 0.000001;
+    nh = clamp(dot(n, h), eps, 1.0);
+    nl = clamp(dot(n, l), eps, 1.0);
+    nv = clamp(dot(n, v), eps, 1.0);
+    vh = clamp(dot(v, h), eps, 1.0);
 
     lightDist = length(lv);
 }
-- 
cgit v1.2.3


From 0f166a199d9a3deb82dd42dc5c68d72a2ca07165 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Tue, 3 Sep 2024 17:53:21 -0700
Subject: secondlife/viewer#2490: Fix PBR terrain texture transform feature
 flag handled by viewer in unpredictable manner

---
 indra/newview/app_settings/settings.xml | 2 +-
 indra/newview/llfloaterregioninfo.cpp   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a52d21edb5..fc896b41fd 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9391,7 +9391,7 @@
       <key>Comment</key>
       <string>EXPERIMENTAL: Enable PBR Terrain texture transforms.</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 66e88e8841..8070284e32 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -268,7 +268,7 @@ bool LLFloaterRegionInfo::postBuild()
     mInfoPanels.push_back(panel);
     static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
     static LLCachedControl<bool> feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false);
-    if (!feature_pbr_terrain_transforms_enabled || !feature_pbr_terrain_enabled)
+    if (!feature_pbr_terrain_transforms_enabled() || !feature_pbr_terrain_enabled())
     {
         panel->buildFromFile("panel_region_terrain.xml");
     }
@@ -1694,7 +1694,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
         static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
 
         const bool textures_ready = compp->makeTexturesReady(false, false);
-        const bool materials_ready = feature_pbr_terrain_enabled && compp->makeMaterialsReady(false, false);
+        const bool materials_ready = feature_pbr_terrain_enabled() && compp->makeMaterialsReady(false, false);
 
         bool set_texture_swatches;
         bool set_material_swatches;
@@ -1724,7 +1724,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
         {
             material_type_to_ctrl(mMaterialTypeCtrl, material_type);
             updateForMaterialType();
-            mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled);
+            mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled());
         }
 
         if (set_texture_swatches)
@@ -1938,7 +1938,7 @@ bool LLPanelRegionTerrainInfo::sendUpdate()
     // POST to ModifyRegion endpoint, if enabled
 
     static LLCachedControl<bool> feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false);
-    if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled)
+    if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled())
     {
         LLTerrainMaterials composition;
         for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
-- 
cgit v1.2.3


From 4ae1de1f8a78d795958d67afab8356f9a13f707d Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 28 Aug 2024 23:05:58 +0300
Subject: viewer#2411 LLFontGL::render optimizations

---
 indra/llrender/CMakeLists.txt         |   2 +
 indra/llrender/llfontgl.cpp           | 124 +++++++++++++++++----
 indra/llrender/llfontgl.h             |  15 ++-
 indra/llrender/llfontvertexbuffer.cpp | 157 +++++++++++++++++++++++++++
 indra/llrender/llfontvertexbuffer.h   |  85 +++++++++++++++
 indra/llrender/llrender.cpp           | 197 ++++++++++++++++++++++++++++------
 indra/llrender/llrender.h             |  10 ++
 indra/llui/llbutton.cpp               |  45 +++++++-
 indra/llui/llbutton.h                 |  14 +--
 indra/llwindow/llwindowwin32.cpp      |   4 +
 indra/newview/llhudnametag.cpp        |   4 +-
 indra/newview/llhudnametag.h          |   3 +
 indra/newview/llhudrender.cpp         |  13 ++-
 indra/newview/llhudrender.h           |   5 +-
 indra/newview/llhudtext.cpp           |   2 +-
 indra/newview/llhudtext.h             |   2 +
 indra/newview/llmanip.cpp             |  10 +-
 indra/newview/llmaniprotate.cpp       |   4 +-
 indra/newview/llmanipscale.cpp        |   4 +-
 indra/newview/llmaniptranslate.cpp    |   4 +-
 20 files changed, 627 insertions(+), 77 deletions(-)
 create mode 100644 indra/llrender/llfontvertexbuffer.cpp
 create mode 100644 indra/llrender/llfontvertexbuffer.h

(limited to 'indra')

diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index 7f881c8bb3..ccff7c7a8c 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -17,6 +17,7 @@ set(llrender_SOURCE_FILES
     llfontfreetype.cpp
     llfontfreetypesvg.cpp
     llfontgl.cpp
+    llfontvertexbuffer.cpp
     llfontregistry.cpp
     llgl.cpp
     llglslshader.cpp
@@ -43,6 +44,7 @@ set(llrender_HEADER_FILES
     llcubemap.h
     llcubemaparray.h
     llfontgl.h
+    llfontvertexbuffer.h
     llfontfreetype.h
     llfontfreetypesvg.h
     llfontbitmapcache.h
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index b6cdb81b33..481e35c16a 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -34,6 +34,7 @@
 #include "llfontbitmapcache.h"
 #include "llfontregistry.h"
 #include "llgl.h"
+#include "llglslshader.h"
 #include "llimagegl.h"
 #include "llrender.h"
 #include "llstl.h"
@@ -41,6 +42,7 @@
 #include "lltexture.h"
 #include "lldir.h"
 #include "llstring.h"
+#include "llvertexbuffer.h"
 
 // Third party library includes
 #include <boost/tokenizer.hpp>
@@ -143,7 +145,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
 
 
 S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
-                     ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses, bool use_color) const
+                     ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses, bool use_color,
+                     std::list<LLVertexBufferData> *buffer_list) const
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
@@ -157,6 +160,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         return 0;
     }
 
+    gGL.flush(); // deliberately empty pending verts
     gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
 
     S32 scaled_max_pixels = max_pixels == S32_MAX ? S32_MAX : llceil((F32)max_pixels * sScaleX);
@@ -270,10 +274,10 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
     const LLFontGlyphInfo* next_glyph = NULL;
 
-    const S32 GLYPH_BATCH_SIZE = 30;
-    LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
-    LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
-    LLColor4U colors[GLYPH_BATCH_SIZE * 4];
+    static constexpr S32 GLYPH_BATCH_SIZE = 30;
+    static thread_local LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
+    static thread_local LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
+    static thread_local LLColor4U colors[GLYPH_BATCH_SIZE * 4];
 
     LLColor4U text_color(color);
     // Preserve the transparency to render fading emojis in fading text (e.g.
@@ -282,6 +286,9 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
     std::pair<EFontGlyphType, S32> bitmap_entry = std::make_pair(EFontGlyphType::Grayscale, -1);
     S32 glyph_count = 0;
+    S32 buffer_count = 0;
+    LLVertexBuffer* vb;
+    LLImageGL* font_image = nullptr;
     for (i = begin_offset; i < begin_offset + length; i++)
     {
         llwchar wch = wstr[i];
@@ -305,16 +312,35 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
             // otherwise the queued glyphs will be taken from wrong textures.
             if (glyph_count > 0)
             {
-                gGL.begin(LLRender::QUADS);
+                if (buffer_list)
                 {
+                    vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
+                    if (vb)
+                    {
+                        buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+                    }
+
                     gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+
+                    vb = gGL.getBuffer(buffer_count); // instead of endNoCache to draw now
+                    if (vb)
+                    {
+                        buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+                    }
+                }
+                else
+                {
+                    gGL.begin(LLRender::QUADS);
+                    {
+                        gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+                    }
+                    gGL.end();
                 }
-                gGL.end();
                 glyph_count = 0;
             }
 
             bitmap_entry = next_bitmap_entry;
-            LLImageGL* font_image = font_bitmap_cache->getImageGL(bitmap_entry.first, bitmap_entry.second);
+            font_image = font_bitmap_cache->getImageGL(bitmap_entry.first, bitmap_entry.second);
             gGL.getTexUnit(0)->bind(font_image);
         }
 
@@ -338,11 +364,28 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
         if (glyph_count >= GLYPH_BATCH_SIZE)
         {
-            gGL.begin(LLRender::QUADS);
+            if (buffer_list)
             {
+                vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
+                if (vb)
+                {
+                    buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+                }
                 gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+                vb = gGL.endNoCache(buffer_count);
+                if (vb)
+                {
+                    buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+                }
+            }
+            else
+            {
+                gGL.begin(LLRender::QUADS);
+                {
+                    gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+                }
+                gGL.end();
             }
-            gGL.end();
 
             glyph_count = 0;
         }
@@ -376,11 +419,28 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         cur_render_y = cur_y;
     }
 
-    gGL.begin(LLRender::QUADS);
+    if (buffer_list)
     {
+        vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
+        if (vb)
+        {
+            buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+        }
         gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+        vb = gGL.endNoCache(buffer_count);
+        if (vb)
+        {
+            buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
+        }
+    }
+    else
+    {
+        gGL.begin(LLRender::QUADS);
+        {
+            gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
+        }
+        gGL.end();
     }
-    gGL.end();
 
 
     if (right_x)
@@ -394,15 +454,42 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         F32 descender = (F32)llfloor(mFontFreetype->getDescenderHeight());
 
         gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-        gGL.begin(LLRender::LINES);
-        gGL.vertex2f(start_x, cur_y - descender);
-        gGL.vertex2f(cur_x, cur_y - descender);
-        gGL.end();
+        if (buffer_list)
+        {
+            vb = gGL.beginNoCache(LLRender::LINES, buffer_count);
+            if (vb)
+            {
+                buffer_list->emplace_back(vb, nullptr, LLRender::QUADS, buffer_count);
+            }
+
+            gGL.vertex2f(start_x, cur_y - descender);
+            gGL.vertex2f(cur_x, cur_y - descender);
+
+            vb = gGL.getBuffer(buffer_count);
+            if (vb)
+            {
+                buffer_list->emplace_back(vb, nullptr, LLRender::LINES, buffer_count);
+            }
+        }
+        else
+        {
+            gGL.begin(LLRender::LINES);
+            gGL.vertex2f(start_x, cur_y - descender);
+            gGL.vertex2f(cur_x, cur_y - descender);
+            gGL.end();
+        }
+    }
+    else if (buffer_list)
+    {
+        vb = gGL.getBuffer(buffer_count);
+        if (vb)
+        {
+            buffer_list->emplace_back(vb, font_image, gGL.getMode(), buffer_count);
+        }
     }
 
     if (draw_ellipses)
     {
-
         // recursively render ellipses at end of string
         // we've already reserved enough room
         gGL.pushUIMatrix();
@@ -417,7 +504,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
                 S32_MAX, max_pixels,
                 right_x,
                 false,
-                use_color);
+                use_color,
+                buffer_list);
         gGL.popUIMatrix();
     }
 
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index de7529a583..5015601cf6 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -33,6 +33,7 @@
 #include "llimagegl.h"
 #include "llpointer.h"
 #include "llrect.h"
+#include "llvertexbuffer.h"
 #include "v2math.h"
 
 class LLColor4;
@@ -42,6 +43,7 @@ class LLFontFreetype;
 
 // Structure used to store previously requested fonts.
 class LLFontRegistry;
+class LLVertexBuffer;
 
 class LLFontGL
 {
@@ -79,6 +81,16 @@ public:
         DROP_SHADOW_SOFT
     };
 
+    struct LLVertexBufferData
+    {
+        LLVertexBufferData() : mBuffer(nullptr), mImage(nullptr), mMode(0), mCount(0) {}
+        LLVertexBufferData(LLVertexBuffer* buffer, LLImageGL* image, U8 mode, U32 count) : mBuffer(buffer), mImage(image), mMode(mode), mCount(count) {}
+        LLPointer<LLVertexBuffer> mBuffer;
+        LLPointer <LLImageGL> mImage; // might be a better idea to store
+        U8 mMode;
+        U32 mCount;
+    };
+
     LLFontGL();
     ~LLFontGL();
 
@@ -119,7 +131,8 @@ public:
                 S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
                 F32* right_x=NULL,
                 bool use_ellipses = false,
-                bool use_color = true) const;
+                bool use_color = true,
+                std::list<LLVertexBufferData>* buffer_list = nullptr) const;
 
     S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const;
 
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
new file mode 100644
index 0000000000..3ff0771795
--- /dev/null
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -0,0 +1,157 @@
+/**
+ * @file llfontvertexbuffer.cpp
+ * @brief Buffer storage for font rendering.
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llfontvertexbuffer.h"
+
+#include "llvertexbuffer.h"
+
+
+LLFontVertexBuffer::LLFontVertexBuffer(bool track_changes)
+: mTrackStringChanges(track_changes)
+{
+}
+
+LLFontVertexBuffer::~LLFontVertexBuffer()
+{
+    reset();
+}
+
+void LLFontVertexBuffer::reset()
+{
+    mBufferList.clear();
+}
+
+S32 LLFontVertexBuffer::render(
+    const LLFontGL* fontp,
+    const LLWString& text,
+    S32 begin_offset,
+    F32 x, F32 y,
+    const LLColor4& color,
+    LLFontGL::HAlign halign, LLFontGL::VAlign valign,
+    U8 style, LLFontGL::ShadowType shadow,
+    S32 max_chars , S32 max_pixels,
+    F32* right_x,
+    bool use_ellipses,
+    bool use_color )
+{
+    if (mBufferList.empty())
+    {
+        genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
+            style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
+    }
+    else if (mLastX != x || mLastY != y || mLastColor != color) // always track position and alphs
+    {
+        genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
+            style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
+    }
+    else if (true //mTrackStringChanges
+             && (mLastOffset != begin_offset
+                 || mLastMaxChars != max_chars
+                 || mLastMaxPixels != max_pixels
+                 || mLastStringHash != sStringHasher._Do_hash(text))) // todo, track all parameters?
+    {
+        genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
+            style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
+    }
+    else
+    {
+
+        gGL.flush(); // deliberately empty pending verts
+        gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+        gGL.pushUIMatrix();
+
+        gGL.loadUIIdentity();
+
+        // Depth translation, so that floating text appears 'in-world'
+        // and is correctly occluded.
+        gGL.translatef(0.f, 0.f, LLFontGL::sCurDepth);
+
+        gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
+        for (auto &buf_data : mBufferList)
+        {
+            if (buf_data.mImage)
+            {
+                gGL.getTexUnit(0)->bind(buf_data.mImage);
+            }
+            else
+            {
+                gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+            }
+            buf_data.mBuffer->setBuffer();
+
+            if (LLRender::sGLCoreProfile && buf_data.mMode == LLRender::QUADS)
+            {
+                buf_data.mBuffer->drawArrays(LLRender::TRIANGLES, 0, buf_data.mCount);
+            }
+            else
+            {
+                buf_data.mBuffer->drawArrays(buf_data.mMode, 0, buf_data.mCount);
+            }
+        }
+        if (right_x)
+        {
+            *right_x = mLastRightX;
+        }
+
+        gGL.popUIMatrix();
+    }
+    return mChars;
+}
+
+void LLFontVertexBuffer::genBuffers(
+    const LLFontGL* fontp,
+    const LLWString& text,
+    S32 begin_offset,
+    F32 x, F32 y,
+    const LLColor4& color,
+    LLFontGL::HAlign halign, LLFontGL::VAlign valign,
+    U8 style, LLFontGL::ShadowType shadow,
+    S32 max_chars, S32 max_pixels,
+    F32* right_x,
+    bool use_ellipses,
+    bool use_color)
+{
+    mBufferList.clear();
+    mChars = fontp->render(text, begin_offset, x, y, color, halign, valign,
+        style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color, &mBufferList);
+
+    mLastOffset = begin_offset;
+    mLastMaxChars = max_chars;
+    mLastMaxPixels = max_pixels;
+    mLastStringHash = sStringHasher._Do_hash(text);
+    mLastX = x;
+    mLastY = y;
+    mLastColor = color;
+
+    if (right_x)
+    {
+        mLastRightX = *right_x;
+    }
+}
+
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
new file mode 100644
index 0000000000..bd42cf6c2d
--- /dev/null
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -0,0 +1,85 @@
+/**
+ * @file llfontgl.h
+ * @author Andrii Kleshchev
+ * @brief Buffer storage for font rendering.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFONTVERTEXBUFFER_H
+#define LL_LLFONTVERTEXBUFFER_H
+
+#include "llfontgl.h"
+
+class LLVertexBuffer;
+
+class LLFontVertexBuffer
+{
+public:
+    LLFontVertexBuffer(bool track_changes = true);
+    ~LLFontVertexBuffer();
+
+    void reset();
+
+    S32 render(const LLFontGL* fontp,
+        const LLWString& text,
+        S32 begin_offset,
+        F32 x, F32 y,
+        const LLColor4& color,
+        LLFontGL::HAlign halign = LLFontGL::LEFT, LLFontGL::VAlign valign = LLFontGL::BASELINE,
+        U8 style = LLFontGL::NORMAL, LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW,
+        S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
+        F32* right_x = NULL,
+        bool use_ellipses = false,
+        bool use_color = true);
+
+private:
+
+    void genBuffers(const LLFontGL* fontp,
+         const LLWString& text,
+         S32 begin_offset,
+         F32 x, F32 y,
+         const LLColor4& color,
+         LLFontGL::HAlign halign, LLFontGL::VAlign valign,
+         U8 style, LLFontGL::ShadowType shadow,
+         S32 max_chars, S32 max_pixels,
+         F32* right_x,
+         bool use_ellipses,
+         bool use_color);
+
+
+    std::list<LLFontGL::LLVertexBufferData> mBufferList;
+    S32 mChars = 0;
+    S32 mLastOffset = 0;
+    S32 mLastMaxChars = 0;
+    S32 mLastMaxPixels = 0;
+    size_t mLastStringHash = 0;
+    F32 mLastX = 0.f;
+    F32 mLastY = 0.f;
+    LLColor4 mLastColor;
+    F32 mLastRightX = 0.f;
+    bool mTrackStringChanges = true;
+
+    static std::hash<LLWString> sStringHasher;
+};
+
+#endif
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 7a52f9cfb5..8cd2d9cc15 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1570,6 +1570,51 @@ void LLRender::end()
         flush();
     }
 }
+
+LLVertexBuffer* LLRender::beginNoCache(const GLuint& mode, S32& count)
+{
+    if (mode != mMode)
+    {
+        if (mode == LLRender::QUADS)
+        {
+            mQuadCycle = 1;
+        }
+
+        if (mMode == LLRender::QUADS ||
+            mMode == LLRender::LINES ||
+            mMode == LLRender::TRIANGLES ||
+            mMode == LLRender::POINTS)
+        {
+            return getBuffer(count);
+        }
+        else if (mCount != 0)
+        {
+            LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL;
+        }
+        mMode = mode;
+    }
+    return nullptr;
+}
+
+LLVertexBuffer* LLRender::endNoCache(S32& count)
+{
+    if (mCount == 0)
+    {
+        return nullptr;
+        //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
+    }
+
+    if ((mMode != LLRender::QUADS &&
+        mMode != LLRender::LINES &&
+        mMode != LLRender::TRIANGLES &&
+        mMode != LLRender::POINTS) ||
+        mCount > 2048)
+    {
+        return getBuffer(count);
+    }
+    return nullptr;
+}
+
 void LLRender::flush()
 {
     STOP_GLERROR;
@@ -1664,27 +1709,7 @@ void LLRender::flush()
             else
             {
                 LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
-                vb = new LLVertexBuffer(attribute_mask);
-                vb->allocateBuffer(count, 0);
-
-                vb->setBuffer();
-
-                vb->setPositionData((LLVector4a*) mVerticesp.get());
-
-                if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
-                {
-                    vb->setTexCoord0Data(mTexcoordsp.get());
-                }
-
-                if (attribute_mask & LLVertexBuffer::MAP_COLOR)
-                {
-                    vb->setColorData(mColorsp.get());
-                }
-
-#if LL_DARWIN
-                vb->unmapBuffer();
-#endif
-                vb->unbind();
+                vb = genBuffer(attribute_mask, count);
 
                 sVBCache[vhash] = { vb , std::chrono::steady_clock::now() };
 
@@ -1712,31 +1737,137 @@ void LLRender::flush()
                 }
             }
 
-            vb->setBuffer();
+            drawBuffer(vb, mMode, count);
+        }
+        else
+        {
+            // mBuffer is present in main thread and not present in an image thread
+            LL_ERRS() << "A flush call from outside main rendering thread" << LL_ENDL;
+        }
+
+        resetStriders(count);
+    }
+}
+
+LLVertexBuffer* LLRender::genBuffer(U32 attribute_mask, S32 count)
+{
+    LLVertexBuffer * vb = new LLVertexBuffer(attribute_mask);
+    vb->allocateBuffer(count, 0);
+
+    vb->setBuffer();
+
+    vb->setPositionData((LLVector4a*)mVerticesp.get());
+
+    if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
+    {
+        vb->setTexCoord0Data(mTexcoordsp.get());
+    }
 
-            if (mMode == LLRender::QUADS && sGLCoreProfile)
+    if (attribute_mask & LLVertexBuffer::MAP_COLOR)
+    {
+        vb->setColorData(mColorsp.get());
+    }
+
+#if LL_DARWIN
+    vb->unmapBuffer();
+#endif
+    vb->unbind();
+
+    return vb;
+}
+
+void LLRender::drawBuffer(LLVertexBuffer* vb, U32 mode, S32 count)
+{
+    vb->setBuffer();
+
+    if (mode == LLRender::QUADS && sGLCoreProfile)
+    {
+        vb->drawArrays(LLRender::TRIANGLES, 0, count);
+        mQuadCycle = 1;
+    }
+    else
+    {
+        vb->drawArrays(mode, 0, count);
+    }
+}
+
+void LLRender::resetStriders(S32 count)
+{
+    mVerticesp[0] = mVerticesp[count];
+    mTexcoordsp[0] = mTexcoordsp[count];
+    mColorsp[0] = mColorsp[count];
+
+    mCount = 0;
+}
+
+LLVertexBuffer* LLRender::getBuffer(S32 & count)
+{
+    STOP_GLERROR;
+    LLVertexBuffer *vb;
+    if (mCount > 0)
+    {
+        LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
+        llassert(LLGLSLShader::sCurBoundShaderPtr != nullptr);
+        if (!mUIOffset.empty())
+        {
+            sUICalls++;
+            sUIVerts += mCount;
+        }
+
+        //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
+        count = mCount;
+
+        if (mMode == LLRender::QUADS && !sGLCoreProfile)
+        {
+            if (mCount % 4 != 0)
             {
-                vb->drawArrays(LLRender::TRIANGLES, 0, count);
-                mQuadCycle = 1;
+                count -= (mCount % 4);
+                LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
             }
-            else
+        }
+
+        if (mMode == LLRender::TRIANGLES)
+        {
+            if (mCount % 3 != 0)
             {
-                vb->drawArrays(mMode, 0, count);
+                count -= (mCount % 3);
+                LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
             }
         }
+
+        if (mMode == LLRender::LINES)
+        {
+            if (mCount % 2 != 0)
+            {
+                count -= (mCount % 2);
+                LL_WARNS() << "Incomplete line requested." << LL_ENDL;
+            }
+        }
+
+        mCount = 0;
+
+        if (mBuffer)
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
+
+            U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
+            vb = genBuffer(attribute_mask, count);
+            drawBuffer(vb, mMode, count);
+        }
         else
         {
             // mBuffer is present in main thread and not present in an image thread
             LL_ERRS() << "A flush call from outside main rendering thread" << LL_ENDL;
         }
 
-
-        mVerticesp[0] = mVerticesp[count];
-        mTexcoordsp[0] = mTexcoordsp[count];
-        mColorsp[0] = mColorsp[count];
-
-        mCount = 0;
+        resetStriders(count);
     }
+    else
+    {
+        count = 0;
+    }
+
+    return vb;
 }
 
 void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 4aa33b7427..5f84a4a275 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -417,6 +417,12 @@ public:
 
     void begin(const GLuint& mode);
     void end();
+
+    LLVertexBuffer* beginNoCache(const GLuint& mode, S32& count);
+    LLVertexBuffer* endNoCache(S32& count);
+    LLVertexBuffer* getBuffer(S32& count);
+    U8 getMode() const { return mMode; }
+
     void vertex2i(const GLint& x, const GLint& y);
     void vertex2f(const GLfloat& x, const GLfloat& y);
     void vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z);
@@ -485,6 +491,10 @@ public:
 private:
     friend class LLLightState;
 
+    LLVertexBuffer* genBuffer(U32 attribute_mask, S32 count);
+    void drawBuffer(LLVertexBuffer* vb, U32 mode, S32 count);
+    void resetStriders(S32 count);
+
     eMatrixMode mMatrixMode;
     U32 mMatIdx[NUM_MATRIX_MODES];
     U32 mMatHash[NUM_MATRIX_MODES];
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 30968225a8..3df7f83d49 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -120,8 +120,9 @@ LLButton::Params::Params()
 
 
 LLButton::LLButton(const LLButton::Params& p)
-:   LLUICtrl(p),
+    : LLUICtrl(p),
     LLBadgeOwner(getHandle()),
+    mFontBuffer(false),
     mMouseDownFrame(0),
     mMouseHeldDownCount(0),
     mBorderEnabled( false ),
@@ -329,6 +330,30 @@ void LLButton::onCommit()
     LLUICtrl::onCommit();
 }
 
+void LLButton::setUnselectedLabelColor(const LLUIColor& c)
+{
+    mUnselectedLabelColor = c;
+    mFontBuffer.reset();
+}
+
+void LLButton::setSelectedLabelColor(const LLUIColor& c)
+{
+    mSelectedLabelColor = c;
+    mFontBuffer.reset();
+}
+
+void LLButton::setUseEllipses(bool use_ellipses)
+{
+    mUseEllipses = use_ellipses;
+    mFontBuffer.reset();
+}
+
+void LLButton::setUseFontColor(bool use_font_color)
+{
+    mUseFontColor = use_font_color;
+    mFontBuffer.reset();
+}
+
 boost::signals2::connection LLButton::setClickedCallback(const CommitCallbackParam& cb)
 {
     return setClickedCallback(initCommitCallback(cb));
@@ -396,6 +421,15 @@ bool LLButton::postBuild()
     return LLUICtrl::postBuild();
 }
 
+void LLButton::onVisibilityChange(bool new_visibility)
+{
+    if (!new_visibility)
+    {
+        mFontBuffer.reset();
+    }
+    return LLUICtrl::onVisibilityChange(new_visibility);
+}
+
 bool LLButton::handleUnicodeCharHere(llwchar uni_char)
 {
     bool handled = false;
@@ -954,7 +988,7 @@ void LLButton::draw()
         // LLFontGL::render expects S32 max_chars variable but process in a separate way -1 value.
         // Due to U32_MAX is equal to S32 -1 value I have rest this value for non-ellipses mode.
         // Not sure if it is really needed. Probably S32_MAX should be always passed as max_chars.
-        mLastDrawCharsCount = mGLFont->render(label, 0,
+        mLastDrawCharsCount = mFontBuffer.render(mGLFont, label, 0,
             (F32)x,
             (F32)(getRect().getHeight() / 2 + mBottomVPad),
             label_color % alpha,
@@ -996,6 +1030,7 @@ void LLButton::setToggleState(bool b)
         setFlashing(false); // stop flash state whenever the selected/unselected state if reset
         // Unselected label assignments
         autoResize();
+        mFontBuffer.reset();
     }
 }
 
@@ -1025,11 +1060,13 @@ bool LLButton::toggleState()
 void LLButton::setLabel( const std::string& label )
 {
     mUnselectedLabel = mSelectedLabel = label;
+    mFontBuffer.reset();
 }
 
 void LLButton::setLabel( const LLUIString& label )
 {
     mUnselectedLabel = mSelectedLabel = label;
+    mFontBuffer.reset();
 }
 
 void LLButton::setLabel( const LLStringExplicit& label )
@@ -1043,17 +1080,20 @@ bool LLButton::setLabelArg( const std::string& key, const LLStringExplicit& text
 {
     mUnselectedLabel.setArg(key, text);
     mSelectedLabel.setArg(key, text);
+    mFontBuffer.reset();
     return true;
 }
 
 void LLButton::setLabelUnselected( const LLStringExplicit& label )
 {
     mUnselectedLabel = label;
+    mFontBuffer.reset();
 }
 
 void LLButton::setLabelSelected( const LLStringExplicit& label )
 {
     mSelectedLabel = label;
+    mFontBuffer.reset();
 }
 
 bool LLButton::labelIsTruncated() const
@@ -1113,6 +1153,7 @@ void LLButton::resize(const LLUIString& label)
         if (btn_width < min_width)
         {
             reshape(min_width, getRect().getHeight());
+            mFontBuffer.reset();
         }
     }
 }
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 4ecea6d473..f522281e30 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -35,6 +35,7 @@
 #include "v4color.h"
 #include "llframetimer.h"
 #include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 #include "lluiimage.h"
 #include "lluistring.h"
 
@@ -167,15 +168,17 @@ public:
     virtual void    draw();
     /*virtual*/ bool postBuild();
 
+    /*virtual*/ void onVisibilityChange(bool visible);
+
     virtual void    onMouseLeave(S32 x, S32 y, MASK mask);
     virtual void    onMouseCaptureLost();
 
     virtual void    onCommit();
 
-    void            setUnselectedLabelColor( const LLUIColor& c )        { mUnselectedLabelColor = c; }
-    void            setSelectedLabelColor( const LLUIColor& c )          { mSelectedLabelColor = c; }
-    void            setUseEllipses( bool use_ellipses )                 { mUseEllipses = use_ellipses; }
-    void            setUseFontColor( bool use_font_color)               { mUseFontColor = use_font_color; }
+    void            setUnselectedLabelColor(const LLUIColor& c);
+    void            setSelectedLabelColor(const LLUIColor& c);
+    void            setUseEllipses(bool use_ellipses);
+    void            setUseFontColor(bool use_font_color);
 
 
     boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb);
@@ -223,7 +226,6 @@ public:
     const std::string   getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); }
     const std::string   getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
 
-    void            setImageColor(const std::string& color_control);
     void            setImageColor(const LLUIColor& c);
     /*virtual*/ void    setColor(const LLUIColor& c);
 
@@ -278,7 +280,6 @@ public:
     void            setCommitOnReturn(bool commit) { mCommitOnReturn = commit; }
     bool            getCommitOnReturn() const { return mCommitOnReturn; }
 
-    static void     onHeldDown(void *userdata);  // to be called by gIdleCallbacks
     static void     toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname);
     static void     setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname);
     static void     setDockableFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname);
@@ -306,6 +307,7 @@ protected:
     commit_signal_t*            mHeldDownSignal;
 
     const LLFontGL*             mGLFont;
+    LLFontVertexBuffer          mFontBuffer;
 
     S32                         mMouseDownFrame;
     S32                         mMouseHeldDownCount;    // Counter for parameter passed to held-down callback
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 76abf5eaa2..25ef1336c8 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3710,6 +3710,10 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
     //
     // "This is why I'm doing it this way, instead of what you would think would be more obvious..."
     // (C) Nat Goodspeed
+    if (!IsWindow(sWindowHandleForMessageBox))
+    {
+        sWindowHandleForMessageBox = NULL;
+    }
     int retval_win = MessageBoxW(sWindowHandleForMessageBox, // HWND
                                  ll_convert_string_to_wide(text).c_str(),
                                  ll_convert_string_to_wide(caption).c_str(),
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 11f049564a..0c56582ea6 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -328,7 +328,7 @@ void LLHUDNameTag::renderText()
             }
 
             LLColor4 label_color(0.f, 0.f, 0.f, alpha_factor);
-            hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
+            hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferLabel, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
         }
     }
 
@@ -373,7 +373,7 @@ void LLHUDNameTag::renderText()
             text_color = segment_iter->mColor;
             text_color.mV[VALPHA] *= alpha_factor;
 
-            hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, false);
+            hud_render_text(segment_iter->getText(), render_position, &segment_iter->mFontBufferText, *fontp, style, shadow, x_offset, y_offset, text_color, false);
         }
     }
     /// Reset the default color to white.  The renderer expects this to be the default.
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 5cb7fa877e..ee315f47af 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -37,6 +37,7 @@
 #include "llrect.h"
 //#include "llframetimer.h"
 #include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 #include <set>
 #include <vector>
 
@@ -67,6 +68,8 @@ protected:
         LLColor4                mColor;
         LLFontGL::StyleFlags    mStyle;
         const LLFontGL*         mFont;
+        LLFontVertexBuffer      mFontBufferLabel;
+        LLFontVertexBuffer      mFontBufferText;
     private:
         LLWString               mText;
         std::map<const LLFontGL*, F32> mFontWidthMap;
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 5608ab763f..f027aa5552 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -39,6 +39,7 @@
 #include "llui.h"
 
 void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
+                     LLFontVertexBuffer *font_buffer,
                      const LLFontGL &font,
                      const U8 style,
                      const LLFontGL::ShadowType shadow,
@@ -47,10 +48,11 @@ void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent,
                      const bool orthographic)
 {
     LLWString wstr(utf8str_to_wstring(str));
-    hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic);
+    hud_render_text(wstr, pos_agent, font_buffer, font, style, shadow, x_offset, y_offset, color, orthographic);
 }
 
 void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
+                    LLFontVertexBuffer *font_buffer,
                     const LLFontGL &font,
                     const U8 style,
                     const LLFontGL::ShadowType shadow,
@@ -138,7 +140,14 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
     LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
     F32 right_x;
 
-    font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+    if (font_buffer)
+    {
+        font_buffer->render(&font, wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+    }
+    else
+    {
+        font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, static_cast<S32>(wstr.length()), 1000, &right_x, /*use_ellipses*/false, /*use_color*/true);
+    }
 
     LLUI::popMatrix();
     gGL.popMatrix();
diff --git a/indra/newview/llhudrender.h b/indra/newview/llhudrender.h
index eb8f07e4d4..be9fc7f084 100644
--- a/indra/newview/llhudrender.h
+++ b/indra/newview/llhudrender.h
@@ -28,6 +28,7 @@
 #define LL_LLHUDRENDER_H
 
 #include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 
 class LLVector3;
 class LLFontGL;
@@ -35,6 +36,7 @@ class LLFontGL;
 // Utility classes for rendering HUD elements
 void hud_render_text(const LLWString &wstr,
                      const LLVector3 &pos_agent,
+                     LLFontVertexBuffer *font_buffer,
                      const LLFontGL &font,
                      const U8 style,
                      const LLFontGL::ShadowType,
@@ -46,9 +48,10 @@ void hud_render_text(const LLWString &wstr,
 // Legacy, slower
 void hud_render_utf8text(const std::string &str,
                          const LLVector3 &pos_agent,
+                         LLFontVertexBuffer *font_buffer,
                          const LLFontGL &font,
                          const U8 style,
-                        const LLFontGL::ShadowType,
+                         const LLFontGL::ShadowType,
                          const F32 x_offset,
                          const F32 y_offset,
                          const LLColor4& color,
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index fd0d8b696f..92f09c34a0 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -231,7 +231,7 @@ void LLHUDText::renderText()
             }
             text_color.mV[VALPHA] *= alpha_factor;
 
-            hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment);
+            hud_render_text(segment_iter->getText(), render_position, &mFontBuffer, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment);
         }
     }
     /// Reset the default color to white.  The renderer expects this to be the default.
diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h
index a81fdebb17..224677736c 100644
--- a/indra/newview/llhudtext.h
+++ b/indra/newview/llhudtext.h
@@ -35,6 +35,7 @@
 #include "v2math.h"
 #include "llrect.h"
 #include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 #include <set>
 #include <vector>
 
@@ -161,6 +162,7 @@ private:
     ETextAlignment  mTextAlignment;
     EVertAlignment  mVertAlignment;
     bool            mHidden;
+    LLFontVertexBuffer   mFontBuffer;
 
     static bool    sDisplayText ;
     static std::set<LLPointer<LLHUDText> > sTextObjects;
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 0d617753c8..9a0b1bfcd6 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -519,9 +519,9 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
     LLColor4 shadow_color = LLColor4::black;
     shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
     gViewerWindow->setup3DViewport(1, -1);
-    hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,  -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+    hud_render_utf8text(text, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,  -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
     gViewerWindow->setup3DViewport();
-    hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
+    hud_render_utf8text(text, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
 
     gGL.popMatrix();
 }
@@ -581,12 +581,12 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
         {
             fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str());
 
-            hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
-            hud_render_utf8text(fraction_string, render_pos, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection);
+            hud_render_utf8text(val_string, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -1.f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+            hud_render_utf8text(fraction_string, render_pos, nullptr, *small_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, 1.f, 3.f, color, hud_selection);
         }
         else
         {
-            hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
+            hud_render_utf8text(val_string, render_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
         }
     }
     gGL.popMatrix();
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 5bdf3f81b5..0d80b8d8ba 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1169,10 +1169,10 @@ void LLManipRotate::renderSnapGuides()
             std::string help_text =  LLTrans::getString("manip_hint1");
             LLColor4 help_text_color = LLColor4::white;
             help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f);
-            hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+            hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
             help_text =  LLTrans::getString("manip_hint2");
             help_text_pos -= offset_dir * mRadiusMeters * 0.4f;
-            hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+            hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
         }
     }
 }
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index ffb66dc6cc..19868f3c3e 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -1865,10 +1865,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
                 std::string help_text = LLTrans::getString("manip_hint1");
                 LLColor4 help_text_color = LLColor4::white;
                 help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f);
-                hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+                hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
                 help_text = LLTrans::getString("manip_hint2");
                 help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f;
-                hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+                hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
             }
         }
     }
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index c11a98be50..c9c7d26d33 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1449,10 +1449,10 @@ void LLManipTranslate::renderSnapGuides()
                 std::string help_text = LLTrans::getString("manip_hint1");
                 LLColor4 help_text_color = LLColor4::white;
                 help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f);
-                hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+                hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
                 help_text = LLTrans::getString("manip_hint2");
                 help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f;
-                hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
+                hud_render_utf8text(help_text, help_text_pos, nullptr, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false);
             }
         }
     }
-- 
cgit v1.2.3


From 2bae8dfb815cf4d04cb4882c2fb889e3fb9666b2 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 29 Aug 2024 17:03:00 +0300
Subject: Remove usused LLButton::mBorderEnabled

---
 indra/llui/llbutton.h    |  3 ---
 indra/llui/llfloater.cpp | 15 ---------------
 indra/llui/llpanel.cpp   | 22 ----------------------
 3 files changed, 40 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index f522281e30..c8e2b941c9 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -264,8 +264,6 @@ public:
 
     void            setDropShadowedText(bool b)         { mDropShadowedText = b; }
 
-    void            setBorderEnabled(bool b)                    { mBorderEnabled = b; }
-
     void            setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
 
     void            setImageUnselected(LLPointer<LLUIImage> image);
@@ -360,7 +358,6 @@ protected:
     bool                        mAutoResize;
     bool                        mUseEllipses;
     bool                        mUseFontColor;
-    bool                        mBorderEnabled;
     bool                        mFlashing;
 
     LLFontGL::HAlign            mHAlign;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 6ad74c09e6..92fb4b75bf 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2042,21 +2042,6 @@ void LLFloater::draw()
 
     LLPanel::updateDefaultBtn();
 
-    if( getDefaultButton() )
-    {
-        if (hasFocus() && getDefaultButton()->getEnabled())
-        {
-            LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
-            // is this button a direct descendent and not a nested widget (e.g. checkbox)?
-            bool focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this;
-            // only enable default button when current focus is not a button
-            getDefaultButton()->setBorderEnabled(!focus_is_child_button);
-        }
-        else
-        {
-            getDefaultButton()->setBorderEnabled(false);
-        }
-    }
     if (isMinimized())
     {
         for (S32 i = 0; i < BUTTON_COUNT; i++)
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 8e96bdde80..db314cae0f 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -242,20 +242,6 @@ void LLPanel::draw()
 
 void LLPanel::updateDefaultBtn()
 {
-    if( mDefaultBtn)
-    {
-        if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled())
-        {
-            LLButton* buttonp = dynamic_cast<LLButton*>(gFocusMgr.getKeyboardFocus());
-            bool focus_is_child_button = buttonp && buttonp->getCommitOnReturn();
-            // only enable default button when current focus is not a return-capturing button
-            mDefaultBtn->setBorderEnabled(!focus_is_child_button);
-        }
-        else
-        {
-            mDefaultBtn->setBorderEnabled(false);
-        }
-    }
 }
 
 void LLPanel::refresh()
@@ -266,15 +252,7 @@ void LLPanel::refresh()
 
 void LLPanel::setDefaultBtn(LLButton* btn)
 {
-    if (mDefaultBtn && mDefaultBtn->getEnabled())
-    {
-        mDefaultBtn->setBorderEnabled(false);
-    }
     mDefaultBtn = btn;
-    if (mDefaultBtn)
-    {
-        mDefaultBtn->setBorderEnabled(true);
-    }
 }
 
 void LLPanel::setDefaultBtn(std::string_view id)
-- 
cgit v1.2.3


From a638d9610d9f369eca6dff74e8860ca466c253c7 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 29 Aug 2024 18:49:10 +0300
Subject: viewer#2411 LLFontGL::render optimizations #2

---
 indra/llrender/llfontgl.cpp           |   3 +
 indra/llrender/llfontvertexbuffer.cpp | 119 ++++++++++++++++++++++------------
 indra/llrender/llfontvertexbuffer.h   |  15 ++++-
 indra/llui/llbutton.cpp               |  64 ++++++++++++++++--
 indra/llui/llbutton.h                 |  49 +++++++-------
 indra/newview/llhudnametag.cpp        |  19 ++++++
 indra/newview/llhudnametag.h          |   1 +
 7 files changed, 195 insertions(+), 75 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 481e35c16a..701ab4d060 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -490,6 +490,9 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
     if (draw_ellipses)
     {
+        // signal a separate context
+        buffer_list->emplace_back(nullptr, nullptr, 0, 0);
+
         // recursively render ellipses at end of string
         // we've already reserved enough room
         gGL.pushUIMatrix();
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 3ff0771795..c4b68c4a6c 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -53,7 +53,8 @@ S32 LLFontVertexBuffer::render(
     F32 x, F32 y,
     const LLColor4& color,
     LLFontGL::HAlign halign, LLFontGL::VAlign valign,
-    U8 style, LLFontGL::ShadowType shadow,
+    U8 style,
+    LLFontGL::ShadowType shadow,
     S32 max_chars , S32 max_pixels,
     F32* right_x,
     bool use_ellipses,
@@ -64,62 +65,33 @@ S32 LLFontVertexBuffer::render(
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
     }
-    else if (mLastX != x || mLastY != y || mLastColor != color) // always track position and alphs
+    else if (mLastX != x || mLastY != y
+             || mLastFont != fontp
+             || mLastColor != color // alphas change often
+             || mLastHalign != halign
+             || mLastValign != valign
+             || mLastOffset != begin_offset
+             || mLastMaxChars != max_chars
+             || mLastMaxPixels != max_pixels
+             || mLastStyle != style
+             || mLastShadow != shadow) // ex: buttons change shadow state
     {
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
     }
-    else if (true //mTrackStringChanges
-             && (mLastOffset != begin_offset
-                 || mLastMaxChars != max_chars
-                 || mLastMaxPixels != max_pixels
-                 || mLastStringHash != sStringHasher._Do_hash(text))) // todo, track all parameters?
+    else if (mTrackStringChanges && mLastStringHash != sStringHasher._Do_hash(text))
     {
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
     }
     else
     {
+        renderBuffers();
 
-        gGL.flush(); // deliberately empty pending verts
-        gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
-        gGL.pushUIMatrix();
-
-        gGL.loadUIIdentity();
-
-        // Depth translation, so that floating text appears 'in-world'
-        // and is correctly occluded.
-        gGL.translatef(0.f, 0.f, LLFontGL::sCurDepth);
-
-        gGL.setSceneBlendType(LLRender::BT_ALPHA);
-
-        for (auto &buf_data : mBufferList)
-        {
-            if (buf_data.mImage)
-            {
-                gGL.getTexUnit(0)->bind(buf_data.mImage);
-            }
-            else
-            {
-                gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-            }
-            buf_data.mBuffer->setBuffer();
-
-            if (LLRender::sGLCoreProfile && buf_data.mMode == LLRender::QUADS)
-            {
-                buf_data.mBuffer->drawArrays(LLRender::TRIANGLES, 0, buf_data.mCount);
-            }
-            else
-            {
-                buf_data.mBuffer->drawArrays(buf_data.mMode, 0, buf_data.mCount);
-            }
-        }
         if (right_x)
         {
             *right_x = mLastRightX;
         }
-
-        gGL.popUIMatrix();
     }
     return mChars;
 }
@@ -141,6 +113,7 @@ void LLFontVertexBuffer::genBuffers(
     mChars = fontp->render(text, begin_offset, x, y, color, halign, valign,
         style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color, &mBufferList);
 
+    mLastFont = fontp;
     mLastOffset = begin_offset;
     mLastMaxChars = max_chars;
     mLastMaxPixels = max_pixels;
@@ -148,6 +121,10 @@ void LLFontVertexBuffer::genBuffers(
     mLastX = x;
     mLastY = y;
     mLastColor = color;
+    mLastHalign = halign;
+    mLastValign = valign;
+    mLastStyle = style;
+    mLastShadow = shadow;
 
     if (right_x)
     {
@@ -155,3 +132,61 @@ void LLFontVertexBuffer::genBuffers(
     }
 }
 
+void render_buffers(LLFontVertexBuffer::buffer_list_t::iterator iter, LLFontVertexBuffer::buffer_list_t::iterator end)
+{
+    gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+    gGL.pushUIMatrix();
+
+    gGL.loadUIIdentity();
+
+    // Depth translation, so that floating text appears 'in-world'
+    // and is correctly occluded.
+    gGL.translatef(0.f, 0.f, LLFontGL::sCurDepth);
+
+    gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
+    while (iter != end)
+    {
+        if (iter->mBuffer == nullptr)
+        {
+            // elipses indicator
+            iter++;
+            break;
+        }
+        if (iter->mImage)
+        {
+            gGL.getTexUnit(0)->bind(iter->mImage);
+        }
+        else
+        {
+            gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+        }
+        iter->mBuffer->setBuffer();
+
+        if (LLRender::sGLCoreProfile && iter->mMode == LLRender::QUADS)
+        {
+            iter->mBuffer->drawArrays(LLRender::TRIANGLES, 0, iter->mCount);
+        }
+        else
+        {
+            iter->mBuffer->drawArrays(iter->mMode, 0, iter->mCount);
+        }
+        iter++;
+    }
+
+    if (iter != end)
+    {
+        gGL.pushUIMatrix();
+        render_buffers(iter, end);
+        gGL.popUIMatrix();
+    }
+
+    gGL.popUIMatrix();
+}
+
+void LLFontVertexBuffer::renderBuffers()
+{
+    gGL.flush(); // deliberately empty pending verts
+    render_buffers(mBufferList.begin(), mBufferList.end());
+}
+
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index bd42cf6c2d..458b0a91bb 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -46,12 +46,14 @@ public:
         F32 x, F32 y,
         const LLColor4& color,
         LLFontGL::HAlign halign = LLFontGL::LEFT, LLFontGL::VAlign valign = LLFontGL::BASELINE,
-        U8 style = LLFontGL::NORMAL, LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW,
+        U8 style = LLFontGL::NORMAL,
+        LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW,
         S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
         F32* right_x = NULL,
         bool use_ellipses = false,
         bool use_color = true);
 
+    typedef std::list<LLFontGL::LLVertexBufferData> buffer_list_t;
 private:
 
     void genBuffers(const LLFontGL* fontp,
@@ -60,15 +62,18 @@ private:
          F32 x, F32 y,
          const LLColor4& color,
          LLFontGL::HAlign halign, LLFontGL::VAlign valign,
-         U8 style, LLFontGL::ShadowType shadow,
+         U8 style,
+        LLFontGL::ShadowType shadow,
          S32 max_chars, S32 max_pixels,
          F32* right_x,
          bool use_ellipses,
          bool use_color);
 
+    void renderBuffers();
 
-    std::list<LLFontGL::LLVertexBufferData> mBufferList;
+    buffer_list_t mBufferList;
     S32 mChars = 0;
+    const LLFontGL *mLastFont = nullptr;
     S32 mLastOffset = 0;
     S32 mLastMaxChars = 0;
     S32 mLastMaxPixels = 0;
@@ -76,6 +81,10 @@ private:
     F32 mLastX = 0.f;
     F32 mLastY = 0.f;
     LLColor4 mLastColor;
+    LLFontGL::HAlign mLastHalign = LLFontGL::LEFT;
+    LLFontGL::VAlign mLastValign = LLFontGL::BASELINE;
+    U8 mLastStyle = LLFontGL::NORMAL;
+    LLFontGL::ShadowType mLastShadow = LLFontGL::NO_SHADOW;
     F32 mLastRightX = 0.f;
     bool mTrackStringChanges = true;
 
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 3df7f83d49..a9f1c10256 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -125,7 +125,6 @@ LLButton::LLButton(const LLButton::Params& p)
     mFontBuffer(false),
     mMouseDownFrame(0),
     mMouseHeldDownCount(0),
-    mBorderEnabled( false ),
     mFlashing( false ),
     mCurGlowStrength(0.f),
     mNeedsHighlight(false),
@@ -423,11 +422,38 @@ bool LLButton::postBuild()
 
 void LLButton::onVisibilityChange(bool new_visibility)
 {
-    if (!new_visibility)
+    mFontBuffer.reset();
+    return LLUICtrl::onVisibilityChange(new_visibility);
+}
+
+void LLButton::reshape(S32 width, S32 height, bool called_from_parent)
+{
+    S32 delta_width = width - getRect().getWidth();
+    S32 delta_height = height - getRect().getHeight();
+
+    if (delta_width || delta_height || sForceReshape)
     {
+        LLUICtrl::reshape(width, height, called_from_parent);
         mFontBuffer.reset();
     }
-    return LLUICtrl::onVisibilityChange(new_visibility);
+}
+
+void LLButton::translate(S32 x, S32 y)
+{
+    LLUICtrl::translate(x, y);
+    mFontBuffer.reset();
+}
+
+void LLButton::setRect(const LLRect& rect)
+{
+    LLUICtrl::setRect(rect);
+    mFontBuffer.reset();
+}
+
+void LLButton::dirtyRect()
+{
+    LLUICtrl::dirtyRect();
+    mFontBuffer.reset();
 }
 
 bool LLButton::handleUnicodeCharHere(llwchar uni_char)
@@ -616,19 +642,25 @@ void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
 {
     LLUICtrl::onMouseLeave(x, y, mask);
 
-    mNeedsHighlight = false;
+    setHighlight(false);
 }
 
 void LLButton::setHighlight(bool b)
 {
-    mNeedsHighlight = b;
+    if (mNeedsHighlight != b)
+    {
+        mNeedsHighlight = b;
+        mFontBuffer.reset();
+    }
 }
 
 bool LLButton::handleHover(S32 x, S32 y, MASK mask)
 {
     if (isInEnabledChain()
         && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this))
-        mNeedsHighlight = true;
+    {
+        setHighlight(true);
+    }
 
     if (!childrenHandleHover(x, y, mask))
     {
@@ -1096,6 +1128,18 @@ void LLButton::setLabelSelected( const LLStringExplicit& label )
     mFontBuffer.reset();
 }
 
+void LLButton::setDisabledLabelColor(const LLUIColor& c)
+{
+    mDisabledLabelColor = c;
+    mFontBuffer.reset();
+}
+
+void LLButton::setFont(const LLFontGL* font)
+{
+    mGLFont = (font ? font : LLFontGL::getFontSansSerif());
+    mFontBuffer.reset();
+}
+
 bool LLButton::labelIsTruncated() const
 {
     return getCurrentLabel().getString().size() > mLastDrawCharsCount;
@@ -1106,6 +1150,12 @@ const LLUIString& LLButton::getCurrentLabel() const
     return getToggleState() ? mSelectedLabel : mUnselectedLabel;
 }
 
+void LLButton::setDropShadowedText(bool b)
+{
+    mDropShadowedText = b;
+    mFontBuffer.reset();
+}
+
 void LLButton::setImageUnselected(LLPointer<LLUIImage> image)
 {
     mImageUnselected = image;
@@ -1153,7 +1203,6 @@ void LLButton::resize(const LLUIString& label)
         if (btn_width < min_width)
         {
             reshape(min_width, getRect().getHeight());
-            mFontBuffer.reset();
         }
     }
 }
@@ -1190,6 +1239,7 @@ void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image)
     mImageDisabledSelected = image;
     mDisabledImageColor = mImageColor;
     mFadeWhenDisabled = true;
+    mFontBuffer.reset();
 }
 
 void LLButton::setImagePressed(LLPointer<LLUIImage> image)
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index c8e2b941c9..74ed922510 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -157,23 +157,27 @@ public:
 
     void            addImageAttributeToXML(LLXMLNodePtr node, const std::string& imageName,
                                         const LLUUID&   imageID,const std::string&  xmlTagName) const;
-    virtual bool    handleUnicodeCharHere(llwchar uni_char);
-    virtual bool    handleKeyHere(KEY key, MASK mask);
-    virtual bool    handleMouseDown(S32 x, S32 y, MASK mask);
-    virtual bool    handleMouseUp(S32 x, S32 y, MASK mask);
-    virtual bool    handleHover(S32 x, S32 y, MASK mask);
-    virtual bool    handleRightMouseDown(S32 x, S32 y, MASK mask);
-    virtual bool    handleRightMouseUp(S32 x, S32 y, MASK mask);
-    virtual bool    handleDoubleClick(S32 x, S32 y, MASK mask);
-    virtual void    draw();
-    /*virtual*/ bool postBuild();
-
-    /*virtual*/ void onVisibilityChange(bool visible);
-
-    virtual void    onMouseLeave(S32 x, S32 y, MASK mask);
-    virtual void    onMouseCaptureLost();
-
-    virtual void    onCommit();
+    virtual bool    handleUnicodeCharHere(llwchar uni_char) override;
+    virtual bool    handleKeyHere(KEY key, MASK mask) override;
+    virtual bool    handleMouseDown(S32 x, S32 y, MASK mask) override;
+    virtual bool    handleMouseUp(S32 x, S32 y, MASK mask) override;
+    virtual bool    handleHover(S32 x, S32 y, MASK mask) override;
+    virtual bool    handleRightMouseDown(S32 x, S32 y, MASK mask) override;
+    virtual bool    handleRightMouseUp(S32 x, S32 y, MASK mask) override;
+    virtual bool    handleDoubleClick(S32 x, S32 y, MASK mask) override;
+    virtual void    draw() override;
+    /*virtual*/ bool postBuild()  override;
+
+    void onVisibilityChange(bool visible) override;
+    void reshape(S32 width, S32 height, bool called_from_parent = true) override;
+    void translate(S32 x, S32 y) override;
+    void setRect(const LLRect& rect) override;
+    void dirtyRect() override;
+
+    virtual void    onMouseLeave(S32 x, S32 y, MASK mask) override;
+    virtual void    onMouseCaptureLost() override;
+
+    virtual void    onCommit() override;
 
     void            setUnselectedLabelColor(const LLUIColor& c);
     void            setSelectedLabelColor(const LLUIColor& c);
@@ -227,7 +231,7 @@ public:
     const std::string   getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
 
     void            setImageColor(const LLUIColor& c);
-    /*virtual*/ void    setColor(const LLUIColor& c);
+    /*virtual*/ void    setColor(const LLUIColor& c) override;
 
     void            setImages(const std::string &image_name, const std::string &selected_name);
 
@@ -245,13 +249,12 @@ public:
     void            setLabel(const std::string& label);
     void            setLabel(const LLUIString& label);
     void            setLabel( const LLStringExplicit& label);
-    virtual bool    setLabelArg( const std::string& key, const LLStringExplicit& text );
+    virtual bool    setLabelArg( const std::string& key, const LLStringExplicit& text ) override;
     void            setLabelUnselected(const LLStringExplicit& label);
     void            setLabelSelected(const LLStringExplicit& label);
-    void            setDisabledLabelColor( const LLUIColor& c )      { mDisabledLabelColor = c; }
+    void            setDisabledLabelColor(const LLUIColor& c);
 
-    void            setFont(const LLFontGL *font)
-        { mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); }
+    void            setFont(const LLFontGL* font);
     const LLFontGL* getFont() const { return mGLFont; }
     const std::string& getText() const { return getCurrentLabel().getString(); }
 
@@ -262,7 +265,7 @@ public:
     void            setScaleImage(bool scale)           { mScaleImage = scale; }
     bool            getScaleImage() const               { return mScaleImage; }
 
-    void            setDropShadowedText(bool b)         { mDropShadowedText = b; }
+    void            setDropShadowedText(bool b);
 
     void            setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
 
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 0c56582ea6..19ae35813c 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -290,6 +290,15 @@ void LLHUDNameTag::renderText()
     LLVector3 render_position = mPositionAgent
             + (x_pixel_vec * screen_offset.mV[VX])
             + (y_pixel_vec * screen_offset.mV[VY]);
+    bool reset_buffers = false;
+    const F32 treshold = 0.000001f;
+    if (abs(mLastRenderPosition.mV[VX] - render_position.mV[VX]) > treshold
+        || abs(mLastRenderPosition.mV[VY] - render_position.mV[VY]) > treshold
+        || abs(mLastRenderPosition.mV[VZ] - render_position.mV[VZ]) > treshold)
+    {
+        reset_buffers = true;
+        mLastRenderPosition = render_position;
+    }
 
     LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
     LLRect screen_rect;
@@ -313,6 +322,11 @@ void LLHUDNameTag::renderText()
         for(std::vector<LLHUDTextSegment>::iterator segment_iter = mLabelSegments.begin();
             segment_iter != mLabelSegments.end(); ++segment_iter )
         {
+            if (reset_buffers)
+            {
+                segment_iter->mFontBufferLabel.reset();
+            }
+
             // Label segments use default font
             const LLFontGL* fontp = (segment_iter->mStyle == LLFontGL::BOLD) ? mBoldFontp : mFontp;
             y_offset -= fontp->getLineHeight();
@@ -350,6 +364,11 @@ void LLHUDNameTag::renderText()
         for (std::vector<LLHUDTextSegment>::iterator segment_iter = mTextSegments.begin() + start_segment;
              segment_iter != mTextSegments.end(); ++segment_iter )
         {
+            if (reset_buffers)
+            {
+                segment_iter->mFontBufferText.reset();
+            }
+
             const LLFontGL* fontp = segment_iter->mFont;
             y_offset -= fontp->getLineHeight();
             y_offset -= LINE_PADDING;
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index ee315f47af..b48a606982 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -177,6 +177,7 @@ private:
     S32             mMaxLines;
     S32             mOffsetY;
     F32             mRadius;
+    LLVector3                     mLastRenderPosition;
     std::vector<LLHUDTextSegment> mTextSegments;
     std::vector<LLHUDTextSegment> mLabelSegments;
 //  LLFrameTimer    mResizeTimer;
-- 
cgit v1.2.3


From 5c64e5e13d9a75cac510aac3128fc6ee780ab243 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 30 Aug 2024 18:51:48 +0300
Subject: viewer#2411 LLFontGL::render optimizations #3

---
 indra/llrender/llfontgl.cpp           | 118 +++--------------------
 indra/llrender/llfontgl.h             |  15 +--
 indra/llrender/llfontvertexbuffer.cpp |  75 +++++----------
 indra/llrender/llfontvertexbuffer.h   |  12 ++-
 indra/llrender/llrender.cpp           | 175 +++++++++++++++++++++-------------
 indra/llrender/llrender.h             |   9 +-
 indra/llrender/llvertexbuffer.cpp     |  47 +++++++++
 indra/llrender/llvertexbuffer.h       |  31 ++++++
 indra/newview/llhudnametag.h          |   4 +-
 9 files changed, 241 insertions(+), 245 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 701ab4d060..7d74bb3e46 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -42,7 +42,6 @@
 #include "lltexture.h"
 #include "lldir.h"
 #include "llstring.h"
-#include "llvertexbuffer.h"
 
 // Third party library includes
 #include <boost/tokenizer.hpp>
@@ -145,8 +144,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
 
 
 S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
-                     ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses, bool use_color,
-                     std::list<LLVertexBufferData> *buffer_list) const
+                     ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses, bool use_color) const
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 
@@ -160,7 +158,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         return 0;
     }
 
-    gGL.flush(); // deliberately empty pending verts
     gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
 
     S32 scaled_max_pixels = max_pixels == S32_MAX ? S32_MAX : llceil((F32)max_pixels * sScaleX);
@@ -286,9 +283,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
     std::pair<EFontGlyphType, S32> bitmap_entry = std::make_pair(EFontGlyphType::Grayscale, -1);
     S32 glyph_count = 0;
-    S32 buffer_count = 0;
-    LLVertexBuffer* vb;
-    LLImageGL* font_image = nullptr;
     for (i = begin_offset; i < begin_offset + length; i++)
     {
         llwchar wch = wstr[i];
@@ -312,35 +306,16 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
             // otherwise the queued glyphs will be taken from wrong textures.
             if (glyph_count > 0)
             {
-                if (buffer_list)
+                gGL.begin(LLRender::QUADS);
                 {
-                    vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
-                    if (vb)
-                    {
-                        buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-                    }
-
                     gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-
-                    vb = gGL.getBuffer(buffer_count); // instead of endNoCache to draw now
-                    if (vb)
-                    {
-                        buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-                    }
-                }
-                else
-                {
-                    gGL.begin(LLRender::QUADS);
-                    {
-                        gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-                    }
-                    gGL.end();
                 }
+                gGL.end();
                 glyph_count = 0;
             }
 
             bitmap_entry = next_bitmap_entry;
-            font_image = font_bitmap_cache->getImageGL(bitmap_entry.first, bitmap_entry.second);
+            LLImageGL* font_image = font_bitmap_cache->getImageGL(bitmap_entry.first, bitmap_entry.second);
             gGL.getTexUnit(0)->bind(font_image);
         }
 
@@ -364,28 +339,11 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
 
         if (glyph_count >= GLYPH_BATCH_SIZE)
         {
-            if (buffer_list)
+            gGL.begin(LLRender::QUADS);
             {
-                vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
-                if (vb)
-                {
-                    buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-                }
                 gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-                vb = gGL.endNoCache(buffer_count);
-                if (vb)
-                {
-                    buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-                }
-            }
-            else
-            {
-                gGL.begin(LLRender::QUADS);
-                {
-                    gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-                }
-                gGL.end();
             }
+            gGL.end();
 
             glyph_count = 0;
         }
@@ -418,29 +376,11 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         cur_render_x = cur_x;
         cur_render_y = cur_y;
     }
-
-    if (buffer_list)
+    gGL.begin(LLRender::QUADS);
     {
-        vb = gGL.beginNoCache(LLRender::QUADS, buffer_count);
-        if (vb)
-        {
-            buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-        }
         gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-        vb = gGL.endNoCache(buffer_count);
-        if (vb)
-        {
-            buffer_list->emplace_back(vb, font_image, LLRender::QUADS, buffer_count);
-        }
-    }
-    else
-    {
-        gGL.begin(LLRender::QUADS);
-        {
-            gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
-        }
-        gGL.end();
     }
+    gGL.end();
 
 
     if (right_x)
@@ -454,45 +394,14 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         F32 descender = (F32)llfloor(mFontFreetype->getDescenderHeight());
 
         gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-        if (buffer_list)
-        {
-            vb = gGL.beginNoCache(LLRender::LINES, buffer_count);
-            if (vb)
-            {
-                buffer_list->emplace_back(vb, nullptr, LLRender::QUADS, buffer_count);
-            }
-
-            gGL.vertex2f(start_x, cur_y - descender);
-            gGL.vertex2f(cur_x, cur_y - descender);
-
-            vb = gGL.getBuffer(buffer_count);
-            if (vb)
-            {
-                buffer_list->emplace_back(vb, nullptr, LLRender::LINES, buffer_count);
-            }
-        }
-        else
-        {
-            gGL.begin(LLRender::LINES);
-            gGL.vertex2f(start_x, cur_y - descender);
-            gGL.vertex2f(cur_x, cur_y - descender);
-            gGL.end();
-        }
-    }
-    else if (buffer_list)
-    {
-        vb = gGL.getBuffer(buffer_count);
-        if (vb)
-        {
-            buffer_list->emplace_back(vb, font_image, gGL.getMode(), buffer_count);
-        }
+        gGL.begin(LLRender::LINES);
+        gGL.vertex2f(start_x, cur_y - descender);
+        gGL.vertex2f(cur_x, cur_y - descender);
+        gGL.end();
     }
 
     if (draw_ellipses)
     {
-        // signal a separate context
-        buffer_list->emplace_back(nullptr, nullptr, 0, 0);
-
         // recursively render ellipses at end of string
         // we've already reserved enough room
         gGL.pushUIMatrix();
@@ -507,8 +416,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
                 S32_MAX, max_pixels,
                 right_x,
                 false,
-                use_color,
-                buffer_list);
+                use_color);
         gGL.popUIMatrix();
     }
 
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 5015601cf6..de7529a583 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -33,7 +33,6 @@
 #include "llimagegl.h"
 #include "llpointer.h"
 #include "llrect.h"
-#include "llvertexbuffer.h"
 #include "v2math.h"
 
 class LLColor4;
@@ -43,7 +42,6 @@ class LLFontFreetype;
 
 // Structure used to store previously requested fonts.
 class LLFontRegistry;
-class LLVertexBuffer;
 
 class LLFontGL
 {
@@ -81,16 +79,6 @@ public:
         DROP_SHADOW_SOFT
     };
 
-    struct LLVertexBufferData
-    {
-        LLVertexBufferData() : mBuffer(nullptr), mImage(nullptr), mMode(0), mCount(0) {}
-        LLVertexBufferData(LLVertexBuffer* buffer, LLImageGL* image, U8 mode, U32 count) : mBuffer(buffer), mImage(image), mMode(mode), mCount(count) {}
-        LLPointer<LLVertexBuffer> mBuffer;
-        LLPointer <LLImageGL> mImage; // might be a better idea to store
-        U8 mMode;
-        U32 mCount;
-    };
-
     LLFontGL();
     ~LLFontGL();
 
@@ -131,8 +119,7 @@ public:
                 S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
                 F32* right_x=NULL,
                 bool use_ellipses = false,
-                bool use_color = true,
-                std::list<LLVertexBufferData>* buffer_list = nullptr) const;
+                bool use_color = true) const;
 
     S32 render(const LLWString &text, S32 begin_offset, F32 x, F32 y, const LLColor4 &color) const;
 
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index c4b68c4a6c..284762dc94 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -60,12 +60,17 @@ S32 LLFontVertexBuffer::render(
     bool use_ellipses,
     bool use_color )
 {
+    if (!LLFontGL::sDisplayFont) //do not display texts
+    {
+        return static_cast<S32>(text.length());
+    }
     if (mBufferList.empty())
     {
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
     }
-    else if (mLastX != x || mLastY != y
+    else if (mLastX != x
+             || mLastY != y
              || mLastFont != fontp
              || mLastColor != color // alphas change often
              || mLastHalign != halign
@@ -74,7 +79,10 @@ S32 LLFontVertexBuffer::render(
              || mLastMaxChars != max_chars
              || mLastMaxPixels != max_pixels
              || mLastStyle != style
-             || mLastShadow != shadow) // ex: buttons change shadow state
+             || mLastShadow != shadow // ex: buttons change shadow state
+             || mLastScaleX != LLFontGL::sScaleX
+             || mLastScaleY != LLFontGL::sScaleY
+             || mLastOrigin != LLFontGL::sCurOrigin)
     {
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
@@ -110,8 +118,11 @@ void LLFontVertexBuffer::genBuffers(
     bool use_color)
 {
     mBufferList.clear();
+
+    gGL.beginList(&mBufferList);
     mChars = fontp->render(text, begin_offset, x, y, color, halign, valign,
-        style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color, &mBufferList);
+        style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
+    gGL.endList();
 
     mLastFont = fontp;
     mLastOffset = begin_offset;
@@ -126,67 +137,25 @@ void LLFontVertexBuffer::genBuffers(
     mLastStyle = style;
     mLastShadow = shadow;
 
+    mLastScaleX = LLFontGL::sScaleX;
+    mLastScaleY = LLFontGL::sScaleY;
+    mLastOrigin = LLFontGL::sCurOrigin;
+
     if (right_x)
     {
         mLastRightX = *right_x;
     }
 }
 
-void render_buffers(LLFontVertexBuffer::buffer_list_t::iterator iter, LLFontVertexBuffer::buffer_list_t::iterator end)
+void LLFontVertexBuffer::renderBuffers()
 {
+    gGL.flush(); // deliberately empty pending verts
     gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
     gGL.pushUIMatrix();
-
-    gGL.loadUIIdentity();
-
-    // Depth translation, so that floating text appears 'in-world'
-    // and is correctly occluded.
-    gGL.translatef(0.f, 0.f, LLFontGL::sCurDepth);
-
-    gGL.setSceneBlendType(LLRender::BT_ALPHA);
-
-    while (iter != end)
-    {
-        if (iter->mBuffer == nullptr)
-        {
-            // elipses indicator
-            iter++;
-            break;
-        }
-        if (iter->mImage)
-        {
-            gGL.getTexUnit(0)->bind(iter->mImage);
-        }
-        else
-        {
-            gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-        }
-        iter->mBuffer->setBuffer();
-
-        if (LLRender::sGLCoreProfile && iter->mMode == LLRender::QUADS)
-        {
-            iter->mBuffer->drawArrays(LLRender::TRIANGLES, 0, iter->mCount);
-        }
-        else
-        {
-            iter->mBuffer->drawArrays(iter->mMode, 0, iter->mCount);
-        }
-        iter++;
-    }
-
-    if (iter != end)
+    for (LLVertexBufferData& buffer : mBufferList)
     {
-        gGL.pushUIMatrix();
-        render_buffers(iter, end);
-        gGL.popUIMatrix();
+        buffer.draw();
     }
-
     gGL.popUIMatrix();
 }
 
-void LLFontVertexBuffer::renderBuffers()
-{
-    gGL.flush(); // deliberately empty pending verts
-    render_buffers(mBufferList.begin(), mBufferList.end());
-}
-
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index 458b0a91bb..7c29e1097b 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -30,7 +30,7 @@
 
 #include "llfontgl.h"
 
-class LLVertexBuffer;
+class LLVertexBufferData;
 
 class LLFontVertexBuffer
 {
@@ -52,8 +52,6 @@ public:
         F32* right_x = NULL,
         bool use_ellipses = false,
         bool use_color = true);
-
-    typedef std::list<LLFontGL::LLVertexBufferData> buffer_list_t;
 private:
 
     void genBuffers(const LLFontGL* fontp,
@@ -71,7 +69,7 @@ private:
 
     void renderBuffers();
 
-    buffer_list_t mBufferList;
+    std::list<LLVertexBufferData> mBufferList;
     S32 mChars = 0;
     const LLFontGL *mLastFont = nullptr;
     S32 mLastOffset = 0;
@@ -86,6 +84,12 @@ private:
     U8 mLastStyle = LLFontGL::NORMAL;
     LLFontGL::ShadowType mLastShadow = LLFontGL::NO_SHADOW;
     F32 mLastRightX = 0.f;
+
+    // LLFontGL's statics
+    F32 mLastScaleX = 1.f;
+    F32 mLastScaleY = 1.f;
+    LLCoordGL mLastOrigin;
+
     bool mTrackStringChanges = true;
 
     static std::hash<LLWString> sStringHasher;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 8cd2d9cc15..182f61f907 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -77,6 +77,7 @@ struct LLVBCache
 };
 
 static std::unordered_map<U64, LLVBCache> sVBCache;
+static thread_local std::list<LLVertexBufferData> *sBufferDataList = nullptr;
 
 static const GLenum sGLTextureType[] =
 {
@@ -1528,6 +1529,25 @@ void LLRender::clearErrors()
     }
 }
 
+void LLRender::beginList(std::list<LLVertexBufferData> *list)
+{
+    flush();
+    sBufferDataList = list;
+}
+
+void LLRender::endList()
+{
+    if (sBufferDataList)
+    {
+        flush();
+        sBufferDataList = nullptr;
+    }
+    else
+    {
+        llassert(false); // something failed to provide a list or closed it twice
+    }
+}
+
 void LLRender::begin(const GLuint& mode)
 {
     if (mode != mMode)
@@ -1663,78 +1683,26 @@ void LLRender::flush()
         if (mBuffer)
         {
 
-            HBXXH64 hash;
-            U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
+            LLVertexBuffer *vb;
 
-            {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache hash");
-
-                hash.update((U8*)mVerticesp.get(), count * sizeof(LLVector4a));
-                if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
-                {
-                    hash.update((U8*)mTexcoordsp.get(), count * sizeof(LLVector2));
-                }
-
-                if (attribute_mask & LLVertexBuffer::MAP_COLOR)
-                {
-                    hash.update((U8*)mColorsp.get(), count * sizeof(LLColor4U));
-                }
-
-                hash.finalize();
-            }
-
-
-            U64 vhash = hash.digest();
-
-            // check the VB cache before making a new vertex buffer
-            // This is a giant hack to deal with (mostly) our terrible UI rendering code
-            // that was built on top of OpenGL immediate mode.  Huge performance wins
-            // can be had by not uploading geometry to VRAM unless absolutely necessary.
-            // Most of our usage of the "immediate mode" style draw calls is actually
-            // sending the same geometry over and over again.
-            // To leverage this, we maintain a running hash of the vertex stream being
-            // built up before a flush, and then check that hash against a VB
-            // cache just before creating a vertex buffer in VRAM
-            std::unordered_map<U64, LLVBCache>::iterator cache = sVBCache.find(vhash);
-
-            LLPointer<LLVertexBuffer> vb;
+            U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
 
-            if (cache != sVBCache.end())
+            if (sBufferDataList)
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache hit");
-                // cache hit, just use the cached buffer
-                vb = cache->second.vb;
-                cache->second.touched = std::chrono::steady_clock::now();
+                vb = genBuffer(attribute_mask, count);
+                sBufferDataList->emplace_back(
+                    vb,
+                    mMode,
+                    count,
+                    gGL.getTexUnit(0)->mCurrTexture,
+                    mMatrix[MM_MODELVIEW][mMatIdx[MM_MODELVIEW]],
+                    mMatrix[MM_PROJECTION][mMatIdx[MM_PROJECTION]],
+                    mMatrix[MM_TEXTURE0][mMatIdx[MM_TEXTURE0]]
+                    );
             }
             else
             {
-                LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
-                vb = genBuffer(attribute_mask, count);
-
-                sVBCache[vhash] = { vb , std::chrono::steady_clock::now() };
-
-                static U32 miss_count = 0;
-                miss_count++;
-                if (miss_count > 1024)
-                {
-                    LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache clean");
-                    miss_count = 0;
-                    auto now = std::chrono::steady_clock::now();
-
-                    using namespace std::chrono_literals;
-                    // every 1024 misses, clean the cache of any VBs that haven't been touched in the last second
-                    for (std::unordered_map<U64, LLVBCache>::iterator iter = sVBCache.begin(); iter != sVBCache.end(); )
-                    {
-                        if (now - iter->second.touched > 1s)
-                        {
-                            iter = sVBCache.erase(iter);
-                        }
-                        else
-                        {
-                            ++iter;
-                        }
-                    }
-                }
+                vb = bufferfromCache(attribute_mask, count);
             }
 
             drawBuffer(vb, mMode, count);
@@ -1749,6 +1717,81 @@ void LLRender::flush()
     }
 }
 
+LLVertexBuffer* LLRender::bufferfromCache(U32 attribute_mask, U32 count)
+{
+    LLVertexBuffer *vb = nullptr;
+    HBXXH64 hash;
+
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache hash");
+
+        hash.update((U8*)mVerticesp.get(), count * sizeof(LLVector4a));
+        if (attribute_mask & LLVertexBuffer::MAP_TEXCOORD0)
+        {
+            hash.update((U8*)mTexcoordsp.get(), count * sizeof(LLVector2));
+        }
+
+        if (attribute_mask & LLVertexBuffer::MAP_COLOR)
+        {
+            hash.update((U8*)mColorsp.get(), count * sizeof(LLColor4U));
+        }
+
+        hash.finalize();
+    }
+
+    U64 vhash = hash.digest();
+
+    // check the VB cache before making a new vertex buffer
+    // This is a giant hack to deal with (mostly) our terrible UI rendering code
+    // that was built on top of OpenGL immediate mode.  Huge performance wins
+    // can be had by not uploading geometry to VRAM unless absolutely necessary.
+    // Most of our usage of the "immediate mode" style draw calls is actually
+    // sending the same geometry over and over again.
+    // To leverage this, we maintain a running hash of the vertex stream being
+    // built up before a flush, and then check that hash against a VB
+    // cache just before creating a vertex buffer in VRAM
+    std::unordered_map<U64, LLVBCache>::iterator cache = sVBCache.find(vhash);
+
+    if (cache != sVBCache.end())
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache hit");
+        // cache hit, just use the cached buffer
+        vb = cache->second.vb;
+        cache->second.touched = std::chrono::steady_clock::now();
+    }
+    else
+    {
+        LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
+        vb = genBuffer(attribute_mask, count);
+
+        sVBCache[vhash] = { vb , std::chrono::steady_clock::now() };
+
+        static U32 miss_count = 0;
+        miss_count++;
+        if (miss_count > 1024)
+        {
+            LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache clean");
+            miss_count = 0;
+            auto now = std::chrono::steady_clock::now();
+
+            using namespace std::chrono_literals;
+            // every 1024 misses, clean the cache of any VBs that haven't been touched in the last second
+            for (std::unordered_map<U64, LLVBCache>::iterator iter = sVBCache.begin(); iter != sVBCache.end(); )
+            {
+                if (now - iter->second.touched > 1s)
+                {
+                    iter = sVBCache.erase(iter);
+                }
+                else
+                {
+                    ++iter;
+                }
+            }
+        }
+    }
+    return vb;
+}
+
 LLVertexBuffer* LLRender::genBuffer(U32 attribute_mask, S32 count)
 {
     LLVertexBuffer * vb = new LLVertexBuffer(attribute_mask);
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 5f84a4a275..aeee8685ab 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -50,7 +50,8 @@ class LLVertexBuffer;
 class LLCubeMap;
 class LLImageGL;
 class LLRenderTarget;
-class LLTexture ;
+class LLTexture;
+class LLVertexBufferData;
 
 #define LL_MATRIX_STACK_DEPTH 32
 
@@ -415,6 +416,10 @@ public:
 
     void flush();
 
+    // if list is set, will store buffers in list for later use, if list isn't set, will use cache
+    void beginList(std::list<LLVertexBufferData> *list);
+    void endList();
+
     void begin(const GLuint& mode);
     void end();
 
@@ -491,6 +496,7 @@ public:
 private:
     friend class LLLightState;
 
+    LLVertexBuffer* bufferfromCache(U32 attribute_mask, U32 count);
     LLVertexBuffer* genBuffer(U32 attribute_mask, S32 count);
     void drawBuffer(LLVertexBuffer* vb, U32 mode, S32 count);
     void resetStriders(S32 count);
@@ -525,7 +531,6 @@ private:
 
     std::vector<LLVector3> mUIOffset;
     std::vector<LLVector3> mUIScale;
-
 };
 
 extern F32 gGLModelView[16];
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 02afcf12c6..11b41730aa 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -570,6 +570,53 @@ public:
 
 static LLVBOPool* sVBOPool = nullptr;
 
+void LLVertexBufferData::draw()
+{
+    if (!mVB)
+    {
+        // signal for pushUIMatrix
+        return; // todo: find a better way?
+    }
+
+    if (mTexName)
+    {
+        gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTexName);
+    }
+    else
+    {
+        gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+    }
+
+    gGL.matrixMode(LLRender::MM_MODELVIEW);
+    gGL.pushMatrix();
+    gGL.loadMatrix(mModelView.m);
+    gGL.matrixMode(LLRender::MM_PROJECTION);
+    gGL.pushMatrix();
+    gGL.loadMatrix(mProjection.m);
+    gGL.matrixMode(LLRender::MM_TEXTURE0);
+    gGL.pushMatrix();
+    gGL.loadMatrix(mTexture0.m);
+
+    mVB->setBuffer();
+
+    if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile)
+    {
+        mVB->drawArrays(LLRender::TRIANGLES, 0, mCount);
+    }
+    else
+    {
+        mVB->drawArrays(mMode, 0, mCount);
+    }
+
+    gGL.popMatrix();
+    gGL.matrixMode(LLRender::MM_PROJECTION);
+    gGL.popMatrix();
+    gGL.matrixMode(LLRender::MM_MODELVIEW);
+    gGL.popMatrix();
+}
+
+//============================================================================
+
 //static
 U64 LLVertexBuffer::getBytesAllocated()
 {
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 4ada0c335b..2a4affdc60 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -53,6 +53,37 @@
 //============================================================================
 // base class
 class LLPrivateMemoryPool;
+class LLVertexBuffer;
+
+class LLVertexBufferData
+{
+public:
+    LLVertexBufferData()
+        : mVB(nullptr)
+        , mMode(0)
+        , mCount(0)
+        , mTexName(0)
+    {}
+    LLVertexBufferData(LLVertexBuffer* buffer, U8 mode, U32 count, U32 tex_name, glh::matrix4f model_view, glh::matrix4f projection, glh::matrix4f texture0)
+        : mVB(buffer)
+        , mMode(mode)
+        , mCount(count)
+        , mTexName(tex_name)
+        , mProjection(model_view)
+        , mModelView(projection)
+        , mTexture0(texture0)
+    {}
+    void draw();
+    LLPointer<LLVertexBuffer> mVB;
+    U8 mMode;
+    U32 mCount;
+    U32 mTexName;
+    glh::matrix4f mProjection;
+    glh::matrix4f mModelView;
+    glh::matrix4f mTexture0;
+};
+typedef std::list<LLVertexBufferData> buffer_data_list_t;
+
 class LLVertexBuffer final : public LLRefCount
 {
 public:
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index b48a606982..0a882ac273 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -59,7 +59,9 @@ protected:
         :   mColor(color),
             mStyle(style),
             mText(text),
-            mFont(font)
+            mFont(font),
+            mFontBufferLabel(false),
+            mFontBufferText(false)
         {}
         F32 getWidth(const LLFontGL* font);
         const LLWString& getText() const { return mText; }
-- 
cgit v1.2.3


From 57ab1a410f9cb3534bb403e034743505758579d8 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 2 Sep 2024 13:46:13 +0300
Subject: viewer#2411 A bit more coverage for font buffer

---
 indra/llrender/llfontgl.cpp               |  3 +-
 indra/llrender/llfontvertexbuffer.cpp     | 55 ++++++++++++++++++++++++++++
 indra/llrender/llfontvertexbuffer.h       | 26 ++++++++++++++
 indra/llrender/llrender.cpp               |  1 +
 indra/llrender/llvertexbuffer.cpp         |  5 +--
 indra/llui/llbadge.cpp                    | 25 +++++++------
 indra/llui/llbadge.h                      |  3 ++
 indra/llui/llbutton.cpp                   | 14 ++------
 indra/llui/llbutton.h                     | 13 ++++---
 indra/llui/llscrolllistcell.cpp           | 60 ++++++++++++++++++++++---------
 indra/llui/llscrolllistcell.h             | 27 +++++++-------
 indra/newview/llpanelmarketplaceinbox.cpp | 44 +++++++++++++++--------
 indra/newview/llpanelmarketplaceinbox.h   |  2 ++
 13 files changed, 200 insertions(+), 78 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 7d74bb3e46..9721b020c7 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -34,7 +34,6 @@
 #include "llfontbitmapcache.h"
 #include "llfontregistry.h"
 #include "llgl.h"
-#include "llglslshader.h"
 #include "llimagegl.h"
 #include "llrender.h"
 #include "llstl.h"
@@ -376,6 +375,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
         cur_render_x = cur_x;
         cur_render_y = cur_y;
     }
+
     gGL.begin(LLRender::QUADS);
     {
         gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
@@ -503,6 +503,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, S32 begin_offset, S32 max
 
 F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars, bool no_padding) const
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
 
     F32 cur_x = 0;
diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 284762dc94..417bacd69d 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -46,6 +46,60 @@ void LLFontVertexBuffer::reset()
     mBufferList.clear();
 }
 
+S32 LLFontVertexBuffer::render(
+    const LLFontGL* fontp,
+    const LLWString& text,
+    S32 begin_offset,
+    LLRect rect,
+    const LLColor4& color,
+    LLFontGL::HAlign halign, LLFontGL::VAlign valign,
+    U8 style,
+    LLFontGL::ShadowType shadow,
+    S32 max_chars, S32 max_pixels,
+    F32* right_x,
+    bool use_ellipses,
+    bool use_color)
+{
+    LLRectf rect_float((F32)rect.mLeft, (F32)rect.mTop, (F32)rect.mRight, (F32)rect.mBottom);
+    return render(fontp, text, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses, use_color);
+}
+
+S32 LLFontVertexBuffer::render(
+    const LLFontGL* fontp,
+    const LLWString& text,
+    S32 begin_offset,
+    LLRectf rect,
+    const LLColor4& color,
+    LLFontGL::HAlign halign, LLFontGL::VAlign valign,
+    U8 style,
+    LLFontGL::ShadowType shadow,
+    S32 max_chars,
+    F32* right_x,
+    bool use_ellipses,
+    bool use_color)
+{
+    F32 x = rect.mLeft;
+    F32 y = 0.f;
+
+    switch (valign)
+    {
+    case LLFontGL::TOP:
+        y = rect.mTop;
+        break;
+    case LLFontGL::VCENTER:
+        y = rect.getCenterY();
+        break;
+    case LLFontGL::BASELINE:
+    case LLFontGL::BOTTOM:
+        y = rect.mBottom;
+        break;
+    default:
+        y = rect.mBottom;
+        break;
+    }
+    return render(fontp, text, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, (S32)rect.getWidth(), right_x, use_ellipses, use_color);
+}
+
 S32 LLFontVertexBuffer::render(
     const LLFontGL* fontp,
     const LLWString& text,
@@ -117,6 +171,7 @@ void LLFontVertexBuffer::genBuffers(
     bool use_ellipses,
     bool use_color)
 {
+    // todo: add a debug build assert if this triggers too often for to long?
     mBufferList.clear();
 
     gGL.beginList(&mBufferList);
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index 7c29e1097b..d41c6205ac 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -40,6 +40,32 @@ public:
 
     void reset();
 
+    S32 render(const LLFontGL* fontp,
+        const LLWString& text,
+        S32 begin_offset,
+        LLRect rect,
+        const LLColor4& color,
+        LLFontGL::HAlign halign = LLFontGL::LEFT, LLFontGL::VAlign valign = LLFontGL::BASELINE,
+        U8 style = LLFontGL::NORMAL,
+        LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW,
+        S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX,
+        F32* right_x = NULL,
+        bool use_ellipses = false,
+        bool use_color = true);
+
+    S32 render(const LLFontGL* fontp,
+        const LLWString& text,
+        S32 begin_offset,
+        LLRectf rect,
+        const LLColor4& color,
+        LLFontGL::HAlign halign = LLFontGL::LEFT, LLFontGL::VAlign valign = LLFontGL::BASELINE,
+        U8 style = LLFontGL::NORMAL,
+        LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW,
+        S32 max_chars = S32_MAX,
+        F32* right_x = NULL,
+        bool use_ellipses = false,
+        bool use_color = true);
+
     S32 render(const LLFontGL* fontp,
         const LLWString& text,
         S32 begin_offset,
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 182f61f907..b906563b08 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1531,6 +1531,7 @@ void LLRender::clearErrors()
 
 void LLRender::beginList(std::list<LLVertexBufferData> *list)
 {
+    llassert(LLGLSLShader::sCurBoundShaderPtr == &gUIProgram);
     flush();
     sBufferDataList = list;
 }
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 11b41730aa..156e300853 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -574,8 +574,9 @@ void LLVertexBufferData::draw()
 {
     if (!mVB)
     {
-        // signal for pushUIMatrix
-        return; // todo: find a better way?
+        llassert(false);
+        // Not supposed to happen, check buffer generation
+        return;
     }
 
     if (mTexName)
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 399f79ad2e..48489db615 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -27,6 +27,8 @@
 #define LLBADGE_CPP
 #include "llbadge.h"
 
+#include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 #include "llscrollcontainer.h"
 #include "lluictrlfactory.h"
 
@@ -103,6 +105,7 @@ LLBadge::LLBadge(const LLBadge::Params& p)
     , mPaddingVert(p.padding_vert)
     , mParentScroller(NULL)
     , mDrawAtParentTop(false)
+    , mFontBuffer(false)
 {
     if (mImage.isNull())
     {
@@ -351,17 +354,17 @@ void LLBadge::draw()
             //
             // Draw the label
             //
-
-            mGLFont->render(mLabel.getWString(),
-                            badge_label_begin_offset,
-                            badge_center_x + mLabelOffsetHoriz,
-                            badge_center_y + mLabelOffsetVert,
-                            mLabelColor % alpha,
-                            LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
-                            LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
-                            LLFontGL::DROP_SHADOW_SOFT,
-                            badge_char_length, badge_pixel_length,
-                            right_position_out, do_not_use_ellipses);
+            mFontBuffer.render(mGLFont,
+                               mLabel.getWString(),
+                               badge_label_begin_offset,
+                               badge_center_x + mLabelOffsetHoriz,
+                               badge_center_y + mLabelOffsetVert,
+                               mLabelColor % alpha,
+                               LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
+                               LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
+                               LLFontGL::DROP_SHADOW_SOFT,
+                               badge_char_length, badge_pixel_length,
+                               right_position_out, do_not_use_ellipses);
         }
     }
 }
diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h
index 77fe76f0da..636e2c9ded 100644
--- a/indra/llui/llbadge.h
+++ b/indra/llui/llbadge.h
@@ -34,12 +34,14 @@
 #include "llstring.h"
 #include "lluiimage.h"
 #include "llview.h"
+#include "llfontvertexbuffer.h"
 
 //
 // Declarations
 //
 
 class LLFontGL;
+class LLFontVertexBuffer;
 class LLScrollContainer;
 class LLUICtrlFactory;
 
@@ -144,6 +146,7 @@ private:
     LLUIColor               mBorderColor;
 
     const LLFontGL*         mGLFont;
+    LLFontVertexBuffer      mFontBuffer;
 
     LLPointer< LLUIImage >  mImage;
     LLUIColor               mImageColor;
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index a9f1c10256..d4e5d501db 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -43,6 +43,8 @@
 #include "llfloater.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
+#include "llfontgl.h"
+#include "llfontvertexbuffer.h"
 #include "llwindow.h"
 #include "llnotificationsutil.h"
 #include "llrender.h"
@@ -438,18 +440,6 @@ void LLButton::reshape(S32 width, S32 height, bool called_from_parent)
     }
 }
 
-void LLButton::translate(S32 x, S32 y)
-{
-    LLUICtrl::translate(x, y);
-    mFontBuffer.reset();
-}
-
-void LLButton::setRect(const LLRect& rect)
-{
-    LLUICtrl::setRect(rect);
-    mFontBuffer.reset();
-}
-
 void LLButton::dirtyRect()
 {
     LLUICtrl::dirtyRect();
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 74ed922510..23a3a05e65 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -34,8 +34,6 @@
 #include "lluictrl.h"
 #include "v4color.h"
 #include "llframetimer.h"
-#include "llfontgl.h"
-#include "llfontvertexbuffer.h"
 #include "lluiimage.h"
 #include "lluistring.h"
 
@@ -56,6 +54,8 @@ S32 round_up(S32 grid, S32 value);
 
 
 class LLUICtrlFactory;
+class LLFontGL;
+class LLFontVertexBuffer;
 
 //
 // Classes
@@ -170,8 +170,6 @@ public:
 
     void onVisibilityChange(bool visible) override;
     void reshape(S32 width, S32 height, bool called_from_parent = true) override;
-    void translate(S32 x, S32 y) override;
-    void setRect(const LLRect& rect) override;
     void dirtyRect() override;
 
     virtual void    onMouseLeave(S32 x, S32 y, MASK mask) override;
@@ -307,9 +305,6 @@ protected:
     commit_signal_t*            mMouseUpSignal;
     commit_signal_t*            mHeldDownSignal;
 
-    const LLFontGL*             mGLFont;
-    LLFontVertexBuffer          mFontBuffer;
-
     S32                         mMouseDownFrame;
     S32                         mMouseHeldDownCount;    // Counter for parameter passed to held-down callback
     F32                         mHeldDownDelay;         // seconds, after which held-down callbacks get called
@@ -392,6 +387,10 @@ protected:
     bool                        mForceFlashing; // Stick flashing color even if button is pressed
     bool                        mHandleRightMouse;
 
+private:
+    const LLFontGL* mGLFont;
+    LLFontVertexBuffer          mFontBuffer;
+
 protected:
     virtual std::string _getSearchText() const
     {
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 7ef2e54429..8b998971b6 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -30,6 +30,7 @@
 #include "llscrolllistcell.h"
 
 #include "llcheckboxctrl.h"
+#include "llfontvertexbuffer.h"
 #include "llui.h"   // LLUIImage
 #include "lluictrlfactory.h"
 
@@ -156,7 +157,7 @@ S32 LLScrollListIcon::getWidth() const
 }
 
 
-void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)  const
+void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)
 {
     if (mIcon)
     {
@@ -236,7 +237,7 @@ S32 LLScrollListBar::getWidth() const
 }
 
 
-void LLScrollListBar::draw(const LLColor4& color, const LLColor4& highlight_color)   const
+void LLScrollListBar::draw(const LLColor4& color, const LLColor4& highlight_color)
 {
     S32 bar_width = getWidth() - mLeftPad - mRightPad;
     S32 left = (S32)(bar_width - bar_width * mRatio);
@@ -255,6 +256,7 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
     mText(p.label.isProvided() ? p.label() : p.value().asString()),
     mAltText(p.alt_value().asString()),
     mFont(p.font),
+    mFontBuffer(false),
     mColor(p.color),
     mUseColor(p.color.isProvided()),
     mFontAlignment(p.font_halign),
@@ -308,6 +310,19 @@ bool LLScrollListText::needsToolTip() const
     return mFont->getWidth(mText.getWString().c_str()) > getWidth();
 }
 
+void LLScrollListText::setTextWidth(S32 value)
+{
+    mTextWidth = value;
+    mFontBuffer.reset();
+}
+
+void LLScrollListText::setWidth(S32 width)
+{
+    LLScrollListCell::setWidth(width);
+    mTextWidth = width;
+    mFontBuffer.reset();
+}
+
 //virtual
 bool LLScrollListText::getVisible() const
 {
@@ -341,6 +356,7 @@ void LLScrollListText::setColor(const LLColor4& color)
 void LLScrollListText::setText(const LLStringExplicit& text)
 {
     mText = text;
+    mFontBuffer.reset();
 }
 
 void LLScrollListText::setFontStyle(const U8 font_style)
@@ -348,6 +364,13 @@ void LLScrollListText::setFontStyle(const U8 font_style)
     LLFontDescriptor new_desc(mFont->getFontDesc());
     new_desc.setStyle(font_style);
     mFont = LLFontGL::getFont(new_desc);
+    mFontBuffer.reset();
+}
+
+void LLScrollListText::setAlignment(LLFontGL::HAlign align)
+{
+    mFontAlignment = align;
+    mFontBuffer.reset();
 }
 
 //virtual
@@ -375,7 +398,7 @@ const LLSD LLScrollListText::getAltValue() const
 }
 
 
-void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const
+void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color)
 {
     LLColor4 display_color;
     if (mUseColor)
@@ -426,17 +449,18 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
         start_x = (F32)getWidth() * 0.5f;
         break;
     }
-    mFont->render(mText.getWString(), 0,
-                    start_x, 0.f,
-                    display_color,
-                    mFontAlignment,
-                    LLFontGL::BOTTOM,
-                    0,
-                    LLFontGL::NO_SHADOW,
-                    string_chars,
-                    getTextWidth(),
-                    &right_x,
-                    true);
+    mFontBuffer.render(mFont,
+                       mText.getWString(), 0,
+                       start_x, 0.f,
+                       display_color,
+                       mFontAlignment,
+                       LLFontGL::BOTTOM,
+                       0,
+                       LLFontGL::NO_SHADOW,
+                       string_chars,
+                       getTextWidth(),
+                       &right_x,
+                       true);
 }
 
 //
@@ -475,7 +499,7 @@ LLScrollListCheck::~LLScrollListCheck()
     mCheckBox = NULL;
 }
 
-void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color) const
+void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color)
 {
     mCheckBox->draw();
 }
@@ -592,7 +616,7 @@ void LLScrollListIconText::setWidth(S32 width)
 }
 
 
-void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight_color)  const
+void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight_color)
 {
     LLColor4 display_color;
     if (mUseColor)
@@ -650,7 +674,9 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
         start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getWString().c_str())) * 0.5f));
         break;
     }
-    mFont->render(mText.getWString(), 0,
+    mFontBuffer.render(
+        mFont,
+        mText.getWString(), 0,
         start_text_x, 0.f,
         display_color,
         mFontAlignment,
diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h
index c5d785ae52..e7ff5c8424 100644
--- a/indra/llui/llscrolllistcell.h
+++ b/indra/llui/llscrolllistcell.h
@@ -29,6 +29,7 @@
 #define LLSCROLLLISTCELL_H
 
 #include "llfontgl.h"       // HAlign
+#include "llfontvertexbuffer.h"       // HAlign
 #include "llpointer.h"      // LLPointer<>
 #include "lluistring.h"
 #include "v4color.h"
@@ -96,7 +97,7 @@ public:
     LLScrollListCell(const LLScrollListCell::Params&);
     virtual ~LLScrollListCell() {};
 
-    virtual void            draw(const LLColor4& color, const LLColor4& highlight_color) const {};      // truncate to given width, if possible
+    virtual void            draw(const LLColor4& color, const LLColor4& highlight_color) {};      // truncate to given width, if possible
     virtual S32             getWidth() const {return mWidth;}
     virtual S32             getContentWidth() const { return 0; }
     virtual S32             getHeight() const { return 0; }
@@ -127,7 +128,7 @@ class LLScrollListSpacer : public LLScrollListCell
 public:
     LLScrollListSpacer(const LLScrollListCell::Params& p) : LLScrollListCell(p) {}
     /*virtual*/ ~LLScrollListSpacer() {};
-    /*virtual*/ void            draw(const LLColor4& color, const LLColor4& highlight_color) const {}
+    /*virtual*/ void            draw(const LLColor4& color, const LLColor4& highlight_color) {}
 };
 
 /*
@@ -139,7 +140,7 @@ public:
     LLScrollListText(const LLScrollListCell::Params&);
     /*virtual*/ ~LLScrollListText();
 
-    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color);
     /*virtual*/ S32     getContentWidth() const;
     /*virtual*/ S32     getHeight() const;
     /*virtual*/ void    setValue(const LLSD& value);
@@ -155,18 +156,20 @@ public:
     /*virtual*/ bool    needsToolTip() const;
 
     S32             getTextWidth() const { return mTextWidth;}
-    void            setTextWidth(S32 value) { mTextWidth = value;}
-    virtual void    setWidth(S32 width) { LLScrollListCell::setWidth(width); mTextWidth = width; }
+    void            setTextWidth(S32 value);
+    virtual void    setWidth(S32 width);
 
     void            setText(const LLStringExplicit& text);
     void            setFontStyle(const U8 font_style);
-    void            setAlignment(LLFontGL::HAlign align) { mFontAlignment = align; }
+    void            setAlignment(LLFontGL::HAlign align);
 
 protected:
+
     LLUIString      mText;
     LLUIString      mAltText;
     S32             mTextWidth;
     const LLFontGL* mFont;
+    LLFontVertexBuffer mFontBuffer;
     LLColor4        mColor;
     LLColor4        mHighlightColor;
     U8              mUseColor;
@@ -188,7 +191,7 @@ class LLScrollListIcon : public LLScrollListCell
 public:
     LLScrollListIcon(const LLScrollListCell::Params& p);
     /*virtual*/ ~LLScrollListIcon();
-    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color);
     /*virtual*/ S32     getWidth() const;
     /*virtual*/ S32     getHeight() const;
     /*virtual*/ const LLSD      getValue() const;
@@ -207,7 +210,7 @@ class LLScrollListBar : public LLScrollListCell
 public:
     LLScrollListBar(const LLScrollListCell::Params& p);
     /*virtual*/ ~LLScrollListBar();
-    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color);
     /*virtual*/ S32     getWidth() const;
     /*virtual*/ S32     getHeight() const;
     /*virtual*/ const LLSD      getValue() const;
@@ -229,7 +232,7 @@ class LLScrollListCheck : public LLScrollListCell
 public:
     LLScrollListCheck( const LLScrollListCell::Params&);
     /*virtual*/ ~LLScrollListCheck();
-    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color);
     /*virtual*/ S32     getHeight() const           { return 0; }
     /*virtual*/ const LLSD  getValue() const;
     /*virtual*/ void    setValue(const LLSD& value);
@@ -264,13 +267,11 @@ class LLScrollListIconText : public LLScrollListText
 public:
     LLScrollListIconText(const LLScrollListCell::Params& p);
     /*virtual*/ ~LLScrollListIconText();
-    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color) const;
+    /*virtual*/ void    draw(const LLColor4& color, const LLColor4& highlight_color);
     /*virtual*/ const LLSD      getValue() const;
     /*virtual*/ void    setValue(const LLSD& value);
 
-
-    S32                 getIconWidth() const;
-    /*virtual*/ void    setWidth(S32 width);/* { LLScrollListCell::setWidth(width); mTextWidth = width - ; }*/
+    /*virtual*/ void    setWidth(S32 width);
 
 private:
     LLPointer<LLUIImage>    mIcon;
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 35961da579..d10e12d3a8 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -52,6 +52,8 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
     , mInboxButton(NULL)
     , mInventoryPanel(NULL)
     , mSavedFolderState(NULL)
+    , mLastItemCount(-1)
+    , mLastFreshItemCount(-1)
 {
     mSavedFolderState = new LLSaveFolderState();
     mSavedFolderState->setApply(false);
@@ -253,28 +255,40 @@ void LLPanelMarketplaceInbox::draw()
 
     llassert(mFreshCountCtrl != NULL);
 
-    if (item_count > 0)
+    if (mLastItemCount != item_count)
     {
-        std::string item_count_str = llformat("%d", item_count);
-
-        LLStringUtil::format_map_t args;
-        args["[NUM]"] = item_count_str;
-        mInboxButton->setLabel(getString("InboxLabelWithArg", args));
-
-        // set green text to fresh item count
-        U32 fresh_item_count = getFreshItemCount();
-        mFreshCountCtrl->setVisible((fresh_item_count > 0));
+        mLastItemCount = item_count;
+        if (item_count > 0)
+        {
+            std::string item_count_str = llformat("%d", item_count);
 
-        if (fresh_item_count > 0)
+            LLStringUtil::format_map_t args;
+            args["[NUM]"] = item_count_str;
+            // setLabel is expensive, causes buffer regeneration
+            mInboxButton->setLabel(getString("InboxLabelWithArg", args));
+        }
+        else
         {
-            mFreshCountCtrl->setTextArg("[NUM]", llformat("%d", fresh_item_count));
+            mInboxButton->setLabel(getString("InboxLabelNoArg"));
+
+            mFreshCountCtrl->setVisible(false);
         }
     }
-    else
+
+    if (item_count > 0)
     {
-        mInboxButton->setLabel(getString("InboxLabelNoArg"));
+        // set green text to fresh item count
+        U32 fresh_item_count = getFreshItemCount();
+        if (mLastFreshItemCount != fresh_item_count)
+        {
+            mLastFreshItemCount = fresh_item_count;
+            mFreshCountCtrl->setVisible((fresh_item_count > 0));
 
-        mFreshCountCtrl->setVisible(false);
+            if (fresh_item_count > 0)
+            {
+                mFreshCountCtrl->setTextArg("[NUM]", llformat("%d", fresh_item_count));
+            }
+        }
     }
 
     LLPanel::draw();
diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h
index e711bb5e5c..493801b96c 100644
--- a/indra/newview/llpanelmarketplaceinbox.h
+++ b/indra/newview/llpanelmarketplaceinbox.h
@@ -75,6 +75,8 @@ private:
     LLButton *          mInboxButton;
     LLInventoryPanel *  mInventoryPanel;
     LLSaveFolderState*          mSavedFolderState;
+    S32                 mLastItemCount;
+    S32                 mLastFreshItemCount;
 };
 
 
-- 
cgit v1.2.3


From 4cc0edb189c4deaa205f986d20a6959aa83fb25c Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 2 Sep 2024 22:14:42 +0300
Subject: viewer#2411 Cleanup

---
 indra/llrender/llfontvertexbuffer.cpp |   9 +--
 indra/llrender/llfontvertexbuffer.h   |   7 +--
 indra/llrender/llrender.cpp           | 114 ----------------------------------
 indra/llrender/llrender.h             |   4 +-
 indra/llui/llbadge.cpp                |   1 -
 indra/llui/llbutton.cpp               |   1 -
 indra/llui/llbutton.h                 |   6 +-
 indra/llui/llscrolllistcell.cpp       |   1 -
 indra/newview/llhudnametag.h          |   4 +-
 9 files changed, 7 insertions(+), 140 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 417bacd69d..96ec94fe0f 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -31,8 +31,7 @@
 #include "llvertexbuffer.h"
 
 
-LLFontVertexBuffer::LLFontVertexBuffer(bool track_changes)
-: mTrackStringChanges(track_changes)
+LLFontVertexBuffer::LLFontVertexBuffer()
 {
 }
 
@@ -141,11 +140,6 @@ S32 LLFontVertexBuffer::render(
         genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
             style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
     }
-    else if (mTrackStringChanges && mLastStringHash != sStringHasher._Do_hash(text))
-    {
-        genBuffers(fontp, text, begin_offset, x, y, color, halign, valign,
-            style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color);
-    }
     else
     {
         renderBuffers();
@@ -183,7 +177,6 @@ void LLFontVertexBuffer::genBuffers(
     mLastOffset = begin_offset;
     mLastMaxChars = max_chars;
     mLastMaxPixels = max_pixels;
-    mLastStringHash = sStringHasher._Do_hash(text);
     mLastX = x;
     mLastY = y;
     mLastColor = color;
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h
index d41c6205ac..67cf2ca13c 100644
--- a/indra/llrender/llfontvertexbuffer.h
+++ b/indra/llrender/llfontvertexbuffer.h
@@ -35,7 +35,7 @@ class LLVertexBufferData;
 class LLFontVertexBuffer
 {
 public:
-    LLFontVertexBuffer(bool track_changes = true);
+    LLFontVertexBuffer();
     ~LLFontVertexBuffer();
 
     void reset();
@@ -101,7 +101,6 @@ private:
     S32 mLastOffset = 0;
     S32 mLastMaxChars = 0;
     S32 mLastMaxPixels = 0;
-    size_t mLastStringHash = 0;
     F32 mLastX = 0.f;
     F32 mLastY = 0.f;
     LLColor4 mLastColor;
@@ -115,10 +114,6 @@ private:
     F32 mLastScaleX = 1.f;
     F32 mLastScaleY = 1.f;
     LLCoordGL mLastOrigin;
-
-    bool mTrackStringChanges = true;
-
-    static std::hash<LLWString> sStringHasher;
 };
 
 #endif
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index b906563b08..a40a668a70 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1592,50 +1592,6 @@ void LLRender::end()
     }
 }
 
-LLVertexBuffer* LLRender::beginNoCache(const GLuint& mode, S32& count)
-{
-    if (mode != mMode)
-    {
-        if (mode == LLRender::QUADS)
-        {
-            mQuadCycle = 1;
-        }
-
-        if (mMode == LLRender::QUADS ||
-            mMode == LLRender::LINES ||
-            mMode == LLRender::TRIANGLES ||
-            mMode == LLRender::POINTS)
-        {
-            return getBuffer(count);
-        }
-        else if (mCount != 0)
-        {
-            LL_ERRS() << "gGL.begin() called redundantly." << LL_ENDL;
-        }
-        mMode = mode;
-    }
-    return nullptr;
-}
-
-LLVertexBuffer* LLRender::endNoCache(S32& count)
-{
-    if (mCount == 0)
-    {
-        return nullptr;
-        //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
-    }
-
-    if ((mMode != LLRender::QUADS &&
-        mMode != LLRender::LINES &&
-        mMode != LLRender::TRIANGLES &&
-        mMode != LLRender::POINTS) ||
-        mCount > 2048)
-    {
-        return getBuffer(count);
-    }
-    return nullptr;
-}
-
 void LLRender::flush()
 {
     STOP_GLERROR;
@@ -1844,76 +1800,6 @@ void LLRender::resetStriders(S32 count)
     mCount = 0;
 }
 
-LLVertexBuffer* LLRender::getBuffer(S32 & count)
-{
-    STOP_GLERROR;
-    LLVertexBuffer *vb;
-    if (mCount > 0)
-    {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
-        llassert(LLGLSLShader::sCurBoundShaderPtr != nullptr);
-        if (!mUIOffset.empty())
-        {
-            sUICalls++;
-            sUIVerts += mCount;
-        }
-
-        //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
-        count = mCount;
-
-        if (mMode == LLRender::QUADS && !sGLCoreProfile)
-        {
-            if (mCount % 4 != 0)
-            {
-                count -= (mCount % 4);
-                LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
-            }
-        }
-
-        if (mMode == LLRender::TRIANGLES)
-        {
-            if (mCount % 3 != 0)
-            {
-                count -= (mCount % 3);
-                LL_WARNS() << "Incomplete triangle requested." << LL_ENDL;
-            }
-        }
-
-        if (mMode == LLRender::LINES)
-        {
-            if (mCount % 2 != 0)
-            {
-                count -= (mCount % 2);
-                LL_WARNS() << "Incomplete line requested." << LL_ENDL;
-            }
-        }
-
-        mCount = 0;
-
-        if (mBuffer)
-        {
-            LL_PROFILE_ZONE_NAMED_CATEGORY_VERTEX("vb cache miss");
-
-            U32 attribute_mask = LLGLSLShader::sCurBoundShaderPtr->mAttributeMask;
-            vb = genBuffer(attribute_mask, count);
-            drawBuffer(vb, mMode, count);
-        }
-        else
-        {
-            // mBuffer is present in main thread and not present in an image thread
-            LL_ERRS() << "A flush call from outside main rendering thread" << LL_ENDL;
-        }
-
-        resetStriders(count);
-    }
-    else
-    {
-        count = 0;
-    }
-
-    return vb;
-}
-
 void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
 {
     //the range of mVerticesp, mColorsp and mTexcoordsp is [0, 4095]
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index aeee8685ab..39c13e328a 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -45,6 +45,7 @@
 #include "glh/glh_linear.h"
 
 #include <array>
+#include <list>
 
 class LLVertexBuffer;
 class LLCubeMap;
@@ -423,9 +424,6 @@ public:
     void begin(const GLuint& mode);
     void end();
 
-    LLVertexBuffer* beginNoCache(const GLuint& mode, S32& count);
-    LLVertexBuffer* endNoCache(S32& count);
-    LLVertexBuffer* getBuffer(S32& count);
     U8 getMode() const { return mMode; }
 
     void vertex2i(const GLint& x, const GLint& y);
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 48489db615..c6654ee0aa 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -105,7 +105,6 @@ LLBadge::LLBadge(const LLBadge::Params& p)
     , mPaddingVert(p.padding_vert)
     , mParentScroller(NULL)
     , mDrawAtParentTop(false)
-    , mFontBuffer(false)
 {
     if (mImage.isNull())
     {
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index d4e5d501db..387d2c0d07 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -124,7 +124,6 @@ LLButton::Params::Params()
 LLButton::LLButton(const LLButton::Params& p)
     : LLUICtrl(p),
     LLBadgeOwner(getHandle()),
-    mFontBuffer(false),
     mMouseDownFrame(0),
     mMouseHeldDownCount(0),
     mFlashing( false ),
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 23a3a05e65..6a389f0554 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -253,8 +253,8 @@ public:
     void            setDisabledLabelColor(const LLUIColor& c);
 
     void            setFont(const LLFontGL* font);
-    const LLFontGL* getFont() const { return mGLFont; }
-    const std::string& getText() const { return getCurrentLabel().getString(); }
+    const LLFontGL* getFont() const override { return mGLFont; }
+    const std::string& getText() const override { return getCurrentLabel().getString(); }
 
     S32             getLastDrawCharsCount() const { return mLastDrawCharsCount; }
     bool            labelIsTruncated() const;
@@ -392,7 +392,7 @@ private:
     LLFontVertexBuffer          mFontBuffer;
 
 protected:
-    virtual std::string _getSearchText() const
+    virtual std::string _getSearchText() const override
     {
         return getLabelUnselected() + getToolTip();
     }
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 8b998971b6..a3108d77e8 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -256,7 +256,6 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
     mText(p.label.isProvided() ? p.label() : p.value().asString()),
     mAltText(p.alt_value().asString()),
     mFont(p.font),
-    mFontBuffer(false),
     mColor(p.color),
     mUseColor(p.color.isProvided()),
     mFontAlignment(p.font_halign),
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 0a882ac273..b48a606982 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -59,9 +59,7 @@ protected:
         :   mColor(color),
             mStyle(style),
             mText(text),
-            mFont(font),
-            mFontBufferLabel(false),
-            mFontBufferText(false)
+            mFont(font)
         {}
         F32 getWidth(const LLFontGL* font);
         const LLWString& getText() const { return mText; }
-- 
cgit v1.2.3


From 2fc8d5ff3cfa1b9ad00b310cd4a6cdb557b9415c Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 3 Sep 2024 17:22:04 +0300
Subject: viewer#2411 Cleanup #2

---
 indra/llrender/llrender.cpp |  6 +++++-
 indra/llui/llbutton.cpp     | 12 ------------
 indra/llui/llbutton.h       |  1 -
 3 files changed, 5 insertions(+), 14 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index a40a668a70..828a509971 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1531,6 +1531,10 @@ void LLRender::clearErrors()
 
 void LLRender::beginList(std::list<LLVertexBufferData> *list)
 {
+    if (sBufferDataList)
+    {
+        LL_ERRS() << "beginList called while another list is open." << LL_ENDL;
+    }
     llassert(LLGLSLShader::sCurBoundShaderPtr == &gUIProgram);
     flush();
     sBufferDataList = list;
@@ -1545,7 +1549,7 @@ void LLRender::endList()
     }
     else
     {
-        llassert(false); // something failed to provide a list or closed it twice
+        llassert(false); // endList called without an open list
     }
 }
 
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 387d2c0d07..1bce31edb1 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -427,18 +427,6 @@ void LLButton::onVisibilityChange(bool new_visibility)
     return LLUICtrl::onVisibilityChange(new_visibility);
 }
 
-void LLButton::reshape(S32 width, S32 height, bool called_from_parent)
-{
-    S32 delta_width = width - getRect().getWidth();
-    S32 delta_height = height - getRect().getHeight();
-
-    if (delta_width || delta_height || sForceReshape)
-    {
-        LLUICtrl::reshape(width, height, called_from_parent);
-        mFontBuffer.reset();
-    }
-}
-
 void LLButton::dirtyRect()
 {
     LLUICtrl::dirtyRect();
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 6a389f0554..890e7c2d1e 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -169,7 +169,6 @@ public:
     /*virtual*/ bool postBuild()  override;
 
     void onVisibilityChange(bool visible) override;
-    void reshape(S32 width, S32 height, bool called_from_parent = true) override;
     void dirtyRect() override;
 
     virtual void    onMouseLeave(S32 x, S32 y, MASK mask) override;
-- 
cgit v1.2.3


From f1e0fc68e78d732ff433bb83c0c894ed23bbf3b2 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 4 Sep 2024 16:31:39 +0200
Subject: #2471 The Destinations ComboBox on Login Screen... (quick fix)

---
 indra/llui/llcombobox.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'indra')

diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index b64794a244..a1c16ccdec 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -521,12 +521,16 @@ bool LLComboBox::setCurrentByIndex(S32 index)
         if (item->getEnabled())
         {
             mList->selectItem(item, -1, true);
+            LLSD::String label = item->getColumn(0)->getValue().asString();
             if (mTextEntry)
             {
-                LLSD::String label = item->getColumn(0)->getValue().asString();
                 mTextEntry->setText(label);
                 mTextEntry->setTentative(false);
             }
+            if (!mAllowTextEntry)
+            {
+                mButton->setLabel(label);
+            }
             mLastSelectedIndex = index;
             return true;
         }
-- 
cgit v1.2.3


From cb9f3dcfe9a55789b757bf5a7d9af3d93710c20f Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Wed, 4 Sep 2024 11:34:44 -0500
Subject: #2482 Low end NVIDIA compatibility pass (#2486)

- Use GL_NVX_gpu_memory_info when available
- Disable transparent water on Mid+ and lower
- Adjust GPU benchmark to better tell the truth
- Texture bias tune up
- viewer-private/#277 - Report foreground_time in viewer stats
---
 indra/llrender/llgl.cpp               | 12 +++++++++
 indra/llrender/llgl.h                 |  1 +
 indra/newview/featuretable.txt        |  4 +--
 indra/newview/featuretable_mac.txt    |  8 +++---
 indra/newview/llglsandbox.cpp         |  6 ++++-
 indra/newview/llviewerstats.cpp       |  3 +++
 indra/newview/llviewertexture.cpp     | 50 ++++++++++++++++++++---------------
 indra/newview/llviewertexturelist.cpp |  2 +-
 8 files changed, 57 insertions(+), 29 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 7959b3bb57..0afe78a30c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1038,6 +1038,7 @@ void LLGLManager::initWGL()
         GLH_EXT_NAME(wglGetGPUIDsAMD) = (PFNWGLGETGPUIDSAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUIDsAMD");
         GLH_EXT_NAME(wglGetGPUInfoAMD) = (PFNWGLGETGPUINFOAMDPROC)GLH_EXT_GET_PROC_ADDRESS("wglGetGPUInfoAMD");
     }
+    mHasNVXGpuMemoryInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts);
 
     if (ExtensionExists("WGL_EXT_swap_control", gGLHExts.mSysExts))
     {
@@ -1205,6 +1206,17 @@ bool LLGLManager::initGL()
             LL_WARNS("RenderInit") << "VRAM Detected (AMDAssociations):" << mVRAM << LL_ENDL;
         }
     }
+    else if (mHasNVXGpuMemoryInfo)
+    {
+        GLint mem_kb = 0;
+        glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &mem_kb);
+        mVRAM = mem_kb / 1024;
+
+        if (mVRAM != 0)
+        {
+            LL_WARNS("RenderInit") << "VRAM Detected (NVXGpuMemoryInfo):" << mVRAM << LL_ENDL;
+        }
+    }
 #endif
 
 #if LL_WINDOWS
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index be1c0a532a..cd1ba55b16 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -97,6 +97,7 @@ public:
 
     // Vendor-specific extensions
     bool mHasAMDAssociations = false;
+    bool mHasNVXGpuMemoryInfo = false;
 
     bool mIsAMD;
     bool mIsNVIDIA;
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 213f0ab845..131d995339 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,4 +1,4 @@
-version 62
+version 63
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -200,7 +200,7 @@ RenderFlexTimeFactor		1	1.0
 RenderGlowResolutionPow		1	9
 RenderMaxPartCount			1	4096
 RenderLocalLightCount		1	1024
-RenderTransparentWater      1   1
+RenderTransparentWater      1   0
 RenderTerrainDetail			1	1
 RenderTerrainLODFactor		1	2.0
 RenderTerrainPBRDetail      1   0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 008e4c8882..7e1313c05d 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 59
+version 60
 // The version number above should be incremented IF AND ONLY IF some
 // change has been made that is sufficiently important to justify
 // resetting the graphics preferences of all users to the recommended
@@ -131,7 +131,7 @@ RenderTerrainDetail			1	1
 RenderTerrainLODFactor		1	1.0
 RenderTerrainPBRDetail      1   -1
 RenderTerrainPBRPlanarSampleCount 1   1
-RenderTransparentWater		1	1
+RenderTransparentWater		1	0
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.125
 RenderDeferredSSAO			1	0
@@ -166,7 +166,7 @@ RenderTerrainDetail			1	1
 RenderTerrainLODFactor		1	2.0
 RenderTerrainPBRDetail      1   0
 RenderTerrainPBRPlanarSampleCount 1   1
-RenderTransparentWater		1	1
+RenderTransparentWater		1	0
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.25
 RenderDeferredSSAO			1	0
@@ -201,7 +201,7 @@ RenderTerrainDetail			1	1
 RenderTerrainLODFactor		1	2.0
 RenderTerrainPBRDetail      1   0
 RenderTerrainPBRPlanarSampleCount 1   1
-RenderTransparentWater		1	1
+RenderTransparentWater		1	0
 RenderTreeLODFactor			1	0.5
 RenderVolumeLODFactor		1	1.375
 RenderDeferredSSAO			1	0
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 19cb4d04e2..930a8c28d9 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -1075,6 +1075,9 @@ F32 gpu_benchmark()
             return -1.f;
         }
         LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA, res,res,GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+        // disable mipmaps and use point filtering to cause cache misses
+        gGL.getTexUnit(0)->setHasMipMaps(false);
+        gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
 
         if (alloc_timer.getElapsedTimeF32() > time_limit)
         {
@@ -1191,7 +1194,8 @@ F32 gpu_benchmark()
     F32 seconds = ms/1000.f;
 
     F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn;
-    F32 samples_sec = (F32)((samples_drawn/1000000000.0)/seconds);
+    F64 gpixels_drawn = samples_drawn / 1000000000.0;
+    F32 samples_sec = (F32)(gpixels_drawn/seconds);
     gbps = samples_sec*4;  // 4 bytes per sample
 
     LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d1ee9ea17c..5b96d351ef 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -597,6 +597,9 @@ void send_viewer_stats(bool include_preferences)
         agent["run_time"] = run_time;
     }
 
+    // report time the viewer has spent in the foreground
+    agent["foreground_time"] = gForegroundTime.getElapsedTimeF32();
+
     // send fps only for time app spends in foreground
     agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32();
     agent["version"] = LLVersionInfo::instance().getChannelAndVersion();
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 452d6f2c04..15b4a3aab3 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -511,44 +511,52 @@ void LLViewerTexture::updateClass()
 
     F32 over_pct = (used - target) / target;
 
-    bool is_low = over_pct > 0.f;
+    bool is_sys_low = isSystemMemoryLow();
+    bool is_low = is_sys_low || over_pct > 0.f;
 
-    if (isSystemMemoryLow())
+    static bool was_low = false;
+    static bool was_sys_low = false;
+
+    if (is_low && !was_low)
+    {
+        // slam to 1.5 bias the moment we hit low memory (discards off screen textures immediately)
+        sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
+
+        if (is_sys_low)
+        { // if we're low on system memory, emergency purge off screen textures to avoid a death spiral
+            LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
+            for (auto& image : gTextureList)
+            {
+                gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/);
+            }
+        }
+    }
+
+    was_low = is_low;
+    was_sys_low = is_sys_low;
+
+    if (is_low)
     {
-        is_low = true;
-        // System RAM is low -> ramp up discard bias over time to free memory
+        // ramp up discard bias over time to free memory
         if (sEvaluationTimer.getElapsedTimeF32() > MEMORY_CHECK_WAIT_TIME)
         {
             static LLCachedControl<F32> low_mem_min_discard_increment(gSavedSettings, "RenderLowMemMinDiscardIncrement", .1f);
-            sDesiredDiscardBias += (F32) low_mem_min_discard_increment * (F32) gFrameIntervalSeconds;
+            sDesiredDiscardBias += (F32)low_mem_min_discard_increment * (F32)gFrameIntervalSeconds;
             sEvaluationTimer.reset();
         }
     }
     else
     {
-        sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.f + over_pct);
+        // don't execute above until the slam to 1.5 has a chance to take effect
+        sEvaluationTimer.reset();
 
+        // lower discard bias over time when free memory is available
         if (sDesiredDiscardBias > 1.f && over_pct < 0.f)
         {
             sDesiredDiscardBias -= gFrameIntervalSeconds * 0.01f;
         }
     }
 
-    static bool was_low = false;
-    if (is_low && !was_low)
-    {
-        LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
-        sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
-
-        for (auto& image : gTextureList)
-        {
-            gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/);
-        }
-    }
-
-    was_low = is_low;
-
-
     // set to max discard bias if the window has been backgrounded for a while
     static bool was_backgrounded = false;
     static LLFrameTimer backgrounded_timer;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index a5700ab264..0a82a9990f 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -949,7 +949,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
       // this is an alternative to decaying mMaxVirtualSize over time
       // that keeps textures from continously downrezzing and uprezzing in the background
 
-        if (LLViewerTexture::sDesiredDiscardBias > 2.f ||
+        if (LLViewerTexture::sDesiredDiscardBias > 1.5f ||
             (!on_screen && LLViewerTexture::sDesiredDiscardBias > 1.f))
         {
             imagep->mMaxVirtualSize = 0.f;
-- 
cgit v1.2.3


From c2724537adab9d31c23d33e36002772a9c56f4c3 Mon Sep 17 00:00:00 2001
From: TJ <tj8@live.com.au>
Date: Thu, 5 Sep 2024 02:42:01 +1000
Subject: Fixed missing comma in list. Fixed loop with too small loop variable.
 (#2497)

---
 indra/newview/llfloaterimagepreview.cpp | 2 +-
 indra/newview/llviewerfloaterreg.cpp    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index a900e04707..711c33e73d 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -852,7 +852,7 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
     }
 
     // build indices
-    for (U16 i = 0; i < num_indices; i++)
+    for (U32 i = 0; i < num_indices; i++)
     {
         *(index_strider++) = vf.mIndices[i];
     }
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 9bdd246129..ef68609182 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -242,7 +242,7 @@ public:
                 "avatar_picker",
                 "camera",
                 "camera_presets",
-                "change_item_thumbnail"
+                "change_item_thumbnail",
                 "classified",
                 "add_landmark",
                 "delete_pref_preset",
-- 
cgit v1.2.3


From 2a188ab306041f28dc40877da1e93ad13f36f8a5 Mon Sep 17 00:00:00 2001
From: Brad Linden <46733234+brad-linden@users.noreply.github.com>
Date: Wed, 4 Sep 2024 10:42:59 -0700
Subject: Fix another 1856 crash on startup case when Terrain Bake shaders are
 unsupported (#2491)

fixes secondlife/viewer#1856
---
 indra/newview/app_settings/settings.xml            | 11 +++++++++++
 indra/newview/llviewermenu.cpp                     |  7 +++++++
 indra/newview/llviewershadermgr.cpp                |  9 ++++++++-
 indra/newview/skins/default/xui/en/menu_viewer.xml |  3 ++-
 4 files changed, 28 insertions(+), 2 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5e7ae32b81..56cd58d88e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7183,6 +7183,17 @@
         <key>Value</key>
         <integer>1</integer>
     </map>
+    <key>RenderCanUseTerrainBakeShaders</key>
+    <map>
+        <key>Comment</key>
+        <string>Hardware has support for Terrain Bake shaders</string>
+        <key>Persist</key>
+        <integer>0</integer>
+        <key>Type</key>
+        <string>Boolean</string>
+        <key>Value</key>
+        <integer>1</integer>
+    </map>
   <key>RenderClass1MemoryBandwidth</key>
   <map>
     <key>Comment</key>
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e1664752e7..35b7cb2763 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3446,6 +3446,12 @@ bool enable_gltf_upload()
     return enable_gltf_save_as();
 }
 
+bool enable_terrain_local_paintmap()
+{
+    static LLCachedControl<bool> can_use_shaders(gSavedSettings, "RenderCanUseTerrainBakeShaders", true);
+    return can_use_shaders;
+}
+
 class LLSelfRemoveAllAttachments : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
@@ -10217,6 +10223,7 @@ void initialize_menus()
     enable.add("EnableGLTF", boost::bind(&enable_gltf));
     enable.add("EnableGLTFSaveAs", boost::bind(&enable_gltf_save_as));
     enable.add("EnableGLTFUpload", boost::bind(&enable_gltf_upload));
+    enable.add("EnableTerrainLocalPaintMap", std::bind(&enable_terrain_local_paintmap));
 
     view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible");
     view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel");
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index c98bd9b7e2..6b0fc4f5e8 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2993,7 +2993,14 @@ bool LLViewerShaderMgr::loadShadersInterface()
         const U32 value_range = (1 << bit_depth) - 1;
         shader->addPermutation("TERRAIN_PAINT_PRECISION", llformat("%d", value_range));
         success = success && shader->createShader();
-        llassert(success);
+        //llassert(success);
+        if (!success)
+        {
+            LL_WARNS() << "Failed to create shader '" << shader->mName << "', disabling!" << LL_ENDL;
+            gSavedSettings.setBOOL("RenderCanUseTerrainBakeShaders", false);
+            // continue as if this shader never happened
+            success = true;
+        }
     }
 
     if (success)
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 40f3e51fca..56dcf15583 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3672,9 +3672,10 @@ function="World.EnvPreset"
             <menu_item_separator/>
 
             <menu_item_call
-              enabled="true"
               label="Create Local Paintmap"
               name="Create Local Paintmap">
+              <menu_item_call.on_enable
+               function="EnableTerrainLocalPaintMap"/>
               <menu_item_call.on_click
                function="Advanced.TerrainCreateLocalPaintMap" />
             </menu_item_call>
-- 
cgit v1.2.3


From e16859804561272fb257b73f4d7558a74045ca2b Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Tue, 3 Sep 2024 17:53:21 -0700
Subject: secondlife/viewer#2490: Fix PBR terrain texture transform feature
 flag handled by viewer in unpredictable manner

---
 indra/newview/app_settings/settings.xml | 2 +-
 indra/newview/llfloaterregioninfo.cpp   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 56cd58d88e..0d194288e8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9402,7 +9402,7 @@
       <key>Comment</key>
       <string>EXPERIMENTAL: Enable PBR Terrain texture transforms.</string>
       <key>Persist</key>
-      <integer>1</integer>
+      <integer>0</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 7869abf66d..7bece051fd 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -268,7 +268,7 @@ bool LLFloaterRegionInfo::postBuild()
     mInfoPanels.push_back(panel);
     static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
     static LLCachedControl<bool> feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false);
-    if (!feature_pbr_terrain_transforms_enabled || !feature_pbr_terrain_enabled)
+    if (!feature_pbr_terrain_transforms_enabled() || !feature_pbr_terrain_enabled())
     {
         panel->buildFromFile("panel_region_terrain.xml");
     }
@@ -1694,7 +1694,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
         static LLCachedControl<bool> feature_pbr_terrain_enabled(gSavedSettings, "RenderTerrainPBREnabled", false);
 
         const bool textures_ready = compp->makeTexturesReady(false, false);
-        const bool materials_ready = feature_pbr_terrain_enabled && compp->makeMaterialsReady(false, false);
+        const bool materials_ready = feature_pbr_terrain_enabled() && compp->makeMaterialsReady(false, false);
 
         bool set_texture_swatches;
         bool set_material_swatches;
@@ -1724,7 +1724,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
         {
             material_type_to_ctrl(mMaterialTypeCtrl, material_type);
             updateForMaterialType();
-            mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled);
+            mMaterialTypeCtrl->setVisible(feature_pbr_terrain_enabled());
         }
 
         if (set_texture_swatches)
@@ -1938,7 +1938,7 @@ bool LLPanelRegionTerrainInfo::sendUpdate()
     // POST to ModifyRegion endpoint, if enabled
 
     static LLCachedControl<bool> feature_pbr_terrain_transforms_enabled(gSavedSettings, "RenderTerrainPBRTransformsEnabled", false);
-    if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled)
+    if (material_type == LLTerrainMaterials::Type::PBR && feature_pbr_terrain_transforms_enabled())
     {
         LLTerrainMaterials composition;
         for (S32 i = 0; i < LLTerrainMaterials::ASSET_COUNT; ++i)
-- 
cgit v1.2.3


From 238a2a64b31e6a0b431309e363067a7fe57125ae Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 4 Sep 2024 13:42:11 +0300
Subject: viewer#2411 Use font buffer in text segments

---
 indra/llrender/llfontvertexbuffer.cpp  |   2 +
 indra/llui/lltextbase.cpp              |  55 ++++++++++++++----
 indra/llui/lltextbase.h                |   9 +++
 indra/llui/llviewmodel.cpp             |  10 ++++
 indra/llui/llviewmodel.h               |   4 +-
 indra/newview/llpanelmaininventory.cpp | 102 +++++++++++++++++++++------------
 indra/newview/llpanelmaininventory.h   |   5 +-
 7 files changed, 137 insertions(+), 50 deletions(-)

(limited to 'indra')

diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp
index 96ec94fe0f..392f235aad 100644
--- a/indra/llrender/llfontvertexbuffer.cpp
+++ b/indra/llrender/llfontvertexbuffer.cpp
@@ -42,6 +42,8 @@ LLFontVertexBuffer::~LLFontVertexBuffer()
 
 void LLFontVertexBuffer::reset()
 {
+    // Todo: some form of debug only frequecy check&assert to see if this is happening too often.
+    // Regenerating this list is expensive
     mBufferList.clear();
 }
 
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 0aebf7543c..6d480e8e00 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -948,7 +948,6 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s
 
 S32 LLTextBase::removeStringNoUndo(S32 pos, S32 length)
 {
-
     beforeValueChange();
     segment_set_t::iterator seg_iter = getSegIterContaining(pos);
     while(seg_iter != mSegments.end())
@@ -1325,6 +1324,7 @@ void LLTextBase::reshape(S32 width, S32 height, bool called_from_parent)
 //virtual
 void LLTextBase::draw()
 {
+    LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
     // reflow if needed, on demand
     reflow();
 
@@ -2586,6 +2586,11 @@ const LLWString& LLTextBase::getWText() const
     return getViewModel()->getDisplay();
 }
 
+S32 LLTextBase::getTextGeneration() const
+{
+    return getViewModel()->getDisplayGeneration();
+}
+
 // If round is true, if the position is on the right half of a character, the cursor
 // will be put to its right.  If round is false, the cursor will always be put to the
 // character's left.
@@ -3280,7 +3285,8 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e
 :   LLTextSegment(start, end),
     mStyle( style ),
     mToken(NULL),
-    mEditor(editor)
+    mEditor(editor),
+    mLastGeneration(-1)
 {
     mFontHeight = mStyle->getFont()->getLineHeight();
 
@@ -3294,7 +3300,8 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e
 LLNormalTextSegment::LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
 :   LLTextSegment(start, end),
     mToken(NULL),
-    mEditor(editor)
+    mEditor(editor),
+    mLastGeneration(-1)
 {
     mStyle = new LLStyle(LLStyle::Params().visible(is_visible).color(color));
 
@@ -3313,22 +3320,38 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec
     {
         return drawClippedSegment( getStart() + start, getStart() + end, selection_start, selection_end, draw_rect);
     }
+    else
+    {
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
+    }
     return draw_rect.mLeft;
 }
 
 // Draws a single text segment, reversing the color for selection if needed.
 F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 selection_start, S32 selection_end, LLRectf rect)
 {
-    F32 alpha = LLViewDrawContext::getCurrentContext().mAlpha;
-
-    const LLWString &text = getWText();
-
     F32 right_x = rect.mLeft;
     if (!mStyle->isVisible())
     {
         return right_x;
     }
 
+    F32 alpha = LLViewDrawContext::getCurrentContext().mAlpha;
+
+    const LLWString& text = getWText();
+    S32 text_gen = mEditor.getTextGeneration();
+
+    if (text_gen != mLastGeneration)
+    {
+        mLastGeneration = text_gen;
+
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
+    }
+
     const LLFontGL* font = mStyle->getFont();
 
     LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor())  % (alpha * mStyle->getAlpha());
@@ -3339,7 +3362,8 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 start = seg_start;
         S32 end = llmin( selection_start, seg_end );
         S32 length =  end - start;
-        font->render(text, start,
+        mFontBufferPreSelection.render(font,
+                 text, start,
                  rect,
                  color,
                  LLFontGL::LEFT, mEditor.mTextVAlign,
@@ -3359,7 +3383,8 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 end = llmin( selection_end, seg_end );
         S32 length = end - start;
 
-        font->render(text, start,
+        mFontBufferSelection.render(font,
+                 text, start,
                  rect,
                  mStyle->getSelectedColor().get(),
                  LLFontGL::LEFT, mEditor.mTextVAlign,
@@ -3377,7 +3402,8 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 start = llmax( selection_end, seg_start );
         S32 end = seg_end;
         S32 length = end - start;
-        font->render(text, start,
+        mFontBufferPostSelection.render(font,
+                 text, start,
                  rect,
                  color,
                  LLFontGL::LEFT, mEditor.mTextVAlign,
@@ -3573,6 +3599,15 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
     return num_chars;
 }
 
+void LLNormalTextSegment::updateLayout(const class LLTextBase& editor)
+{
+    LLTextSegment::updateLayout(editor);
+
+    mFontBufferPreSelection.reset();
+    mFontBufferSelection.reset();
+    mFontBufferPostSelection.reset();
+}
+
 void LLNormalTextSegment::dump() const
 {
     LL_INFOS() << "Segment [" <<
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 00cf66b134..e2981c2637 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -30,6 +30,7 @@
 
 #include "v4color.h"
 #include "lleditmenuhandler.h"
+#include "llfontvertexbuffer.h"
 #include "llspellcheckmenuhandler.h"
 #include "llstyle.h"
 #include "llkeywords.h"
@@ -131,6 +132,7 @@ public:
     /*virtual*/ bool                getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
     /*virtual*/ S32                 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
     /*virtual*/ S32                 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
+    /*virtual*/ void                updateLayout(const class LLTextBase& editor);
     /*virtual*/ F32                 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
     /*virtual*/ bool                canEdit() const { return true; }
     /*virtual*/ const LLUIColor&     getColor() const                    { return mStyle->getColor(); }
@@ -161,6 +163,12 @@ protected:
     LLKeywordToken*     mToken;
     std::string         mTooltip;
     boost::signals2::connection mImageLoadedConnection;
+
+    // font rendering
+    LLFontVertexBuffer  mFontBufferPreSelection;
+    LLFontVertexBuffer  mFontBufferSelection;
+    LLFontVertexBuffer  mFontBufferPostSelection;
+    S32                 mLastGeneration = -1;
 };
 
 // This text segment is the same as LLNormalTextSegment, the only difference
@@ -432,6 +440,7 @@ public:
     // wide-char versions
     void                    setWText(const LLWString& text);
     const LLWString&        getWText() const;
+    S32                     getTextGeneration() const;
 
     void                    appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params());
 
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index 93106b344f..35963c2b99 100644
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -82,11 +82,20 @@ void LLTextViewModel::setValue(const LLSD& value)
     // approximate LLSD storage usage
     LLViewModel::setValue(value);
     mDisplay = utf8str_to_wstring(mStringValue = value.asString());
+    mDisplayGeneration++;
 
     // mDisplay and mValue agree
     mUpdateFromDisplay = false;
 }
 
+LLWString& LLTextViewModel::getEditableDisplay()
+{
+    mDirty = true;
+    mDisplayGeneration++;
+    mUpdateFromDisplay = true;
+    return mDisplay;
+}
+
 void LLTextViewModel::setDisplay(const LLWString& value)
 {
     // This is the strange way to alter the value. Normally we'd setValue()
@@ -94,6 +103,7 @@ void LLTextViewModel::setDisplay(const LLWString& value)
     // value. But a text editor might want to edit the display string
     // directly, then convert back to UTF8 on commit.
     mDisplay = value;
+    mDisplayGeneration++;
     mDirty = true;
     // Don't immediately convert to UTF8 -- do it lazily -- we expect many
     // more setDisplay() calls than getValue() calls. Just flag that it needs
diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h
index 6cf2200a81..16b0800ce2 100644
--- a/indra/llui/llviewmodel.h
+++ b/indra/llui/llviewmodel.h
@@ -105,7 +105,8 @@ public:
     // New functions
     /// Get the stored value in string form
     const LLWString& getDisplay() const { return mDisplay; }
-    LLWString& getEditableDisplay() { mDirty = true; mUpdateFromDisplay = true; return mDisplay; }
+    S32 getDisplayGeneration() const { return mDisplayGeneration; }
+    LLWString& getEditableDisplay();
 
     /**
      * Set the display string directly (see LLTextEditor). What the user is
@@ -120,6 +121,7 @@ private:
     /// To avoid converting every widget's stored value from LLSD to LLWString
     /// every frame, cache the converted value
     LLWString mDisplay;
+    S32 mDisplayGeneration = -1;
 
     /// As the user edits individual characters (setDisplay()), defer
     /// LLWString-to-UTF8 conversions until s/he's done.
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 2466ee5973..0c068ff993 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -963,59 +963,87 @@ void LLPanelMainInventory::draw()
 
 void LLPanelMainInventory::updateItemcountText()
 {
-    if(mItemCount != gInventory.getItemCount())
-    {
-        mItemCount = gInventory.getItemCount();
-        mItemCountString = "";
-        LLLocale locale(LLLocale::USER_LOCALE);
-        LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
-    }
-
-    if(mCategoryCount != gInventory.getCategoryCount())
+    bool update = false;
+    if (mSingleFolderMode)
     {
-        mCategoryCount = gInventory.getCategoryCount();
-        mCategoryCountString = "";
-        LLLocale locale(LLLocale::USER_LOCALE);
-        LLResMgr::getInstance()->getIntegerString(mCategoryCountString, mCategoryCount);
-    }
-
-    LLStringUtil::format_map_t string_args;
-    string_args["[ITEM_COUNT]"] = mItemCountString;
-    string_args["[CATEGORY_COUNT]"] = mCategoryCountString;
-    string_args["[FILTER]"] = getFilterText();
+        LLInventoryModel::cat_array_t* cats;
+        LLInventoryModel::item_array_t* items;
 
-    std::string text = "";
+        gInventory.getDirectDescendentsOf(getCurrentSFVRoot(), cats, items);
+        S32 item_count = items ? (S32)items->size() : 0;
+        S32 cat_count = cats ? (S32)cats->size() : 0;
 
-    if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
-    {
-        text = getString("ItemcountFetching", string_args);
+        if (mItemCount != item_count)
+        {
+            mItemCount = item_count;
+            update = true;
+        }
+        if (mCategoryCount != cat_count)
+        {
+            mCategoryCount = cat_count;
+            update = true;
+        }
     }
-    else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
+    else
     {
-        text = getString("ItemcountCompleted", string_args);
+        if (mItemCount != gInventory.getItemCount())
+        {
+            mItemCount = gInventory.getItemCount();
+            update = true;
+        }
+
+        if (mCategoryCount != gInventory.getCategoryCount())
+        {
+            mCategoryCount = gInventory.getCategoryCount();
+            update = true;
+        }
     }
-    else
+
+    if (mLastFilterText != getFilterText())
     {
-        text = getString("ItemcountUnknown", string_args);
+        mLastFilterText = getFilterText();
+        update = true;
     }
 
-    if (mSingleFolderMode)
+    if (update)
     {
-        LLInventoryModel::cat_array_t *cats;
-        LLInventoryModel::item_array_t *items;
+        mItemCountString = "";
+        LLLocale locale(LLLocale::USER_LOCALE);
+        LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
 
-        gInventory.getDirectDescendentsOf(getCurrentSFVRoot(), cats, items);
+        mCategoryCountString = "";
+        LLResMgr::getInstance()->getIntegerString(mCategoryCountString, mCategoryCount);
 
-        if (items && cats)
+        LLStringUtil::format_map_t string_args;
+        string_args["[ITEM_COUNT]"] = mItemCountString;
+        string_args["[CATEGORY_COUNT]"] = mCategoryCountString;
+        string_args["[FILTER]"] = mLastFilterText;
+
+        std::string text = "";
+
+        if (mSingleFolderMode)
         {
-            string_args["[ITEM_COUNT]"] = llformat("%d", items->size());
-            string_args["[CATEGORY_COUNT]"] = llformat("%d", cats->size());
             text = getString("ItemcountCompleted", string_args);
         }
-    }
+        else
+        {
+            if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
+            {
+                text = getString("ItemcountFetching", string_args);
+            }
+            else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
+            {
+                text = getString("ItemcountCompleted", string_args);
+            }
+            else
+            {
+                text = getString("ItemcountUnknown", string_args);
+            }
+        }
 
-    mCounterCtrl->setValue(text);
-    mCounterCtrl->setToolTip(text);
+        mCounterCtrl->setValue(text);
+        mCounterCtrl->setToolTip(text);
+    }
 }
 
 void LLPanelMainInventory::onFocusReceived()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 3347ab904b..d28daddd73 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -196,9 +196,10 @@ private:
     LLSaveFolderState*          mSavedFolderState;
     std::string                 mFilterText;
     std::string                 mFilterSubString;
-    S32                         mItemCount;
+    S32                         mItemCount = 0;
+    std::string                 mLastFilterText;
     std::string                 mItemCountString;
-    S32                         mCategoryCount;
+    S32                         mCategoryCount = 0;
     std::string                 mCategoryCountString;
     LLComboBox*                 mSearchTypeCombo;
 
-- 
cgit v1.2.3


From 442ee9795ecde5a89df254b78465c8f4ed46845f Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 4 Sep 2024 15:40:11 +0300
Subject: viewer#2411 Use font buffer in line editor

---
 indra/llui/lllineeditor.cpp | 60 ++++++++++++++++++++++++++++++++++++++++-----
 indra/llui/lllineeditor.h   |  5 ++++
 2 files changed, 59 insertions(+), 6 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 60b6115b34..66b274c33f 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -436,6 +436,9 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit
     {
         mText.assign(utf8str_symbol_truncate(truncated_utf8, mMaxLengthChars));
     }
+    mFontBufferPreSelection.reset();
+    mFontBufferSelection.reset();
+    mFontBufferPostSelection.reset();
 
     if (all_selected)
     {
@@ -617,6 +620,10 @@ void LLLineEditor::replaceWithSuggestion(U32 index)
             mText.insert(it->first, suggestion);
             setCursor(it->first + (S32)suggestion.length());
 
+            mFontBufferPreSelection.reset();
+            mFontBufferSelection.reset();
+            mFontBufferPostSelection.reset();
+
             break;
         }
     }
@@ -969,6 +976,10 @@ void LLLineEditor::removeChar()
         mText.erase(getCursor() - 1, 1);
 
         setCursor(getCursor() - 1);
+
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
     }
     else
     {
@@ -992,6 +1003,10 @@ void LLLineEditor::addChar(const llwchar uni_char)
             return;
 
         mText.erase(getCursor(), 1);
+
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
     }
 
     S32 cur_bytes = static_cast<S32>(mText.getString().size());
@@ -1022,6 +1037,10 @@ void LLLineEditor::addChar(const llwchar uni_char)
 
         mText.insert(getCursor(), w_buf);
         setCursor(getCursor() + 1);
+
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
     }
     else
     {
@@ -1186,6 +1205,10 @@ void LLLineEditor::deleteSelection()
         mText.erase(left_pos, selection_length);
         deselect();
         setCursor(left_pos);
+
+        mFontBufferPreSelection.reset();
+        mFontBufferSelection.reset();
+        mFontBufferPostSelection.reset();
     }
 }
 
@@ -1346,6 +1369,10 @@ void LLLineEditor::pasteHelper(bool is_primary)
             setCursor( getCursor() + (S32)clean_string.length() );
             deselect();
 
+            mFontBufferPreSelection.reset();
+            mFontBufferSelection.reset();
+            mFontBufferPostSelection.reset();
+
             // Validate new string and rollback the if needed.
             bool need_to_rollback = mPrevalidator && !mPrevalidator.validate(mText.getWString());
             if (need_to_rollback)
@@ -1506,6 +1533,10 @@ bool LLLineEditor::handleSpecialKey(KEY key, MASK mask)
             {
                 mText.assign(*(--mCurrentHistoryLine));
                 setCursorToEnd();
+
+                mFontBufferPreSelection.reset();
+                mFontBufferSelection.reset();
+                mFontBufferPostSelection.reset();
             }
             else
             {
@@ -1523,6 +1554,10 @@ bool LLLineEditor::handleSpecialKey(KEY key, MASK mask)
             {
                 mText.assign( *(++mCurrentHistoryLine) );
                 setCursorToEnd();
+
+                mFontBufferPreSelection.reset();
+                mFontBufferSelection.reset();
+                mFontBufferPostSelection.reset();
             }
             else
             {
@@ -1897,7 +1932,8 @@ void LLLineEditor::draw()
         if( select_left > mScrollHPos )
         {
             // unselected, left side
-            rendered_text = mGLFont->render(
+            rendered_text = mFontBufferPreSelection.render(
+                mGLFont,
                 mText, mScrollHPos,
                 rendered_pixels_right, text_bottom,
                 text_color,
@@ -1919,7 +1955,8 @@ void LLLineEditor::draw()
             gl_rect_2d(ll_round(rendered_pixels_right), cursor_top, ll_round(rendered_pixels_right)+width, cursor_bottom, color);
 
             LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha );
-            rendered_text += mGLFont->render(
+            rendered_text += mFontBufferSelection.render(
+                mGLFont,
                 mText, mScrollHPos + rendered_text,
                 rendered_pixels_right, text_bottom,
                 tmp_color,
@@ -1934,7 +1971,8 @@ void LLLineEditor::draw()
         if( (rendered_pixels_right < (F32)mTextRightEdge) && (rendered_text < text_len) )
         {
             // unselected, right side
-            rendered_text += mGLFont->render(
+            rendered_text += mFontBufferPostSelection.render(
+                mGLFont,
                 mText, mScrollHPos + rendered_text,
                 rendered_pixels_right, text_bottom,
                 text_color,
@@ -1948,7 +1986,8 @@ void LLLineEditor::draw()
     }
     else
     {
-        rendered_text = mGLFont->render(
+        rendered_text = mFontBufferPreSelection.render(
+            mGLFont,
             mText, mScrollHPos,
             rendered_pixels_right, text_bottom,
             text_color,
@@ -2108,7 +2147,8 @@ void LLLineEditor::draw()
         //to give indication that it is not text you typed in
         if (0 == mText.length() && (mReadOnly || mShowLabelFocused))
         {
-            mGLFont->render(mLabel.getWString(), 0,
+            mFontBufferLabel.render(mGLFont,
+                            mLabel.getWString(), 0,
                             (F32)mTextLeftEdge, (F32)text_bottom,
                             label_color,
                             LLFontGL::LEFT,
@@ -2133,7 +2173,8 @@ void LLLineEditor::draw()
         // draw label if no text provided
         if (0 == mText.length())
         {
-            mGLFont->render(mLabel.getWString(), 0,
+            mFontBufferLabel.render(mGLFont,
+                            mLabel.getWString(), 0,
                             (F32)mTextLeftEdge, (F32)text_bottom,
                             label_color,
                             LLFontGL::LEFT,
@@ -2404,12 +2445,16 @@ void LLLineEditor::setKeystrokeCallback(callback_t callback, void* user_data)
 bool LLLineEditor::setTextArg( const std::string& key, const LLStringExplicit& text )
 {
     mText.setArg(key, text);
+    mFontBufferPreSelection.reset();
+    mFontBufferSelection.reset();
+    mFontBufferPostSelection.reset();
     return true;
 }
 
 bool LLLineEditor::setLabelArg( const std::string& key, const LLStringExplicit& text )
 {
     mLabel.setArg(key, text);
+    mFontBufferLabel.reset();
     return true;
 }
 
@@ -2508,6 +2553,9 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string,
         mPreeditOverwrittenWString.clear();
     }
     mText.insert(insert_preedit_at, mPreeditWString);
+    mFontBufferPreSelection.reset();
+    mFontBufferSelection.reset();
+    mFontBufferPostSelection.reset();
 
     mPreeditStandouts = preedit_standouts;
 
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index cdd22413e7..12fe800acb 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -40,6 +40,7 @@
 #include "llframetimer.h"
 
 #include "lleditmenuhandler.h"
+#include "llfontvertexbuffer.h"
 #include "llspellcheckmenuhandler.h"
 #include "lluictrl.h"
 #include "lluiimage.h"
@@ -344,6 +345,10 @@ protected:
 
     LLViewBorder* mBorder;
     const LLFontGL* mGLFont;
+    LLFontVertexBuffer mFontBufferPreSelection;
+    LLFontVertexBuffer mFontBufferSelection;
+    LLFontVertexBuffer mFontBufferPostSelection;
+    LLFontVertexBuffer mFontBufferLabel;
     S32         mMaxLengthBytes;            // Max length of the UTF8 string in bytes
     S32         mMaxLengthChars;            // Maximum number of characters in the string
     S32         mCursorPos;                 // I-beam is just after the mCursorPos-th character.
-- 
cgit v1.2.3


From 494ac09216c547cd62ebd43f57056807bb46d49c Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 4 Sep 2024 19:22:49 +0300
Subject: viewer#2411 Confine font vertex buffers to static text segments

Collection of vertex buffers happens to often with segmented text.
---
 indra/llui/lltextbase.cpp | 129 ++++++++++++++++++++++++++++++++++------------
 1 file changed, 95 insertions(+), 34 deletions(-)

(limited to 'indra')

diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 6d480e8e00..615619d244 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -3342,6 +3342,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
 
     const LLWString& text = getWText();
     S32 text_gen = mEditor.getTextGeneration();
+    bool is_text_read_only = mEditor.getReadOnly();
 
     if (text_gen != mLastGeneration)
     {
@@ -3354,7 +3355,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
 
     const LLFontGL* font = mStyle->getFont();
 
-    LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor())  % (alpha * mStyle->getAlpha());
+    LLColor4 color = (is_text_read_only ? mStyle->getReadOnlyColor() : mStyle->getColor())  % (alpha * mStyle->getAlpha());
 
     if( selection_start > seg_start )
     {
@@ -3362,17 +3363,40 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 start = seg_start;
         S32 end = llmin( selection_start, seg_end );
         S32 length =  end - start;
-        mFontBufferPreSelection.render(font,
-                 text, start,
-                 rect,
-                 color,
-                 LLFontGL::LEFT, mEditor.mTextVAlign,
-                 LLFontGL::NORMAL,
-                 mStyle->getShadowType(),
-                 length,
-                 &right_x,
-                 mEditor.getUseEllipses(),
-                 mEditor.getUseColor());
+        if (is_text_read_only)
+        {
+            mFontBufferPreSelection.render(
+                font,
+                text, start,
+                rect,
+                color,
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                mStyle->getShadowType(),
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+        }
+        else
+        {
+            // Font buffer doesn't do well with changes and huge notecard with a bunch
+            // of segments will see a lot of buffer updates, so instead use derect
+            // rendering to cache.
+            // Todo: instead of mLastGeneration make buffer invalidation more fine grained
+            // like string hash of a given segment.
+            font->render(
+                text, start,
+                rect,
+                color,
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                mStyle->getShadowType(),
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+        }
     }
     rect.mLeft = right_x;
 
@@ -3383,17 +3407,35 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 end = llmin( selection_end, seg_end );
         S32 length = end - start;
 
-        mFontBufferSelection.render(font,
-                 text, start,
-                 rect,
-                 mStyle->getSelectedColor().get(),
-                 LLFontGL::LEFT, mEditor.mTextVAlign,
-                 LLFontGL::NORMAL,
-                 LLFontGL::NO_SHADOW,
-                 length,
-                 &right_x,
-                 mEditor.getUseEllipses(),
-                 mEditor.getUseColor());
+        if (is_text_read_only)
+        {
+            mFontBufferSelection.render(
+                font,
+                text, start,
+                rect,
+                mStyle->getSelectedColor().get(),
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                LLFontGL::NO_SHADOW,
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+        }
+        else
+        {
+            font->render(
+                text, start,
+                rect,
+                mStyle->getSelectedColor().get(),
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                LLFontGL::NO_SHADOW,
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+        }
     }
     rect.mLeft = right_x;
     if( selection_end < seg_end )
@@ -3402,17 +3444,36 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
         S32 start = llmax( selection_end, seg_start );
         S32 end = seg_end;
         S32 length = end - start;
-        mFontBufferPostSelection.render(font,
-                 text, start,
-                 rect,
-                 color,
-                 LLFontGL::LEFT, mEditor.mTextVAlign,
-                 LLFontGL::NORMAL,
-                 mStyle->getShadowType(),
-                 length,
-                 &right_x,
-                 mEditor.getUseEllipses(),
-                 mEditor.getUseColor());
+        if (is_text_read_only)
+        {
+            mFontBufferPostSelection.render(
+                font,
+                text, start,
+                rect,
+                color,
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                mStyle->getShadowType(),
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+        }
+        else
+        {
+            font->render(
+                text, start,
+                rect,
+                color,
+                LLFontGL::LEFT, mEditor.mTextVAlign,
+                LLFontGL::NORMAL,
+                mStyle->getShadowType(),
+                length,
+                &right_x,
+                mEditor.getUseEllipses(),
+                mEditor.getUseColor());
+
+        }
     }
     return right_x;
 }
-- 
cgit v1.2.3


From 61627f6524fdb6e723fef71312b23f75a6799a65 Mon Sep 17 00:00:00 2001
From: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
Date: Wed, 4 Sep 2024 23:51:42 +0200
Subject: #2461 changing the color of my dot on the minimap

---
 .../skins/default/textures/map_avatar_you_32.tga      | Bin 3395 -> 4140 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/textures/map_avatar_you_32.tga b/indra/newview/skins/default/textures/map_avatar_you_32.tga
index 782207efd6..84b57aceaf 100644
Binary files a/indra/newview/skins/default/textures/map_avatar_you_32.tga and b/indra/newview/skins/default/textures/map_avatar_you_32.tga differ
-- 
cgit v1.2.3


From bacf9cfeab90bd1ffad827fa3c34ced985c768a2 Mon Sep 17 00:00:00 2001
From: TJ <tj8@live.com.au>
Date: Thu, 5 Sep 2024 23:55:02 +1000
Subject: Fixed md5 buffer not being correctly zero-initialized and refactored
 code. (#2507)

---
 indra/llcommon/llmd5.cpp | 551 ++++++++++++++++++++++-------------------------
 indra/llcommon/llmd5.h   |  82 ++++---
 2 files changed, 293 insertions(+), 340 deletions(-)

(limited to 'indra')

diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index f64f54c262..e999b8f597 100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -68,10 +68,6 @@ documentation and/or software.
 
  */
 
-
-
-
-
 #include "linden_common.h"
 
 #include "llmd5.h"
@@ -81,232 +77,203 @@ documentation and/or software.
 // how many bytes to grab at a time when checking files
 const int LLMD5::BLOCK_LEN = 4096;
 
-
 // LLMD5 simple initialization method
-
 LLMD5::LLMD5()
 {
-  init();
+    init();
 }
 
-
-
-
 // MD5 block update operation. Continues an MD5 message-digest
 // operation, processing another message block, and updating the
 // context.
+void LLMD5::update(const uint8_t* input, const size_t input_length)
+{
+    size_t input_index, buffer_index;
+    size_t buffer_space; // how much space is left in buffer
 
-void LLMD5::update (const uint8_t *input, const size_t input_length) {
-
-  size_t input_index, buffer_index;
-  size_t buffer_space;                // how much space is left in buffer
-
-  if (finalized){  // so we can't update!
-      std::cerr << "LLMD5::update:  Can't update a finalized digest!" << std::endl;
-    return;
-  }
-
-  // Compute number of bytes mod 64
-  buffer_index = size_t((count >> 3) & 0x3F);
+    if (finalized)
+    { // so we can't update!
+        std::cerr << "LLMD5::update:  Can't update a finalized digest!" << std::endl;
+        return;
+    }
 
-  // Update number of bits
-  count += input_length << 3;
+    // Compute number of bytes mod 64
+    buffer_index = size_t((count >> 3) & 0x3F);
 
-  buffer_space = 64 - buffer_index;  // how much space is left in buffer
+    // Update number of bits
+    count += input_length << 3;
 
-  // now, transform each 64-byte piece of the input, bypassing the buffer
-  if (input == NULL || input_length == 0){
-      std::cerr << "LLMD5::update:  Invalid input!" << std::endl;
-      return;
-  }
+    buffer_space = 64 - buffer_index; // how much space is left in buffer
 
-  // Transform as many times as possible.
-  if (input_length >= buffer_space) { // ie. we have enough to fill the buffer
-    // fill the rest of the buffer and transform
-    memcpy( /* Flawfinder: ignore */
-        buffer + buffer_index,
-        input,
-        buffer_space);
-    transform (buffer);
+    // now, transform each 64-byte piece of the input, bypassing the buffer
+    if (input == NULL || input_length == 0)
+    {
+        std::cerr << "LLMD5::update:  Invalid input!" << std::endl;
+        return;
+    }
 
-    for (input_index = buffer_space; input_index + 63 < input_length;
-     input_index += 64)
-      transform (input+input_index);
+    // Transform as many times as possible.
+    if (input_length >= buffer_space) // ie. we have enough to fill the buffer
+    {
+        // fill the rest of the buffer and transform
+        memcpy(/* Flawfinder: ignore */
+               buffer + buffer_index,
+               input,
+               buffer_space);
+        transform(buffer);
 
-    buffer_index = 0;  // so we can buffer remaining
-  }
-  else
-    input_index=0;     // so we can buffer the whole input
+        for (input_index = buffer_space; input_index + 63 < input_length; input_index += 64)
+            transform(input + input_index);
 
+        buffer_index = 0; // so we can buffer remaining
+    }
+    else
+        input_index = 0; // so we can buffer the whole input
 
-  // and here we do the buffering:
-  memcpy(buffer+buffer_index, input+input_index, input_length-input_index);     /* Flawfinder: ignore */
+    // and here we do the buffering:
+    memcpy(buffer + buffer_index, input + input_index, input_length - input_index); /* Flawfinder: ignore */
 }
 
-
-
 // MD5 update for files.
 // Like above, except that it works on files (and uses above as a primitive.)
+void LLMD5::update(FILE* file)
+{
+    unsigned char buffer[BLOCK_LEN]; /* Flawfinder: ignore */
+    int len;
 
-void LLMD5::update(FILE* file){
-
-  unsigned char buffer[BLOCK_LEN];      /* Flawfinder: ignore */
-  int len;
-
-  while ( (len=(int)fread(buffer, 1, BLOCK_LEN, file)) )
-    update(buffer, len);
-
-  fclose (file);
+    while ((len = (int)fread(buffer, 1, BLOCK_LEN, file)))
+        update(buffer, len);
 
+    fclose(file);
 }
 
 // MD5 update for istreams.
 // Like update for files; see above.
+void LLMD5::update(std::istream& stream)
+{
+    unsigned char buffer[BLOCK_LEN]; /* Flawfinder: ignore */
+    int len;
 
-void LLMD5::update(std::istream& stream){
-
-  unsigned char buffer[BLOCK_LEN];      /* Flawfinder: ignore */
-  int len;
-
-  while (stream.good()){
-    stream.read( (char*)buffer, BLOCK_LEN);     /* Flawfinder: ignore */        // note that return value of read is unusable.
-    len=(int)stream.gcount();
-    update(buffer, len);
-  }
-
+    while (stream.good())
+    {
+        stream.read((char*)buffer, BLOCK_LEN); /* Flawfinder: ignore */ // note that return value of read is unusable.
+        len = (int)stream.gcount();
+        update(buffer, len);
+    }
 }
 
-void  LLMD5::update(const std::string& s)
+void LLMD5::update(const std::string& s)
 {
-    update((unsigned char *)s.c_str(),s.length());
+    update((unsigned char*)s.c_str(), s.length());
 }
 
 // MD5 finalization. Ends an MD5 message-digest operation, writing the
 // the message digest and zeroizing the context.
-
-
-void LLMD5::finalize (){
-
-  unsigned char bits[8];        /* Flawfinder: ignore */
-  size_t index, padLen;
-  static uint8_t PADDING[64]={
-    0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+void LLMD5::finalize()
+{
+    unsigned char bits[8]; /* Flawfinder: ignore */
+    size_t index, padLen;
+    static uint8_t PADDING[64] =
+    {
+        0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     };
 
-  if (finalized){
-    std::cerr << "LLMD5::finalize:  Already finalized this digest!" << std::endl;
-    return;
-  }
-
-  // Save number of bits.
-  // Treat count, a uint64_t, as uint32_t[2].
-  encode (bits, reinterpret_cast<uint32_t*>(&count), 8);
+    if (finalized)
+    {
+        std::cerr << "LLMD5::finalize:  Already finalized this digest!" << std::endl;
+        return;
+    }
 
-  // Pad out to 56 mod 64.
-  index = size_t((count >> 3) & 0x3f);
-  padLen = (index < 56) ? (56 - index) : (120 - index);
-  update (PADDING, padLen);
+    // Save number of bits.
+    // Treat count, a uint64_t, as uint32_t[2].
+    encode(bits, reinterpret_cast<uint32_t*>(&count), 8);
 
-  // Append length (before padding)
-  update (bits, 8);
+    // Pad out to 56 mod 64.
+    index  = size_t((count >> 3) & 0x3f);
+    padLen = (index < 56) ? (56 - index) : (120 - index);
+    update(PADDING, padLen);
 
-  // Store state in digest
-  encode (digest, state, 16);
+    // Append length (before padding)
+    update(bits, 8);
 
-  // Zeroize sensitive information
-  memset (buffer, 0, sizeof(*buffer));
+    // Store state in digest
+    encode(digest, state, 16);
 
-  finalized=1;
+    // Zeroize sensitive information
+    memset(buffer, 0, sizeof(buffer));
 
+    finalized = true;
 }
 
-
-
-
-LLMD5::LLMD5(FILE *file){
-
-  init();  // must be called be all constructors
-  update(file);
-  finalize ();
+LLMD5::LLMD5(FILE* file)
+{
+    init(); // must be called be all constructors
+    update(file);
+    finalize();
 }
 
-
-
-
-LLMD5::LLMD5(std::istream& stream){
-
-  init();  // must called by all constructors
-  update (stream);
-  finalize();
+LLMD5::LLMD5(std::istream& stream)
+{
+    init(); // must called by all constructors
+    update(stream);
+    finalize();
 }
 
 // Digest a string of the format ("%s:%i" % (s, number))
-LLMD5::LLMD5(const unsigned char *string, const unsigned int number)
+LLMD5::LLMD5(const unsigned char* string, const unsigned int number)
 {
-    const char *colon = ":";
-    char tbuf[16];      /* Flawfinder: ignore */
+    const char* colon = ":";
+    char tbuf[16]; /* Flawfinder: ignore */
     init();
-    update(string, (U32)strlen((const char *) string));     /* Flawfinder: ignore */
-    update((const unsigned char *) colon, (U32)strlen(colon));      /* Flawfinder: ignore */
-    snprintf(tbuf, sizeof(tbuf), "%i", number); /* Flawfinder: ignore */
-    update((const unsigned char *) tbuf, (U32)strlen(tbuf));    /* Flawfinder: ignore */
+    update(string, (U32)strlen((const char*)string));        /* Flawfinder: ignore */
+    update((const unsigned char*)colon, (U32)strlen(colon)); /* Flawfinder: ignore */
+    snprintf(tbuf, sizeof(tbuf), "%i", number);              /* Flawfinder: ignore */
+    update((const unsigned char*)tbuf, (U32)strlen(tbuf));   /* Flawfinder: ignore */
     finalize();
 }
 
 // Digest a string
-LLMD5::LLMD5(const unsigned char *s)
+LLMD5::LLMD5(const unsigned char* s)
 {
     init();
-    update(s, (U32)strlen((const char *) s));       /* Flawfinder: ignore */
+    update(s, (U32)strlen((const char*)s)); /* Flawfinder: ignore */
     finalize();
 }
 
-void LLMD5::raw_digest(unsigned char *s) const
+void LLMD5::raw_digest(unsigned char* s) const
 {
     if (!finalized)
     {
-        std::cerr << "LLMD5::raw_digest:  Can't get digest if you haven't "<<
-            "finalized the digest!" << std::endl;
+        std::cerr << "LLMD5::raw_digest:  Can't get digest if you haven't "
+                  << "finalized the digest!" << std::endl;
         s[0] = '\0';
         return;
     }
 
-    memcpy(s, digest, 16);      /* Flawfinder: ignore */
-    return;
+    memcpy(s, digest, 16); /* Flawfinder: ignore */
 }
 
-
-
-void LLMD5::hex_digest(char *s) const
+void LLMD5::hex_digest(char* s) const
 {
-    int i;
-
     if (!finalized)
     {
-        std::cerr << "LLMD5::hex_digest:  Can't get digest if you haven't "<<
-          "finalized the digest!" <<std::endl;
+        std::cerr << "LLMD5::hex_digest:  Can't get digest if you haven't "
+                  << "finalized the digest!" << std::endl;
         s[0] = '\0';
         return;
     }
 
-    for (i=0; i<16; i++)
+    for (int i = 0; i < 16; i++)
     {
-        sprintf(s+i*2, "%02x", digest[i]);      /* Flawfinder: ignore */
+        sprintf(s + i * 2, "%02x", digest[i]); /* Flawfinder: ignore */
     }
 
-    s[32]='\0';
-
-    return;
+    s[32] = '\0';
 }
 
-
-
-
-
-
-std::ostream& operator<<(std::ostream &stream, LLMD5 context)
+std::ostream& operator<<(std::ostream& stream, const LLMD5& context)
 {
     char s[33];     /* Flawfinder: ignore */
     context.hex_digest(s);
@@ -320,7 +287,7 @@ bool operator==(const LLMD5& a, const LLMD5& b)
     unsigned char b_guts[16];
     a.raw_digest(a_guts);
     b.raw_digest(b_guts);
-    if (memcmp(a_guts,b_guts,16)==0)
+    if (memcmp(a_guts, b_guts, 16) == 0)
         return true;
     else
         return false;
@@ -328,30 +295,27 @@ bool operator==(const LLMD5& a, const LLMD5& b)
 
 bool operator!=(const LLMD5& a, const LLMD5& b)
 {
-    return !(a==b);
+    return !(a == b);
 }
 
 // PRIVATE METHODS:
+void LLMD5::init()
+{
+    finalized = false; // we just started!
 
-void LLMD5::init(){
-  finalized=0;  // we just started!
-
-  // Nothing counted, so count=0
-  count = 0;
+    // Nothing counted, so count=0
+    count = 0;
 
-  // Load magic initialization constants.
-  state[0] = 0x67452301;
-  state[1] = 0xefcdab89;
-  state[2] = 0x98badcfe;
-  state[3] = 0x10325476;
+    // Load magic initialization constants.
+    state[0] = 0x67452301;
+    state[1] = 0xefcdab89;
+    state[2] = 0x98badcfe;
+    state[3] = 0x10325476;
 }
 
-
-
 // Constants for MD5Transform routine.
 // Although we could use C++ style constants, defines are actually better,
 // since they let us easily evade scope clashes.
-
 #define S11 7
 #define S12 12
 #define S13 17
@@ -381,153 +345,144 @@ void LLMD5::init(){
 
 /* ROTATE_LEFT rotates x left n bits.
  */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
 
 /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
 Rotation is separate from addition to prevent recomputation.
  */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (U32)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-  }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (U32)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-  }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (U32)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-  }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (U32)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
-  }
-
-
+#define FF(a, b, c, d, x, s, ac)                   \
+    {                                              \
+        (a) += F((b), (c), (d)) + (x) + (U32)(ac); \
+        (a) = ROTATE_LEFT((a), (s));               \
+        (a) += (b);                                \
+    }
+#define GG(a, b, c, d, x, s, ac)                   \
+    {                                              \
+        (a) += G((b), (c), (d)) + (x) + (U32)(ac); \
+        (a) = ROTATE_LEFT((a), (s));               \
+        (a) += (b);                                \
+    }
+#define HH(a, b, c, d, x, s, ac)                   \
+    {                                              \
+        (a) += H((b), (c), (d)) + (x) + (U32)(ac); \
+        (a) = ROTATE_LEFT((a), (s));               \
+        (a) += (b);                                \
+    }
+#define II(a, b, c, d, x, s, ac)                   \
+    {                                              \
+        (a) += I((b), (c), (d)) + (x) + (U32)(ac); \
+        (a) = ROTATE_LEFT((a), (s));               \
+        (a) += (b);                                \
+    }
 
 // LLMD5 basic transformation. Transforms state based on block.
-void LLMD5::transform (const U8 block[64]){
-
-  uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
-  decode (x, block, 64);
-
-  assert(!finalized);  // not just a user error, since the method is private
-
-  /* Round 1 */
-  FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
-  FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
-  FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
-  FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
-  FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
-  FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
-  FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
-  FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
-  FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
-  FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
-  FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
-  FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
-  FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
-  FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
-  FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
-  FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
-  GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
-  GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
-  GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
-  GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
-  GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
-  GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
-  GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
-  GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
-  GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
-  GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
-  GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
-  GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
-  GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
-  GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
-  GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
-  GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
-  /* Round 3 */
-  HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
-  HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
-  HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
-  HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
-  HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
-  HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
-  HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
-  HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
-  HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
-  HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
-  HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
-  HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
-  HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
-  HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
-  HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
-  HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
-  /* Round 4 */
-  II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
-  II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
-  II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
-  II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
-  II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
-  II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
-  II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
-  II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
-  II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
-  II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
-  II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
-  II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
-  II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
-  II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
-  II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
-  II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
-  state[0] += a;
-  state[1] += b;
-  state[2] += c;
-  state[3] += d;
-
-  // Zeroize sensitive information.
-  memset ( (uint8_t *) x, 0, sizeof(x));
-
+void LLMD5::transform(const U8 block[64])
+{
+    uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+    decode(x, block, 64);
+
+    assert(!finalized); // not just a user error, since the method is private
+
+    /* Round 1 */
+    FF(a, b, c, d, x[0], S11, 0xd76aa478);  /* 1 */
+    FF(d, a, b, c, x[1], S12, 0xe8c7b756);  /* 2 */
+    FF(c, d, a, b, x[2], S13, 0x242070db);  /* 3 */
+    FF(b, c, d, a, x[3], S14, 0xc1bdceee);  /* 4 */
+    FF(a, b, c, d, x[4], S11, 0xf57c0faf);  /* 5 */
+    FF(d, a, b, c, x[5], S12, 0x4787c62a);  /* 6 */
+    FF(c, d, a, b, x[6], S13, 0xa8304613);  /* 7 */
+    FF(b, c, d, a, x[7], S14, 0xfd469501);  /* 8 */
+    FF(a, b, c, d, x[8], S11, 0x698098d8);  /* 9 */
+    FF(d, a, b, c, x[9], S12, 0x8b44f7af);  /* 10 */
+    FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
+    FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
+    FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
+    FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
+    FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
+    FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
+
+    /* Round 2 */
+    GG(a, b, c, d, x[1], S21, 0xf61e2562);  /* 17 */
+    GG(d, a, b, c, x[6], S22, 0xc040b340);  /* 18 */
+    GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
+    GG(b, c, d, a, x[0], S24, 0xe9b6c7aa);  /* 20 */
+    GG(a, b, c, d, x[5], S21, 0xd62f105d);  /* 21 */
+    GG(d, a, b, c, x[10], S22, 0x2441453);  /* 22 */
+    GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
+    GG(b, c, d, a, x[4], S24, 0xe7d3fbc8);  /* 24 */
+    GG(a, b, c, d, x[9], S21, 0x21e1cde6);  /* 25 */
+    GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
+    GG(c, d, a, b, x[3], S23, 0xf4d50d87);  /* 27 */
+    GG(b, c, d, a, x[8], S24, 0x455a14ed);  /* 28 */
+    GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
+    GG(d, a, b, c, x[2], S22, 0xfcefa3f8);  /* 30 */
+    GG(c, d, a, b, x[7], S23, 0x676f02d9);  /* 31 */
+    GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
+
+    /* Round 3 */
+    HH(a, b, c, d, x[5], S31, 0xfffa3942);  /* 33 */
+    HH(d, a, b, c, x[8], S32, 0x8771f681);  /* 34 */
+    HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
+    HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
+    HH(a, b, c, d, x[1], S31, 0xa4beea44);  /* 37 */
+    HH(d, a, b, c, x[4], S32, 0x4bdecfa9);  /* 38 */
+    HH(c, d, a, b, x[7], S33, 0xf6bb4b60);  /* 39 */
+    HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
+    HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
+    HH(d, a, b, c, x[0], S32, 0xeaa127fa);  /* 42 */
+    HH(c, d, a, b, x[3], S33, 0xd4ef3085);  /* 43 */
+    HH(b, c, d, a, x[6], S34, 0x4881d05);   /* 44 */
+    HH(a, b, c, d, x[9], S31, 0xd9d4d039);  /* 45 */
+    HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
+    HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
+    HH(b, c, d, a, x[2], S34, 0xc4ac5665);  /* 48 */
+
+    /* Round 4 */
+    II(a, b, c, d, x[0], S41, 0xf4292244);  /* 49 */
+    II(d, a, b, c, x[7], S42, 0x432aff97);  /* 50 */
+    II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
+    II(b, c, d, a, x[5], S44, 0xfc93a039);  /* 52 */
+    II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
+    II(d, a, b, c, x[3], S42, 0x8f0ccc92);  /* 54 */
+    II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
+    II(b, c, d, a, x[1], S44, 0x85845dd1);  /* 56 */
+    II(a, b, c, d, x[8], S41, 0x6fa87e4f);  /* 57 */
+    II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
+    II(c, d, a, b, x[6], S43, 0xa3014314);  /* 59 */
+    II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
+    II(a, b, c, d, x[4], S41, 0xf7537e82);  /* 61 */
+    II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
+    II(c, d, a, b, x[2], S43, 0x2ad7d2bb);  /* 63 */
+    II(b, c, d, a, x[9], S44, 0xeb86d391);  /* 64 */
+
+    state[0] += a;
+    state[1] += b;
+    state[2] += c;
+    state[3] += d;
+
+    // Zeroize sensitive information.
+    memset(x, 0, sizeof(x));
 }
 
-
-
 // Encodes input (uint32_t) into output (unsigned char). Assumes len is
 // a multiple of 4.
-void LLMD5::encode (uint8_t *output, const uint32_t *input, const size_t len) {
-
-  size_t i, j;
-
-  for (i = 0, j = 0; j < len; i++, j += 4) {
-    output[j]   = (uint8_t)  (input[i] & 0xff);
-    output[j+1] = (uint8_t) ((input[i] >> 8) & 0xff);
-    output[j+2] = (uint8_t) ((input[i] >> 16) & 0xff);
-    output[j+3] = (uint8_t) ((input[i] >> 24) & 0xff);
-  }
+void LLMD5::encode(uint8_t* output, const uint32_t* input, const size_t len)
+{
+    for (size_t i = 0, j = 0; j < len; i++, j += 4)
+    {
+        output[j] = (uint8_t)(input[i] & 0xff);
+        output[j + 1] = (uint8_t)((input[i] >> 8) & 0xff);
+        output[j + 2] = (uint8_t)((input[i] >> 16) & 0xff);
+        output[j + 3] = (uint8_t)((input[i] >> 24) & 0xff);
+    }
 }
 
-
-
-
 // Decodes input (unsigned char) into output (uint32_t). Assumes len is
 // a multiple of 4.
-void LLMD5::decode (uint32_t *output, const uint8_t *input, const size_t len){
-
-  size_t i, j;
-
-  for (i = 0, j = 0; j < len; i++, j += 4)
-    output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
-      (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
+void LLMD5::decode(uint32_t* output, const uint8_t* input, const size_t len)
+{
+    for (size_t i = 0, j = 0; j < len; i++, j += 4)
+        output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
+        (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
 }
-
-
diff --git a/indra/llcommon/llmd5.h b/indra/llcommon/llmd5.h
index 46c79cf5a2..ad063fda46 100644
--- a/indra/llcommon/llmd5.h
+++ b/indra/llcommon/llmd5.h
@@ -67,59 +67,57 @@ documentation and/or software.
 
 */
 
-#include <cstdint>                  // uint32_t et al.
+#include <cstdint> // uint32_t et al.
 
 // use for the raw digest output
 const int MD5RAW_BYTES = 16;
 
 // use for outputting hex digests
-const int MD5HEX_STR_SIZE = 33;  // char hex[MD5HEX_STR_SIZE]; with null
+const int MD5HEX_STR_SIZE  = 33; // char hex[MD5HEX_STR_SIZE]; with null
 const int MD5HEX_STR_BYTES = 32; // message system fixed size
 
-class LL_COMMON_API LLMD5 {
-// how many bytes to grab at a time when checking files
-  static const int BLOCK_LEN;
+class LL_COMMON_API LLMD5
+{
+    // how many bytes to grab at a time when checking files
+    static const int BLOCK_LEN;
 
 public:
-// methods for controlled operation:
-  LLMD5              ();  // simple initializer
-  void  update     (const uint8_t *input, const size_t input_length);
-  void  update     (std::istream& stream);
-  void  update     (FILE *file);
-  void  update     (const std::string& str);
-  void  finalize   ();
-
-// constructors for special circumstances.  All these constructors finalize
-// the MD5 context.
-  LLMD5              (const unsigned char *string); // digest string, finalize
-  LLMD5              (std::istream& stream);       // digest stream, finalize
-  LLMD5              (FILE *file);            // digest file, close, finalize
-  LLMD5              (const unsigned char *string, const unsigned int number);
-
-// methods to acquire finalized result
-  void              raw_digest(unsigned char *array) const; // provide 16-byte array for binary data
-  void              hex_digest(char *string) const;         // provide 33-byte array for ascii-hex string
-
-  friend LL_COMMON_API std::ostream&   operator<< (std::ostream&, LLMD5 context);
+    // methods for controlled operation:
+    LLMD5(); // simple initializer
+    void update(const uint8_t* input, const size_t input_length);
+    void update(std::istream& stream);
+    void update(FILE* file);
+    void update(const std::string& str);
+    void finalize();
+
+    // constructors for special circumstances.  All these constructors finalize
+    // the MD5 context.
+    LLMD5(const unsigned char* string); // digest string, finalize
+    LLMD5(std::istream& stream);        // digest stream, finalize
+    LLMD5(FILE* file);                  // digest file, close, finalize
+    LLMD5(const unsigned char* string, const unsigned int number);
+
+    // methods to acquire finalized result
+    void raw_digest(unsigned char* array) const; // provide 16-byte array for binary data
+    void hex_digest(char* string) const;         // provide 33-byte array for ascii-hex string
+
+    friend LL_COMMON_API std::ostream& operator<<(std::ostream&, const LLMD5& context);
 
 private:
-
-
-// next, the private data:
-  uint32_t state[4];
-  uint64_t count;     // number of *bits*, mod 2^64
-  uint8_t buffer[64];   // input buffer
-  uint8_t digest[16];
-  uint8_t finalized;
-
-// last, the private methods, mostly static:
-  void init             ();               // called by all constructors
-  void transform        (const uint8_t *buffer);  // does the real update work.  Note
-                                          // that length is implied to be 64.
-
-  static void encode    (uint8_t *dest, const uint32_t *src, const size_t length);
-  static void decode    (uint32_t *dest, const uint8_t *src, const size_t length);
-
+    // next, the private data:
+    uint32_t state[4];
+    uint64_t count;      // number of *bits*, mod 2^64
+    uint8_t  buffer[64]; // input buffer
+    uint8_t  digest[16];
+    bool     finalized;
+
+    // last, the private methods, mostly static:
+    void init();                           // called by all constructors
+    void transform(const uint8_t* buffer); // does the real update work.  Note
+                                           // that length is implied to be 64.
+
+    static void encode(uint8_t* dest, const uint32_t* src, const size_t length);
+    static void decode(uint32_t* dest, const uint8_t* src, const size_t length);
 };
 
 LL_COMMON_API bool operator==(const LLMD5& a, const LLMD5& b);
-- 
cgit v1.2.3