CSPspEmu.Hle.Formats.audio.At3.MaiAT3PlusCoreDecoder.MAPCDSF_calcACCTableTableUnk3ByAfterValue C# (CSharp) Method

MAPCDSF_calcACCTableTableUnk3ByAfterValue() static private method

static private MAPCDSF_calcACCTableTableUnk3ByAfterValue ( MaiAT3PlusCoreDecoderChnACCTableTable table, MaiBitReader mbr0 ) : int
table MaiAT3PlusCoreDecoderChnACCTableTable
mbr0 CSPspEmu.Hle.Formats.audio.At3.SUB.MaiBitReader
return int
        static int MAPCDSF_calcACCTableTableUnk3ByAfterValue(MaiAT3PlusCoreDecoderChnACCTableTable table, MaiBitReader mbr0)
        {
            int rs = 0;

            int btmp0 = table.num_uk - 1;

            while (btmp0 >= 0)
            {
                // @TODO: Refactor gettings bits.
                if (btmp0 == (table.num_uk - 1) )
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0xA);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 2)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x1);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 4)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x2);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 8)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x3);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x10)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x4);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x20)
                {
                    table.ptr0[btmp0].unk3 =  mbr0.getWithI32Buffer(0x5);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x40)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x6);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x80)
                {
                    table.ptr0[btmp0].unk3 =  mbr0.getWithI32Buffer(0x7);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x100)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x8);
                }
                else if ( table.ptr0[btmp0 + 1].unk3 < 0x200)
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0x9);
                }
                else
                {
                    table.ptr0[btmp0].unk3 = mbr0.getWithI32Buffer(0xA);
                }

                btmp0--;
            }

            return rs;
        }
MaiAT3PlusCoreDecoder