package mapped;

import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;

@ObfuscatedName("sj")
public abstract class class469 implements class291 {
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "Ltu;"
   )
   class514 field4808;

   class469(int var1) {
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(Luj;II)V",
      garbageValue = "-1867165172"
   )
   abstract void vmethod8554(Buffer var1, int var2);

   @ObfuscatedName("au")
   @ObfuscatedSignature(
      descriptor = "(Luj;B)V",
      garbageValue = "0"
   )
   public void method8553(Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte_base();
         if(var2 == 0) {
            return;
         }

         class465 var3 = (class465)class12.method170(class129.method3090_base(), var2);
         if(var3 != null) {
            switch(var3.field4791) {
            case 0:
               class12.method170(MilliClock.method4243_base(), var1.readUnsignedByte_base());
               break;
            case 1:
               int var4 = var1.readUnsignedByte_base();
               this.field4808 = class472.method8562_base(var4);
               if(this.field4808 != null) {
                  break;
               }

               throw new IllegalStateException("Unknown ScriptVarType ID in VarType.decode: " + var4);
            case 2:
               var1.readStringCp1252NullCircumfixed_base();
               break;
            default:
               throw new IllegalStateException("Unrecognised VarTypeEncodingKey - " + var3);
            }
         } else {
            this.vmethod8554(var1, var2);
         }
      }
   }

   @ObfuscatedName("aa")
   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "984690534"
   )
   boolean method8553_base() {
      return this.field4808 != null;
   }

   @ObfuscatedName("ac")
   @ObfuscatedSignature(
      descriptor = "(I)Ljava/lang/Object;",
      garbageValue = "1989421795"
   )
   Object method8554_base() {
      return this.field4808 == class514.field5065?Integer.valueOf(0):(this.field4808 == class514.field5066?Long.valueOf(-1L):(this.field4808 == class514.field5061?"":null));
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(II)Ltf;",
      garbageValue = "1997766495"
   )
   public static DbRowType method8563(int var0) {
      DbRowType var1 = (DbRowType)DbRowType.DBRowType_cache.get((long)var0);
      if(var1 != null) {
         return var1;
      } else {
         byte[] var2 = DbRowType.field5085.takeFile_base(38, var0);
         var1 = new DbRowType();
         if(var2 != null) {
            var1.method9182(new Buffer(var2));
         }

         var1.method9165_base();
         DbRowType.DBRowType_cache.put(var1, (long)var0);
         return var1;
      }
   }
}
