void func_2()
{
	func_6(-815326385);
	func_3("SHI_T_SANDY_2", 0, 0, -1, 10000, 7, 0, 0, 0);
	wait(0);
	func_3("SHI_T_SANDY_3", 0, 0, -1, 10000, 7, 0, 0, 0);
	iLocal_37 = 2;
}
void func_1()
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 4)
	{
		if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[iVar0]))
		{
			if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[iVar0]) || (!ENTITY::IS_ENTITY_DEAD(iLocal_49[iVar0], 0) && !is_entity_visible(iLocal_49[iVar0])))
			{
				delete_vehicle(&(iLocal_49[iVar0]));
				PED::DELETE_PED(&(iLocal_55[iVar0]));
			}
			else
			{
				if (iVar0 == 0 || iVar0 == 2)
				{
					func_3(1);
				}
				func_2(&(iLocal_49[iVar0]), &(iLocal_55[iVar0]));
				set_vehicle_as_no_longer_needed(&(iLocal_49[iVar0]));
				set_ped_as_no_longer_needed(&(iLocal_55[iVar0]));
			}
		}
		iVar0++;
	}
	if (ENTITY::DOES_ENTITY_EXIST(iLocal_54))
	{
		if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_54))
		{
			delete_vehicle(&iLocal_54);
			PED::DELETE_PED(&iLocal_60);
		}
		else
		{
			func_2(&iLocal_54, &iLocal_60);
			set_vehicle_as_no_longer_needed(&iLocal_54);
			set_ped_as_no_longer_needed(&iLocal_60);
		}
	}
	if (iLocal_82)
	{
		remove_vehicle_recording(101, "AirportJetTakeOff");
		remove_vehicle_recording(102, "AirportJetTakeOff");
		remove_vehicle_recording(101, "AirportNew");
		remove_vehicle_recording(102, "AirportNew");
		remove_vehicle_recording(103, "AirplaneLandingRedux");
		remove_vehicle_recording(104, "AirplaneLandingRedux");
		remove_vehicle_recording(101, "EastWestFlight");
	}
}
bool func_5(int iParam0, int iParam1, int iParam2)
{
	int iVar0;
	
	if (func_51(*iParam0))
	{
		if (is_entity_playing_anim(*iParam0, func_10(), func_9(), 3))
		{
			if (!PED::IS_PED_RAGDOLL(*iParam0) || is_ped_getting_up(*iParam0))
			{
				request_anim_dict(func_11());
				if (has_anim_dict_loaded(func_11()))
				{
					*iParam2 = create_synchronized_scene(2727.4f, 4145.56f, 43.68f, 0f, 0f, -92.17f, 2);
					set_synchronized_scene_looped(*iParam2, false);
					_0x394B9CD12435C981(*iParam2, false);
					if (func_4(*iParam0, 1785177548))
					{
						stop_synchronized_entity_anim(*iParam0, -1000f, 1);
					}
					task_synchronized_scene(*iParam0, *iParam2, func_11(), func_3(), 1000f, -4f, 4626, 0, 1000f, 0);
					_0x2208438012482A1A(*iParam0, 0, 0);
					if (func_8(*iParam1))
					{
						if (is_entity_playing_anim(*iParam1, func_10(), func_7(), 3))
						{
							stop_synchronized_entity_anim(*iParam1, -16f, 0);
						}
						iVar0 = 0;
						iVar0 += 16;
						iVar0 += 64;
						iVar0 += 512;
						iVar0 += 4096;
						play_synchronized_entity_anim(*iParam1, *iParam2, func_6(), func_11(), 16f, -4f, iVar0, 1000f);
					}
					return true;
				}
			}
			else
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}
Exemple #4
0
/* 
 * reads : g_9 g_23 g_12 g_19
 * writes: g_9 g_23 g_12
 */
static uint32_t  func_14(int32_t * p_15, int32_t * p_16)
{ /* block id: 6 */
    int32_t *l_27[5][6] = {{&g_23,&g_12[3][1],&g_12[3][1],&g_12[3][1],&g_23,&g_12[3][1]},{&g_23,&g_12[3][1],&g_12[3][1],&g_12[3][1],&g_23,&g_12[3][1]},{&g_23,&g_12[3][1],&g_12[3][1],&g_12[3][1],&g_23,&g_12[3][1]},{&g_23,&g_12[3][1],&g_12[3][1],&g_12[3][1],&g_23,&g_12[3][1]},{&g_23,&g_12[3][1],&g_12[3][1],&g_12[3][1],&g_23,&g_12[3][1]}};
    uint32_t l_28 = 0xC127C80BL;
    int i, j;
    for (g_9 = 0; (g_9 == 14); g_9++)
    { /* block id: 9 */
        for (g_23 = (-5); (g_23 <= 10); g_23 += 9)
        { /* block id: 12 */
            uint16_t l_26[8][8] = {{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL},{6UL,65531UL,6UL,0xDEDCL,6UL,65531UL,6UL,0xDEDCL}};
            int i, j;
            (*p_16) = func_3(l_26[7][1]);
            if ((*p_15))
                break;
        }
    }
    --l_28;
    return g_19;
}
int func_2(auto uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)
{
    func_18(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
    if (iParam3 > 7)
    {
        if (iParam3 < 12)
        {
            iParam3 = 7;
        }
    }
    Global_15719 = 0;
    Global_15721 = 0;
    Global_15726 = 0;
    Global_16703 = 0;
    Global_16705 = 0;
    Global_16709 = 0;
    Global_2621441 = 0;
    return func_3(sParam2, iParam3, 0);
}
Exemple #6
0
/* 
 * reads : g_18 g_19 g_20 g_32 g_31 g_25 g_44 g_49 g_53 g_27 g_65 g_73 g_103 g_109
 * writes: g_20 g_32 g_31 g_44 g_49 g_18.f0 g_18 g_59 g_65 g_27 g_54 g_79 g_103 g_110
 */
static uint32_t  func_1(void)
{ /* block id: 0 */
    uint32_t l_2[1];
    struct S0 l_22 = {0x7BL};
    int32_t l_97 = 1L;
    int32_t l_98 = 6L;
    int32_t l_99 = 0x1A0A7665L;
    int32_t l_100 = 0L;
    int32_t l_101[4];
    int i;
    for (i = 0; i < 1; i++)
        l_2[i] = 0xD7D490C4L;
    for (i = 0; i < 4; i++)
        l_101[i] = 0L;
    if (l_2[0])
    { /* block id: 1 */
        struct S0 l_21 = {1L};
        int8_t l_90 = (-1L);
        int32_t *l_91 = &g_79;
        int32_t *l_92 = (void*)0;
        int32_t *l_93 = &g_79;
        int32_t *l_94 = &g_27;
        int32_t *l_95 = &g_20;
        int32_t *l_96[8][4] = {{&g_27,&g_27,(void*)0,&g_20},{&g_27,(void*)0,&g_27,&g_27},{&g_27,&g_20,&g_27,&g_27},{(void*)0,(void*)0,&g_20,&g_20},{&g_20,&g_27,&g_20,&g_27},{(void*)0,&g_20,&g_20,(void*)0},{&g_27,&g_20,&g_20,&g_27},{&g_20,&g_27,&g_79,&g_27}};
        int i, j;
        (*l_91) = (((func_3((func_9((func_15((l_2[0] , 0xF5EF889AL), g_18) , l_21), l_2[0], l_21.f0, l_22, g_18.f0) == g_27), g_27, g_27, g_27, l_22.f0) ^ 2UL) <= l_21.f0) & l_90);
        g_103++;
    }
    else
    { /* block id: 49 */
        uint32_t l_108 = 0x835DF1A5L;
        for (g_44 = 0; (g_44 < 29); ++g_44)
        { /* block id: 52 */
            (*g_19) |= (65532UL != l_108);
            return l_108;
        }
    }
    (*g_109) = &g_27;
    return l_97;
}
Exemple #7
0
int main()
{
    bool a = false;
    static_assert(std::is_same<decltype(a), bool>::value, "");
    // transformed A = 'bool'
    // deducted A can be more cv-qualified = 'const bool'
    func_1(a);
 
    int* b = nullptr;
    static_assert(std::is_same<decltype(b), int*>::value, "");
    // transformed A = 'int*'
    // converted via qualification conversion to deducted A = 'volatile int*'
    func_2(b);
 
    Boo c;
    static_assert(std::is_same<decltype(&c), Boo*>::value, "");
    // transformed A = 'Boo*'
    // can be a derived class, deducted A = 'Foo<int>*'
    func_3(&c);
 
    std::cout << "done\n";
}
Exemple #8
0
/* 
 * reads : g_9 g_23 g_12 g_19 g_34 g_32 g_21 g_41 g_22 g_57 g_58 g_59 g_68 g_69
 * writes: g_12 g_9 g_23 g_34 g_32 g_41 g_69 g_70 g_85
 */
static int32_t  func_1(void)
{ /* block id: 0 */
    uint8_t l_6 = 5UL;
    uint16_t l_10 = 1UL;
    int32_t *l_13 = &g_12[4][2];
    uint32_t *l_31[8] = {&g_32,&g_32,&g_32,&g_32,&g_32,&g_32,&g_32,&g_32};
    int32_t *l_33[8] = {&g_34,&g_34,&g_34,&g_34,&g_34,&g_34,&g_34,&g_34};
    int32_t l_54[7];
    uint32_t l_81 = 4294967290UL;
    int i;
    for (i = 0; i < 7; i++)
        l_54[i] = 0xA83BDBB1L;
    (*l_13) = ((!((((((func_3(((!l_6) | l_6)) | 0x57L) | g_9) , g_9) >= g_9) || 0x19L) || 0x14L)) | l_10);
    if ((g_34 &= ((((*l_13) = func_14(l_13, &g_12[4][2])) <= 0xFF2B3A76L) < 1L)))
    { /* block id: 21 */
        uint32_t *l_37[1][5];
        int i, j;
        for (i = 0; i < 1; i++)
        {
            for (j = 0; j < 5; j++)
                l_37[i][j] = (void*)0;
        }
        for (g_32 = 0; (g_32 <= 7); g_32 += 1)
        { /* block id: 24 */
            uint8_t *l_38 = (void*)0;
            uint8_t *l_39[6] = {(void*)0,(void*)0,(void*)0,(void*)0,(void*)0,(void*)0};
            int32_t l_44 = (-9L);
            uint32_t l_45 = 4294967295UL;
            int32_t l_46 = (-3L);
            int i;
            g_12[3][1] &= ((uint32_t)(&g_32 != l_37[0][4]) % (uint32_t)g_21);
            l_46 ^= (((((((--g_41) , (((((void*)0 == &g_32) < 0xA6L) <= g_23) | g_41)) && (*l_13)) >= l_44) != g_21) && g_22) < l_45);
        }
    }
    else
    { /* block id: 29 */
        uint8_t l_47 = 246UL;
        int32_t l_79 = (-3L);
        int32_t **l_86 = &g_85[4];
        if (l_47)
        { /* block id: 30 */
            uint8_t *l_56 = &l_6;
            uint8_t **l_55 = &l_56;
            int32_t l_60[5] = {0xB7D5E362L,0xB7D5E362L,0xB7D5E362L,0xB7D5E362L,0xB7D5E362L};
            int32_t l_61 = 0x92F9381BL;
            int i;
            (*g_68) = func_48(((((((((((*l_13) > l_47) != g_9) != l_54[6]) || l_47) && (-1L)) , l_55) != g_57[1][3]) , (*g_58)) , l_47), g_32, l_60[0], l_61, g_41);
        }
        else
        { /* block id: 35 */
            uint8_t **l_73 = (void*)0;
            uint8_t *l_75 = &l_47;
            uint8_t **l_74 = &l_75;
            uint8_t *l_77 = &g_41;
            uint8_t **l_76 = &l_77;
            int32_t l_78 = 6L;
            int32_t l_80 = 0x1380A060L;
            (*l_13) = ((((uint16_t)(((((*l_76) = ((*l_74) = ((*g_69) = &l_6))) != &l_47) || g_12[3][1]) || 0xCFE2AFDDL) % (uint16_t)l_78) || g_32) , l_47);
            ++l_81;
        }
        (*l_86) = &l_79;
    }
    return (*l_13);
}
void main()
{
	int iVar0;
	
	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_20 = "NULL";
	fLocal_21 = 0f;
	fLocal_25 = -0.0375f;
	fLocal_26 = 0.17f;
	iLocal_28 = 1;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(18))
	{
		func_38();
	}
	func_37(20);
	func_36();
	func_35(1);
	func_35(0);
	func_35(2);
	func_35(13);
	func_35(12);
	Global_2288 = 1;
	func_34();
	if (!func_33(-1615086084))
	{
		func_32(-1615086084, 2, 2, 2, 1, -1, 5);
	}
	if (!func_33(-1970925435))
	{
		func_32(-1970925435, 2, 0, 0, 1, -1, 5);
	}
	if (!func_33(-1817481777))
	{
		func_32(-1817481777, 2, 12, 3, 1, -1, 5);
	}
	iVar0 = false;
	while (func_31(23) && !func_30(134))
	{
		if (func_26() == 1)
		{
			if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID()))
			{
				if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
				{
					if ((!is_ped_falling(PLAYER::PLAYER_PED_ID()) && !is_entity_in_water(PLAYER::PLAYER_PED_ID())) && !is_entity_on_fire(PLAYER::PLAYER_PED_ID()))
					{
						if (!iVar0)
						{
							if (!((func_25() || is_player_switch_in_progress()) || func_24()))
							{
								if (func_13())
								{
									iVar0 = true;
								}
							}
						}
						else
						{
							if (iLocal_28)
							{
								set_player_control(player_id(), false, 384);
								set_ped_max_move_blend_ratio(PLAYER::PLAYER_PED_ID(), 0f);
								enable_control_action(0, 173, 1);
								enable_control_action(0, 172, 1);
								enable_control_action(0, 174, 1);
								enable_control_action(0, 175, 1);
								enable_control_action(0, 176, 1);
								enable_control_action(0, 177, 1);
								enable_control_action(0, 178, 1);
								enable_control_action(0, 179, 1);
								enable_control_action(0, 180, 1);
								enable_control_action(0, 181, 1);
							}
							else
							{
								set_player_control(player_id(), true, 0);
							}
							switch (func_12())
							{
								case -1615086084:
									if (!func_33(-1989308064))
									{
										func_8(-1989308064, 0, 1, 0, 1, 6000, 6000, -1, 0, -1, 68);
									}
									break;
								
								case -1989308064:
									func_7(12, 0);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), 2, 1);
									break;
								
								case -1970925435:
									if (!func_33(-1060930305))
									{
										func_8(-1060930305, 0, 1, 2, 2, 6000, 6000, -1, 0, -1, 68);
									}
									break;
								
								case -1060930305:
									func_7(12, 1);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), true, 1);
									break;
								
								case -1817481777:
									func_7(12, 2);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), 3, 1);
									break;
								
								default:
									if (!func_5(0))
									{
										iVar0 = false;
									}
									else if (iLocal_28)
									{
										if (func_4())
										{
											iLocal_28 = 0;
										}
									}
									break;
								}
							}
						}
					}
				}
		}
		wait(0);
	}
	func_3(20);
	Global_91317 = 0;
	func_1();
	func_38();
}
Exemple #10
0
int main(int argc, char*argv[]){
	
	int retT2;//server talking thread return value
	
#ifdef DOGE
	FILE * pFile;
	pFile = fopen ("doge.txt","r");
	char c [DIM];
	while(fgets(c, DIM, pFile) != NULL){
		printf("%s",c);
	}
	sleep(4);
#endif

//Variables initialization phase and signal handling
	com_res = LISTEN;
	inchat = NOTINCHAT;			
	callingIP = malloc(IPLEN);
	sig_man();

//this struct is used to store the dimensions (rows/col) of the terminal window
	ioctl(0, TIOCGWINSZ, &ts);
	signal(SIGWINCH, sigwinch_handler);
	row_count = 0;

//Spawn server talking thread and  create communication semaphores
	if (sem_init(&sem1, 0, SEMZERO) == -1 || sem_init(&sem2, 0, SEMZERO) == -1)
		perror("Couldn't create the semaphores");
	retT2 = pthread_create(&t2, NULL, &func_t_2, NULL);
	if (retT2 != 0)
		perror("Couldn't create the thread!");

//clear screen and ask for command
	clearS();
	puts("\nWelcome! We are now starting the service!");
	printf("Please select which action to perform:\n - Write '0' to Sign Up as a new user\n - Write '1' to Log In\n");
	fgets(serverCom, SERV_COM, stdin);
	while (serverCom[0] != '1' && serverCom[0] != '0' && com_res != QUIT){
		puts("Invalid command please repeat your selection");
		memset(serverCom, 0, SERV_COM);
		fgets(serverCom, SERV_COM, stdin);
	}
#ifdef DEBUG
	printf("comando = %c\n",serverCom[0]);
#endif
	sem_post(&sem1);
	sem_wait(&sem2);

	//This loop ends when the user input the ::q command
	while(com_res != QUIT){
#ifdef DEBUG
		puts("In the MAIN cycle");
		printf("com res = %d\n", com_res);
#endif
//Qui in teoria posso forzare a LISTEN e poi gestire da li
		if(com_res == LISTEN)
			func_1();
		else if (com_res == CONNECT)
			func_3();
	
			
	}

	printf("\033[1;31mQuitting....\033[0m\n");
	sleep(2);
	clearS();
	exit(1);
}
void main()
{
	Vector3 vVar0;
	Vector3 vVar3;
	Vector3 vVar6;
	float fVar9;
	
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(2))
	{
		func_4();
	}
	if (ENTITY::DOES_ENTITY_EXIST(iLocal_10))
	{
		ENTITY::FREEZE_ENTITY_POSITION(iLocal_10, true);
		vLocal_4 = {ENTITY::GET_ENTITY_COORDS(iLocal_10, 1)};
		vLocal_7 = {get_entity_rotation(iLocal_10, 2)};
	}
	while (true)
	{
		wait(0);
		if (ENTITY::DOES_ENTITY_EXIST(iLocal_10))
		{
			if (is_object_within_brain_activation_range(iLocal_10))
			{
				switch (iLocal_2)
				{
					case 0:
						if (does_entity_have_drawable(iLocal_10))
						{
							STREAMING::REQUEST_MODEL(joaat("p_abat_roller_1_col"));
							if (STREAMING::HAS_MODEL_LOADED(joaat("p_abat_roller_1_col")))
							{
								if (!func_3(vLocal_4, 0f, 0f, 0f, 0))
								{
									iLocal_3 = create_object(joaat("p_abat_roller_1_col"), vLocal_4, 1, true, false);
									ENTITY::SET_ENTITY_ROTATION(iLocal_3, vLocal_7, 2, 1);
									iLocal_2 = 1;
								}
							}
						}
						break;
					
					case 1:
						if (does_entity_have_drawable(iLocal_10))
						{
							if (_get_number_of_instances_of_streamed_script(joaat("michael2")) > 0)
							{
								request_anim_dict("map_objects");
								if (has_anim_dict_loaded("map_objects"))
								{
									iLocal_2 = 2;
								}
							}
						}
						break;
					
					case 2:
						if (does_entity_have_drawable(iLocal_10))
						{
							if (_get_number_of_instances_of_streamed_script(joaat("michael2")) > 0)
							{
								if (Global_88042)
								{
									if (has_anim_dict_loaded("map_objects"))
									{
										play_entity_anim(iLocal_10, "P_Abat_roller_1_open", "map_objects", 1f, false, 1, 0, 0f, 0);
										iLocal_2 = 3;
									}
								}
							}
						}
						break;
					
					case 3:
						fVar9 = 0.35f;
						vVar0 = {vLocal_4 + Vector(3.45f, 0f, 0f)};
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_3))
						{
							vVar3 = {ENTITY::GET_ENTITY_COORDS(iLocal_3, 1)};
							if (!func_2(vVar3, vVar0, 0.1f, 0))
							{
								vVar6 = {vVar0 - vVar3};
								set_entity_coords(iLocal_3, vVar3 + func_1(vVar6) * FtoV(get_frame_time()) * Vector(fVar9, fVar9, fVar9), 1, false, 0, 1);
							}
							else
							{
								Global_88043 = 1;
								iLocal_2 = 4;
							}
						}
						break;
					
					case 4:
						break;
				}
			}
			else
			{
				func_4();
			}
		}
		else
		{
			func_4();
		}
	}
}
void main()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	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;
	fLocal_30 = 80f;
	fLocal_31 = 140f;
	fLocal_32 = 180f;
	iLocal_35 = 3;
	iLocal_85 = -1;
	iLocal_86 = -1;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(19))
	{
		func_55();
	}
	if (!func_52())
	{
		func_55();
	}
	if (!func_51(iLocal_82))
	{
		func_55();
	}
	else
	{
		func_50();
		iLocal_83 = GAMEPLAY::GET_GAME_TIMER();
		iLocal_85 = func_49();
		iLocal_84 = 0;
		func_48(1, &uLocal_88);
	}
	while (true)
	{
		if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
		{
			if (!func_51(iLocal_82))
			{
				func_55();
			}
			vVar0 = {ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)};
			vVar3 = {ENTITY::GET_ENTITY_COORDS(iLocal_82, 1)};
			if (vdist2(vVar0, vVar3) >= 100f * 100f)
			{
				func_55();
			}
			switch (iLocal_87)
			{
				case 0:
					func_43(vVar3, vVar0, 18000, 1101004800);
					if (func_25(&iLocal_82, 0))
					{
						func_24();
						func_16(0);
						func_12(vVar3, vVar0);
						request_anim_dict(func_11());
						iLocal_87 = 1;
					}
					break;
				
				case 1:
					if (func_5(&iLocal_82, &iLocal_79, &iLocal_86))
					{
						iLocal_87 = 2;
					}
					break;
				
				case 2:
					if (!func_4(iLocal_82, 1805844857) && !is_ped_fleeing(iLocal_82))
					{
						if (!is_entity_playing_anim(iLocal_82, func_11(), func_3(), 3))
						{
							func_1();
						}
					}
					else
					{
						func_55();
					}
					break;
				}
		}
		wait(0);
	}
}
void func_4()
{
	int iVar0;
	
	switch (iLocal_88)
	{
		case 0:
			vLocal_61[0 /*3*/] = {-1542.113f, -3023.802f, 23.2538f};
			vLocal_61[1 /*3*/] = {-3089.888f, -1960.075f, 313.559f};
			vLocal_61[2 /*3*/] = {-1037.638f, -3316.12f, 23.2475f};
			vLocal_61[3 /*3*/] = {451.174f, -4009.46f, 135.1171f};
			vLocal_74 = {-1612.174f, -2688.442f, 12.9444f};
			if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
			{
				if ((is_ped_in_any_heli(PLAYER::PLAYER_PED_ID()) || is_ped_in_any_plane(PLAYER::PLAYER_PED_ID())) || is_player_wanted_level_greater(player_id(), 0))
				{
					iLocal_78 = false;
				}
				else
				{
					iLocal_78 = true;
				}
			}
			iLocal_88 = 1;
			break;
		
		case 1:
			STREAMING::REQUEST_MODEL(joaat("jet"));
			STREAMING::REQUEST_MODEL(iLocal_84);
			request_vehicle_recording(101, "AirportJetTakeOff");
			request_vehicle_recording(103, "AirplaneLandingRedux");
			request_vehicle_recording(101, "EastWestFlight");
			request_vehicle_recording(101, "AirportNew");
			request_vehicle_recording(104, "AirplaneLandingRedux");
			iLocal_88 = 2;
			break;
		
		case 2:
			if (!iLocal_82)
			{
				if ((((((STREAMING::HAS_MODEL_LOADED(joaat("jet")) && STREAMING::HAS_MODEL_LOADED(iLocal_84)) && has_vehicle_recording_been_loaded(101, "AirportJetTakeOff")) && has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux")) && has_vehicle_recording_been_loaded(101, "AirportNew")) && has_vehicle_recording_been_loaded(104, "AirplaneLandingRedux")) && has_vehicle_recording_been_loaded(101, "EastWestFlight"))
				{
					iLocal_82 = true;
				}
				else
				{
					STREAMING::REQUEST_MODEL(joaat("jet"));
					STREAMING::REQUEST_MODEL(iLocal_84);
					request_vehicle_recording(101, "AirportJetTakeOff");
					request_vehicle_recording(102, "AirportJetTakeOff");
					request_vehicle_recording(101, "AirportNew");
					request_vehicle_recording(102, "AirportNew");
					request_vehicle_recording(101, "EastWestFlight");
				}
			}
			if (iLocal_82)
			{
				if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f) && !CAM::IS_SPHERE_VISIBLE(vLocal_74, 50f))
				{
					iLocal_88 = 3;
				}
				else
				{
					if (CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f))
					{
					}
					if (CAM::IS_SPHERE_VISIBLE(vLocal_74, 50f))
					{
					}
				}
			}
			break;
		
		case 3:
			iLocal_49[0] = create_vehicle(joaat("jet"), vLocal_61[0 /*3*/], 0, 1, true);
			set_entity_heading(iLocal_49[0], 240.3179f);
			_0x279D50DE5652D935(iLocal_49[0], 0);
			iLocal_49[1] = create_vehicle(joaat("jet"), vLocal_61[1 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[1], 0);
			iLocal_49[2] = create_vehicle(joaat("jet"), vLocal_61[2 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[2], 0);
			iLocal_49[3] = create_vehicle(joaat("jet"), vLocal_61[3 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[3], 0);
			iVar0 = 0;
			while (iVar0 < 4)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[iVar0]))
				{
					iLocal_55[iVar0] = PED::CREATE_PED_inside_vehicle(iLocal_49[iVar0], 4, iLocal_84, -1, 1, true);
					set_entity_lod_dist(iLocal_49[iVar0], 1000);
					set_vehicle_engine_on(iLocal_49[iVar0], true, 1, 0);
					set_blocking_of_non_temporary_events(iLocal_55[iVar0], true);
				}
				iVar0++;
			}
			func_8(&(iLocal_49[1]), &(iLocal_55[1]));
			func_8(&(iLocal_49[2]), &(iLocal_55[2]));
			func_8(&(iLocal_49[3]), &(iLocal_55[3]));
			if (iLocal_78)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]))
				{
					if (has_vehicle_recording_been_loaded(101, "AirportJetTakeOff"))
					{
						start_playback_recorded_vehicle_with_flags(iLocal_49[0], 101, "AirportJetTakeOff", 2, 5, 786603);
						iLocal_77 = 1;
					}
					else
					{
						request_vehicle_recording(101, "AirportJetTakeOff");
					}
				}
			}
			iLocal_88 = 4;
			break;
		
		case 4:
			if (iLocal_81)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
				{
					if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[3]))
					{
						if (!iLocal_79)
						{
							func_8(&(iLocal_49[3]), &(iLocal_55[3]));
							iLocal_79 = 1;
						}
					}
				}
			}
			func_3(0);
			func_7();
			switch (iLocal_87)
			{
				case 0:
					if (!iLocal_77)
					{
						if (iLocal_78)
						{
							if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[0], 0))
							{
								if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[0]) && !CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f))
								{
									if (has_vehicle_recording_been_loaded(101, "AirportJetTakeOff"))
									{
										start_playback_recorded_vehicle_with_flags(iLocal_49[0], 101, "AirportJetTakeOff", 2, 5, 786603);
										iLocal_77 = 1;
									}
									else
									{
										request_vehicle_recording(101, "AirportJetTakeOff");
									}
								}
							}
						}
					}
					if (iLocal_77)
					{
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[0], 0))
						{
							if (is_playback_going_on_for_vehicle(iLocal_49[0]))
							{
								fLocal_85 = get_position_in_recording(iLocal_49[0]);
							}
						}
						if (fLocal_85 > 1100f)
						{
							iLocal_87 = 1;
						}
					}
					break;
				
				case 1:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (iLocal_78)
						{
							if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[1]))
							{
								if (iLocal_81)
								{
									if (iLocal_79)
									{
										func_6(&(iLocal_49[1]), &(iLocal_55[1]));
										if (has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux"))
										{
											start_playback_recorded_vehicle_with_flags(iLocal_49[1], 103, "AirplaneLandingRedux", 2, 5, 786603);
											iLocal_80 = 0;
											iLocal_87 = 2;
										}
										else
										{
											request_vehicle_recording(103, "AirplaneLandingRedux");
										}
									}
								}
								else
								{
									func_6(&(iLocal_49[1]), &(iLocal_55[1]));
									if (has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux"))
									{
										start_playback_recorded_vehicle_with_flags(iLocal_49[1], 103, "AirplaneLandingRedux", 2, 5, 786603);
										iLocal_80 = 0;
										iLocal_87 = 2;
									}
									else
									{
										request_vehicle_recording(103, "AirplaneLandingRedux");
									}
								}
							}
						}
					}
					break;
				
				case 2:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[1]))
						{
							iLocal_87 = 3;
						}
					}
					break;
				
				case 3:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[2]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[2], 0))
					{
						if (has_vehicle_recording_been_loaded(101, "AirportNew"))
						{
							if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[2 /*3*/], 50f))
							{
								if (!is_playback_going_on_for_vehicle(iLocal_49[2]))
								{
									func_6(&(iLocal_49[2]), &(iLocal_55[2]));
									start_playback_recorded_vehicle(iLocal_49[2], 101, "AirportNew", 1);
									iLocal_87 = 4;
								}
							}
						}
					}
					break;
				
				case 4:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[2]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[2], 0))
					{
						if (is_playback_going_on_for_vehicle(iLocal_49[2]))
						{
							fLocal_86 = get_position_in_recording(iLocal_49[2]);
						}
					}
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[1]))
						{
							if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[1]))
							{
								func_8(&(iLocal_49[1]), &(iLocal_55[1]));
								iLocal_80 = 1;
							}
						}
					}
					if (fLocal_86 > 1100f)
					{
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
						{
							if (has_vehicle_recording_been_loaded(104, "AirplaneLandingRedux"))
							{
								if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[3 /*3*/], 50f))
								{
									if (!is_playback_going_on_for_vehicle(iLocal_49[3]) && iLocal_80)
									{
										func_6(&(iLocal_49[3]), &(iLocal_55[3]));
										start_playback_recorded_vehicle(iLocal_49[3], 104, "AirplaneLandingRedux", 1);
										iLocal_87 = 5;
									}
								}
							}
						}
					}
					break;
				
				case 5:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[3]))
						{
							func_5();
							iLocal_87 = 0;
						}
					}
					break;
			}
			break;
	}
}
auto func_2()
{
	func_3();
	return Global_101154.f_1826.f_539.f_3549;
}
void func_1()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	vVar0 = {1.5f, 1.5f, 1.5f};
	switch (iLocal_322)
	{
		case 0:
			if (Global_1572920 == 8)
			{
				Global_1572920 = -1;
			}
			if (func_63() == 5)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 7;
			}
			else if (func_48(8))
			{
				if ((((func_44(vLocal_339, vVar0) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (iLocal_328 == -1)
					{
						func_39(&iLocal_328, 3, "SA_BED_IN", 0, 0, 0, 0);
					}
					iLocal_322 = 1;
				}
			}
			break;
		
		case 1:
			if (func_38(1, 0, 1))
			{
				if (((((func_44(vLocal_339, vVar0) && func_48(8)) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (func_36(iLocal_328, 1))
					{
						func_34(&iLocal_328);
						func_33();
						Global_1572920 = 8;
						if (func_32("SA_BED_IN"))
						{
							clear_help(1);
						}
						clear_area_of_projectiles(vLocal_339, 3f, 0);
						func_27(player_id(), 0, 256);
						iLocal_36 = 1;
						func_26();
						WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_unarmed"), true);
						func_16(1, 1, 1, 0);
						vLocal_339 = {get_anim_initial_offset_position(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						vVar3 = {get_anim_initial_offset_rotation(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						fLocal_342 = vVar3.z;
						task_go_straight_to_coord(PLAYER::PLAYER_PED_ID(), vLocal_339, 1f, 5000, fLocal_342, 0.05f);
						if (get_follow_ped_cam_view_mode() == 4)
						{
							set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
							force_ped_motion_state(PLAYER::PLAYER_PED_ID(), 1063765679, false, 0, 0);
							set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
						}
						iLocal_322 = 2;
					}
				}
				else
				{
					func_34(&iLocal_328);
					if (func_32("SA_BED_IN"))
					{
						clear_help(1);
					}
					iLocal_322 = 0;
				}
			}
			break;
		
		case 2:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_follow_ped_cam_view_mode() == 4)
			{
				set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
				set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
			}
			if (AI::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 2106541073) != 1)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_330, 4f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 3;
			}
			break;
		
		case 3:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				iLocal_322 = 4;
			}
			break;
		
		case 4:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_synchronized_scene_phase(iLocal_327) > 0.9f)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 5;
			}
			break;
		
		case 5:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				set_synchronized_scene_looped(iLocal_327, true);
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
				iLocal_322 = 6;
			}
			break;
		
		case 6:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (!func_9(1))
			{
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
			}
			else if (func_32("SA_BED_OUT"))
			{
				clear_help(1);
			}
			if (!func_40(player_id()) && is_control_just_pressed(2, 222))
			{
				if (func_32("SA_BED_OUT"))
				{
					clear_help(1);
				}
				func_8();
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 2f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 7:
			if (((is_interior_ready(get_interior_at_coords(vLocal_339)) && !func_7()) && !func_5()) && Global_1312466.f_8 == 0)
			{
				iLocal_324 = true;
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 1000f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 8:
			if (!iLocal_324)
			{
				func_14();
				func_11();
				hide_hud_and_radar_this_frame();
			}
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				func_4(5);
				iLocal_322 = 9;
			}
			break;
		
		case 9:
			func_14();
			hide_hud_and_radar_this_frame();
			func_3(0);
			if (!is_synchronized_scene_running(iLocal_327))
			{
				func_2();
				if (iLocal_36)
				{
					func_27(player_id(), 1, 0);
					iLocal_36 = 0;
				}
				func_16(0, 1, 1, 0);
				iLocal_322 = 0;
				Global_1572920 = -1;
			}
			break;
	}
}