package mapped;

import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSSoundSystem;

@ObfuscatedName("bz")
public class SoundSystem implements Runnable, RSSoundSystem {
   @ObfuscatedName("ge")
   @ObfuscatedSignature(
      descriptor = "Loh;"
   )
   static Archive field298;
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "[Lby;"
   )
   public volatile PcmPlayer[] players;

   public SoundSystem() {
      this.players = new PcmPlayer[2];
   }

   public void run() {
      try {
         for(int var1 = 0; var1 < 2; ++var1) {
            PcmPlayer var2 = this.players[var1];
            if(var2 != null) {
               var2.run_base();
            }
         }
      } catch (Exception var4) {
         GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var4);
      }

   }

   @ObfuscatedName("al")
   @ObfuscatedSignature(
      descriptor = "(B)Liu;",
      garbageValue = "1"
   )
   public static Clock method863() {
      NanoClock var10000;
      try {
         var10000 = new NanoClock();
      } catch (Throwable var1) {
         return new MilliClock();
      }

      return var10000;
   }

   @ObfuscatedName("ay")
   @ObfuscatedSignature(
      descriptor = "(ZI)V",
      garbageValue = "467776303"
   )
   static void Login_promptCredentials_base(boolean var0) {
      if(!SpriteMask.client.containsAccessAndRefreshToken_base() && !SpriteMask.client.method1347_base() && !SpriteMask.client.containsSessionAndCharacterId_base()) {
         Login.Login_response1 = "";
         Login.Login_response2 = "Enter your email & password.";
         Login.Login_response3 = "";
         UserComparator7.method2966_base(2);
         if(var0) {
            Login.Login_password = "";
         }

         Frames.method5517_base();
         class150.method3281_base();
      } else {
         UserComparator7.method2966_base(10);
      }
   }

   @ObfuscatedName("bn")
   @ObfuscatedSignature(
      descriptor = "(ILdt;ZB)I",
      garbageValue = "0"
   )
   static int method869(int var0, Script var1, boolean var2) {
      int var3;
      if(var0 == 5504) {
         DbTableType.Interpreter_intStackSize -= 2;
         var3 = Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize];
         int var4 = Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1];
         if(!Client.isCameraLocked) {
            Client.camAngleX = var3;
            Client.onCameraPitchTargetChanged(-1);
            Client.camAngleY = var4;
         }

         return 1;
      } else if(var0 == 5505) {
         Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Client.camAngleX;
         return 1;
      } else if(var0 == 5506) {
         Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Client.camAngleY;
         return 1;
      } else if(var0 == 5530) {
         var3 = Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize];
         if(var3 < 0) {
            var3 = 0;
         }

         Client.camFollowHeight = var3;
         return 1;
      } else if(var0 == 5531) {
         Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Client.camFollowHeight;
         return 1;
      } else {
         return 2;
      }
   }

   @ObfuscatedName("kg")
   @ObfuscatedSignature(
      descriptor = "(IIIII)V",
      garbageValue = "702782966"
   )
   static final void method867_base(int var0, int var1, int var2, int var3) {
      for(int var4 = 0; var4 < Client.rootWidgetCount; ++var4) {
         if(Client.rootWidgetXs[var4] + Client.rootWidgetWidths[var4] > var0 && Client.rootWidgetXs[var4] < var0 + var2 && Client.rootWidgetYs[var4] + Client.rootWidgetHeights[var4] > var1 && Client.rootWidgetYs[var4] < var3 + var1) {
            Client.field785[var4] = true;
         }
      }

   }

   @ObfuscatedName("lk")
   @ObfuscatedSignature(
      descriptor = "([Lnn;IIIIIIIII)V",
      garbageValue = "-610795305"
   )
   static final void method866(Widget[] var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      Client.preRenderWidgetLayer(var0, var1, var2, var3, var4, var5, var6, var7, var8);
      Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
      Rasterizer3D.resetRasterClipping_base();

      for(int var9 = 0; var9 < var0.length; ++var9) {
         Widget var10 = var0[var9];
         if(var10 != null && (var10.parentId == var1 || var1 == -1412584499 && var10 == Client.clickedWidget)) {
            int var11;
            if(var8 == -1) {
               Client.rootWidgetXs[Client.rootWidgetCount] = var10.x + var6;
               Client.rootWidgetYs[Client.rootWidgetCount] = var7 + var10.y;
               Client.rootWidgetWidths[Client.rootWidgetCount] = var10.width;
               Client.rootWidgetHeights[Client.rootWidgetCount] = var10.height;
               var11 = ++Client.rootWidgetCount - 1;
            } else {
               var11 = var8;
            }

            var10.rootIndex = var11;
            var10.cycle = Client.cycle;
            var10.onCycle(-1);
            if(!var10.isIf3 || !class11.method114(var10)) {
               if(var10.contentType > 0) {
                  class348.method6833(var10);
               }

               int var12 = var10.x + var6;
               int var13 = var7 + var10.y;
               int var14 = var10.transparencyTop;
               int var15;
               int var16;
               if(var10 == Client.clickedWidget) {
                  if(var1 != -1412584499 && !var10.isScrollBar) {
                     UserComparator10.field1453 = var0;
                     ParamComposition.field2040 = var6;
                     PendingSpawn.field1167 = var7;
                     continue;
                  }

                  if(Client.isDraggingWidget && Client.field674) {
                     var15 = MouseHandler.MouseHandler_x;
                     var16 = MouseHandler.MouseHandler_y;
                     var15 -= Client.widgetClickX;
                     var16 -= Client.widgetClickY;
                     if(var15 < Client.field554) {
                        var15 = Client.field554;
                     }

                     if(var15 + var10.width > Client.field554 + Client.clickedWidgetParent.width) {
                        var15 = Client.field554 + Client.clickedWidgetParent.width - var10.width;
                     }

                     if(var16 < Client.field676) {
                        var16 = Client.field676;
                     }

                     if(var16 + var10.height > Client.field676 + Client.clickedWidgetParent.height) {
                        var16 = Client.field676 + Client.clickedWidgetParent.height - var10.height;
                     }

                     var12 = var15;
                     var13 = var16;
                  }

                  if(!var10.isScrollBar) {
                     var14 = 128;
                  }
               }

               int var17;
               int var18;
               int var19;
               int var20;
               int var21;
               int var22;
               if(var10.type == 9) {
                  var19 = var12;
                  var20 = var13;
                  var21 = var12 + var10.width;
                  var22 = var13 + var10.height;
                  if(var21 < var12) {
                     var19 = var21;
                     var21 = var12;
                  }

                  if(var22 < var13) {
                     var20 = var22;
                     var22 = var13;
                  }

                  ++var21;
                  ++var22;
                  var15 = var19 > var2?var19:var2;
                  var16 = var20 > var3?var20:var3;
                  var17 = var21 < var4?var21:var4;
                  var18 = var22 < var5?var22:var5;
               } else {
                  var19 = var12 + var10.width;
                  var20 = var13 + var10.height;
                  var15 = var12 > var2?var12:var2;
                  var16 = var13 > var3?var13:var3;
                  var17 = var19 < var4?var19:var4;
                  var18 = var20 < var5?var20:var5;
               }

               if(!var10.isIf3 || var15 < var17 && var16 < var18) {
                  if(var10.contentType != 0) {
                     if(var10.contentType == 1336) {
                        if(WorldMapIcon_1.clientPreferences.method2608_base()) {
                           var13 += 15;
                           ItemLayer.fontPlain12.drawRightAligned_base("Fps:" + GameEngine.fps, var12 + var10.width, var13, 16776960, -1);
                           var13 += 15;
                           Runtime var41 = Runtime.getRuntime();
                           var20 = (int)((var41.totalMemory() - var41.freeMemory()) / 1024L);
                           var21 = 16776960;
                           if(var20 > 327680 && !Client.isLowDetail) {
                              var21 = 16711680;
                           }

                           ItemLayer.fontPlain12.drawRightAligned_base("Mem:" + var20 + "k", var12 + var10.width, var13, var21, -1);
                           var13 += 15;
                        }
                        continue;
                     }

                     if(var10.contentType == 1337) {
                        Client.viewportX = var12;
                        Client.viewportY = var13;
                        PlayerComposition.drawEntities_base(var12, var13, var10.width, var10.height);
                        Client.validRootWidgets[var10.rootIndex] = true;
                        Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                        continue;
                     }

                     if(var10.contentType == 1338) {
                        class36.method706(var10, var12, var13, var11);
                        Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                        continue;
                     }

                     if(var10.contentType == 1339) {
                        MilliClock.method4249(var10, var12, var13, var11);
                        Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                        continue;
                     }

                     if(var10.contentType == 1400) {
                        NpcOverrides.worldMap.draw_base(var12, var13, var10.width, var10.height, Client.cycle);
                     }

                     if(var10.contentType == 1401) {
                        NpcOverrides.worldMap.drawOverview_base(var12, var13, var10.width, var10.height);
                     }

                     if(var10.contentType == 1402) {
                        EnumComposition.loginScreenRunesAnimation.draw_base(var12, Client.cycle);
                     }
                  }

                  if(var10.type == 0) {
                     if(!var10.isIf3 && class11.method114(var10) && var10 != Interpreter.mousedOverWidgetIf1) {
                        continue;
                     }

                     if(!var10.isIf3) {
                        if(var10.scrollY > var10.scrollHeight - var10.height) {
                           var10.scrollY = var10.scrollHeight - var10.height;
                        }

                        if(var10.scrollY < 0) {
                           var10.scrollY = 0;
                        }
                     }

                     method866(var0, var10.id, var15, var16, var17, var18, var12 - var10.scrollX, var13 - var10.scrollY, var11);
                     if(var10.children != null) {
                        method866(var10.children, var10.id, var15, var16, var17, var18, var12 - var10.scrollX, var13 - var10.scrollY, var11);
                     }

                     InterfaceParent var28 = (InterfaceParent)Client.interfaceParents.get((long)var10.id);
                     if(var28 != null) {
                        Canvas.drawWidgets_base(var28.group, var15, var16, var17, var18, var12, var13, var11);
                     }

                     Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                     Rasterizer3D.resetRasterClipping_base();
                  } else if(var10.type == 11) {
                     if(class11.method114(var10) && var10 != Interpreter.mousedOverWidgetIf1) {
                        continue;
                     }

                     if(var10.children != null) {
                        method866(var10.children, var10.id, var15, var16, var17, var18, var12 - var10.scrollX, var13 - var10.scrollY, var11);
                     }

                     Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                     Rasterizer3D.resetRasterClipping_base();
                  }

                  if(Client.isResizable || Client.field515[var11] || Client.gameDrawingMode > 1) {
                     if(var10.type == 0 && !var10.isIf3 && var10.scrollHeight > var10.height) {
                        Varcs.drawScrollBar_base(var12 + var10.width, var13, var10.scrollY, var10.height, var10.scrollHeight);
                     }

                     if(var10.type != 1) {
                        if(var10.type == 3) {
                           if(WidgetDefinition.method6286(var10)) {
                              var19 = var10.color2;
                              if(var10 == Interpreter.mousedOverWidgetIf1 && var10.mouseOverColor2 != 0) {
                                 var19 = var10.mouseOverColor2;
                              }
                           } else {
                              var19 = var10.color;
                              if(var10 == Interpreter.mousedOverWidgetIf1 && var10.mouseOverColor != 0) {
                                 var19 = var10.mouseOverColor;
                              }
                           }

                           if(var10.fill) {
                              switch(var10.fillMode.field5221) {
                              case 1:
                                 Rasterizer2D.Rasterizer2D_fillRectangleGradient_base(var12, var13, var10.width, var10.height, var10.color, var10.color2);
                                 break;
                              case 2:
                                 Rasterizer2D.Rasterizer2D_fillRectangleGradientAlpha_base(var12, var13, var10.width, var10.height, var10.color, var10.color2, 255 - (var10.transparencyTop & 255), 255 - (var10.transparencyBot & 255));
                                 break;
                              default:
                                 if(var14 == 0) {
                                    Rasterizer2D.Rasterizer2D_fillRectangle_base(var12, var13, var10.width, var10.height, var19);
                                 } else {
                                    Rasterizer2D.Rasterizer2D_fillRectangleAlpha_base(var12, var13, var10.width, var10.height, var19, 256 - (var14 & 255));
                                 }
                              }
                           } else if(var14 == 0) {
                              Rasterizer2D.Rasterizer2D_drawRectangle_base(var12, var13, var10.width, var10.height, var19);
                           } else {
                              Rasterizer2D.Rasterizer2D_drawRectangleAlpha_base(var12, var13, var10.width, var10.height, var19, 256 - (var14 & 255));
                           }
                        } else if(var10.type == 4) {
                           Font var40 = var10.method6668(HealthBarDefinition.widgetDefinition);
                           if(var40 == null) {
                              if(Widget.field3656) {
                                 class159.method3423(var10);
                              }
                           } else {
                              String var42 = var10.text;
                              if(WidgetDefinition.method6286(var10)) {
                                 var20 = var10.color2;
                                 if(var10 == Interpreter.mousedOverWidgetIf1 && var10.mouseOverColor2 != 0) {
                                    var20 = var10.mouseOverColor2;
                                 }

                                 if(var10.text2.length() > 0) {
                                    var42 = var10.text2;
                                 }
                              } else {
                                 var20 = var10.color;
                                 if(var10 == Interpreter.mousedOverWidgetIf1 && var10.mouseOverColor != 0) {
                                    var20 = var10.mouseOverColor;
                                 }
                              }

                              if(var10.isIf3 && var10.itemId != -1) {
                                 ItemComposition var43 = class214.method4226(var10.itemId);
                                 var42 = var43.name;
                                 if(var42 == null) {
                                    var42 = "null";
                                 }

                                 if((var43.isStackable == 1 || var10.itemQuantity != 1) && var10.itemQuantity != -1) {
                                    var42 = class167.colorStartTag_base(16748608) + var42 + "</col>" + " " + 'x' + class355.formatItemStacks_base(var10.itemQuantity);
                                 }
                              }

                              if(var10 == Client.meslayerContinueWidget) {
                                 var42 = "Please wait...";
                                 var20 = var10.color;
                              }

                              if(!var10.isIf3) {
                                 var42 = HitSplatDefinition.method3864(var42, var10);
                              }

                              var40.drawWidgetText_base(var42, var12, var13, var10.width, var10.height, var20, var10.textShadowed?0:-1, class478.method8602_base(var10.transparencyTop), var10.textXAlignment, var10.textYAlignment, var10.textLineHeight);
                           }
                        } else {
                           int var23;
                           int var24;
                           int var25;
                           if(var10.type == 5) {
                              SpritePixels var38;
                              if(!var10.isIf3) {
                                 var38 = var10.method6663(HealthBarDefinition.widgetDefinition, WidgetDefinition.method6286(var10), class60.urlRequester);
                                 if(var38 != null) {
                                    var38.drawTransBgAt_base(var12, var13);
                                 } else if(Widget.field3656) {
                                    class159.method3423(var10);
                                 }
                              } else {
                                 if(var10.itemId != -1) {
                                    var38 = class6.method49(var10.itemId, var10.itemQuantity, var10.outline, var10.spriteShadow, var10.itemQuantityMode, false);
                                 } else {
                                    var38 = var10.method6663(HealthBarDefinition.widgetDefinition, false, class60.urlRequester);
                                 }

                                 if(var38 == null) {
                                    if(Widget.field3656) {
                                       class159.method3423(var10);
                                    }
                                 } else {
                                    var20 = var38.width;
                                    var21 = var38.height;
                                    if(!var10.spriteTiling) {
                                       var22 = var10.width * 4096 / var20;
                                       if(var10.spriteAngle != 0) {
                                          var38.method9767_base(var10.width / 2 + var12, var10.height / 2 + var13, var10.spriteAngle, var22);
                                       } else if(var14 != 0) {
                                          var38.drawTransScaledAt_base(var12, var13, var10.width, var10.height, 256 - (var14 & 255));
                                       } else if(var20 == var10.width && var21 == var10.height) {
                                          var38.drawTransBgAt_base(var12, var13);
                                       } else {
                                          var38.drawScaledAt_base(var12, var13, var10.width, var10.height);
                                       }
                                    } else {
                                       Rasterizer2D.Rasterizer2D_expandClip_base(var12, var13, var12 + var10.width, var13 + var10.height);
                                       var22 = (var20 - 1 + var10.width) / var20;
                                       var23 = (var21 - 1 + var10.height) / var21;

                                       for(var24 = 0; var24 < var22; ++var24) {
                                          for(var25 = 0; var25 < var23; ++var25) {
                                             if(var10.spriteAngle != 0) {
                                                var38.method9767_base(var20 / 2 + var12 + var20 * var24, var21 / 2 + var13 + var21 * var25, var10.spriteAngle, 4096);
                                             } else if(var14 != 0) {
                                                var38.drawTransAt_base(var12 + var20 * var24, var13 + var21 * var25, 256 - (var14 & 255));
                                             } else {
                                                var38.drawTransBgAt_base(var12 + var20 * var24, var13 + var25 * var21);
                                             }
                                          }
                                       }

                                       Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                                    }
                                 }
                              }
                           } else {
                              int var34;
                              if(var10.type == 6) {
                                 boolean var36 = WidgetDefinition.method6286(var10);
                                 if(var36) {
                                    var20 = var10.sequenceId2;
                                 } else {
                                    var20 = var10.sequenceId;
                                 }

                                 Model var39 = null;
                                 var22 = 0;
                                 if(var10.itemId != -1) {
                                    ItemComposition var44 = class214.method4226(var10.itemId);
                                    if(var44 != null) {
                                       var44 = var44.method3957(var10.itemQuantity);
                                       var39 = var44.method3956(1);
                                       if(var39 != null) {
                                          var39.calculateBoundsCylinder_base();
                                          var22 = var39.height / 2;
                                       } else {
                                          class159.method3423(var10);
                                       }
                                    }
                                 } else if(var10.modelType == 5) {
                                    if(var10.modelId == 0) {
                                       var39 = Client.playerAppearance.method6322((SequenceDefinition)null, -1, (SequenceDefinition)null, -1);
                                    } else {
                                       var39 = class229.localPlayer.vmethod5504();
                                    }
                                 } else if(var10.modelType == 7) {
                                    var39 = var10.field3717.method6322((SequenceDefinition)null, -1, DynamicObject.method2245(class229.localPlayer.idleSequence), class229.localPlayer.movementFrame);
                                 } else {
                                    NPCComposition var45 = null;
                                    NpcOverrides var32 = null;
                                    if(var10.modelType == 6) {
                                       var25 = var10.modelId;
                                       if(var25 >= 0 && var25 < Client.npcs.length) {
                                          NPC var26 = Client.npcs[var25];
                                          if(var26 != null) {
                                             var45 = var26.definition;
                                             var32 = var26.method2672();
                                          }
                                       }
                                    }

                                    SequenceDefinition var33 = null;
                                    var34 = -1;
                                    if(var20 != -1) {
                                       var33 = DynamicObject.method2245(var20);
                                       var34 = var10.modelFrame;
                                    }

                                    var39 = var10.method6669(HealthBarDefinition.widgetDefinition, var33, var34, var36, class229.localPlayer.appearance, var45, var32);
                                    if(var39 == null && Widget.field3656) {
                                       class159.method3423(var10);
                                    }
                                 }

                                 Rasterizer3D.method5206_base(var10.width / 2 + var12, var10.height / 2 + var13);
                                 var23 = Rasterizer3D.Rasterizer3D_sine[var10.modelAngleX] * var10.modelZoom >> 16;
                                 var24 = Rasterizer3D.Rasterizer3D_cosine[var10.modelAngleX] * var10.modelZoom >> 16;
                                 if(var39 != null) {
                                    if(!var10.isIf3) {
                                       var39.drawFrustum_base(0, var10.modelAngleY, 0, var10.modelAngleX, 0, var23, var24);
                                    } else {
                                       var39.calculateBoundsCylinder_base();
                                       if(var10.modelOrthog) {
                                          var39.method5586_base(0, var10.modelAngleY, var10.modelAngleZ, var10.modelAngleX, var10.modelOffsetX, var23 + var22 + var10.modelOffsetY, var24 + var10.modelOffsetY, var10.modelZoom);
                                       } else {
                                          var39.drawFrustum_base(0, var10.modelAngleY, var10.modelAngleZ, var10.modelAngleX, var10.modelOffsetX, var22 + var23 + var10.modelOffsetY, var24 + var10.modelOffsetY);
                                       }
                                    }
                                 }

                                 Rasterizer3D.method5205_base();
                              } else {
                                 Font var29;
                                 if(var10.type == 8 && var10 == SwapSongTask.field4539 && Client.field768 == Client.field648) {
                                    var19 = 0;
                                    var20 = 0;
                                    var29 = ItemLayer.fontPlain12;
                                    String var30 = var10.text;

                                    String var31;
                                    for(var30 = HitSplatDefinition.method3864(var30, var10); var30.length() > 0; var20 = var20 + var29.ascent + 1) {
                                       var24 = var30.indexOf("<br>");
                                       if(var24 != -1) {
                                          var31 = var30.substring(0, var24);
                                          var30 = var30.substring(var24 + 4);
                                       } else {
                                          var31 = var30;
                                          var30 = "";
                                       }

                                       var25 = var29.stringWidth_base(var31);
                                       if(var25 > var19) {
                                          var19 = var25;
                                       }
                                    }

                                    var19 += 6;
                                    var20 += 7;
                                    var24 = var12 + var10.width - 5 - var19;
                                    var25 = var13 + var10.height + 5;
                                    if(var24 < var12 + 5) {
                                       var24 = var12 + 5;
                                    }

                                    if(var19 + var24 > var4) {
                                       var24 = var4 - var19;
                                    }

                                    if(var20 + var25 > var5) {
                                       var25 = var5 - var20;
                                    }

                                    Rasterizer2D.Rasterizer2D_fillRectangle_base(var24, var25, var19, var20, 16777120);
                                    Rasterizer2D.Rasterizer2D_drawRectangle_base(var24, var25, var19, var20, 0);
                                    var30 = var10.text;
                                    var34 = var25 + var29.ascent + 2;

                                    for(var30 = HitSplatDefinition.method3864(var30, var10); var30.length() > 0; var34 = var34 + var29.ascent + 1) {
                                       int var27 = var30.indexOf("<br>");
                                       if(var27 != -1) {
                                          var31 = var30.substring(0, var27);
                                          var30 = var30.substring(var27 + 4);
                                       } else {
                                          var31 = var30;
                                          var30 = "";
                                       }

                                       var29.draw_base(var31, var24 + 3, var34, 0, -1);
                                    }
                                 }

                                 if(var10.type == 9) {
                                    if(var10.field3693) {
                                       var19 = var12;
                                       var20 = var13 + var10.height;
                                       var21 = var12 + var10.width;
                                       var22 = var13;
                                    } else {
                                       var19 = var12;
                                       var20 = var13;
                                       var21 = var12 + var10.width;
                                       var22 = var13 + var10.height;
                                    }

                                    if(var10.lineWid == 1) {
                                       Rasterizer2D.Rasterizer2D_drawLine_base(var19, var20, var21, var22, var10.color);
                                    } else {
                                       UrlRequest.method2922_base(var19, var20, var21, var22, var10.color, var10.lineWid);
                                    }
                                 } else if(var10.type == 12) {
                                    class341 var37 = var10.method6688_base();
                                    class336 var35 = var10.method6724_base();
                                    if(var37 != null && var35 != null && var37.method6394_base()) {
                                       var29 = var10.method6668(HealthBarDefinition.widgetDefinition);
                                       if(var29 != null) {
                                          Client.field573.method9922_base(var12, var13, var10.width, var10.height, var37.method6418_base(), var37.method6419_base(), var37.method6415_base(), var37.method6416_base(), var37.method6414_base());
                                          var22 = var10.textShadowed?var10.spriteShadow:-1;
                                          if(!var37.method6640_base() && var37.method6616_base().method7520_base()) {
                                             Client.field573.method9912_base(var35.field3579, var22, var35.field3580, var35.field3578);
                                             Client.field573.method9919(var37.method6644_base(), var29);
                                          } else {
                                             Client.field573.method9912_base(var10.color, var22, var35.field3580, var35.field3578);
                                             Client.field573.method9919(var37.method6616_base(), var29);
                                          }

                                          Rasterizer2D.Rasterizer2D_setClip_base(var2, var3, var4, var5);
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }

      Client.postRenderWidgetLayer(var0, var1, var2, var3, var4, var5, var6, var7, var8);
   }

   @ObfuscatedName("mc")
   @ObfuscatedSignature(
      descriptor = "(IS)V",
      garbageValue = "4026"
   )
   static final void method868_base(int var0) {
      var0 = Math.min(Math.max(var0, 0), 127);
      WorldMapIcon_1.clientPreferences.updateSoundEffectVolume_base(var0);
   }
}
