text: #region Local Var
  	var uLocal_0 = 0;
  	var uLocal_1 = 0;
  	int iLocal_2 = 0;
  	int iLocal_3 = 0;
  	int iLocal_4 = 0;
  	int iLocal_5 = 0;
  	int iLocal_6 = 0;
  	int iLocal_7 = 0;
  	int iLocal_8 = 0;
  	int iLocal_9 = 0;
  	int iLocal_10 = 0;
  	int iLocal_11 = 0;
  	var uLocal_12 = 0;
  	var uLocal_13 = 0;
  	float fLocal_14 = 0f;
  	var uLocal_15 = 0;
  	var uLocal_16 = 0;
  	int iLocal_17 = 0;
  	char* sLocal_18 = NULL;
  	var uLocal_19 = 0;
  	var uLocal_20 = 0;
  	float fLocal_21 = 0f;
  	var uLocal_22 = 0;
  	var uLocal_23 = 0;
  	var uLocal_24 = 0;
  	float fLocal_25 = 0f;
  	float fLocal_26 = 0f;
  	var uLocal_27 = 0;
  	int iLocal_28 = 0;
  	var uLocal_29 = 0;
  	var uLocal_30 = 0;
  	float fLocal_31 = 0f;
  	float fLocal_32 = 0f;
  	float fLocal_33 = 0f;
  	var uLocal_34 = 0;
  	var uLocal_35 = 0;
  	var uLocal_36 = 0;
  	var uLocal_37 = 0;
  	var uLocal_38 = 0;
  	int iLocal_39 = 0;
  	int iLocal_40 = 0;
  	int iLocal_41 = 0;
  	int iLocal_42 = 0;
  	var uLocal_43 = 0;
  	var uLocal_44 = 0;
  	var uLocal_45 = 0;
  	var uLocal_46 = 0;
  	var uLocal_47 = 0;
  	var uLocal_48 = 0;
  	var uLocal_49 = 0;
  	var uLocal_50 = 0;
  	var uLocal_51 = 0;
  	var uLocal_52 = 0;
  	var uLocal_53 = 0;
  	var uLocal_54 = 0;
  	var uLocal_55 = 0;
  	var uLocal_56 = 0;
  	var uLocal_57 = 0;
  	var uLocal_58 = 0;
  	var uLocal_59 = 0;
  	var uLocal_60 = 0;
  	var uLocal_61 = 0;
  	float fLocal_62 = 0f;
  	var uLocal_63 = 0;
  	var uLocal_64 = 0;
  	var uLocal_65 = 0;
  	var uLocal_66 = 0;
  	var uLocal_67 = 0;
  	var uLocal_68 = 0;
  	var uLocal_69 = 0;
  	var uLocal_70 = 0;
  	var uLocal_71 = 0;
  	var uLocal_72 = 0;
  	var uLocal_73 = 0;
  	var uLocal_74 = 0;
  	var uLocal_75 = 0;
  	var uLocal_76 = 0;
  	var uLocal_77 = 0;
  	var uLocal_78 = 0;
  	var uLocal_79 = -1;
  	var uLocal_80 = 0;
  	var uLocal_81 = 0;
  	var uLocal_82 = 0;
  	var uLocal_83 = 0;
  	var uLocal_84 = 0;
  	var uLocal_85 = 0;
  	var uLocal_86 = 0;
  	var uLocal_87 = 3;
  	var uLocal_88 = 0;
  	var uLocal_89 = 0;
  	var uLocal_90 = 0;
  	var uLocal_91 = 0;
  	var uLocal_92 = 0;
  	var uLocal_93 = 0;
  	var uLocal_94 = 0;
  	var uLocal_95 = 1061158912;
  	var uLocal_96 = 0;
  	var uLocal_97 = 0;
  	var uLocal_98 = 0;
  	var uLocal_99 = 0;
  	var uLocal_100 = 0;
  	var uLocal_101 = 0;
  	var uLocal_102 = 0;
  	var uLocal_103 = 0;
  	var uLocal_104 = 0;
  	var uLocal_105 = 0;
  	var uLocal_106 = 0;
  	var uLocal_107 = 0;
  	var uLocal_108 = 0;
  	var uLocal_109 = 1061158912;
  	var uLocal_110 = 0;
  	var uLocal_111 = 0;
  	var uLocal_112 = 0;
  	var uLocal_113 = 0;
  	var uLocal_114 = 0;
  	var uLocal_115 = 0;
  	var uLocal_116 = 0;
  	var uLocal_117 = 0;
  	var uLocal_118 = 0;
  	var uLocal_119 = 0;
  	var uLocal_120 = 0;
  	var uLocal_121 = 0;
  	var uLocal_122 = 0;
  	var uLocal_123 = 1061158912;
  	var uLocal_124 = 0;
  	var uLocal_125 = 0;
  	var uLocal_126 = 0;
  	var uLocal_127 = 0;
  	var uLocal_128 = 0;
  	var uLocal_129 = 0;
  	var uLocal_130 = 0;
  	var uLocal_131 = -1;
  	var uLocal_132 = 0;
  	var uLocal_133 = 0;
  	var uLocal_134 = 0;
  	var uLocal_135 = -1;
  	var uLocal_136 = -1;
  	var uLocal_137 = -1;
  	var uLocal_138 = 0;
  	var uLocal_139 = 0;
  	var uLocal_140 = 0;
  	var uLocal_141 = 0;
  	var uLocal_142 = 0;
  	var uLocal_143 = 0;
  	var uLocal_144 = 0;
  	var uLocal_145 = 0;
  #endregion
  
  void __EntryFunction__()
  {
  	iLocal_2 = 1;
  	iLocal_3 = 134;
  	iLocal_4 = 134;
  	iLocal_5 = 1;
  	iLocal_6 = 1;
  	iLocal_7 = 1;
  	iLocal_8 = 134;
  	iLocal_9 = 1;
  	iLocal_10 = 12;
  	iLocal_11 = 12;
  	fLocal_14 = 0.001f;
  	iLocal_17 = -1;
  	sLocal_18 = "NULL";
  	fLocal_21 = 0f;
  	fLocal_25 = -0.0375f;
  	fLocal_26 = 0.17f;
  	iLocal_28 = 3;
  	fLocal_31 = 80f;
  	fLocal_32 = 140f;
  	fLocal_33 = 180f;
  	iLocal_39 = 1;
  	iLocal_40 = 65;
  	iLocal_41 = 49;
  	iLocal_42 = 64;
  	fLocal_62 = ((0.05f + 0.275f) - 0.01f);
  	if (func_86())
  	{
  		while (!func_72())
  		{
  			SYSTEM::WAIT(0);
  			func_9(&uLocal_87);
  		}
  	}
  	func_1();
  }
  
  void func_1()
  {
  	func_3(&uLocal_87);
  	func_2();
  }
  
  void func_2()
  {
  	unk_0x4BFE89D21F9885DC();
  }
  
  void func_3(var uParam0)
  {
  	var uVar0;
  	
  	func_7(&(uParam0->f_43.f_5));
  	func_5(uParam0, 1);
  	if (uParam0->f_43.f_4 > 2)
  	{
  		func_4(-1);
  		uVar0 = unk_0x51FB94D5F3D17E35(uParam0->f_43.f_1);
  		if (unk_0xEEC203A73BC92E7E(uVar0))
  		{
  			unk_0x3DF4E172AD7D16AF(uParam0->f_43.f_1);
  		}
  	}
  }
  
  void func_4(int iParam0)
  {
  	Global_2463526 = iParam0;
  	Global_1590908[unk_0x1146A9AE09CE2B14() /*874*/].f_867 = iParam0;
  }
  
  void func_5(var uParam0, int iParam1)
  {
  	if (((((((((((((((func_6("MPOF_AC_PC_EXIT") || func_6("MPOF_AC_EXIT")) || func_6("MPOFSEAT_PCEXIT")) || func_6("MPOFSEAT_EXIT")) || func_6("DJ_SEAT_PC")) || func_6("DJ_SEAT")) || func_6("DJ_PSEAT_PC")) || func_6("DJ_PSEAT")) || func_6("DJ_SEAT_PC_BM")) || func_6("DJ_SEAT_BM")) || func_6("DJ_PSEAT_PC_BM")) || func_6("DJ_PSEAT_BM")) || func_6("DJ_SEAT_PC_TOU")) || func_6("DJ_SEAT_TOU")) || func_6("DJ_PSEAT_PC_TOU")) || func_6("DJ_PSEAT_TOU"))
  	{
  		unk_0x66AE54CE92457FEE(1);
  	}
  	if (iParam1 && uParam0->f_43.f_5 != -1)
  	{
  		func_7(&(uParam0->f_43.f_5));
  		uParam0->f_43.f_5 = -1;
  	}
  }
  
  var func_6(char* sParam0)
  {
  	unk_0x4A4799828818A508(sParam0);
  	return unk_0x0222F263F70347A8(0);
  }
  
  void func_7(var uParam0)
  {
  	int iVar0;
  	
  	if (*uParam0 == -1)
  	{
  		return;
  	}
  	iVar0 = func_8(*uParam0);
  	if (iVar0 == -1)
  	{
  		*uParam0 = -1;
  		return;
  	}
  	if (iVar0 > -1 && iVar0 < 6)
  	{
  		if (Global_42737[iVar0 /*32*/])
  		{
  			Global_42737[iVar0 /*32*/].f_7 = 1;
  			*uParam0 = -1;
  			return;
  		}
  	}
  	*uParam0 = -1;
  }
  
  int func_8(int iParam0)
  {
  	int iVar0;
  	
  	if (iParam0 < 0)
  	{
  		return -1;
  	}
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < 6)
  	{
  		if (Global_42737[iVar0 /*32*/].f_1 == iParam0)
  		{
  			return iVar0;
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  void func_9(var uParam0)
  {
  	char* sVar0;
  	char* sVar16;
  	struct<3> Var20;
  	struct<3> Var23;
  	var uVar26;
  	float fVar27;
  	int iVar28;
  	struct<3> Var29;
  	float fVar32;
  	var uVar33;
  	var uVar34;
  	int iVar35;
  	
  	func_69(uParam0);
  	func_67(uParam0);
  	switch (uParam0->f_43.f_4)
  	{
  		case 0:
  			func_66(&(uParam0->f_43), 11);
  			func_65(uParam0, 1);
  			break;
  		
  		case 1:
  			Global_1683951 = 0;
  			if (func_64(uParam0))
  			{
  				uParam0->f_43.f_6 = unk_0xDFB7BFA6482FEE1E();
  				func_65(uParam0, 2);
  			}
  			break;
  		
  		case 2:
  			if (func_63(unk_0x7D2B9E6A64637269(), uParam0[uParam0->f_43.f_2 /*14*/]) && func_62(unk_0x7D2B9E6A64637269(), (uParam0[uParam0->f_43.f_2 /*14*/])->f_8.f_3, (*uParam0)[uParam0->f_43.f_2 /*14*/]))
  			{
  				if ((func_60(uParam0) || func_56(uParam0)) || !func_55(uParam0))
  				{
  					func_5(uParam0, 1);
  					func_65(uParam0, 1);
  				}
  				else
  				{
  					Global_1683951 = 1;
  					if (uParam0->f_43.f_5 == -1)
  					{
  						if ((unk_0xDFB7BFA6482FEE1E() - uParam0->f_43.f_6) > 150)
  						{
  							func_54(&(uParam0->f_43.f_5), 4, "MPJAC_SIT", 0, 0, 0, 0);
  						}
  					}
  					else if (unk_0x86AF801D34E482FF(0, 51))
  					{
  						func_7(&(uParam0->f_43.f_5));
  						func_51(uParam0);
  						func_65(uParam0, 3);
  					}
  				}
  			}
  			else
  			{
  				func_5(uParam0, 1);
  				func_65(uParam0, 1);
  			}
  			break;
  		
  		case 3:
  			func_50(uParam0, &sVar0);
  			unk_0x068BDE31F7D112BB(&sVar0);
  			if (unk_0x0EC2B29D4172D225(&sVar0))
  			{
  				func_65(uParam0, 4);
  			}
  			break;
  		
  		case 4:
  			func_50(uParam0, &sVar0);
  			func_49(uParam0, &sVar16);
  			Var20 = { unk_0xBF480D363C51CDF8(&sVar0, &sVar16, func_48(uParam0), func_47(uParam0), 0, 2) };
  			Var23 = { unk_0x04F690ADA8C71424(&sVar0, &sVar16, func_48(uParam0), func_47(uParam0), 0, 2) };
  			uVar26 = Var23.f_2;
  			fVar27 = 0.05f;
  			if (uParam0->f_43.f_8 == 1)
  			{
  				fVar27 = 0.15f;
  			}
  			unk_0x28A5BAF912B4E14D(unk_0x7D2B9E6A64637269(), Var20, 1f, 500, uVar26, fVar27);
  			func_4(uParam0->f_43.f_2);
  			func_65(uParam0, 5);
  			break;
  		
  		case 5:
  			func_35(uParam0);
  			func_50(uParam0, &sVar0);
  			func_49(uParam0, &sVar16);
  			iVar28 = unk_0x4E8DA737B686529A(unk_0x7D2B9E6A64637269(), 2106541073);
  			Var29 = { unk_0x04F690ADA8C71424(&sVar0, &sVar16, func_48(uParam0), func_47(uParam0), 0, 2) };
  			fVar32 = Var29.f_2;
  			if ((iVar28 != 1 && iVar28 != 0) || func_34(unk_0xA8D713A937F31250(unk_0x7D2B9E6A64637269()), fVar32, 5f))
  			{
  				uParam0->f_43.f_1 = unk_0x88A92D91AB021F3F(func_48(uParam0), func_47(uParam0), 2, 1, 0, 1065353216, 0, 1.12f);
  				unk_0x5DDC0EBEF6A48288(unk_0x7D2B9E6A64637269(), uParam0->f_43.f_1, &sVar0, &sVar16, 2f, -1000f, 13, 16, 1148846080, 0);
  				unk_0x20F6F12F2945E30E(uParam0->f_43.f_1);
  				uParam0->f_43.f_8.f_4 = unk_0xDFB7BFA6482FEE1E();
  				func_33(&(uParam0->f_43), 8);
  				func_65(uParam0, 6);
  			}
  			break;
  		
  		case 6:
  			if (func_32(&(uParam0->f_43), 10) || func_31())
  			{
  				func_66(&(uParam0->f_43), 10);
  				func_30(uParam0);
  			}
  			func_35(uParam0);
  			func_16(uParam0);
  			uVar33 = unk_0x51FB94D5F3D17E35(uParam0->f_43.f_1);
  			if (unk_0xEEC203A73BC92E7E(uVar33))
  			{
  				if (unk_0x0BC8768247440B3A(uVar33) >= 1f)
  				{
  					func_10(uParam0, 0);
  					func_50(uParam0, &sVar0);
  					func_49(uParam0, &sVar16);
  					uParam0->f_43.f_1 = unk_0x88A92D91AB021F3F(func_48(uParam0), func_47(uParam0), 2, 1, 0, 1065353216, 0, 1.12f);
  					unk_0x5DDC0EBEF6A48288(unk_0x7D2B9E6A64637269(), uParam0->f_43.f_1, &sVar0, &sVar16, 4f, -1.5f, 13, 16, 1148846080, 0);
  					unk_0x20F6F12F2945E30E(uParam0->f_43.f_1);
  					func_33(&(uParam0->f_43), 8);
  					func_33(&(uParam0->f_43), 11);
  				}
  				else
  				{
  					func_66(&(uParam0->f_43), 8);
  				}
  			}
  			else if (!func_32(&(uParam0->f_43), 8))
  			{
  				func_65(uParam0, 8);
  			}
  			break;
  		
  		case 7:
  			unk_0x3DF4E172AD7D16AF(uParam0->f_43.f_1);
  			func_65(uParam0, 8);
  			break;
  		
  		case 8:
  			uVar34 = unk_0x51FB94D5F3D17E35(uParam0->f_43.f_1);
  			iVar35 = unk_0x4E8DA737B686529A(unk_0x7D2B9E6A64637269(), 1785177548);
  			if (iVar35 == 0 || iVar35 == 1)
  			{
  				if (unk_0xEEC203A73BC92E7E(uVar34))
  				{
  					if ((unk_0x0BC8768247440B3A(uVar34) >= 0.7f || unk_0x0E497F28E1A4E3F6(unk_0x7D2B9E6A64637269(), 364629851)) || unk_0x0E497F28E1A4E3F6(unk_0x7D2B9E6A64637269(), 2116425869))
  					{
  						unk_0x3DF4E172AD7D16AF(uParam0->f_43.f_1);
  						func_4(-1);
  						func_5(uParam0, 1);
  						func_65(uParam0, 0);
  					}
  				}
  			}
  			else
  			{
  				func_4(-1);
  				func_5(uParam0, 1);
  				func_65(uParam0, 0);
  			}
  			break;
  	}
  }
  
  void func_10(var uParam0, bool bParam1)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	
  	if (bParam1)
  	{
  		iVar1 = func_11(uParam0);
  		if (iVar1 != uParam0->f_43.f_8.f_1)
  		{
  			if (iVar1 == 0)
  			{
  				iVar0 = (11 + uParam0->f_43.f_8.f_1);
  			}
  			else
  			{
  				iVar0 = (6 + iVar1);
  			}
  		}
  		else
  		{
  			iVar0 = uParam0->f_43.f_8.f_2;
  		}
  		iVar1 = uParam0->f_43.f_8.f_1;
  	}
  	else if (uParam0->f_43.f_8.f_2 == 5)
  	{
  		iVar1 = uParam0->f_43.f_8.f_1;
  		iVar2 = 3;
  		iVar0 = unk_0xB36B8558948EA7A8(0, iVar2);
  		if (iVar0 == uParam0->f_43.f_8.f_3)
  		{
  			iVar0 = (iVar0 + 1 % iVar2);
  		}
  	}
  	else
  	{
  		if (uParam0->f_43.f_8.f_2 > 6)
  		{
  			iVar1 = func_11(uParam0);
  			uParam0->f_43.f_8.f_4 = unk_0xDFB7BFA6482FEE1E();
  		}
  		else
  		{
  			iVar1 = uParam0->f_43.f_8.f_1;
  		}
  		if ((unk_0xDFB7BFA6482FEE1E() - uParam0->f_43.f_8.f_4) >= 90000)
  		{
  			iVar1 = func_11(uParam0);
  			if (iVar1 != uParam0->f_43.f_8.f_1)
  			{
  				if (iVar1 == 0)
  				{
  					iVar0 = (11 + uParam0->f_43.f_8.f_1);
  				}
  				else
  				{
  					iVar0 = (6 + iVar1);
  				}
  			}
  			iVar1 = uParam0->f_43.f_8.f_1;
  		}
  		else
  		{
  			iVar0 = 5;
  		}
  	}
  	uParam0->f_43.f_8.f_3 = uParam0->f_43.f_8.f_2;
  	uParam0->f_43.f_8.f_2 = iVar0;
  	uParam0->f_43.f_8.f_1 = iVar1;
  }
  
  int func_11(var uParam0)
  {
  	int iVar0;
  	
  	if (uParam0->f_43.f_8 == 2)
  	{
  		return uParam0->f_43.f_8.f_1;
  	}
  	iVar0 = (uParam0->f_43.f_8.f_1 + 1 % func_14(uParam0->f_43.f_8));
  	if (func_12())
  	{
  		if (uParam0->f_43.f_8 == 1)
  		{
  			if (iVar0 == 0 || iVar0 == 4)
  			{
  				iVar0 = 1;
  			}
  		}
  	}
  	else if (uParam0->f_43.f_8 == 1)
  	{
  		if (iVar0 == 1 || iVar0 == 2)
  		{
  			iVar0 = 3;
  		}
  	}
  	return iVar0;
  }
  
  bool func_12()
  {
  	return func_13(unk_0x1146A9AE09CE2B14());
  }
  
  int func_13(int iParam0)
  {
  	if (unk_0x6471F4759775FCA4(unk_0xD56332194D622ECE(iParam0)) == joaat("mp_f_freemode_01"))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_14(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 0:
  			return 3;
  		
  		case 1:
  			return func_15(func_12(), 4, 5);
  		
  		case 2:
  			return 5;
  		
  		default:
  	}
  	return 0;
  }
  
  int func_15(bool bParam0, int iParam1, int iParam2)
  {
  	if (bParam0)
  	{
  		return iParam1;
  	}
  	return iParam2;
  }
  
  void func_16(var uParam0)
  {
  	struct<3> Var0;
  	float fVar3;
  	bool bVar4;
  	int iVar5;
  	
  	if (uParam0->f_43.f_4 == 6)
  	{
  		Var0 = { unk_0xBDAD193FD6CC54F5(0, 218), unk_0xBDAD193FD6CC54F5(0, 219), 0f };
  		fVar3 = SYSTEM::VMAG(Var0);
  		if ((uParam0->f_43.f_4 == 6 && !unk_0x0E497F28E1A4E3F6(unk_0x7D2B9E6A64637269(), -1322051853)) && !func_32(&(uParam0->f_43), 12))
  		{
  			if ((fVar3 >= 0.35f && !Global_2520122) && !Global_2520124)
  			{
  				func_29(uParam0);
  			}
  		}
  		if (unk_0x0C7C436873368EDB(2))
  		{
  			func_5(uParam0, 1);
  		}
  		if (unk_0x0E497F28E1A4E3F6(unk_0x7D2B9E6A64637269(), -1322051853))
  		{
  			func_5(uParam0, 1);
  		}
  		else if (Global_2520122 || Global_2520124)
  		{
  			func_5(uParam0, 1);
  		}
  		else if (func_28(uParam0))
  		{
  			func_5(uParam0, 1);
  		}
  		else
  		{
  			unk_0xB5D61F76D4980A55(2);
  			unk_0x366E7F593105797F(0, 24, 1);
  			unk_0x366E7F593105797F(0, 257, 1);
  			unk_0x366E7F593105797F(0, 142, 1);
  			unk_0x366E7F593105797F(0, 141, 1);
  			unk_0x366E7F593105797F(0, 140, 1);
  			unk_0x366E7F593105797F(0, 263, 1);
  			unk_0x366E7F593105797F(0, 264, 1);
  			unk_0x366E7F593105797F(0, 143, 1);
  			unk_0x366E7F593105797F(2, 200, 1);
  			bVar4 = false;
  			if (((func_26(func_27()) && func_25()) && func_24(Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9, 4)) && func_23(Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9))
  			{
  				bVar4 = true;
  			}
  			if (((((!unk_0xA300BD5F71A8C704() && !func_32(&(uParam0->f_43), 0)) && !func_32(&(uParam0->f_43), 4)) && !func_22()) && !func_20(1)) && uParam0->f_43.f_8.f_2 != 3)
  			{
  				if (uParam0->f_43.f_5 == -1)
  				{
  					if (uParam0->f_43.f_8 == 1 || uParam0->f_43.f_8 == 0)
  					{
  						if (unk_0x0D901EFDFD7EF9D5(2))
  						{
  							if (bVar4)
  							{
  								if (func_17(unk_0x1146A9AE09CE2B14()) == 3)
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT_PC_BM", 0, 0, 0, 0);
  								}
  								else if (func_17(unk_0x1146A9AE09CE2B14()) == 2)
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT_PC_TOU", 0, 0, 0, 0);
  								}
  								else
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT_PC", 0, 0, 0, 0);
  								}
  							}
  							else
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "MPOF_AC_PC_EXIT", 0, 0, 0, 0);
  							}
  						}
  						else if (bVar4)
  						{
  							if (func_17(unk_0x1146A9AE09CE2B14()) == 3)
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT_BM", 0, 0, 0, 0);
  							}
  							else if (func_17(unk_0x1146A9AE09CE2B14()) == 2)
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT_TOU", 0, 0, 0, 0);
  							}
  							else
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_SEAT", 0, 0, 0, 0);
  							}
  						}
  						else
  						{
  							func_54(&(uParam0->f_43.f_5), 4, "MPOF_AC_EXIT", 0, 0, 0, 0);
  						}
  					}
  					else if (uParam0->f_43.f_8 == 2)
  					{
  						if (unk_0x0D901EFDFD7EF9D5(2))
  						{
  							if (bVar4)
  							{
  								if (func_17(unk_0x1146A9AE09CE2B14()) == 3)
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT_PC_BM", 0, 0, 0, 0);
  								}
  								else if (func_17(unk_0x1146A9AE09CE2B14()) == 2)
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT_PC_TOU", 0, 0, 0, 0);
  								}
  								else
  								{
  									func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT_PC", 0, 0, 0, 0);
  								}
  							}
  							else
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "MPOFSEAT_PCEXIT", 0, 0, 0, 0);
  							}
  						}
  						else if (bVar4)
  						{
  							if (func_17(unk_0x1146A9AE09CE2B14()) == 3)
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT_BM", 0, 0, 0, 0);
  							}
  							else if (func_17(unk_0x1146A9AE09CE2B14()) == 2)
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT_TOU", 0, 0, 0, 0);
  							}
  							else
  							{
  								func_54(&(uParam0->f_43.f_5), 4, "DJ_PSEAT", 0, 0, 0, 0);
  							}
  						}
  						else
  						{
  							func_54(&(uParam0->f_43.f_5), 4, "MPOFSEAT_EXIT", 0, 0, 0, 0);
  						}
  					}
  				}
  				if (uParam0->f_43.f_4 == 6)
  				{
  					if (unk_0x0D901EFDFD7EF9D5(2))
  					{
  						iVar5 = 225;
  					}
  					else
  					{
  						iVar5 = 190;
  					}
  					if (((unk_0x96DF114B59E81B9C(2, iVar5) && !unk_0x86AF801D34E482FF(2, 203)) && !Global_2520124) && !Global_2520122)
  					{
  						func_30(uParam0);
  					}
  					if (((((unk_0x96DF114B59E81B9C(2, 203) && !unk_0x96DF114B59E81B9C(2, iVar5)) && func_26(func_27())) && func_25()) && func_24(Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9, 4)) && func_23(Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9))
  					{
  						Global_2520124 = 1;
  						Global_2520122 = 1;
  					}
  				}
  			}
  		}
  	}
  	func_66(&(uParam0->f_43), 9);
  }
  
  int func_17(int iParam0)
  {
  	int iVar0;
  	
  	iVar0 = -1;
  	if (func_18(iParam0, 0))
  	{
  		iVar0 = 0;
  	}
  	else if (func_18(iParam0, 1))
  	{
  		iVar0 = 1;
  	}
  	else if (func_18(iParam0, 2))
  	{
  		iVar0 = 2;
  	}
  	else if (func_18(iParam0, 3))
  	{
  		iVar0 = 3;
  	}
  	return iVar0;
  }
  
  bool func_18(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (unk_0xE45310E861787FC2())
  	{
  		return Global_4456448.f_127840.f_6 == iParam1;
  	}
  	if (iParam0 == func_19() || iParam1 == -1)
  	{
  		return 0;
  	}
  	iVar0 = iParam1 + 20;
  	return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_324.f_1, iVar0);
  }
  
  int func_19()
  {
  	return -1;
  }
  
  int func_20(bool bParam0)
  {
  	if (unk_0x4AA05D0E8631839E())
  	{
  		if (!unk_0xECEC7528A52B4EE8(unk_0x7D2B9E6A64637269()))
  		{
  			if (func_21(unk_0x7D2B9E6A64637269()))
  			{
  				if (unk_0x5C6675393464A814(0, 25) || unk_0x5C6675393464A814(0, 68))
  				{
  					return 0;
  				}
  			}
  		}
  	}
  	if (Global_22531.f_130)
  	{
  		return 0;
  	}
  	if (unk_0x5C6675393464A814(0, 19) || (!bParam0 && unk_0x51794501073F0A33(0, 19)))
  	{
  		return 1;
  	}
  	if (unk_0x3640D836D145B814())
  	{
  		if (((unk_0x5C6675393464A814(0, 166) || unk_0x5C6675393464A814(0, 167)) || unk_0x5C6675393464A814(0, 168)) || unk_0x5C6675393464A814(0, 169))
  		{
  			return 1;
  		}
  		if (!bParam0)
  		{
  			if (((unk_0x51794501073F0A33(0, 166) || unk_0x51794501073F0A33(0, 167)) || unk_0x51794501073F0A33(0, 168)) || unk_0x51794501073F0A33(0, 169))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_21(var uParam0)
  {
  	int iVar0;
  	
  	if (unk_0x8ACA9ACB93EC151E())
  	{
  		if (!unk_0xECEC7528A52B4EE8(uParam0))
  		{
  			unk_0xBDC364B886846D11(uParam0, &iVar0, 1);
  			if (((iVar0 == joaat("weapon_sniperrifle") || iVar0 == joaat("weapon_heavysniper")) || iVar0 == joaat("weapon_marksmanrifle")) || iVar0 == joaat("weapon_heavysniper_mk2"))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_22()
  {
  	if (Global_2441237.f_1274.f_5 == -1)
  	{
  		return 0;
  	}
  	return 1;
  }
  
  bool func_23(int iParam0)
  {
  	if (unk_0xE45310E861787FC2())
  	{
  		return unk_0x234B68AC2E35ED5A(Global_4456448.f_127840.f_14, 4);
  	}
  	if (iParam0 == func_19())
  	{
  		return 0;
  	}
  	return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_324.f_1, 1);
  }
  
  int func_24(int iParam0, int iParam1)
  {
  	if (iParam0 == func_19())
  	{
  		return 0;
  	}
  	switch (iParam1)
  	{
  		case 0:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 0);
  			break;
  		
  		case 1:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 1);
  			break;
  		
  		case 4:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 2);
  			break;
  		
  		case 2:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 3);
  			break;
  		
  		case 3:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 4);
  			break;
  		
  		case 5:
  			return unk_0x234B68AC2E35ED5A(Global_1590908[iParam0 /*874*/].f_267.f_283.f_7, 5);
  			break;
  	}
  	return 0;
  }
  
  int func_25()
  {
  	if (unk_0x8954E9D0A9F6F8CF(unk_0x7D2B9E6A64637269(), -1612.283f, -3021.792f, -76.18069f, -1612.22f, -3005.203f, -74.20517f, 12.75f, 0, 1, 0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_26(int iParam0)
  {
  	if (Global_262145.f_24034)
  	{
  		return 0;
  	}
  	switch (iParam0)
  	{
  		case 4:
  		case 5:
  		case 6:
  		case 7:
  		case 8:
  			return 1;
  		
  		default:
  	}
  	return 0;
  }
  
  int func_27()
  {
  	return Global_2463526;
  }
  
  bool func_28(var uParam0)
  {
  	return func_32(&(uParam0->f_43), 9);
  }
  
  void func_29(var uParam0)
  {
  	char* sVar0;
  	char* sVar16;
  	
  	if (((func_11(uParam0) != uParam0->f_43.f_8.f_1 && uParam0->f_43.f_8.f_2 < 6) && uParam0->f_43.f_8.f_2 != 3) && uParam0->f_43.f_8.f_2 != 4)
  	{
  		func_10(uParam0, 1);
  		func_50(uParam0, &sVar0);
  		func_49(uParam0, &sVar16);
  		uParam0->f_43.f_1 = unk_0x88A92D91AB021F3F(func_48(uParam0), func_47(uParam0), 2, 1, 0, 1065353216, 0, 1.12f);
  		unk_0x5DDC0EBEF6A48288(unk_0x7D2B9E6A64637269(), uParam0->f_43.f_1, &sVar0, &sVar16, 4f, -1.5f, 13, 16, 1148846080, 0);
  		unk_0x20F6F12F2945E30E(uParam0->f_43.f_1);
  		func_33(&(uParam0->f_43), 8);
  		unk_0xE37EB80DFB0D31FB(unk_0x7D2B9E6A64637269(), 0, 0);
  	}
  }
  
  void func_30(var uParam0)
  {
  	char* sVar0;
  	
  	uParam0->f_43.f_1 = unk_0x88A92D91AB021F3F(func_48(uParam0), func_47(uParam0), 2, 1, 0, 1065353216, 0, 1.12f);
  	func_50(uParam0, &sVar0);
  	unk_0x5DDC0EBEF6A48288(unk_0x7D2B9E6A64637269(), uParam0->f_43.f_1, &sVar0, "exit", 4f, -4f, 13, 16, 1148846080, 0);
  	unk_0x20F6F12F2945E30E(uParam0->f_43.f_1);
  	func_7(&(uParam0->f_43.f_5));
  	func_65(uParam0, 8);
  }
  
  bool func_31()
  {
  	return unk_0x234B68AC2E35ED5A(Global_1683970.f_3, 25);
  }
  
  bool func_32(var uParam0, int iParam1)
  {
  	return unk_0x234B68AC2E35ED5A(*uParam0, iParam1);
  }
  
  void func_33(var uParam0, int iParam1)
  {
  	unk_0x191DDA30577F440A(uParam0, iParam1);
  }
  
  int func_34(float fParam0, float fParam1, float fParam2)
  {
  	float fVar0;
  	float fVar1;
  	
  	fVar1 = (fParam1 - fParam2);
  	if (fVar1 < 0f)
  	{
  		fVar1 = (fVar1 + 360f);
  	}
  	fVar0 = (fParam1 + fParam2);
  	if (fVar0 >= 360f)
  	{
  		fVar0 = (fVar0 - 360f);
  	}
  	if (fVar0 < 0f)
  	{
  		fVar0 = (fVar0 + 360f);
  	}
  	if (fVar0 > fVar1)
  	{
  		if (fParam0 < fVar0 && fParam0 > fVar1)
  		{
  			return 1;
  		}
  	}
  	else if (fParam0 < fVar0 || fParam0 > fVar1)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_35(var uParam0)
  {
  	int iVar0;
  	
  	switch (uParam0->f_43.f_4)
  	{
  		case 4:
  		case 8:
  			func_40(1);
  		
  		case 6:
  			unk_0x00501E90C3DEF64D();
  			unk_0x795DF3C9512FD2E7(0);
  			unk_0xC507AA2C3FCF5DA4(0);
  			unk_0xEFD424FDD55A6EC7(19);
  			unk_0xEFD424FDD55A6EC7(2);
  			unk_0x2C79DF42E0C84790();
  			func_39();
  			if (unk_0xBDC364B886846D11(unk_0x7D2B9E6A64637269(), &iVar0, 1) && iVar0 != joaat("weapon_unarmed"))
  			{
  				unk_0x2FF622571073AA69(unk_0x7D2B9E6A64637269(), joaat("weapon_unarmed"), 1);
  			}
  			unk_0x366E7F593105797F(0, 37, 1);
  			func_37(1);
  			func_36();
  			break;
  	}
  }
  
  void func_36()
  {
  	Global_22531.f_6 = 1;
  }
  
  void func_37(bool bParam0)
  {
  	if (bParam0)
  	{
  		if (func_38())
  		{
  			Global_2453009.f_41 = 1;
  		}
  	}
  	else
  	{
  		Global_2453009.f_41 = 0;
  	}
  }
  
  bool func_38()
  {
  	return unk_0x234B68AC2E35ED5A(Global_2453009.f_2, 11);
  }
  
  void func_39()
  {
  	unk_0x191DDA30577F440A(&Global_7669, 4);
  }
  
  void func_40(int iParam0)
  {
  	if (func_46())
  	{
  		return;
  	}
  	if (!Global_19798.f_1 == 1)
  	{
  		if (func_45(0))
  		{
  			func_41(iParam0);
  		}
  		unk_0x191DDA30577F440A(&Global_7669, 2);
  	}
  }
  
  void func_41(int iParam0)
  {
  	if (func_46())
  	{
  		return;
  	}
  	if (Global_19984)
  	{
  		if (func_44())
  		{
  			func_43(1, 1);
  		}
  		else
  		{
  			func_43(0, 0);
  		}
  	}
  	if (Global_19798.f_1 == 10 || Global_19798.f_1 == 9)
  	{
  		unk_0x191DDA30577F440A(&Global_7669, 16);
  	}
  	if (unk_0x8820F6FCD373F9F7())
  	{
  		unk_0x75B41F5020877259(0);
  	}
  	Global_21125 = 5;
  	if (iParam0 == 1)
  	{
  		unk_0x191DDA30577F440A(&Global_7668, 30);
  	}
  	else
  	{
  		unk_0xC664C0067EEAB8D1(&Global_7668, 30);
  	}
  	if (!func_42())
  	{
  		Global_19798.f_1 = 3;
  	}
  }
  
  int func_42()
  {
  	if (Global_19798.f_1 == 1 || Global_19798.f_1 == 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_43(bool bParam0, bool bParam1)
  {
  	if (bParam0)
  	{
  		if (func_45(0))
  		{
  			Global_19984 = 1;
  			if (bParam1)
  			{
  				unk_0x3AEC124A3999B3D1(&Global_19735);
  			}
  			Global_19726 = { Global_19744[Global_19743 /*3*/] };
  			unk_0xA48FA5CE681A5230(Global_19726);
  		}
  	}
  	else if (Global_19984 == 1)
  	{
  		Global_19984 = 0;
  		Global_19726 = { Global_19751[Global_19743 /*3*/] };
  		if (bParam1)
  		{
  			unk_0xA48FA5CE681A5230(Global_19735);
  		}
  		else
  		{
  			unk_0xA48FA5CE681A5230(Global_19726);
  		}
  	}
  }
  
  bool func_44()
  {
  	return unk_0x234B68AC2E35ED5A(Global_1695733, 5);
  }
  
  int func_45(int iParam0)
  {
  	if (iParam0 == 1)
  	{
  		if (Global_19798.f_1 > 3)
  		{
  			if (unk_0x234B68AC2E35ED5A(Global_7668, 14))
  			{
  				return 1;
  			}
  			else
  			{
  				return 0;
  			}
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	if (unk_0x636F1F53CC61D2C9(joaat("cellphone_flashhand")) > 0)
  	{
  		return 1;
  	}
  	if (Global_19798.f_1 > 3)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_46()
  {
  	return unk_0x234B68AC2E35ED5A(Global_1695733, 19);
  }
  
  Vector3 func_47(var uParam0)
  {
  	struct<3> Var0;
  	
  	Var0 = { (uParam0[uParam0->f_43.f_2 /*14*/])->f_8.f_3 };
  	if (func_12() && uParam0->f_43.f_8 == 0)
  	{
  		Var0.f_2 = (Var0.f_2 - 4f);
  	}
  	return Var0;
  }
  
  Vector3 func_48(var uParam0)
  {
  	return (uParam0[uParam0->f_43.f_2 /*14*/])->f_8;
  }
  
  void func_49(var uParam0, char* sParam1)
  {
  	if (uParam0->f_43.f_8 == 1)
  	{
  		if (func_12())
  		{
  			switch (uParam0->f_43.f_8.f_2)
  			{
  				case 0:
  					StringCopy(sParam1, "IDLE_A", 16);
  					break;
  				
  				case 1:
  					StringCopy(sParam1, "IDLE_B", 16);
  					break;
  				
  				case 2:
  					StringCopy(sParam1, "IDLE_C", 16);
  					break;
  				
  				case 3:
  					StringCopy(sParam1, "ENTER", 16);
  					break;
  				
  				case 5:
  					StringCopy(sParam1, "BASE", 16);
  					break;
  				
  				case 4:
  					StringCopy(sParam1, "EXIT", 16);
  					break;
  				
  				case 7:
  					StringCopy(sParam1, "D_TO_B", 16);
  					break;
  				
  				case 8:
  					StringCopy(sParam1, "B_TO_C", 16);
  					break;
  				
  				case 9:
  					StringCopy(sParam1, "C_TO_D", 16);
  					break;
  				
  				case 10:
  					StringCopy(sParam1, "D_TO_B", 16);
  					break;
  				
  				case 12:
  					StringCopy(sParam1, "B_TO_A", 16);
  					break;
  				
  				case 13:
  					StringCopy(sParam1, "C_TO_A", 16);
  					break;
  				
  				case 14:
  					StringCopy(sParam1, "D_TO_B", 16);
  					break;
  				
  				case 15:
  					StringCopy(sParam1, "E_TO_A", 16);
  					break;
  				
  				default:
  					StringCopy(sParam1, "invalid_clip", 16);
  					break;
  			}
  		}
  		else
  		{
  			switch (uParam0->f_43.f_8.f_2)
  			{
  				case 0:
  					StringCopy(sParam1, "IDLE_A", 16);
  					break;
  				
  				case 1:
  					StringCopy(sParam1, "IDLE_B", 16);
  					break;
  				
  				case 2:
  					StringCopy(sParam1, "IDLE_C", 16);
  					break;
  				
  				case 3:
  					StringCopy(sParam1, "ENTER", 16);
  					break;
  				
  				case 5:
  					StringCopy(sParam1, "BASE", 16);
  					break;
  				
  				case 4:
  					StringCopy(sParam1, "EXIT", 16);
  					break;
  				
  				case 7:
  					StringCopy(sParam1, "A_TO_B", 16);
  					break;
  				
  				case 8:
  					StringCopy(sParam1, "B_TO_C", 16);
  					break;
  				
  				case 9:
  					StringCopy(sParam1, "A_TO_D", 16);
  					break;
  				
  				case 10:
  					StringCopy(sParam1, "D_TO_E", 16);
  					break;
  				
  				case 12:
  					StringCopy(sParam1, "B_TO_E", 16);
  					break;
  				
  				case 13:
  					StringCopy(sParam1, "C_TO_A", 16);
  					break;
  				
  				case 14:
  					StringCopy(sParam1, "D_TO_A", 16);
  					break;
  				
  				case 15:
  					StringCopy(sParam1, "E_TO_A", 16);
  					break;
  				
  				default:
  					StringCopy(sParam1, "invalid_clip", 16);
  					break;
  				}
  		}
  	}
  	else
  	{
  		switch (uParam0->f_43.f_8.f_2)
  		{
  			case 0:
  				StringCopy(sParam1, "IDLE_A", 16);
  				break;
  			
  			case 1:
  				StringCopy(sParam1, "IDLE_B", 16);
  				break;
  			
  			case 2:
  				StringCopy(sParam1, "IDLE_C", 16);
  				break;
  			
  			case 3:
  				StringCopy(sParam1, "ENTER", 16);
  				break;
  			
  			case 5:
  				StringCopy(sParam1, "BASE", 16);
  				break;
  			
  			case 4:
  				StringCopy(sParam1, "EXIT", 16);
  				break;
  			
  			case 7:
  				StringCopy(sParam1, "A_TO_B", 16);
  				break;
  			
  			case 8:
  				StringCopy(sParam1, "B_TO_C", 16);
  				break;
  			
  			case 9:
  				StringCopy(sParam1, "C_TO_D", 16);
  				break;
  			
  			case 10:
  				StringCopy(sParam1, "D_TO_E", 16);
  				break;
  			
  			case 12:
  				StringCopy(sParam1, "B_TO_E", 16);
  				break;
  			
  			case 13:
  				StringCopy(sParam1, "C_TO_A", 16);
  				break;
  			
  			case 14:
  				StringCopy(sParam1, "D_TO_A", 16);
  				break;
  			
  			case 15:
  				StringCopy(sParam1, "E_TO_A", 16);
  				break;
  			
  			default:
  				StringCopy(sParam1, "invalid_clip", 16);
  				break;
  			}
  	}
  }
  
  void func_50(var uParam0, char* sParam1)
  {
  	switch (uParam0->f_43.f_8)
  	{
  		case 0:
  			StringCopy(sParam1, "ANIM@AMB@CLUBHOUSE@SEATING", 64);
  			break;
  		
  		case 1:
  			StringCopy(sParam1, "ANIM@AMB@OFFICE@SEATING", 64);
  			break;
  		
  		case 2:
  			StringCopy(sParam1, "ANIM@AMB@FACILITY@BRIEFING_ROOM@SEATING", 64);
  			break;
  	}
  	if (func_12())
  	{
  		StringConCat(sParam1, "@FEMALE", 64);
  	}
  	else
  	{
  		StringConCat(sParam1, "@MALE", 64);
  	}
  	switch (uParam0->f_43.f_8)
  	{
  		case 1:
  			if (func_12())
  			{
  				switch (uParam0->f_43.f_8.f_1)
  				{
  					case 0:
  						StringConCat(sParam1, "@VAR_B@BASE@", 64);
  						break;
  					
  					case 1:
  						StringConCat(sParam1, "@VAR_B@BASE@", 64);
  						break;
  					
  					case 2:
  						StringConCat(sParam1, "@VAR_C@BASE@", 64);
  						break;
  					
  					case 3:
  						StringConCat(sParam1, "@VAR_D@BASE@", 64);
  						break;
  					
  					case 4:
  						StringConCat(sParam1, "@VAR_B@BASE@", 64);
  						break;
  				}
  			}
  			else
  			{
  				switch (uParam0->f_43.f_8.f_1)
  				{
  					case 0:
  						StringConCat(sParam1, "@VAR_A@BASE@", 64);
  						break;
  					
  					case 1:
  						StringConCat(sParam1, "@VAR_B@BASE@", 64);
  						break;
  					
  					case 2:
  						StringConCat(sParam1, "@VAR_C@BASE@", 64);
  						break;
  					
  					case 3:
  						StringConCat(sParam1, "@VAR_D@BASE@", 64);
  						break;
  					
  					case 4:
  						StringConCat(sParam1, "@VAR_E@BASE@", 64);
  						break;
  					}
  			}
  			break;
  		
  		case 0:
  			switch (uParam0->f_43.f_8.f_1)
  			{
  				case 0:
  					StringConCat(sParam1, "@VAR_A@BASE@", 64);
  					break;
  				
  				case 1:
  					StringConCat(sParam1, "@VAR_B@BASE@", 64);
  					break;
  				
  				case 2:
  					StringConCat(sParam1, "@VAR_C@BASE@", 64);
  					break;
  				
  				case 3:
  					StringConCat(sParam1, "@VAR_D@BASE@", 64);
  					break;
  				
  				case 4:
  					StringConCat(sParam1, "@VAR_E@BASE@", 64);
  					break;
  			}
  			break;
  		
  		case 2:
  			switch (uParam0->f_43.f_8.f_1)
  			{
  				case 0:
  					StringConCat(sParam1, "@VAR_A@", 64);
  					break;
  				
  				case 1:
  					StringConCat(sParam1, "@VAR_B@", 64);
  					break;
  				
  				case 2:
  					StringConCat(sParam1, "@VAR_C@", 64);
  					break;
  				
  				case 3:
  					StringConCat(sParam1, "@VAR_D@", 64);
  					break;
  				
  				case 4:
  					StringConCat(sParam1, "@VAR_E@", 64);
  					break;
  			}
  			break;
  	}
  }
  
  void func_51(var uParam0)
  {
  	uParam0->f_43.f_8 = func_53((*uParam0)[uParam0->f_43.f_2 /*14*/]);
  	uParam0->f_43.f_8.f_1 = func_52(uParam0);
  	uParam0->f_43.f_8.f_2 = 3;
  	uParam0->f_43.f_8.f_3 = 3;
  }
  
  int func_52(var uParam0)
  {
  	int iVar0;
  	
  	switch (uParam0->f_43.f_8)
  	{
  		case 2:
  			iVar0 = unk_0xB36B8558948EA7A8(0, 4);
  			if (iVar0 >= 1)
  			{
  				iVar0++;
  			}
  			break;
  		
  		default:
  			iVar0 = unk_0xB36B8558948EA7A8(0, func_14(uParam0->f_43.f_8));
  	}
  	if (uParam0->f_43.f_8 == 1)
  	{
  		if (func_12())
  		{
  			if (iVar0 == 0 || iVar0 == 4)
  			{
  				iVar0 = 1;
  			}
  		}
  		else if (iVar0 == 1 || iVar0 == 2)
  		{
  			iVar0 = 3;
  		}
  	}
  	return iVar0;
  }
  
  int func_53(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 1:
  			return 1;
  		
  		case 2:
  			return 0;
  		
  		case 3:
  			return 2;
  		
  		default:
  	}
  	return 0;
  }
  
  void func_54(var uParam0, int iParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6)
  {
  	int iVar0;
  	
  	if (unk_0x636F1F53CC61D2C9(joaat("context_controller")) < 1)
  	{
  	}
  	if (unk_0xF471787D45ADC2C1())
  	{
  		if (!*uParam0 == -1)
  		{
  			func_7(uParam0);
  		}
  		return;
  	}
  	if (!*uParam0 == -1)
  	{
  		return;
  	}
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < 6)
  	{
  		if (!Global_42737[iVar0 /*32*/])
  		{
  			Global_42737[iVar0 /*32*/] = 1;
  			Global_42737[iVar0 /*32*/].f_1 = Global_42938;
  			Global_42938++;
  			Global_42737[iVar0 /*32*/].f_4 = 0;
  			Global_42737[iVar0 /*32*/].f_29 = 0;
  			Global_42737[iVar0 /*32*/].f_5 = 0;
  			Global_42737[iVar0 /*32*/].f_2 = iParam1;
  			StringCopy(&(Global_42737[iVar0 /*32*/].f_8), sParam2, 16);
  			Global_42737[iVar0 /*32*/].f_6 = iParam3;
  			Global_42737[iVar0 /*32*/].f_31 = unk_0x62D18D65FE22FF39();
  			Global_42737[iVar0 /*32*/].f_7 = 0;
  			Global_42737[iVar0 /*32*/].f_3 = iParam5;
  			if (!unk_0xAB6A270F84A8781E(sParam4))
  			{
  				Global_42737[iVar0 /*32*/].f_12 = 1;
  				StringCopy(&(Global_42737[iVar0 /*32*/].f_13), sParam4, 64);
  				Global_42737[iVar0 /*32*/].f_30 = iParam6;
  			}
  			else
  			{
  				Global_42737[iVar0 /*32*/].f_12 = 0;
  				Global_42737[iVar0 /*32*/].f_30 = 0;
  			}
  			*uParam0 = Global_42737[iVar0 /*32*/].f_1;
  			return;
  		}
  		iVar0++;
  	}
  }
  
  bool func_55(var uParam0)
  {
  	Stack.Push(!func_32(&(uParam0->f_43), 5));
  	Stack.Push(uParam0[uParam0->f_43.f_2 /*14*/]);
  	Stack.Push(uParam0->f_43.f_2);
  	Call_Loc(uParam0->f_43.f_13);
  	return (StackVal || StackVal);
  }
  
  int func_56(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = 0;
  	while (iVar0 < unk_0x5E72DF7B8C03AA05())
  	{
  		if (unk_0xF46EDF82CA845956(unk_0x6750311806FF130A(iVar0)))
  		{
  			iVar1 = unk_0x539ED6DF32477DE0(unk_0x6750311806FF130A(iVar0));
  			if (iVar1 != unk_0x1146A9AE09CE2B14() && func_59(iVar1, 1, 1))
  			{
  				if (func_63(unk_0xD56332194D622ECE(iVar1), uParam0[uParam0->f_43.f_2 /*14*/]) || func_58(iVar1) == uParam0->f_43.f_2)
  				{
  					return 1;
  				}
  			}
  		}
  		iVar0++;
  	}
  	if (func_57(uParam0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_57(var uParam0)
  {
  	var uVar0[10];
  	int iVar11;
  	
  	unk_0x65C60F47A52ECB92(unk_0x7D2B9E6A64637269(), &uVar0, -1);
  	iVar11 = 0;
  	while (iVar11 < 10)
  	{
  		if (((unk_0x419E13582192CFEA(uVar0[iVar11]) && !unk_0xECEC7528A52B4EE8(uVar0[iVar11])) && unk_0x1F9D47D45E125FA6(uVar0[iVar11])) && (func_63(uVar0[iVar11], uParam0[uParam0->f_43.f_2 /*14*/]) || SYSTEM::VDIST2(unk_0xD6E677FAD7521410(uVar0[iVar11], 0), (uParam0[uParam0->f_43.f_2 /*14*/])->f_1 + (uParam0[uParam0->f_43.f_2 /*14*/])->f_1.f_3 / Vector(2f, 2f, 2f)) < 1f))
  		{
  			return 1;
  		}
  		iVar11++;
  	}
  	return 0;
  }
  
  int func_58(int iParam0)
  {
  	if (iParam0 != func_19())
  	{
  		return Global_1590908[iParam0 /*874*/].f_867;
  	}
  	return -1;
  }
  
  int func_59(int iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	iVar0 = iParam0;
  	if (iVar0 != -1)
  	{
  		if (unk_0x8CFC2F41A749E236(iParam0))
  		{
  			if (bParam1)
  			{
  				if (!unk_0xCAD1755E530A6012(iParam0))
  				{
  					return 0;
  				}
  			}
  			if (bParam2)
  			{
  				if (!Global_2441237.f_3[iVar0])
  				{
  					return 0;
  				}
  			}
  			return 1;
  		}
  	}
  	return 0;
  }
  
  bool func_60(var uParam0)
  {
  	if (func_61(unk_0x1146A9AE09CE2B14()))
  	{
  		return 1;
  	}
  	return uParam0->f_43 & 31 > 0;
  }
  
  bool func_61(int iParam0)
  {
  	return unk_0x234B68AC2E35ED5A(Global_2426865[iParam0 /*449*/].f_319.f_3, 13);
  }
  
  int func_62(var uParam0, struct<3> Param1, int iParam4)
  {
  	if (unk_0x419E13582192CFEA(uParam0))
  	{
  		if (iParam4 == 3)
  		{
  			if (func_34(unk_0xA8D713A937F31250(uParam0), (Param1.f_2 - 180f), 45f))
  			{
  				return 1;
  			}
  		}
  		else if (func_34(unk_0xA8D713A937F31250(uParam0), Param1.f_2, 45f))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  bool func_63(var uParam0, var uParam1)
  {
  	return unk_0x8954E9D0A9F6F8CF(uParam0, uParam1->f_1, uParam1->f_1.f_3, uParam1->f_1.f_6, 0, 1, 0);
  }
  
  int func_64(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 1)
  	{
  		if (func_63(unk_0x7D2B9E6A64637269(), uParam0[uParam0->f_43.f_2 /*14*/]) && func_62(unk_0x7D2B9E6A64637269(), (uParam0[uParam0->f_43.f_2 /*14*/])->f_8.f_3, (*uParam0)[uParam0->f_43.f_2 /*14*/]))
  		{
  			return 1;
  		}
  		else
  		{
  			uParam0->f_43.f_2 = (uParam0->f_43.f_2 + 1 % 3);
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  void func_65(var uParam0, int iParam1)
  {
  	uParam0->f_43.f_4 = iParam1;
  }
  
  void func_66(var uParam0, int iParam1)
  {
  	unk_0xC664C0067EEAB8D1(uParam0, iParam1);
  }
  
  void func_67(var uParam0)
  {
  	if (uParam0->f_43.f_4 == 6)
  	{
  	}
  	else if (uParam0->f_43.f_4 > 4)
  	{
  		unk_0x40D79ADB3AFD3714(unk_0x7D2B9E6A64637269());
  		unk_0x7979149EE8FE954D(unk_0x7D2B9E6A64637269(), func_68());
  		uParam0->f_43.f_7 = unk_0x2053F6ACFD4ED4BC();
  	}
  	else if ((unk_0x2053F6ACFD4ED4BC() - uParam0->f_43.f_7) < 5)
  	{
  		unk_0x7979149EE8FE954D(unk_0x7D2B9E6A64637269(), func_68());
  	}
  }
  
  float func_68()
  {
  	return 0.13f;
  }
  
  void func_69(var uParam0)
  {
  	func_70(&(uParam0->f_43), 4, func_71());
  	func_70(&(uParam0->f_43), 1, unk_0xE50EB54E0F21BED0(unk_0x7D2B9E6A64637269(), 0));
  	func_70(&(uParam0->f_43), 3, unk_0xC49311A2A500FF09(unk_0x7D2B9E6A64637269(), 1));
  	func_70(&(uParam0->f_43), 0, func_45(0));
  	func_70(&(uParam0->f_43), 2, unk_0xD9045D352687BE18(unk_0x7D2B9E6A64637269()));
  }
  
  void func_70(var uParam0, int iParam1, bool bParam2)
  {
  	var uVar0;
  	
  	uVar0 = iParam1;
  	if (bParam2)
  	{
  		unk_0x191DDA30577F440A(uParam0, uVar0);
  	}
  	else
  	{
  		unk_0xC664C0067EEAB8D1(uParam0, iVar0);
  	}
  }
  
  bool func_71()
  {
  	return Global_74428;
  }
  
  int func_72()
  {
  	if ((unk_0x8B6A925F148E0E94() && !func_85()) && !Global_2520122)
  	{
  		return 1;
  	}
  	if (!func_84())
  	{
  		return 1;
  	}
  	if (func_73())
  	{
  		return 1;
  	}
  	if (Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9 == func_19())
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_73()
  {
  	var uVar0;
  	
  	func_81(&uVar0);
  	if (Global_1312878 == 0)
  	{
  		if (!unk_0x02BFF15CAA701972())
  		{
  			return 1;
  		}
  	}
  	if (func_80())
  	{
  		return 1;
  	}
  	if (Global_2465749)
  	{
  		return 1;
  	}
  	if (func_79())
  	{
  		return 1;
  	}
  	if (func_78(159))
  	{
  		if (!func_77())
  		{
  			return 1;
  		}
  	}
  	if (func_78(157))
  	{
  		return 1;
  	}
  	if (!unk_0x0B4295B1608BB934())
  	{
  		return 1;
  	}
  	if (func_74() != 0)
  	{
  		if (unk_0x636F1F53CC61D2C9(func_74()) == 0)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_74()
  {
  	switch (func_76())
  	{
  		case 0:
  			return func_75();
  			break;
  		
  		case 2:
  			return joaat("creator");
  			break;
  	}
  	return 0;
  }
  
  int func_75()
  {
  	switch (Global_2465851)
  	{
  		case 0:
  			return joaat("freemode");
  		
  		default:
  	}
  	return joaat("freemode");
  }
  
  int func_76()
  {
  	return Global_31345;
  }
  
  bool func_77()
  {
  	return Global_2453009.f_698;
  }
  
  int func_78(int iParam0)
  {
  	if (unk_0x7B95B829DF1701E0(1, iParam0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_79()
  {
  	return Global_2463497;
  }
  
  bool func_80()
  {
  	return Global_2453009.f_693;
  }
  
  void func_81(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	struct<3> Var4;
  	
  	iVar0 = 0;
  	while (iVar0 < unk_0x1131A9F5A725F45A(1))
  	{
  		iVar1 = unk_0x5F0847A02025CAB5(1, iVar0);
  		if (iVar1 == 174)
  		{
  			unk_0x53858F1E03A88AE1(1, iVar0, &iVar2, 2);
  			switch (iVar2)
  			{
  				case -771178269:
  					func_82(iVar0);
  					break;
  				
  				case -1320260596:
  					unk_0x53858F1E03A88AE1(1, iVar0, &Var4, 4);
  					if (Var4.f_2 == -2138305833)
  					{
  						*uParam0 = 1;
  					}
  					break;
  				}
  		}
  		iVar0++;
  	}
  }
  
  void func_82(int iParam0)
  {
  	struct<3> Var0;
  	var uVar3;
  	var uVar4;
  	bool bVar5;
  	
  	if (unk_0x53858F1E03A88AE1(1, iParam0, &Var0, 3))
  	{
  		if (func_59(Var0.f_1, 1, 1))
  		{
  			uVar3 = unk_0xD56332194D622ECE(Var0.f_1);
  			if (unk_0x419E13582192CFEA(uVar3))
  			{
  				if (unk_0xC49311A2A500FF09(uVar3, 0))
  				{
  					uVar4 = unk_0x75B58B38E45C6F9A(uVar3, 0);
  					if (unk_0xF2A0B4A5DE0987FB(uVar4, Var0.f_2) && unk_0x8ED8428AB65B7367())
  					{
  						if (func_83(uVar4, &bVar5))
  						{
  							unk_0x2B360ED559ED11A6(uVar4, Var0.f_2);
  						}
  						if (bVar5)
  						{
  							unk_0x795957CD3A0042C8(&uVar4);
  						}
  					}
  				}
  			}
  		}
  	}
  }
  
  int func_83(var uParam0, var uParam1)
  {
  	if (unk_0x419E13582192CFEA(uParam0))
  	{
  		if (!unk_0xEE1D92A39CF8E1E6(uParam0))
  		{
  			if (unk_0x456C91FDAFEEF560(uParam0))
  			{
  				if (!unk_0x8C6BE3ED9638F314(unk_0x6471F4759775FCA4(uParam0)))
  				{
  					unk_0x4985CD0720AFD468(uParam0, 0, 1);
  					*uParam1 = 1;
  				}
  			}
  		}
  		if (unk_0x9984C023D4E57C2E(uParam0, 0))
  		{
  			if (unk_0xA6BE8F025C6B653F(uParam0))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_84()
  {
  	if (unk_0x8954E9D0A9F6F8CF(unk_0x7D2B9E6A64637269(), 207.5193f, 5163.855f, -86.59737f, 211.7083f, 5163.879f, -83.6007f, 6.25f, 0, 1, 0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_85()
  {
  	return unk_0x234B68AC2E35ED5A(Global_1683970.f_4, 10);
  }
  
  int func_86()
  {
  	if (Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9 != func_19())
  	{
  		if (unk_0x3F466B2A5F02D328("arena_workshop_seats", Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9, 1, 0))
  		{
  			return 0;
  		}
  		unk_0x35BEDD7AFD26FCD5(32, 0, Global_2426865[unk_0x1146A9AE09CE2B14() /*449*/].f_319.f_9);
  		func_95(0, -1, 0);
  		unk_0x87F1904AB605184A(0);
  		func_94();
  		func_87();
  		return 1;
  	}
  	return 0;
  }
  
  void func_87()
  {
  	func_88(0, &uLocal_87, 0, 2);
  	func_88(1, &uLocal_87, 1, 1);
  	func_88(2, &uLocal_87, 2, 2);
  }
  
  void func_88(int iParam0, var uParam1, int iParam2, int iParam3)
  {
  	struct<3> Var0;
  	float fVar3;
  	
  	func_93(iParam0, &Var0, &fVar3);
  	(*uParam1)[iParam2 /*14*/] = iParam3;
  	(uParam1[iParam2 /*14*/])->f_8 = { Var0 };
  	(uParam1[iParam2 /*14*/])->f_8.f_3 = { 0f, 0f, fVar3 };
  	(uParam1[iParam2 /*14*/])->f_1 = { func_90(func_92(), func_91(iParam3, fVar3)) + Var0 };
  	(uParam1[iParam2 /*14*/])->f_1.f_3 = { func_90(func_89(), func_91(iParam3, fVar3)) + Var0 };
  	(uParam1[iParam2 /*14*/])->f_1.f_6 = 1.25f;
  }
  
  Vector3 func_89()
  {
  	return 0.5f, -0.5f, 2f;
  }
  
  Vector3 func_90(struct<3> Param0, float fParam3)
  {
  	struct<3> Var0;
  	float fVar3;
  	float fVar4;
  	
  	fVar3 = SYSTEM::SIN(fParam3);
  	fVar4 = SYSTEM::COS(fParam3);
  	Var0.x = ((Param0.x * fVar4) - (Param0.f_1 * fVar3));
  	Var0.f_1 = ((Param0.x * fVar3) + (Param0.f_1 * fVar4));
  	Var0.f_2 = Param0.f_2;
  	return Var0;
  }
  
  float func_91(int iParam0, float fParam1)
  {
  	switch (iParam0)
  	{
  		case 1:
  		case 2:
  			return fParam1;
  		
  		case 3:
  			return (fParam1 - 180f);
  		
  		default:
  	}
  	return fParam1;
  }
  
  Vector3 func_92()
  {
  	return -0.5f, -0.5f, 0f;
  }
  
  void func_93(int iParam0, var uParam1, var uParam2)
  {
  	if (func_12())
  	{
  		switch (iParam0)
  		{
  			case 0:
  				*uParam1 = { 209.185f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  			
  			case 1:
  				*uParam1 = { 210.085f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  			
  			case 2:
  				*uParam1 = { 210.897f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  		}
  	}
  	else
  	{
  		switch (iParam0)
  		{
  			case 0:
  				*uParam1 = { 209.185f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  			
  			case 1:
  				*uParam1 = { 210.085f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  			
  			case 2:
  				*uParam1 = { 210.897f, 5166.375f, -86.6007f };
  				*uParam2 = 0f;
  				break;
  			}
  	}
  }
  
  void func_94()
  {
  }
  
  int func_95(int iParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	
  	iVar0 = unk_0x41BB6B0BDB7933FF();
  	while (iVar0 != 2)
  	{
  		if (((iVar0 == 3 || iVar0 == 4) || iVar0 == 5) || iVar0 == 6)
  		{
  			if (!bParam2)
  			{
  				func_2();
  			}
  			else
  			{
  				return 0;
  			}
  		}
  		if (!func_96())
  		{
  			if (iParam0 == 0)
  			{
  				if (!unk_0x02BFF15CAA701972())
  				{
  					if (!bParam2)
  					{
  						func_2();
  					}
  					else
  					{
  						return 0;
  					}
  				}
  				if (func_80())
  				{
  					if (!bParam2)
  					{
  						func_2();
  					}
  					else
  					{
  						return 0;
  					}
  				}
  				if (func_78(157))
  				{
  					if (!bParam2)
  					{
  						func_2();
  					}
  					else
  					{
  						return 0;
  					}
  				}
  			}
  			else if (!unk_0x930F75DAF7DE892B())
  			{
  				if (!bParam2)
  				{
  					func_2();
  				}
  				else
  				{
  					return 0;
  				}
  			}
  		}
  		SYSTEM::WAIT(0);
  		iVar0 = unk_0x41BB6B0BDB7933FF();
  	}
  	if (iParam1 > -1)
  	{
  		Global_1312519 = iVar0;
  	}
  	if (iParam0 == 0)
  	{
  		if (!unk_0x02BFF15CAA701972())
  		{
  			if (!bParam2)
  			{
  				func_2();
  			}
  			else
  			{
  				return 0;
  			}
  		}
  	}
  	else if (!unk_0x930F75DAF7DE892B())
  	{
  		if (!bParam2)
  		{
  			func_2();
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  bool func_96()
  {
  	return Global_1312878;
  }
  
  