Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.02 KB | None | 0 0
  1. while (true)
  2.     {
  3.         if (index == array.Length)
  4.         {
  5.             return deserializedOpt;
  6.         }
  7.         if (index > array.Length)
  8.         {
  9.             return null;
  10.         }
  11.         if (deserializedOpt == null)
  12.         {
  13.             break;
  14.         }
  15.         FSharpOption<FSharpList<Command>> val = deserializedOpt;
  16.         FSharpList<Command> value = val.get_Value();
  17.         switch (array[index])
  18.         {
  19.         default:
  20.             return null;
  21.         case 192:
  22.         {
  23.             FSharpOption<FSharpList<Command>> obj6 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(Command.Drop, value));
  24.             int num13 = index + 1;
  25.             array = array;
  26.             index = num13;
  27.             deserializedOpt = obj6;
  28.             break;
  29.         }
  30.         case 154:
  31.         {
  32.             FSharpOption<FSharpList<Command>> obj3 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(Command.Print, value));
  33.             int num3 = index + 1;
  34.             array = array;
  35.             index = num3;
  36.             deserializedOpt = obj3;
  37.             break;
  38.         }
  39.         case 146:
  40.         {
  41.             FSharpOption<FSharpList<Command>> obj7 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(Command.Add, value));
  42.             int num14 = index + 1;
  43.             array = array;
  44.             index = num14;
  45.             deserializedOpt = obj7;
  46.             break;
  47.         }
  48.         case 123:
  49.         {
  50.             FSharpOption<FSharpList<Command>> obj4 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(Command.Concat, value));
  51.             int num4 = index + 1;
  52.             array = array;
  53.             index = num4;
  54.             deserializedOpt = obj4;
  55.             break;
  56.         }
  57.         case 105:
  58.         {
  59.             FSharpOption<int> val2 = tryFindIndexSince(index + 1, new terminationIndex@66(), array);
  60.             if (val2 == null)
  61.             {
  62.                 return null;
  63.             }
  64.             FSharpOption<int> val3 = val2;
  65.             int value2 = val3.get_Value();
  66.             Encoding aSCII = Encoding.ASCII;
  67.             int num5 = index + 1;
  68.             int num6 = value2 - 1;
  69.             int num7 = array.Length;
  70.             int num8 = num6 - num5 + 1;
  71.             int num9 = (num8 >= 0) ? num8 : 0;
  72.             byte[] array2 = new byte[num9];
  73.             Encoding encoding = aSCII;
  74.             int num10 = 0;
  75.             int num11 = num9 - 1;
  76.             if (num11 >= num10)
  77.             {
  78.                 do
  79.                 {
  80.                     array2[num10] = array[num5 + num10];
  81.                     num10++;
  82.                 }
  83.                 while (num10 != num11 + 1);
  84.             }
  85.             string @string = encoding.GetString(array2);
  86.             Command command = Command.NewLoadString(@string);
  87.             FSharpOption<FSharpList<Command>> obj5 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(command, value));
  88.             int num12 = value2 + 1;
  89.             array = array;
  90.             index = num12;
  91.             deserializedOpt = obj5;
  92.             break;
  93.         }
  94.         case 101:
  95.         {
  96.             if (index + 4 >= array.Length)
  97.             {
  98.                 return null;
  99.             }
  100.             Command command = Command.NewLoadInt(BitConverter.ToInt32(array, index + 1));
  101.             FSharpOption<FSharpList<Command>> obj2 = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(command, value));
  102.             int num2 = index + 5;
  103.             array = array;
  104.             index = num2;
  105.             deserializedOpt = obj2;
  106.             break;
  107.         }
  108.         case 11:
  109.         {
  110.             FSharpOption<FSharpList<Command>> obj = FSharpOption<FSharpList<Command>>.Some(FSharpList<Command>.Cons(Command.Return, value));
  111.             int num = index + 1;
  112.             array = array;
  113.             index = num;
  114.             deserializedOpt = obj;
  115.             break;
  116.         }
  117.         }
  118.     }
  119.     return null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement