using System;

namespace SL200_RTLogViewer.lib
{
	// Token: 0x02000027 RID: 39
	public class ATCR250
	{
		// Token: 0x06000142 RID: 322 RVA: 0x000245F0 File Offset: 0x000227F0
		public static ATCR250Class SetData(byte[] data)
		{
			ATCR250Class atcr250Class = new ATCR250Class();
			atcr250Class.seq = Convert.ToInt32(data[0]);
			atcr250Class.swver = string.Format("{0}.{1}", (data[1] & 192) >> 6, (data[1] & 28) >> 2);
			atcr250Class.boardstat = Convert.ToInt32((int)(data[1] & 3));
			bool flag = (data[2] & 240) == 0;
			if (flag)
			{
				atcr250Class.atcmodfq = 0;
			}
			else
			{
				bool flag2 = (data[2] & 240) == 16;
				if (flag2)
				{
					atcr250Class.atcmodfq = 38;
				}
				else
				{
					bool flag3 = (data[2] & 240) == 32;
					if (flag3)
					{
						atcr250Class.atcmodfq = 34;
					}
					else
					{
						bool flag4 = (data[2] & 240) == 48;
						if (flag4)
						{
							atcr250Class.atcmodfq = 22;
						}
						else
						{
							bool flag5 = (data[2] & 240) == 64;
							if (flag5)
							{
								atcr250Class.atcmodfq = 18;
							}
							else
							{
								bool flag6 = (data[2] & 240) == 80;
								if (flag6)
								{
									atcr250Class.atcmodfq = 16;
								}
								else
								{
									bool flag7 = (data[2] & 240) == 96;
									if (flag7)
									{
										atcr250Class.atcmodfq = 14;
									}
									else
									{
										bool flag8 = (data[2] & 240) == 112;
										if (flag8)
										{
											atcr250Class.atcmodfq = 100;
										}
										else
										{
											bool flag9 = (data[2] & 240) == 128;
											if (flag9)
											{
												atcr250Class.atcmodfq = 12;
											}
											else
											{
												bool flag10 = (data[2] & 240) == 144;
												if (flag10)
												{
													atcr250Class.atcmodfq = 10;
												}
												else
												{
													bool flag11 = (data[2] & 240) == 160;
													if (flag11)
													{
														atcr250Class.atcmodfq = 26;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			bool flag12 = (data[2] & 15) == 0;
			if (flag12)
			{
				atcr250Class.atccode = "02";
			}
			else
			{
				bool flag13 = (data[2] & 15) == 1;
				if (flag13)
				{
					atcr250Class.atccode = "01";
				}
				else
				{
					bool flag14 = (data[2] & 15) == 2;
					if (flag14)
					{
						atcr250Class.atccode = "25";
					}
					else
					{
						bool flag15 = (data[2] & 15) == 3;
						if (flag15)
						{
							atcr250Class.atccode = "40";
						}
						else
						{
							bool flag16 = (data[2] & 15) == 4;
							if (flag16)
							{
								atcr250Class.atccode = "55";
							}
							else
							{
								bool flag17 = (data[2] & 15) == 5;
								if (flag17)
								{
									atcr250Class.atccode = "65";
								}
								else
								{
									bool flag18 = (data[2] & 15) == 6;
									if (flag18)
									{
										atcr250Class.atccode = "75";
									}
									else
									{
										bool flag19 = (data[2] & 15) == 7;
										if (flag19)
										{
											atcr250Class.atccode = "DE";
										}
										else
										{
											bool flag20 = (data[2] & 15) == 8;
											if (flag20)
											{
												atcr250Class.atccode = "DW";
											}
											else
											{
												atcr250Class.atccode = "-";
											}
										}
									}
								}
							}
						}
					}
				}
			}
			atcr250Class.pdtprogress = ((data[3] & 128) > 0);
			atcr250Class.pdtng = ((data[3] & 64) > 0);
			atcr250Class.pdtok = ((data[3] & 32) > 0);
			bool flag21 = (data[3] & 7) == 0;
			if (flag21)
			{
				atcr250Class.atcfofq = 0;
			}
			else
			{
				bool flag22 = (data[3] & 7) == 1;
				if (flag22)
				{
					atcr250Class.atcfofq = 8460;
				}
				else
				{
					bool flag23 = (data[3] & 7) == 2;
					if (flag23)
					{
						atcr250Class.atcfofq = 9180;
					}
					else
					{
						bool flag24 = (data[3] & 7) == 3;
						if (flag24)
						{
							atcr250Class.atcfofq = 10260;
						}
						else
						{
							bool flag25 = (data[3] & 7) == 4;
							if (flag25)
							{
								atcr250Class.atcfofq = 10980;
							}
						}
					}
				}
			}
			return atcr250Class;
		}
	}
}
