Example #1
0
 internal static int smethod_0(int int_8)
 {
     if (int_8 >= 256)
     {
         return((int)Class7.sbyte_1[256 + Class8.smethod_0(int_8, 7)]);
     }
     return((int)Class7.sbyte_1[int_8]);
 }
Example #2
0
 private void method_7()
 {
     if (this.class8_0 != null)
     {
         return;
     }
     this.class8_0 = (Class8)this.method_11("hhea");
 }
        private int method_0(int[] int_25, int int_26, int int_27, int int_28, int[] int_29, int[] int_30, int[] int_31, int[] int_32, int[] int_33, int[] int_34, int[] int_35)
        {
            int num  = 0;
            int num2 = int_27;

            do
            {
                this.int_21[int_25[int_26 + num]]++;
                num++;
                num2--;
            }while (num2 != 0);
            if (this.int_21[0] == int_27)
            {
                int_31[0] = -1;
                int_32[0] = 0;
                return(0);
            }
            int num3 = int_32[0];
            int i    = 1;

            while (i <= 15 && this.int_21[i] == 0)
            {
                i++;
            }
            int j = i;

            if (num3 < i)
            {
                num3 = i;
            }
            num2 = 15;
            while (num2 != 0 && this.int_21[num2] == 0)
            {
                num2--;
            }
            int num4 = num2;

            if (num3 > num2)
            {
                num3 = num2;
            }
            int_32[0] = num3;
            int num5 = 1 << i;

            while (i < num2)
            {
                if ((num5 -= this.int_21[i]) < 0)
                {
                    return(-3);
                }
                i++;
                num5 <<= 1;
            }
            if ((num5 -= this.int_21[num2]) < 0)
            {
                return(-3);
            }
            this.int_21[num2] += num5;
            i   = (this.int_24[1] = 0);
            num = 1;
            int num6 = 2;

            while (--num2 != 0)
            {
                i = (this.int_24[num6] = i + this.int_21[num]);
                num6++;
                num++;
            }
            num2 = 0;
            num  = 0;
            do
            {
                if ((i = int_25[int_26 + num]) != 0)
                {
                    int_35[this.int_24[i]++] = num2;
                }
                num++;
            }while (++num2 < int_27);
            int_27 = this.int_24[num4];
            num2   = (this.int_24[0] = 0);
            num    = 0;
            int num7 = -1;
            int num8 = -num3;

            this.int_23[0] = 0;
            int num9  = 0;
            int num10 = 0;

            while (j <= num4)
            {
                int num11 = this.int_21[j];
                while (num11-- != 0)
                {
                    int num12;
                    while (j > num8 + num3)
                    {
                        num7++;
                        num8 += num3;
                        num10 = num4 - num8;
                        num10 = ((num10 > num3) ? num3 : num10);
                        if ((num12 = 1 << ((i = j - num8) & 31)) > num11 + 1)
                        {
                            num12 -= num11 + 1;
                            num6   = j;
                            if (i < num10)
                            {
                                while (++i < num10 && (num12 <<= 1) > this.int_21[++num6])
                                {
                                    num12 -= this.int_21[num6];
                                }
                            }
                        }
                        num10 = 1 << i;
                        if (int_34[0] + num10 > 1440)
                        {
                            return(-3);
                        }
                        num9       = (this.int_23[num7] = int_34[0]);
                        int_34[0] += num10;
                        if (num7 != 0)
                        {
                            this.int_24[num7] = num2;
                            this.int_22[0]    = (int)((sbyte)i);
                            this.int_22[1]    = (int)((sbyte)num3);
                            i = Class8.smethod_0(num2, num8 - num3);
                            this.int_22[2] = num9 - this.int_23[num7 - 1] - i;
                            Array.Copy(this.int_22, 0, int_33, (this.int_23[num7 - 1] + i) * 3, 3);
                        }
                        else
                        {
                            int_31[0] = num9;
                        }
                    }
                    this.int_22[1] = (int)((sbyte)(j - num8));
                    if (num >= int_27)
                    {
                        this.int_22[0] = 192;
                    }
                    else if (int_35[num] < int_28)
                    {
                        this.int_22[0] = (int)((int_35[num] < 256) ? 0 : 96);
                        this.int_22[2] = int_35[num++];
                    }
                    else
                    {
                        this.int_22[0] = (int)((sbyte)(int_30[int_35[num] - int_28] + 16 + 64));
                        this.int_22[2] = int_29[int_35[num++] - int_28];
                    }
                    num12 = 1 << j - num8;
                    for (i = Class8.smethod_0(num2, num8); i < num10; i += num12)
                    {
                        Array.Copy(this.int_22, 0, int_33, (num9 + i) * 3, 3);
                    }
                    i = 1 << j - 1;
                    while ((num2 & i) != 0)
                    {
                        num2 ^= i;
                        i     = Class8.smethod_0(i, 1);
                    }
                    num2 ^= i;
                    int num13 = (1 << num8) - 1;
                    while ((num2 & num13) != this.int_24[num7])
                    {
                        num7--;
                        num8 -= num3;
                        num13 = (1 << num8) - 1;
                    }
                }
                j++;
            }
            if (num5 != 0)
            {
                if (num4 != 1)
                {
                    return(-5);
                }
            }
            return(0);
        }